@import url('./style-button.css');
@import url('./university-filled-actions.css');
@import url('./university-classroom-shell.css');
@import url('./university-confirmation.css');
@import url('./university-desktop.css');
@import url('./university-course-history.css');
/* Native Aseprite frames; deliberately no new illustration for the pilot. */
.university-save-error{position:fixed;bottom:12px;left:12px;right:12px;z-index:200;padding:16px;background:#fff5df;color:#582e38;border:2px solid #8f646b;border-radius:12px;font:16px/1.4 system-ui,sans-serif}
.university-save-error[hidden]{display:none!important}
.university-save-error button{margin:4px;padding:8px 12px}
/* Pixel glyphs are Latin-only: Japanese embedded in French prose must use
   the same smooth fallback as lessons, including inside bold explanations. */
@font-face{font-family:UniversityLatin;src:url('/fonts/fusion-pixel/fusion-pixel-12px-proportional-ja.otf.woff2') format('woff2');font-display:swap;unicode-range:U+0000-024F,U+0300-036F,U+1E00-1EFF,U+2000-206F,U+20A0-20CF,U+2100-214F,U+2190-22FF}
/* Native corners are 4×4 source pixels, always rendered at exactly 2×.
   Only the straight edges and center stretch; frame size never rescales a corner. */
html body #university-dialog{--uni-ui-font:UniversityLatin,'Noto Sans JP','Yu Gothic',Meiryo,system-ui,sans-serif;--uni-frame-corner:8px;image-rendering:pixelated}
html body #university-dialog{position:fixed;inset:0;margin:0;width:100%;height:100%;max-width:none;max-height:none;padding:0;border:0;border-radius:0;background:#f0e7fb url('/assets/interface-v2/pastel-ui/background-lilac.png') repeat;color:#46305e;overflow:hidden;font-family:var(--uni-ui-font);box-sizing:border-box}
#university-dialog::backdrop{background:#f0e7fb}
#university-dialog *{box-sizing:border-box}
#university-dialog [hidden]{display:none!important}
#university-dialog button{font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-touch-callout:none;user-select:none}
#university-dialog button:disabled{cursor:default;opacity:.5}
#university-dialog button:focus-visible,#university-dialog input:focus-visible{outline:3px solid #765099;outline-offset:4px}
#university-dialog .uni-shell{height:100%;height:100dvh;display:flex;flex-direction:column;max-width:1040px;margin:auto;padding:max(16px,env(safe-area-inset-top)) 28px max(16px,env(safe-area-inset-bottom));gap:14px}
#university-dialog .uni-header{display:flex;align-items:center;gap:16px;min-height:52px;padding-left:46px;flex-shrink:0}
#university-dialog .uni-heading{flex:1;min-width:0}
#university-dialog .uni-heading p{margin:0;font:17px/1.3 system-ui,sans-serif;color:#745d8a}
#university-dialog h1{font:700 34px/1.05 var(--uni-ui-font);margin:3px 0}
#university-dialog .uni-close{position:fixed;z-index:5;left:var(--pixel-close-left,max(4px,env(safe-area-inset-left)));top:var(--pixel-close-top,max(4px,env(safe-area-inset-top)));width:48px;height:48px;padding:10px;background:none;border:0}
#university-dialog .uni-close img{width:28px;height:28px;image-rendering:pixelated}
#university-dialog .uni-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:10px 8px 18px;scrollbar-width:thin}
#university-dialog .uni-panel,#university-dialog .uni-button{border:0;border-image:url('/assets/interface-v2/pastel-ui/lavender-normal.png') 4 fill stretch;border-image-width:var(--uni-frame-corner);background:none;border-radius:0;color:#493260;box-shadow:none}
#university-dialog .uni-panel{padding:25px}
#university-dialog .uni-panel[data-tone=mint],#university-dialog .uni-button[data-tone=mint]{border-image-source:url('/assets/interface-v2/pastel-ui/mint-normal.png');color:#285f54}
#university-dialog .uni-panel[data-tone=blue],#university-dialog .uni-button[data-tone=blue]{border-image-source:url('/assets/interface-v2/pastel-ui/blue-normal.png');color:#2d587a}
#university-dialog .uni-panel[data-tone=gold],#university-dialog .uni-button[data-tone=gold]{border-image-source:url('/assets/interface-v2/pastel-ui/gold-normal.png');color:#78582d}
#university-dialog .uni-button{min-height:48px;padding:12px 18px;font-size:23px;line-height:1.15}
#university-dialog .uni-button:active{transform:translateY(2px);border-image-source:url('/assets/interface-v2/pastel-ui/lavender-pressed.png')}
#university-dialog .uni-button[aria-pressed=true]{border-image-source:url('/assets/interface-v2/pastel-ui/mint-pressed.png');color:#225747}
#university-dialog .uni-link{font:15px/1.4 system-ui,sans-serif;background:none;border:0;color:#60407e;text-decoration:underline;text-underline-offset:3px;padding:10px}
#university-dialog .uni-hero{display:flex;gap:24px;align-items:center;margin-bottom:20px}
#university-dialog .uni-hero img{width:90px;height:90px;object-fit:contain;image-rendering:pixelated}
#university-dialog h2{font:700 32px/1.15 var(--uni-ui-font);margin:0 0 12px}
#university-dialog h3{font:700 25px/1.2 var(--uni-ui-font);margin:8px 0}
html body #university-dialog :is(h1,h2,h3){color:inherit;text-shadow:none;-webkit-text-stroke:0}
#university-dialog .uni-badge img:is([data-star=completed],[data-star=perfect]){filter:none}
#university-dialog .uni-badge img[data-star=empty]{filter:grayscale(1);opacity:.35}
#university-dialog p{font:17px/1.55 system-ui,sans-serif;margin:10px 0}
html body #university-dialog p{color:inherit}
#university-dialog .uni-kicker{font:700 13px/1.3 system-ui,sans-serif;letter-spacing:.09em;text-transform:uppercase;color:#73538e}
#university-dialog .uni-note{font:13px/1.45 system-ui,sans-serif;color:#735f82;margin:6px 0}
#university-dialog .uni-courses{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
#university-dialog .uni-course{display:flex;flex-direction:column;align-items:start;gap:4px;min-height:270px;padding:23px}
#university-dialog .uni-course>img{width:56px;height:56px;image-rendering:pixelated;object-fit:contain}
#university-dialog .uni-course>p{flex:1;font-size:15px}
#university-dialog .uni-course .uni-button{width:100%;margin-top:8px}
#university-dialog .uni-footer{flex-shrink:0;display:flex;gap:12px;align-items:center;justify-content:space-between;padding:4px 8px}
#university-dialog .uni-footer>.uni-button{min-width:180px}
#university-dialog .uni-progress{width:100%;height:10px;border:2px solid #aa8fb8;background:#e1d4ed;overflow:hidden;margin:9px 0 0}
#university-dialog .uni-progress span{display:block;height:100%;background:#82c9a3;transition:width .2s ease}
#university-dialog .uni-exercise{max-width:760px;margin:0 auto}
#university-dialog .uni-stimulus{text-align:center;padding:22px 14px;margin:16px 0;background:#fff8eb;border:2px solid #d0b9d3}
#university-dialog .uni-jp{font:500 32px/1.65 'Noto Sans JP',sans-serif;word-break:normal;overflow-wrap:anywhere;margin:6px 0;white-space:pre-line}
#university-dialog .uni-romaji{font:17px/1.5 system-ui,sans-serif;color:#75558e;margin:5px 0}
#university-dialog .uni-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}
#university-dialog .uni-option-row{display:flex;align-items:stretch;gap:4px}
#university-dialog .uni-option-row>.uni-button{flex:1;min-width:0}
#university-dialog .uni-option-row .uni-listen-small{flex:0 0 48px;min-width:48px;padding:8px}
#university-dialog .uni-button img{width:24px;height:24px;vertical-align:middle;object-fit:contain;image-rendering:pixelated;margin-right:8px}
#university-dialog .uni-button small{display:block;font:14px/1.5 system-ui,sans-serif}
#university-dialog .uni-answer-label{display:block;font:15px/1.4 system-ui,sans-serif;margin:12px 0 6px}
#university-dialog .uni-answer{font:24px/1.4 system-ui,sans-serif;border:3px solid #af94c4;background:#fffdf7;color:#342c43;border-radius:0;width:100%;padding:11px 14px;min-height:54px;box-shadow:none}
#university-dialog .uni-answer[lang=ja]{font-family:'Noto Sans JP',system-ui,sans-serif}
#university-dialog .uni-feedback{padding:18px;margin:18px 0;border:2px solid #91b5a1;background:#d9f3e7}
#university-dialog .uni-feedback[data-correct=false]{border-color:#c6a76b;background:#fff0d0}
#university-dialog .uni-feedback p{margin:6px 0}
#university-dialog .uni-feedback .uni-jp{font-size:24px}
#university-dialog .uni-pairs{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}
#university-dialog .uni-pair-column{display:flex;flex-direction:column;gap:12px;min-width:0}
#university-dialog .uni-pair-column button{min-height:70px;font-size:19px;overflow-wrap:anywhere}
#university-dialog .uni-pair-column button[data-locked=true]{opacity:.65}
#university-dialog .uni-gaps{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:20px 0}
#university-dialog .uni-gap{min-width:40px;padding:10px;min-height:48px}
#university-dialog .uni-chunk{text-align:center;font:23px/1.5 'Noto Sans JP',sans-serif}
#university-dialog .uni-chunk small{display:block;font:12px/1.3 system-ui,sans-serif;max-width:115px}
#university-dialog .uni-alert{font:14px/1.4 system-ui,sans-serif;color:#854620;min-height:0;margin:0 8px}
#university-dialog .uni-alert:empty{display:none}
#university-dialog:not([data-screen=exercise]) .uni-shell:has(.uni-response:empty){gap:8px}
#university-dialog .uni-help{border:2px solid #bd9ac9;background:#fff7eb;padding:16px;margin:14px 0}
html body #university-dialog .uni-exit-dialog{position:fixed;inset:0;width:min(460px,calc(100% - 32px));height:fit-content;min-height:0;max-width:none;max-height:calc(100dvh - 32px);margin:auto;padding:0;border:0;border-radius:0;background:transparent;color:inherit;overflow:auto;font-family:inherit}
#university-dialog .uni-exit-dialog::backdrop{background:#30233f88}
#university-dialog .uni-exit-dialog[open]{animation:uni-pop 320ms ease-out both;transform-origin:center}
#university-dialog .uni-exit-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px}
#university-dialog .uni-exit-actions>button{flex:1;min-width:0}
html body #university-dialog .uni-exit-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
html body #university-dialog .uni-exit-actions>.uni-button{padding:12px 4px;font-size:clamp(18px,5vw,24px)}
html body #university-dialog .uni-exit-actions>.uni-button[data-tone=pink]{border-image-source:url('/assets/university-ui-v02/pink-normal.png')}
html body #university-dialog .uni-exit-actions>.uni-button[data-tone=pink]:hover{border-image-source:url('/assets/university-ui-v02/pink-hover.png')}
html body #university-dialog .uni-exit-actions>.uni-button[data-tone=pink]:active{border-image-source:url('/assets/university-ui-v02/pink-pressed.png')}
html body #university-dialog .uni-exit-actions>.uni-button[data-tone=mint]{border-image-source:url('/assets/university-ui-v02/mint-normal.png')}
html body #university-dialog .uni-exit-actions>.uni-button[data-tone=mint]:hover{border-image-source:url('/assets/university-ui-v02/mint-hover.png')}
html body #university-dialog .uni-exit-actions>.uni-button[data-tone=mint]:active{border-image-source:url('/assets/university-ui-v02/mint-pressed.png')}
#university-dialog .uni-results{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:20px 0}
#university-dialog .uni-metric{text-align:center;padding:16px;background:#fff9ed;border:2px solid #cbb7d5}
#university-dialog .uni-metric strong{display:block;font:700 34px/1.2 var(--uni-ui-font)}
#university-dialog .uni-metric span{font:13px/1.4 system-ui,sans-serif}
#university-dialog .uni-badge{display:inline-flex;gap:6px;align-items:center;font:14px/1.3 system-ui,sans-serif}
#university-dialog .uni-badge img{width:24px;height:24px;image-rendering:pixelated}
#university-dialog .uni-pop{animation:uni-pop 320ms ease-out both;transform-origin:center}
#university-dialog .uni-audio{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:center;margin:16px 0}
#university-dialog .uni-audio-note{font:13px/1.4 system-ui,sans-serif}
#university-dialog .uni-keyboard-slot{flex-shrink:0}
#university-dialog .uni-response{flex-shrink:0;width:100%;max-width:760px;margin:0 auto;padding:0 8px}
#university-dialog .uni-response:empty{display:none}
#university-dialog .uni-keyboard-slot:empty{display:block;min-height:1px}
#university-dialog .pixel-keyboard.is-docked{position:relative;inset:auto;width:100%;margin:0;max-width:none}
#university-dialog .uni-library-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:18px 0}
#university-dialog .uni-card-choice{display:flex;align-items:center;gap:10px;font:16px/1.5 system-ui,sans-serif;margin:12px 0}
#university-dialog .uni-card-choice input{width:22px;height:22px;accent-color:#547a67;flex-shrink:0}
@keyframes uni-pop{0%{transform:scale(.82)}40%{transform:scale(1.045)}72%{transform:scale(.985)}100%{transform:scale(1)}}
@media(max-width:700px){#university-dialog .uni-shell{padding:10px 10px max(8px,env(safe-area-inset-bottom));gap:6px}#university-dialog .uni-header{gap:7px;min-height:44px;padding-left:43px}#university-dialog h1{font-size:26px}#university-dialog .uni-heading p{font-size:12px}#university-dialog .uni-header>.uni-note{display:none}#university-dialog .uni-courses{grid-template-columns:1fr;gap:14px}#university-dialog .uni-course{min-height:0;padding:20px;display:grid;grid-template-columns:48px 1fr;gap:2px 12px}#university-dialog .uni-course>img{width:44px;height:44px;grid-row:1/4}#university-dialog .uni-course>p{margin:2px 0}#university-dialog .uni-course .uni-button{grid-column:1/-1}#university-dialog .uni-course .uni-badge{grid-column:2}#university-dialog .uni-panel{padding:18px}#university-dialog .uni-hero{gap:12px;margin-bottom:14px}#university-dialog .uni-hero img{width:58px;height:58px}#university-dialog h2{font-size:27px}#university-dialog p{font-size:15px}#university-dialog .uni-button{font-size:20px;padding:12px;min-height:46px}#university-dialog .uni-footer>.uni-button{min-width:136px}#university-dialog .uni-footer{gap:6px;padding:3px}#university-dialog .uni-jp{font-size:26px}#university-dialog .uni-stimulus{padding:12px 8px;margin:12px 0}#university-dialog .uni-options{gap:8px;margin:12px 0}#university-dialog .uni-answer{min-height:48px;font-size:21px;padding:8px 10px}#university-dialog .uni-scroll{padding:7px 5px 12px}#university-dialog .uni-results{gap:7px}#university-dialog .uni-metric{padding:10px 4px}#university-dialog .uni-metric strong{font-size:28px}}
@media(max-height:500px) and (orientation:landscape){#university-dialog .uni-shell{max-width:100%;padding:5px 18px;gap:3px}#university-dialog .uni-header{min-height:35px}#university-dialog h1{font-size:24px}#university-dialog .uni-heading p{display:none}#university-dialog .uni-progress{margin:3px 0;height:7px}#university-dialog .uni-footer>.uni-button{min-height:40px;padding:8px}#university-dialog .uni-stimulus{margin:6px 0;padding:5px}#university-dialog .uni-jp{font-size:23px}#university-dialog .uni-exercise h2{font-size:24px}#university-dialog .uni-shell:has(.pixel-keyboard:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,43%);grid-template-rows:auto 1fr auto;gap:5px 14px}#university-dialog .uni-header{grid-column:1/-1}#university-dialog .uni-scroll{grid-column:1;grid-row:2/4}#university-dialog .uni-keyboard-slot{grid-column:2;grid-row:2;align-self:end}#university-dialog .uni-footer{grid-column:2;grid-row:3}#university-dialog .uni-alert:not(:empty){position:absolute;bottom:0;left:20px;background:#fff7eb}#university-dialog .uni-courses{gap:12px}#university-dialog .uni-course{min-height:190px}}
@media(prefers-reduced-motion:reduce){#university-dialog *,#university-dialog *::before{animation:none!important;transition:none!important}}
@media(min-width:701px) and (max-height:800px){
 #university-dialog[data-screen=home] .uni-hero{padding:18px;margin-bottom:10px}
 #university-dialog[data-screen=home] .uni-hero img{width:68px;height:68px}
 #university-dialog[data-screen=home] .uni-hero p{margin:5px 0}
 #university-dialog[data-screen=home] .uni-library-row{margin:10px 0}
 #university-dialog[data-screen=home] .uni-course{padding:18px;min-height:245px}
 #university-dialog[data-screen=home] .uni-course>img{width:44px;height:44px}
}
@media(max-height:700px) and (orientation:portrait){
 #university-dialog .uni-shell:has(.pixel-keyboard:not([hidden])){gap:3px;padding-top:5px}
 #university-dialog:has(.pixel-keyboard:not([hidden])) .uni-heading>p{display:none}
 #university-dialog:has(.pixel-keyboard:not([hidden])) .uni-header{min-height:40px}
 #university-dialog:has(.pixel-keyboard:not([hidden])) .uni-progress{margin-top:4px;height:7px}
 #university-dialog:has(.pixel-keyboard:not([hidden])) .uni-keyboard-slot{height:224px}
 #university-dialog:has(.pixel-keyboard:not([hidden])) .pixel-keyboard{--key-size:30px}
 #university-dialog:has(.pixel-keyboard:not([hidden])) .uni-answer-label{font-size:12px;margin:3px 0}
 #university-dialog:has(.pixel-keyboard:not([hidden])) .uni-answer{min-height:42px;padding:5px 8px}
 #university-dialog:has(.pixel-keyboard:not([hidden])) .uni-exercise h2{font-size:22px;margin-bottom:6px}
 #university-dialog:has(.pixel-keyboard:not([hidden])) .uni-kicker{margin:3px 0}
 #university-dialog:has(.pixel-keyboard:not([hidden])) .uni-footer>.uni-button{min-height:42px;padding:8px}
}
@media(max-height:500px) and (orientation:landscape){#university-dialog .uni-shell:has(.pixel-keyboard:not([hidden])){grid-template-rows:auto auto 1fr auto}#university-dialog .uni-scroll{grid-row:2/5}#university-dialog .uni-response{grid-column:2;grid-row:2;padding:0}#university-dialog .uni-response label{font-size:12px;margin:0 0 3px}#university-dialog .uni-response input{min-height:36px;font-size:18px;padding:4px 8px}#university-dialog .uni-keyboard-slot{grid-row:3}#university-dialog .uni-footer{grid-row:4}}
/* R1: the same response surface stays in place through correction. */
#university-dialog{--uni-jp-size:28px}
#university-dialog .uni-jp,#university-dialog .uni-feedback .uni-jp{font:500 var(--uni-jp-size)/1.5 'Noto Sans JP','Yu Gothic',sans-serif;margin:3px 0}
#university-dialog .uni-button:disabled{opacity:.8}
#university-dialog .uni-options .uni-button:disabled,#university-dialog .uni-composition .uni-button:disabled{opacity:1}
#university-dialog .uni-pair-column button{position:relative;height:96px;min-height:96px;max-height:96px;padding:12px 24px 12px 12px;font-size:20px}
#university-dialog .uni-pair-column button:disabled{opacity:1}
#university-dialog .uni-button[data-selected=true],#university-dialog .uni-button[data-editing=true]{outline:3px dashed currentColor;outline-offset:2px}
#university-dialog .uni-pair-number{position:absolute;right:7px;top:6px;font:700 15px/1 system-ui,sans-serif;border:1px solid currentColor;padding:2px 4px;min-width:20px;text-align:center}
#university-dialog .uni-teacher{display:flex;align-items:center;gap:16px;margin:16px 0}
#university-dialog .uni-teacher>img{width:48px;height:48px;object-fit:contain;image-rendering:pixelated;flex-shrink:0}
#university-dialog .uni-teacher-bubble{position:relative;inset:auto;transform:none;max-width:none;width:auto;margin:0;opacity:1;visibility:visible;font:17px/1.55 system-ui,sans-serif;color:#191722;background:#fff9f2;border:4px solid #796580;padding:12px 18px;box-shadow:none;pointer-events:auto}
#university-dialog .uni-teacher-bubble::after{display:none}
#university-dialog .uni-segment-example{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#university-dialog .uni-example-token{padding:8px 4px;border:2px solid transparent;border-image:url('/assets/interface-v2/pastel-ui/lavender-normal.png') 4 fill / var(--uni-frame-corner)}
#university-dialog .uni-example-token[data-tone=mint]{border-image-source:url('/assets/interface-v2/pastel-ui/mint-normal.png')}
#university-dialog .uni-example-token[data-tone=blue]{border-image-source:url('/assets/interface-v2/pastel-ui/blue-normal.png')}
#university-dialog .uni-example-token[data-tone=gold]{border-image-source:url('/assets/interface-v2/pastel-ui/gold-normal.png')}
#university-dialog .uni-example-token[data-highlight=true]{outline:3px dashed currentColor;outline-offset:2px}
#university-dialog .uni-example-token>span{display:block}
#university-dialog .uni-example-token small{font:12px/1.4 system-ui,sans-serif}
#university-dialog .uni-lexicon{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#university-dialog .uni-composition,#university-dialog .uni-word-bank,#university-dialog .uni-role-reserve{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;margin:16px 0}
#university-dialog .uni-composition{min-height:112px;padding:12px;border:2px dashed #aa8fb8;background:#fff9f2}
#university-dialog .uni-composed{display:flex;flex-direction:column;align-items:center;min-width:0;max-width:100%}
#university-dialog .uni-composed .uni-button{max-width:100%}
#university-dialog .uni-profiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin:14px 0}
#university-dialog .uni-profiles .uni-button{min-height:105px;display:flex;flex-direction:column;justify-content:center;gap:12px}
#university-dialog .uni-role{font:17px/1.4 system-ui,sans-serif}
#university-dialog .uni-role-reserve>p{width:100%;text-align:center;margin:0}
#university-dialog .uni-frozen-answer{padding:12px;border:2px solid #af94c4;background:#fffdf7;overflow-wrap:anywhere;margin:12px 0}
#university-dialog .uni-correct-pair{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:6px 12px;margin:12px 0}
#university-dialog .uni-correct-pair .uni-romaji{grid-column:1;grid-row:2;margin:0}
#university-dialog .uni-correct-pair p{grid-column:2;grid-row:1/3}
#university-dialog .uni-feedback summary{cursor:pointer;font:600 16px/1.5 system-ui,sans-serif;margin-top:12px}
#university-dialog .uni-feedback>.uni-button{margin-top:12px}
#university-dialog .uni-transcript{margin:12px 0;padding-bottom:8px;border-bottom:1px solid #b4c6ba}
#university-dialog .uni-response:has([data-action=add-segment]){display:grid;grid-template-columns:1fr auto;gap:5px 8px}
#university-dialog .uni-response:has([data-action=add-segment]) label{grid-column:1/-1}
#university-dialog .uni-response:has([data-action=add-segment]) input{min-width:0}
#university-dialog[data-course=B01-J01-CO1] .uni-audio{margin:10px 0}
#university-dialog[data-course=B01-J01-CO1] .uni-options{margin:10px 0}
@media(max-width:700px){#university-dialog{--uni-jp-size:23px}#university-dialog .uni-pairs{gap:10px}#university-dialog .uni-pair-column button{height:86px;min-height:86px;max-height:86px;font-size:17px}#university-dialog .uni-teacher{gap:8px}#university-dialog .uni-teacher>img{width:32px;height:32px}#university-dialog .uni-teacher-bubble{font-size:15px;padding:10px}#university-dialog .uni-segment-example{gap:6px}#university-dialog .uni-example-token{padding:8px 2px}#university-dialog .uni-example-token .uni-jp{font-size:21px}#university-dialog .uni-example-token .uni-romaji{font-size:12px}#university-dialog .uni-example-token small{font-size:10px}#university-dialog .uni-composition,#university-dialog .uni-word-bank{gap:7px;margin:10px 0}}
@media(max-height:500px) and (orientation:landscape){#university-dialog{--uni-jp-size:23px}#university-dialog .uni-response:has([data-action=add-segment]) .uni-button{padding:6px;font-size:18px;min-height:36px}}
#university-dialog .uni-course{cursor:pointer}

/* University V02. Native shared frames exported from the owner's retouched source. */
html body #university-dialog{overflow:auto}
html body #university-dialog.has-pixel-keyboard[data-screen]{padding:0}
#university-dialog .uni-panel,#university-dialog .uni-button{border-image-source:url('/assets/university-ui-v02/lavender-normal.png');image-rendering:pixelated}
#university-dialog .uni-panel[data-tone=mint],#university-dialog .uni-button[data-tone=mint]{border-image-source:url('/assets/university-ui-v02/mint-normal.png')}
#university-dialog .uni-panel[data-tone=blue],#university-dialog .uni-button[data-tone=blue]{border-image-source:url('/assets/university-ui-v02/blue-normal.png')}
#university-dialog .uni-panel[data-tone=gold],#university-dialog .uni-button[data-tone=gold]{border-image-source:url('/assets/university-ui-v02/gold-normal.png')}
#university-dialog .uni-button:hover:not(:disabled){border-image-source:url('/assets/university-ui-v02/lavender-hover.png')}
#university-dialog .uni-button:active:not(:disabled){border-image-source:url('/assets/university-ui-v02/lavender-pressed.png');transform:none}
#university-dialog .uni-button[data-tone=mint]:hover:not(:disabled){border-image-source:url('/assets/university-ui-v02/mint-hover.png')}
#university-dialog .uni-button[data-tone=mint]:active:not(:disabled),#university-dialog .uni-button[aria-pressed=true]{border-image-source:url('/assets/university-ui-v02/mint-pressed.png')}
#university-dialog .uni-button[data-result=correct]{border-image-source:url('/assets/university-ui-v02/mint-normal.png');color:#285f54}
#university-dialog .uni-button[data-result=wrong]{border-image-source:url('/assets/university-ui-v02/pink-normal.png');color:#843e49}
#university-dialog .uni-choice-mark{position:absolute;right:10px;top:8px;font:700 20px/1 system-ui,sans-serif}
#university-dialog .uni-option-row .uni-button{position:relative}
#university-dialog .uni-stimulus{border:8px solid transparent;border-image:url('/assets/university-ui-v02/paper-normal.png') 4 stretch;border-image-width:var(--uni-frame-corner);background:#fff9ed;background-clip:padding-box;image-rendering:pixelated}
#university-dialog .uni-footer{justify-content:flex-end}
#university-dialog[data-screen=home] .uni-footer{justify-content:space-between}
#university-dialog .uni-item-count{font:20px/1.1 var(--uni-ui-font);margin:5px 0 0;color:#745d8a}

/* The exercise is laid out in the available viewport, not clipped to fake a fit. */
#university-dialog[data-screen=exercise] .uni-shell{max-width:1100px;gap:10px;padding:14px 24px max(10px,env(safe-area-inset-bottom));--uni-keyboard-height:clamp(190px,28dvh,286px)}
#university-dialog[data-screen=exercise] .uni-header{min-height:0;align-items:start}
#university-dialog[data-screen=exercise] .uni-header>.uni-note{display:none}
#university-dialog[data-screen=exercise] .uni-heading>p:not(.uni-item-count){font-size:14px}
#university-dialog[data-screen=exercise] h1{font-size:30px}
#university-dialog[data-screen=exercise] .uni-progress{height:12px;margin-top:6px}
#university-dialog[data-screen=exercise] .uni-scroll{overflow:visible;padding:4px 0;display:flex;flex-direction:column}
#university-dialog[data-screen=exercise] .uni-exercise{width:100%;max-width:940px;flex:1;min-height:0;display:flex;flex-direction:column;gap:14px}
#university-dialog .uni-question,#university-dialog .uni-answers{min-width:0}
#university-dialog[data-screen=exercise] .uni-question h2{font-size:clamp(23px,3.1vw,32px);margin:0 0 12px}
#university-dialog[data-screen=exercise] .uni-stimulus{padding:clamp(14px,3dvh,32px) 18px;margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}
#university-dialog[data-screen=exercise][data-input=choice] .uni-stimulus>.uni-jp{font-size:clamp(30px,5vw,54px);line-height:1.45}
#university-dialog[data-screen=exercise][data-input=choice] .uni-stimulus{min-height:clamp(170px,27dvh,260px)}
#university-dialog[data-screen=exercise] .uni-stimulus>.uni-romaji{font-size:19px;margin:0}
#university-dialog[data-screen=exercise] .uni-stimulus>.uni-button{margin-top:6px}
#university-dialog[data-screen=exercise] .uni-options{gap:12px;margin:0}
#university-dialog[data-screen=exercise] .uni-option-row>.uni-button{min-height:68px;font-size:22px;padding:14px 22px;white-space:normal;overflow-wrap:anywhere}
#university-dialog[data-screen=exercise] .uni-note{margin:5px 0;font-size:13px;line-height:1.35}
#university-dialog[data-screen=exercise] .uni-footer{min-height:50px;padding:0}
#university-dialog[data-screen=exercise] .uni-footer>[data-action=skip]{margin-right:auto}
#university-dialog[data-screen=exercise] .uni-footer>.uni-button{min-width:200px}
#university-dialog[data-screen=exercise][data-locked=true] .uni-footer{pointer-events:none}
#university-dialog[data-screen=exercise] .uni-response{max-width:940px;padding:0}
#university-dialog[data-screen=exercise] .uni-response .uni-answer-label{margin:0 0 4px;font:14px/1.3 system-ui,sans-serif}
#university-dialog .uni-response:has([data-action=add-segment]) .uni-answer-label{grid-column:1/-1}
#university-dialog .uni-response:has([data-action=add-segment]) .uni-frozen-answer{min-width:0}
#university-dialog[data-screen=exercise] .uni-answer,#university-dialog[data-screen=exercise] .uni-frozen-answer{margin:0;min-height:48px;height:48px;padding:7px 12px;font-size:22px;line-height:1.3;border:3px solid #af94c4}
#university-dialog[data-screen=exercise] .uni-frozen-answer[lang=ja]{font-family:'Noto Sans JP','Yu Gothic',sans-serif}
#university-dialog[data-screen=exercise] .uni-keyboard-slot{height:0;min-height:0}
#university-dialog[data-screen=exercise][data-typing=true] .uni-keyboard-slot{height:var(--uni-keyboard-height)}
#university-dialog[data-screen=exercise] .pixel-keyboard{--key-size:30px}
#university-dialog[data-screen=exercise] .uni-pairs{margin:0;gap:14px}
#university-dialog[data-screen=exercise] .uni-pair-column{gap:10px}
#university-dialog[data-screen=exercise] .uni-pair-column button{height:clamp(55px,9dvh,82px);min-height:0;max-height:none;font-size:18px;padding:8px 26px 8px 10px}
#university-dialog[data-screen=exercise] .uni-composition{min-height:74px;margin:0 0 10px;padding:8px}
#university-dialog[data-screen=exercise] .uni-word-bank,#university-dialog[data-screen=exercise] .uni-role-reserve{gap:8px;margin:8px 0}
#university-dialog[data-screen=exercise] .uni-profiles{margin:10px 0;gap:10px;grid-template-columns:repeat(3,minmax(0,1fr))}
#university-dialog[data-screen=exercise] .uni-profiles .uni-button{min-height:88px;padding:10px 6px;gap:6px}
#university-dialog[data-screen=exercise] .uni-audio{margin:10px 0}
#university-dialog .uni-composed:has(.uni-remove-segment){position:relative;padding-right:24px}
#university-dialog .uni-remove-segment{position:absolute;right:0;top:0;width:24px;height:28px;min-height:28px;padding:0;font:22px/1 system-ui,sans-serif}
#university-dialog[data-screen=exercise] .uni-heading>p.uni-item-count{display:block}

/* A continuous full-width sheet, outside layout flow. Only long explanation
   content scrolls internally; both equal-sized actions always remain at its foot. */
#university-dialog .uni-result-sheet{position:fixed;z-index:4;left:0;right:0;bottom:0;margin:0;max-height:calc(100dvh - 68px);background:#d3f3e3;border-top:0;animation:uni-result-rise 240ms cubic-bezier(.2,.7,.2,1) both;color:#342342;padding:18px max(18px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-right));display:flex;flex-direction:column}
#university-dialog .uni-result-sheet::before{content:none}
#university-dialog .uni-result-sheet[data-correct=false]{background:#f8d7d5;border-color:#c98787}
#university-dialog .uni-result-sheet[data-correct=false]::before{border-color:#c98787}
#university-dialog .uni-sheet-inner{width:100%;max-width:780px;margin:0 auto;display:flex;flex-direction:column;min-height:0;gap:14px}
#university-dialog .uni-sheet-content{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
#university-dialog .uni-sheet-content::-webkit-scrollbar{display:none}
#university-dialog .uni-sheet-title{font:700 clamp(26px,3.5vw,34px)/1.2 var(--uni-ui-font);margin:0;display:flex;gap:12px;align-items:center}
#university-dialog .uni-result-icon{font:700 30px/1 system-ui,sans-serif;color:#258666}
#university-dialog [data-correct=false] .uni-result-icon{color:#b74f58}
#university-dialog .uni-sheet-correction{margin-top:9px}
#university-dialog .uni-sheet-correction p{margin:3px 0;line-height:1.35}
#university-dialog .uni-sheet-correction .uni-correction-label{font-size:15px}
#university-dialog .uni-correction-answer{font:600 21px/1.4 'Noto Sans JP',system-ui,sans-serif;white-space:pre-line}
#university-dialog .uni-sheet-actions{display:grid;grid-template-columns:1fr;gap:9px;flex-shrink:0}
#university-dialog .uni-sheet-actions>.uni-button{width:100%;height:52px;min-height:52px;margin:0;padding:10px 14px;font-size:25px;line-height:1.15;color:#392947}
#university-dialog .uni-sheet-explanation{margin-top:14px;padding-top:8px;border-top:1px solid #49326040}
#university-dialog .uni-sheet-explanation p{font-size:16px;line-height:1.45}
#university-dialog .uni-sheet-explanation .uni-jp{font-size:23px}
#university-dialog .uni-sheet-explanation .uni-stimulus{padding:12px;margin:10px 0}
#university-dialog .uni-sheet-extra .uni-button{min-height:38px;font-size:17px;margin-top:9px;padding:8px 12px}
#university-dialog .uni-sheet-extra:empty{display:none}
@keyframes uni-result-rise{from{transform:translateY(100%)}to{transform:translateY(0)}}

@media(max-width:700px){
 #university-dialog[data-screen=exercise] .uni-shell{padding:max(8px,env(safe-area-inset-top)) 16px max(8px,env(safe-area-inset-bottom));gap:8px;--uni-keyboard-height:clamp(180px,28dvh,260px)}
 #university-dialog[data-screen=exercise] .uni-header{padding-left:40px}
 #university-dialog[data-screen=exercise] h1{font-size:27px}
 #university-dialog[data-screen=exercise] .uni-heading>p:not(.uni-item-count){font-size:12px}
 #university-dialog .uni-item-count{font-size:17px;margin-top:4px}
 #university-dialog[data-screen=exercise] .uni-exercise{gap:10px}
 #university-dialog[data-screen=exercise] .uni-question h2{font-size:25px;line-height:1.12;margin-bottom:10px}
 #university-dialog[data-screen=exercise] .uni-options{gap:9px}
 #university-dialog[data-screen=exercise] .uni-option-row>.uni-button{min-height:62px;font-size:19px;padding:12px}
 #university-dialog[data-screen=exercise] .uni-stimulus{padding:20px 12px}
 #university-dialog[data-screen=exercise][data-input=choice] .uni-stimulus>.uni-jp{font-size:36px}
 #university-dialog[data-screen=exercise] .uni-stimulus>.uni-romaji{font-size:17px}
 #university-dialog[data-screen=exercise] .uni-footer{min-height:46px}
 #university-dialog[data-screen=exercise] .uni-footer>.uni-button{min-width:148px;max-width:65%;font-size:20px;padding:10px}
 #university-dialog[data-screen=exercise] .uni-answers .uni-jp{font-size:23px}
 #university-dialog[data-screen=exercise] .uni-button small{font-size:12px}
 #university-dialog .uni-result-sheet{padding:15px 16px max(10px,env(safe-area-inset-bottom))}
 #university-dialog .uni-sheet-inner{gap:12px}
 #university-dialog .uni-sheet-title{font-size:28px}
 #university-dialog .uni-sheet-actions>.uni-button{height:48px;min-height:48px;font-size:23px}
 #university-dialog .uni-correction-answer{font-size:19px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-question h2{font-size:21px;margin-bottom:6px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-stimulus{padding:9px 10px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-options .uni-button{min-height:52px;padding:6px 8px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-note{font-size:12px;line-height:1.25}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-word-bank .uni-button{min-height:44px;padding:5px 9px}
}
@media(max-height:720px) and (orientation:portrait){
 #university-dialog[data-screen=exercise] .uni-shell{gap:5px;--uni-keyboard-height:182px}
 #university-dialog[data-screen=exercise] h1{font-size:24px}
 #university-dialog[data-screen=exercise] .uni-heading>p:not(.uni-item-count){display:block;font-size:11px}
 #university-dialog[data-screen=exercise] .uni-progress{height:8px;margin-top:4px}
 #university-dialog[data-screen=exercise] .uni-stimulus{padding:12px 8px}
 #university-dialog[data-screen=exercise] .uni-question h2{font-size:22px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-exercise{gap:5px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-question h2{font-size:19px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-jp{font-size:21px;line-height:1.3}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-stimulus p{font-size:13px;line-height:1.3;margin:2px 0}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-composition{min-height:56px;padding:5px;margin-bottom:5px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-word-bank{margin:4px 0;gap:5px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-note{margin:2px 0}
 #university-dialog[data-screen=exercise] .uni-response:has([data-action=add-segment]) .uni-button{font-size:16px;min-height:40px;padding:6px 10px}
 #university-dialog[data-screen=exercise] .uni-response .uni-answer-label{font-size:12px}
 #university-dialog[data-screen=exercise] .uni-answer,#university-dialog[data-screen=exercise] .uni-frozen-answer{min-height:40px;height:40px;padding:5px 10px;font-size:20px}
}
@media(orientation:landscape) and (max-height:550px){
 #university-dialog[data-screen=exercise] .uni-shell{max-width:none;padding:6px 18px max(6px,env(safe-area-inset-bottom));gap:5px;--uni-keyboard-height:clamp(164px,51dvh,218px);display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,43%);grid-template-rows:auto minmax(0,1fr) auto}
 #university-dialog[data-screen=exercise] .uni-header{grid-column:1/-1;min-height:0}
 #university-dialog[data-screen=exercise] h1{font-size:23px}
 #university-dialog[data-screen=exercise] .uni-heading{display:grid;grid-template-columns:auto minmax(80px,1fr) auto;gap:12px;align-items:center}
 #university-dialog[data-screen=exercise] .uni-heading>p:not(.uni-item-count){display:none}
 #university-dialog[data-screen=exercise] .uni-item-count{margin:0;display:block}
 #university-dialog[data-screen=exercise] .uni-progress{margin:0;height:9px}
 #university-dialog[data-screen=exercise] .uni-scroll{grid-column:1/-1;grid-row:2;padding:0}
 #university-dialog[data-screen=exercise] .uni-exercise{max-width:none;display:grid;grid-template-columns:1fr 1fr;gap:18px;align-content:start;align-items:start}
 #university-dialog[data-screen=exercise] .uni-question h2{font-size:21px;margin-bottom:8px}
 #university-dialog[data-screen=exercise] .uni-stimulus{padding:10px}
 #university-dialog[data-screen=exercise][data-input=choice] .uni-stimulus>.uni-jp{font-size:32px}
 #university-dialog[data-screen=exercise][data-presentation=sentence][data-input=choice] .uni-stimulus>.uni-jp{font-size:25px;line-height:1.3}
 #university-dialog[data-screen=exercise][data-presentation=sentence] .uni-stimulus>.uni-romaji{font-size:15px}
 #university-dialog[data-screen=exercise][data-input=choice] .uni-stimulus{min-height:0}
 #university-dialog[data-screen=exercise] .uni-options .uni-button{min-height:58px;padding:8px;font-size:19px}
 #university-dialog[data-screen=exercise] .uni-footer{grid-column:2;grid-row:3;min-height:40px}
 #university-dialog[data-screen=exercise] .uni-footer>.uni-button{min-height:40px;min-width:120px;padding:7px;font-size:20px}
 #university-dialog[data-screen=exercise] .uni-keyboard-slot{grid-column:2;grid-row:2}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-shell{grid-template-rows:auto auto minmax(0,1fr) auto}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-scroll{grid-column:1;grid-row:2/5}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-exercise{display:flex;gap:5px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-response{grid-column:2;grid-row:2}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-keyboard-slot{grid-column:2;grid-row:3;align-self:end}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-footer{grid-column:2;grid-row:4}
 #university-dialog[data-screen=exercise] .uni-response .uni-answer-label{font-size:11px}
 #university-dialog[data-screen=exercise] .uni-answer,#university-dialog[data-screen=exercise] .uni-frozen-answer{min-height:34px;height:34px;padding:3px 8px;font-size:20px}
 #university-dialog[data-screen=exercise] .uni-pair-column{gap:5px}
 #university-dialog[data-screen=exercise] .uni-pair-column button{height:49px;font-size:15px;padding:4px 22px 4px 8px}
 #university-dialog[data-screen=exercise] .uni-pair-column .uni-jp{font-size:20px;line-height:1.1}
 #university-dialog[data-screen=exercise] .uni-pair-column small{font-size:11px;line-height:1.1}
 #university-dialog[data-screen=exercise] .uni-composition{min-height:58px;padding:5px;margin-bottom:5px}
 #university-dialog[data-screen=exercise] .uni-word-bank{gap:6px;margin:4px 0}
 #university-dialog[data-screen=exercise] .uni-word-bank .uni-button{min-height:40px;padding:4px 8px}
 #university-dialog[data-screen=exercise] .uni-profiles .uni-button{min-height:70px;font-size:18px}
 #university-dialog .uni-result-sheet{padding:10px 18px max(7px,env(safe-area-inset-bottom));max-height:calc(100dvh - 49px)}
 #university-dialog .uni-sheet-inner{max-width:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:18px}
 #university-dialog .uni-sheet-title{font-size:25px}
 #university-dialog .uni-sheet-actions{gap:6px}
 #university-dialog .uni-sheet-actions{align-self:end}
 #university-dialog .uni-sheet-actions>.uni-button{height:42px;min-height:42px;padding:6px 12px;font-size:22px}
 #university-dialog .uni-sheet-correction{margin-top:5px}
 #university-dialog .uni-correction-answer{font-size:17px}
}
@media(prefers-reduced-motion:reduce){#university-dialog .uni-result-sheet{animation:none}}

/* Reference proportions (V02): 26% question card, 16% answer grid,
   30% success sheet / 35% error sheet. These are content budgets, not clipping.
   Dense typing exercises keep their own smaller question budget. */
@media(min-height:551px){
 #university-dialog[data-screen=exercise] .uni-shell{max-width:none;padding:clamp(14px,2.3dvh,28px) clamp(16px,4.5vw,72px) max(12px,env(safe-area-inset-bottom));gap:clamp(10px,1.6dvh,20px)}
 #university-dialog[data-screen=exercise] h1{font-size:clamp(26px,3.3dvh,40px);margin:1px 0}
 #university-dialog[data-screen=exercise] .uni-heading>p:not(.uni-item-count){font-size:clamp(12px,1.6dvh,18px)}
 #university-dialog[data-screen=exercise] .uni-item-count{font-size:clamp(17px,2.1dvh,24px);line-height:1.1}
 #university-dialog[data-screen=exercise] .uni-exercise{max-width:none;gap:clamp(10px,1.5dvh,20px)}
 #university-dialog[data-screen=exercise] .uni-question h2{font-size:clamp(24px,3.5dvh,40px);line-height:1.14;margin-bottom:clamp(12px,1.8dvh,22px)}
 #university-dialog[data-screen=exercise][data-input=choice] .uni-stimulus{min-height:26dvh;gap:clamp(5px,1dvh,12px);padding:clamp(12px,2dvh,24px)}
 #university-dialog[data-screen=exercise][data-input=choice] .uni-stimulus>.uni-jp{font-size:clamp(36px,5.7dvh,68px);line-height:1.3}
 #university-dialog[data-screen=exercise][data-presentation=sentence][data-input=choice] .uni-stimulus{min-height:20dvh}
 #university-dialog[data-screen=exercise][data-presentation=sentence][data-input=choice] .uni-stimulus>.uni-jp{font-size:clamp(26px,4.2dvh,46px)}
 #university-dialog[data-screen=exercise][data-presentation=sentence] .uni-stimulus>.uni-romaji{font-size:clamp(15px,1.9dvh,22px)}
 #university-dialog[data-screen=exercise] .uni-stimulus>.uni-romaji{font-size:clamp(18px,2.3dvh,28px);font-weight:600}
 #university-dialog[data-screen=exercise] .uni-options{gap:clamp(9px,1.3dvh,16px);margin:0}
 #university-dialog[data-screen=exercise] .uni-option-row>.uni-button{min-height:clamp(56px,8dvh,100px);font-size:clamp(18px,2.6dvh,30px);padding:8px 14px}
 #university-dialog[data-screen=exercise] .uni-response{max-width:none}
 #university-dialog[data-screen=exercise] .uni-question:has(>.uni-audio):not(:has(>.uni-stimulus))>.uni-audio{min-height:20dvh;display:flex;flex-direction:column;justify-content:center;gap:12px;margin:0;border:8px solid transparent;border-image:url('/assets/university-ui-v02/paper-normal.png') 4 stretch;border-image-width:var(--uni-frame-corner);background:#fff9ed;background-clip:padding-box}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-question:has(>.uni-audio):not(:has(>.uni-stimulus))>.uni-audio{min-height:12dvh}
 #university-dialog[data-screen=exercise] .uni-footer{min-height:clamp(46px,6dvh,64px)}
 #university-dialog[data-screen=exercise] .uni-footer>.uni-button{min-height:clamp(46px,6dvh,64px)}
 #university-dialog .uni-result-sheet{padding:clamp(18px,3.5dvh,38px) clamp(16px,4.5vw,72px) max(clamp(16px,2.8dvh,30px),env(safe-area-inset-bottom));min-height:29.5dvh}
 #university-dialog .uni-result-sheet[data-correct=false]{padding-top:clamp(14px,2dvh,24px)}
 #university-dialog .uni-sheet-inner{max-width:none;gap:clamp(16px,2.4dvh,28px);flex:1}
 #university-dialog .uni-sheet-content{flex:1}
 #university-dialog .uni-sheet-title{font-size:clamp(27px,3.9dvh,46px);gap:clamp(12px,2vw,24px)}
 #university-dialog .uni-result-icon{font-size:clamp(30px,4.2dvh,48px)}
 #university-dialog .uni-sheet-actions{gap:clamp(10px,1.4dvh,16px)}
 #university-dialog .uni-sheet-actions>.uni-button{height:clamp(46px,6.7dvh,78px);min-height:clamp(46px,6.7dvh,78px);font-size:clamp(24px,3.3dvh,38px)}
 #university-dialog .uni-correction-answer{font-size:clamp(20px,2.6dvh,30px)}
 #university-dialog .uni-sheet-correction .uni-correction-label{font-size:clamp(15px,2dvh,22px)}
 /* The keyboard and its response have first claim on height on narrow screens. */
 #university-dialog[data-screen=exercise][data-typing=true] .uni-shell{gap:7px;padding-top:10px;--uni-keyboard-height:clamp(182px,29dvh,310px)}
 #university-dialog[data-screen=exercise][data-typing=true] h1{font-size:clamp(24px,3.2dvh,34px)}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-question h2{font-size:clamp(20px,2.7dvh,29px);margin-bottom:6px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-stimulus{padding:10px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-option-row>.uni-button{min-height:clamp(48px,7dvh,76px);padding:6px 10px;font-size:20px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-exercise{gap:8px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-answers:has(.uni-options){flex:1;display:flex;flex-direction:column}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-answers>.uni-options{flex:1;max-height:28dvh}
}

/* A wide screen gets a composed two-column scene, rather than a narrow stack
   floating in a large empty canvas. Short landscape uses the compact rules above. */
@media(min-width:1000px) and (min-height:551px) and (min-aspect-ratio:6/5){
 #university-dialog[data-screen=exercise] .uni-shell{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:16px 32px}
 #university-dialog[data-screen=exercise] .uni-header{grid-column:1/-1}
 #university-dialog[data-screen=exercise] .uni-scroll{grid-column:1/-1;grid-row:2;padding:0}
 #university-dialog[data-screen=exercise] .uni-exercise{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px;align-items:stretch;flex:0 0 auto;min-height:60dvh}
 #university-dialog[data-screen=exercise] .uni-question{display:flex;flex-direction:column;justify-content:center}
 #university-dialog[data-screen=exercise] .uni-question>.uni-stimulus{flex:1}
 #university-dialog[data-screen=exercise] .uni-answers{display:flex;flex-direction:column;justify-content:center}
 #university-dialog[data-screen=exercise] .uni-answers>.uni-options{min-height:48dvh}
 #university-dialog[data-screen=exercise] .uni-question h2{font-size:clamp(30px,3vw,42px)}
 #university-dialog[data-screen=exercise][data-input=choice][data-presentation=word] .uni-stimulus>.uni-jp{font-size:clamp(48px,7dvh,80px)}
 #university-dialog[data-screen=exercise] .uni-option-row>.uni-button{font-size:clamp(24px,2.1vw,32px)}
 #university-dialog[data-screen=exercise] .uni-question:has(>.uni-audio):not(:has(>.uni-stimulus))>.uni-audio{flex:1}
 #university-dialog[data-screen=exercise] .uni-footer{grid-column:2;grid-row:3}
 #university-dialog[data-screen=exercise] .uni-response{grid-column:1;grid-row:3}
 #university-dialog[data-screen=exercise] .uni-keyboard-slot{grid-column:2;grid-row:2}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-shell{grid-template-rows:auto auto minmax(0,1fr) auto;gap:16px 32px;--uni-keyboard-height:clamp(260px,43dvh,450px)}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-scroll{grid-column:1;grid-row:2/5}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-exercise{display:flex;flex:1;gap:16px;min-height:0}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-question{flex:0 0 auto}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-answers>.uni-options{min-height:0;max-height:52dvh}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-response{grid-column:2;grid-row:2}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-keyboard-slot{grid-column:2;grid-row:3;height:auto;align-self:stretch}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-footer{grid-row:4}
}
@media(max-height:720px) and (orientation:portrait){
 #university-dialog[data-screen=exercise][data-typing=true] .uni-shell{gap:4px;padding-top:6px;--uni-keyboard-height:182px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-heading{display:grid;grid-template-columns:minmax(0,1fr) 38%;gap:2px 6px;align-items:center}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-heading h1{grid-column:1;grid-row:1}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-heading>p:not(.uni-item-count){grid-column:1;grid-row:2}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-heading>.uni-progress{grid-column:2;grid-row:2;margin:0}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-heading>.uni-item-count{grid-column:2;grid-row:1;text-align:right;margin:0}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-question h2{font-size:19px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-exercise{gap:5px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-option-row>.uni-button{min-height:46px;padding:5px 8px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-stimulus{padding:6px 8px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-word-bank .uni-button{min-height:38px;padding:4px 7px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-footer,#university-dialog[data-screen=exercise][data-typing=true] .uni-footer>.uni-button{min-height:42px}
}
/* Small portrait keeps all teaching content visible by reducing chrome and
   spacing first; the keyboard still has four full rows in Japanese mode. */
@media(max-height:620px) and (orientation:portrait){
 #university-dialog[data-screen=exercise] .uni-shell,#university-dialog[data-screen=exercise][data-typing=true] .uni-shell{padding:5px 12px;gap:3px;--uni-keyboard-height:182px}
 #university-dialog[data-screen=exercise] .uni-header{padding-left:38px}
 #university-dialog[data-screen=exercise] .uni-heading{display:grid;grid-template-columns:minmax(0,1fr) 38%;grid-template-rows:auto auto;gap:2px 6px;align-items:center}
 #university-dialog[data-screen=exercise] .uni-heading h1{grid-column:1;grid-row:1}
 #university-dialog[data-screen=exercise] .uni-heading>p:not(.uni-item-count){grid-column:1;grid-row:2}
 #university-dialog[data-screen=exercise] .uni-heading>.uni-progress{grid-column:2;grid-row:2;margin:0}
 #university-dialog[data-screen=exercise] .uni-heading>.uni-item-count{grid-column:2;grid-row:1;text-align:right;margin:0}
 #university-dialog[data-screen=exercise] h1,#university-dialog[data-screen=exercise][data-typing=true] h1{font-size:22px}
 #university-dialog[data-screen=exercise] .uni-heading>p:not(.uni-item-count){font-size:10px}
 #university-dialog[data-screen=exercise] .uni-progress{height:6px;margin-top:3px}
 #university-dialog[data-screen=exercise] .uni-item-count{font-size:14px;margin-top:2px}
 #university-dialog[data-screen=exercise] .uni-exercise,#university-dialog[data-screen=exercise][data-typing=true] .uni-exercise{gap:5px}
 #university-dialog[data-screen=exercise] .uni-question h2,#university-dialog[data-screen=exercise][data-typing=true] .uni-question h2{font-size:18px;margin-bottom:6px}
 #university-dialog[data-screen=exercise] .uni-options{gap:6px}
 #university-dialog[data-screen=exercise] .uni-option-row>.uni-button,#university-dialog[data-screen=exercise][data-typing=true] .uni-option-row>.uni-button{min-height:43px;font-size:17px;padding:5px 8px}
 #university-dialog[data-screen=exercise][data-presentation=sentence][data-input=choice] .uni-stimulus{min-height:0;padding:8px;gap:3px}
 #university-dialog[data-screen=exercise][data-presentation=sentence][data-input=choice] .uni-stimulus>.uni-jp{font-size:25px}
 #university-dialog[data-screen=exercise] .uni-stimulus>.uni-romaji{font-size:14px}
 #university-dialog[data-screen=exercise] .uni-stimulus p{font-size:13px;margin:2px 0;line-height:1.3}
 #university-dialog[data-screen=exercise] .uni-stimulus>.uni-jp{font-size:23px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-stimulus{padding:4px;gap:0}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-stimulus p{font-size:12px;line-height:1.2;margin:1px 0}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-stimulus>.uni-jp{font-size:21px;line-height:1.25}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-stimulus>.uni-romaji{font-size:12px;line-height:1.2}
 #university-dialog[data-screen=exercise] .uni-question:has(>.uni-audio):not(:has(>.uni-stimulus))>.uni-audio{min-height:80px;gap:5px}
 #university-dialog[data-screen=exercise] .uni-audio{margin:5px 0}
 #university-dialog[data-screen=exercise] .uni-audio>.uni-button{min-height:38px;padding:7px;font-size:19px}
 #university-dialog[data-screen=exercise] .uni-note{font-size:11px;line-height:1.25;margin:3px 0}
 #university-dialog[data-screen=exercise] .uni-profiles{gap:6px;margin:6px 0}
 #university-dialog[data-screen=exercise] .uni-profiles .uni-button{min-height:72px;font-size:17px;padding:6px 3px}
 #university-dialog[data-screen=exercise] .uni-role{font-size:13px;overflow-wrap:anywhere}
 #university-dialog[data-screen=exercise] .uni-role-reserve{gap:5px;margin:5px 0}
 #university-dialog[data-screen=exercise] .uni-role-reserve>.uni-button{min-height:36px;padding:6px 8px;font-size:17px}
 #university-dialog[data-screen=exercise] .uni-composition,#university-dialog[data-screen=exercise][data-typing=true] .uni-composition{min-height:34px;padding:3px;margin-bottom:3px}
 #university-dialog[data-screen=exercise] .uni-word-bank{gap:5px;margin:4px 0}
 #university-dialog[data-screen=exercise] .uni-word-bank .uni-button,#university-dialog[data-screen=exercise][data-typing=true] .uni-word-bank .uni-button{min-height:32px;padding:3px 6px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-note{font-size:10px;line-height:1.2;margin:2px 0}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-answers .uni-jp{font-size:18px;line-height:1.2}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-word-bank .uni-jp{margin:0}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-composition .uni-button{min-height:32px;padding:3px 5px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-composition .uni-jp{margin:0;font-size:18px;line-height:1.15}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-composition small{line-height:1.1}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-word-bank small{line-height:1.1}
 #university-dialog[data-screen=exercise][data-gameplay=GRAM_RECONSTRUCT] .uni-question h2{font-size:17px}
 #university-dialog[data-screen=exercise][data-input=mixed_sentence] .uni-answers{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 6px;align-items:start}
 #university-dialog[data-screen=exercise][data-input=mixed_sentence] .uni-composition{grid-column:1;grid-row:1;gap:3px;margin:0}
 #university-dialog[data-screen=exercise][data-input=mixed_sentence] .uni-answers>.uni-word-bank:nth-child(2){grid-column:2;grid-row:1;max-width:110px;flex-wrap:nowrap;margin:0}
 #university-dialog[data-screen=exercise][data-input=mixed_sentence] .uni-answers>.uni-note,#university-dialog[data-screen=exercise][data-input=mixed_sentence] .uni-answers>.uni-word-bank:not(:nth-child(2)){grid-column:1/-1}
 #university-dialog[data-screen=exercise][data-input=mixed_sentence] .uni-word-bank:empty{display:none}
 #university-dialog[data-screen=exercise][data-input=mixed_sentence] .uni-answers:has(>.uni-word-bank:nth-child(2):empty)>.uni-composition{grid-column:1/-1}
 #university-dialog[data-screen=exercise][data-input=mixed_sentence] .uni-composed:has(.uni-remove-segment){padding-right:20px}
 #university-dialog[data-screen=exercise][data-input=mixed_sentence] .uni-remove-segment{width:20px}
 #university-dialog[data-screen=exercise] .uni-response:has([data-action=add-segment]){gap:2px 6px}
 #university-dialog[data-screen=exercise] .uni-response:has([data-action=add-segment]) .uni-button{min-height:36px;height:36px;padding:4px 6px;font-size:15px}
 #university-dialog[data-screen=exercise] .uni-answers .uni-jp{font-size:19px;line-height:1.2}
 #university-dialog[data-screen=exercise] .uni-button small{font-size:10px}
 #university-dialog[data-screen=exercise] .uni-footer,#university-dialog[data-screen=exercise][data-typing=true] .uni-footer,#university-dialog[data-screen=exercise] .uni-footer>.uni-button,#university-dialog[data-screen=exercise][data-typing=true] .uni-footer>.uni-button{min-height:38px;padding:5px;font-size:18px}
 #university-dialog[data-screen=exercise] .uni-footer,#university-dialog[data-screen=exercise][data-typing=true] .uni-footer{padding:0}
 #university-dialog[data-screen=exercise] .uni-footer>.uni-link{font-size:13px;padding:4px}
 #university-dialog[data-screen=exercise][data-typing=true] .uni-answer,#university-dialog[data-screen=exercise] .uni-frozen-answer{height:36px;min-height:36px}
 #university-dialog[data-screen=exercise] .uni-response .uni-answer-label{font-size:10px;margin:0 0 2px}
 #university-dialog[data-screen=exercise] .pixel-keyboard{--key-size:18px;font-size:18px}
 #university-dialog[data-screen=exercise] .pixel-keyboard:is([data-mode=hiragana],[data-mode=katakana]) .pixel-keyboard-row button{font-size:18px}
}

/* Intent from the user's saved atelier (28/09). Shared rhythm, not absolute coordinates.
   Tune these variables for every question, correction and teaching capsule together. */
@font-face{font-family:UniversityActions;src:url('/assets/city-home-v03/Tiny5-Regular.ttf');font-display:swap}
html body #university-dialog{
 --uni-page: min(940px,100%);--uni-gutter:clamp(18px,4.6vw,40px);
 --uni-action-height:clamp(48px,6.75dvh,62px);--uni-action-font:22px;
 --uni-result-height:clamp(205px,29.5dvh,290px);--uni-bottom:max(18px,env(safe-area-inset-bottom));
 --uni-tile-height:44px;--uni-tile-gap:10px;--uni-line-height:60px;
}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-shell{max-width:var(--uni-page);padding:max(8px,env(safe-area-inset-top)) var(--uni-gutter) var(--uni-bottom);gap:12px}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-header{display:flex;grid-column:1/-1;grid-row:1;min-height:32px;height:32px;padding:0 28px;align-items:center}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-heading{display:block;width:100%}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-header .uni-heading{display:block;width:100%}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-heading h1{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-heading>p,
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-header>.uni-note{display:none}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-progress{height:16px;margin:0;width:100%;border-width:3px}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-header .uni-progress{height:16px;margin:0;width:100%;border-width:3px}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-scroll{padding:0;min-width:0}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-exercise{max-width:none;width:100%}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-exercise h2{font:700 clamp(23px,2.96dvh,30px)/1.25 var(--uni-ui-font);margin:0 0 18px;text-align:left}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-footer{padding:0;min-height:var(--uni-action-height);width:100%;max-width:none;justify-content:center}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-footer>.uni-button,
html body #university-dialog .uni-sheet-actions>.uni-button{width:100%;max-width:none;min-width:0;height:var(--uni-action-height);min-height:var(--uni-action-height);font:var(--uni-action-font)/1.1 UniversityActions,var(--uni-ui-font);text-transform:uppercase;padding:10px 14px;color:#392947}
html body #university-dialog .uni-result-sheet{min-height:var(--uni-result-height);padding:20px var(--uni-gutter) var(--uni-bottom);animation:uni-pop 320ms ease-out both;transform-origin:center;max-height:calc(100dvh - 54px)}
html body #university-dialog .uni-sheet-inner{max-width:calc(940px - 2 * var(--uni-gutter));flex:1;min-height:0;gap:14px}
html body #university-dialog .uni-sheet-content{flex:1}
html body #university-dialog .uni-sheet-title{font-size:28px;gap:12px;min-height:36px}
html body #university-dialog .uni-result-icon{font-size:38px;flex:none}
html body #university-dialog .uni-sheet-actions{gap:14px;align-self:stretch}
html body #university-dialog[data-screen] .uni-stimulus.uni-source-phrase{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:12px;padding:0;margin:0;border:0;background:none;min-height:0;text-align:left}
html body #university-dialog .uni-source-words{min-width:0;flex:1}
html body #university-dialog .uni-source-words>.uni-jp{font-size:clamp(26px,3.55dvh,36px);line-height:1.55;margin:0}
html body #university-dialog .uni-source-words>.uni-romaji{display:none}
html body #university-dialog .uni-source-words>p{font-size:18px;margin:8px 0}
html body #university-dialog .uni-listen-icon{border:0;border-image:none;background:none;padding:2px;width:44px;height:44px;min-height:44px;flex:0 0 44px;margin:2px 0 0}
html body #university-dialog .uni-listen-icon img{width:40px;height:40px;margin:0}
html body #university-dialog .uni-listen-icon:hover{background:#dfcef080;border-image:none}
html body #university-dialog .uni-word-bank{justify-content:center}

/* The same space is reserved before and after validation: the phrase and tiles never jump. */
html body #university-dialog[data-input=word_translation] .uni-shell{display:flex}
html body #university-dialog[data-input=word_translation] .uni-scroll{display:flex;overflow:visible;padding-bottom:calc(var(--uni-result-height) - var(--uni-action-height) - var(--uni-bottom))}
html body #university-dialog[data-input=word_translation] .uni-exercise{display:flex;flex-direction:column;gap:20px;flex:1;min-height:0}
html body #university-dialog[data-input=word_translation] .uni-question{flex:none}
html body #university-dialog[data-input=word_translation] .uni-answers{display:flex;flex:1;min-height:0}
html body #university-dialog .uni-word-translation{display:grid;grid-template-rows:1fr auto;gap:24px;min-height:0;width:100%;--uni-tile-font:20px}
html body #university-dialog .uni-phrase-lines{display:flex;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:center;gap:calc(var(--uni-line-height) - var(--uni-tile-height)) var(--uni-tile-gap);min-height:calc(2 * var(--uni-line-height));align-self:center;padding:6px 0 10px;background:repeating-linear-gradient(to bottom,transparent 0 calc(var(--uni-line-height) - 2px),#baa5cf calc(var(--uni-line-height) - 2px) var(--uni-line-height));width:100%}
html body #university-dialog .uni-tile-bank{display:flex;flex-wrap:wrap;justify-content:center;align-content:center;align-items:flex-start;gap:var(--uni-tile-gap);width:100%}
html body #university-dialog .uni-tile-slot{display:inline-flex;max-width:100%;border-radius:5px}
html body #university-dialog .uni-tile-slot[data-used=true]{background:#9e83b72b;box-shadow:inset 0 2px 0 #9e83b735}
html body #university-dialog .uni-word-tile{display:inline-flex;position:relative;align-items:center;justify-content:center;white-space:nowrap;width:auto;max-width:100%;height:var(--uni-tile-height);min-height:var(--uni-tile-height);padding:8px 12px;font:var(--uni-tile-font)/1.2 var(--uni-ui-font);border-image-width:var(--uni-frame-corner);z-index:1}
html body #university-dialog .uni-word-tile:disabled{opacity:1}
html body #university-dialog .uni-word-tile:focus-visible{z-index:2}

/* Teaching uses the same header and footer, retaining its lesson content. */
html body #university-dialog[data-screen=intro] .uni-exercise{display:flex;flex-direction:column;gap:18px}
html body #university-dialog[data-screen=intro] .uni-exercise h2{margin-bottom:0}
html body #university-dialog[data-screen=intro] .uni-teacher{margin:0}
html body #university-dialog[data-screen=intro] .uni-example-token small{display:block}
html body #university-dialog[data-screen=intro] .uni-lexicon .uni-button{display:grid;grid-template-columns:24px minmax(0,1fr);gap:3px 6px;padding:10px;align-items:center}
html body #university-dialog[data-screen=intro] .uni-lexicon .uni-button>img{grid-column:1;grid-row:1/4;margin:0}
html body #university-dialog[data-screen=intro] .uni-lexicon .uni-button>:not(img){grid-column:2}
html body #university-dialog[data-screen=intro] .uni-lexicon .uni-jp{font-size:21px;line-height:1.25;margin:0}
html body #university-dialog[data-screen=intro] .uni-lexicon small{font-size:11px;line-height:1.25}
html body #university-dialog[data-screen=intro] .uni-teacher>img{display:none}
html body #university-dialog[data-screen=intro] .uni-teacher-bubble{background:none;border:0;border-image:none;padding:0;margin:0;font-size:17px}
html body #university-dialog[data-screen=intro] .uni-teacher-bubble::before,
html body #university-dialog[data-screen=intro] .uni-teacher-bubble::after{display:none}
html body #university-dialog[data-screen=intro] .uni-stimulus{margin:0;padding:16px}
html body #university-dialog[data-screen=intro][data-lesson=word] .uni-lesson-word{margin-top:15px;min-height:166px;display:flex;flex-direction:column;justify-content:center}
html body #university-dialog[data-screen=intro][data-lesson=word] .uni-jp{font-size:48px}
html body #university-dialog[data-screen=intro][data-lesson=word] .uni-listen-icon{align-self:center;width:70px;height:70px;flex-basis:70px}
html body #university-dialog[data-screen=intro][data-lesson=word] .uni-listen-icon img{width:42px;height:42px}

@media(min-width:1000px) and (min-height:551px){
 html body #university-dialog{--uni-tile-height:50px;--uni-line-height:66px;--uni-action-font:25px}
 html body #university-dialog .uni-word-translation{--uni-tile-font:24px}
 html body #university-dialog[data-screen=exercise]:not([data-input=word_translation]) .uni-shell{grid-template-rows:auto minmax(0,1fr) auto auto}
 html body #university-dialog[data-screen=exercise][data-typing=true] .uni-shell{grid-template-rows:auto auto minmax(0,1fr) auto}
 html body #university-dialog[data-screen=exercise] .uni-footer{grid-column:1/-1;grid-row:4}
}
@media(max-height:720px) and (orientation:portrait){
 html body #university-dialog{--uni-result-height:205px;--uni-action-height:48px;--uni-bottom:max(12px,env(safe-area-inset-bottom));--uni-line-height:54px;--uni-tile-height:42px;--uni-tile-gap:8px}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-shell{gap:8px}
 html body #university-dialog .uni-word-translation{gap:12px;--uni-tile-font:18px}
 html body #university-dialog[data-input=word_translation] .uni-exercise{gap:10px}
 html body #university-dialog .uni-result-sheet{padding-top:14px}
 html body #university-dialog .uni-sheet-actions{gap:10px}
 html body #university-dialog .uni-source-words>.uni-jp{font-size:26px}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-exercise h2{margin-bottom:10px}
 html body #university-dialog[data-screen=exercise][data-typing=true] .uni-shell{padding:max(8px,env(safe-area-inset-top)) var(--uni-gutter) var(--uni-bottom);gap:8px}
 html body #university-dialog[data-screen=intro] .uni-exercise{gap:12px}
 html body #university-dialog[data-screen=intro] .uni-exercise h2{margin-bottom:0}
 html body #university-dialog[data-screen=intro] .uni-teacher-bubble{font-size:15px;line-height:1.4}
 html body #university-dialog[data-screen=intro] .uni-stimulus{padding:10px}
 html body #university-dialog[data-screen=intro] .uni-segment-example{display:grid;grid-template-columns:1fr 1fr;gap:6px}
 html body #university-dialog[data-screen=intro] .uni-example-token{padding:4px}
 html body #university-dialog[data-screen=intro] .uni-example-token .uni-jp{font-size:20px;line-height:1.2;margin:0}
 html body #university-dialog[data-screen=intro] .uni-example-token .uni-romaji{font-size:12px;line-height:1.2;margin:2px 0}
 html body #university-dialog[data-screen=intro] .uni-example-token small{font-size:10px;line-height:1.2}
 html body #university-dialog[data-screen=intro] .uni-stimulus>p{margin:5px 0}
 html body #university-dialog[data-screen=intro][data-lesson=notion] .uni-stimulus>.uni-jp{font-size:22px;line-height:1.3;margin:2px 0}
 html body #university-dialog[data-screen=intro][data-lesson=notion] .uni-stimulus>.uni-romaji{font-size:13px;line-height:1.3;margin:2px 0}
 html body #university-dialog[data-screen=intro][data-lesson=notion] .uni-stimulus>p{font-size:14px;line-height:1.3;margin:3px 0}
 html body #university-dialog[data-screen=intro][data-lesson=notion] .uni-stimulus>.uni-button{min-height:36px;padding:6px 12px;font-size:18px}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-shell{--uni-keyboard-height:182px;gap:6px}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-keyboard-slot{height:182px}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-exercise{gap:6px}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-stimulus{display:flex;align-items:center;justify-content:space-around;padding:5px}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-stimulus>.uni-romaji,
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-stimulus>p{display:none}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-note{font-size:11px;line-height:1.3;margin:0}
}
@media(max-height:600px) and (orientation:portrait){
 html body #university-dialog{--uni-result-height:180px;--uni-action-height:44px;--uni-tile-height:38px;--uni-line-height:46px;--uni-gutter:14px;--uni-tile-gap:6px}
 html body #university-dialog .uni-word-translation{--uni-tile-font:17px;gap:8px}
 html body #university-dialog .uni-word-tile{padding:6px 9px}
 html body #university-dialog .uni-sheet-title{font-size:25px}
 html body #university-dialog .uni-source-words>.uni-jp{font-size:23px}
 html body #university-dialog[data-screen=exercise][data-typing=true] .uni-exercise{gap:4px}
}
@media(orientation:landscape) and (max-height:550px){
 html body #university-dialog{--uni-action-height:42px;--uni-action-font:22px;--uni-result-height:122px;--uni-bottom:max(8px,env(safe-area-inset-bottom));--uni-tile-height:38px;--uni-line-height:48px;--uni-tile-gap:8px;--uni-gutter:22px}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-shell{gap:6px}
 html body #university-dialog[data-screen=exercise] .uni-shell{grid-template-columns:1fr 1fr;column-gap:24px}
 html body #university-dialog[data-screen=exercise][data-typing=true] .uni-shell{grid-template-columns:1fr 1fr;column-gap:24px}
 html body #university-dialog:is([data-input=word_translation],[data-screen=intro]) .uni-footer>.uni-button{width:calc(50% - 12px);margin-left:auto}
 html body #university-dialog[data-input=word_translation] .uni-exercise{display:grid;grid-template-columns:1fr 1fr;gap:24px}
 html body #university-dialog[data-input=word_translation] .uni-scroll{padding-bottom:calc(var(--uni-result-height) - var(--uni-action-height) - var(--uni-bottom))}
 html body #university-dialog .uni-word-translation{gap:12px;--uni-tile-font:18px}
 html body #university-dialog .uni-phrase-lines{align-self:start}
 html body #university-dialog .uni-sheet-inner{display:grid;grid-template-columns:1fr 1fr;gap:24px}
 html body #university-dialog .uni-sheet-actions{gap:8px}
 html body #university-dialog .uni-sheet-actions{align-self:end}
 html body #university-dialog .uni-result-sheet{padding-top:10px}
 html body #university-dialog .uni-sheet-title{font-size:26px}
 html body #university-dialog .uni-source-words>.uni-jp{font-size:25px}
 html body #university-dialog[data-screen=exercise][data-input=mixed_sentence] .uni-question h2{font-size:20px;line-height:1.2;margin-bottom:8px}
 html body #university-dialog[data-screen=exercise][data-input=mixed_sentence] .uni-exercise{gap:6px}
 html body #university-dialog[data-input=mixed_sentence] .uni-composition .uni-button{min-height:38px;padding:4px 7px}
 html body #university-dialog[data-input=mixed_sentence] .uni-composition .uni-jp{font-size:20px;line-height:1.2;margin:0}
 html body #university-dialog[data-input=mixed_sentence] .uni-composition small{font-size:11px;line-height:1.1}
 html body #university-dialog[data-input=mixed_sentence] .uni-word-bank:empty{display:none}
 html body #university-dialog[data-screen=intro] .uni-exercise{display:grid;grid-template-columns:1fr 1fr;gap:10px 22px}
 html body #university-dialog[data-screen=intro] .uni-exercise h2{grid-column:1/-1;margin-bottom:0}
 html body #university-dialog[data-screen=intro] .uni-teacher-bubble{font-size:15px;line-height:1.4}
 html body #university-dialog[data-screen=intro] .uni-segment-example{display:grid;grid-template-columns:1fr 1fr;gap:4px}
 html body #university-dialog[data-screen=intro] .uni-example-token{padding:3px}
 html body #university-dialog[data-screen=intro] .uni-example-token .uni-jp{font-size:20px;line-height:1.2;margin:0}
 html body #university-dialog[data-screen=intro] .uni-example-token .uni-romaji{font-size:11px;line-height:1.2;margin:1px 0}
 html body #university-dialog[data-screen=intro] .uni-example-token small{font-size:10px;line-height:1.15}
 html body #university-dialog[data-screen=intro] .uni-stimulus>p{margin:4px 0;font-size:14px}
 html body #university-dialog[data-screen=intro] .uni-exercise:has(>.uni-stimulus~.uni-stimulus)>.uni-teacher{grid-column:1/-1}
 html body #university-dialog[data-screen=intro] .uni-exercise:has(>.uni-profiles)>.uni-teacher{grid-column:1;grid-row:2/4;align-self:start}
 html body #university-dialog[data-screen=intro] .uni-role-reserve{grid-column:2;grid-row:2;margin:0;gap:6px}
 html body #university-dialog[data-screen=intro] .uni-profiles{grid-column:2;grid-row:3;margin:0}
 html body #university-dialog[data-screen=intro] .uni-profiles>.uni-button{min-height:88px;padding:8px}
 html body #university-dialog[data-screen=intro] .uni-exercise>[data-action=demo-particle]{grid-column:1;grid-row:2;align-self:end;justify-self:start}
 html body #university-dialog[data-screen=intro] .uni-exercise:has(>[data-action=demo-particle])>.uni-teacher{grid-column:1;grid-row:2;align-self:start;padding-bottom:50px}
 html body #university-dialog[data-screen=intro][data-lesson=notion] .uni-stimulus>.uni-jp{font-size:22px;line-height:1.3;margin:2px 0}
 html body #university-dialog[data-screen=intro][data-lesson=notion] .uni-stimulus>.uni-romaji{font-size:13px;line-height:1.3;margin:2px 0}
 html body #university-dialog[data-screen=intro][data-lesson=notion] .uni-stimulus>.uni-button{min-height:36px;padding:5px 12px;font-size:18px}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-shell{grid-template-columns:1fr 1fr;column-gap:24px;--uni-keyboard-height:190px}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-keyboard-slot{height:190px;min-height:0}
 html body #university-dialog[data-screen=intro][data-practice=true] .pixel-keyboard{height:100%;min-height:0}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-footer>.uni-button{width:100%}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-exercise{display:flex;gap:8px}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-stimulus{display:flex;align-items:center;justify-content:space-around;padding:5px}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-stimulus>.uni-romaji,
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-stimulus>p{display:none}
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-note{font-size:11px;line-height:1.3;margin:0}
 html body #university-dialog[data-screen=intro] .uni-stimulus{padding:8px}
 html body #university-dialog[data-screen=intro][data-lesson=word] .uni-lesson-word{min-height:120px;margin:0}
}
@media(prefers-reduced-motion:reduce){html body #university-dialog .uni-result-sheet{animation:none}}


/* V3: common layouts and interactions. Scoped exclusively to the University. */
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-shell{padding-top:var(--pixel-close-top,max(4px,env(safe-area-inset-top)))}
html body #university-dialog[data-screen=exercise][data-typing=true] .uni-shell{padding-top:var(--pixel-close-top,max(4px,env(safe-area-inset-top)))}
html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-header{height:48px;min-height:48px;align-items:center;padding:0 28px}
html body #university-dialog .uni-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden;clip-path:inset(50%);margin:0!important}
html body #university-dialog .uni-jp{white-space:normal;word-break:normal;overflow-wrap:normal}
html body #university-dialog .uni-jp-word{display:inline;white-space:nowrap}
html body #university-dialog ruby{ruby-position:over;ruby-align:center}
html body #university-dialog rt{font:400 .36em/1.1 system-ui,sans-serif;color:#725e83;letter-spacing:0;text-transform:none}
html body #university-dialog .uni-romaji{display:none}
html body #university-dialog .uni-stimulus.uni-source-phrase{display:flow-root;text-align:left;padding:3px 0;line-height:1.8}
html body #university-dialog .uni-source-phrase>.uni-jp{display:inline;font-size:clamp(25px,3.5dvh,34px);line-height:1.85}
html body #university-dialog .uni-source-phrase>.uni-listen-icon{float:left;margin:2px 12px 0 0}
html body #university-dialog .uni-button.uni-audio-button{border:0;border-image:url('/assets/university-ui-v02/blue-normal.png') 4 fill stretch;border-image-width:var(--uni-frame-corner);background:none;min-width:48px;width:48px;height:48px;min-height:48px;padding:10px;display:inline-flex;align-items:center;justify-content:center}
html body #university-dialog .uni-audio-button img{width:28px;height:28px;margin:0;flex:none}
html body #university-dialog .uni-audio-button:active{border-image-source:url('/assets/university-ui-v02/blue-pressed.png')}
html body #university-dialog .uni-target-word{border:0;border-image:url('/assets/university-ui-v02/paper-normal.png') 4 fill stretch;border-image-width:var(--uni-frame-corner);background:none;display:flex;align-items:center;justify-content:center;gap:18px;min-height:112px;padding:20px;margin:12px 0;font-size:30px}
html body #university-dialog .uni-target-word>.uni-jp{font-size:36px;line-height:1.7;margin:0}
html body #university-dialog .uni-options .uni-button{min-height:70px;padding:14px 8px 8px}
html body #university-dialog .uni-options .uni-jp{display:inline-block;font-size:26px;line-height:1.5;margin:0}
html body #university-dialog .uni-options{margin:12px 0;gap:10px}
html body #university-dialog[data-screen=exercise][data-typing=true] .uni-answers:has(.uni-options){flex:0}
html body #university-dialog[data-screen=exercise][data-typing=true] .uni-answers>.uni-options{flex:0;min-height:0;max-height:none;align-content:start}
html body #university-dialog[data-screen=exercise][data-typing=true] .uni-option-row>.uni-button{min-height:68px;padding:12px 8px 6px}
html body #university-dialog .uni-word-bank>.uni-audio-button{width:auto;height:auto;min-height:64px;gap:8px}
html body #university-dialog .uni-keyboard-choices{display:flex;gap:12px}
html body #university-dialog .uni-keyboard-choices>.uni-button{flex:1;min-width:0;font-size:21px}
html body #university-dialog .uni-exercise-context{margin:0 0 10px;font-size:17px}
html body #university-dialog .uni-pair-column>.uni-button{min-height:72px;padding:12px 8px}
html body #university-dialog .uni-pair-column .uni-jp{font-size:27px;line-height:1.5;margin:0}
html body #university-dialog .uni-pair-column>.uni-button:disabled{opacity:1}
html body #university-dialog .uni-button[data-tone=paper],html body #university-dialog .uni-panel[data-tone=paper]{border-image-source:url('/assets/university-ui-v02/paper-normal.png');color:#493260}
html body #university-dialog .uni-target-word,html body #university-dialog .uni-button[data-tone=paper],html body #university-dialog .uni-panel[data-tone=paper]{border:8px solid transparent;border-image-source:url('/assets/university-ui-v02/paper-normal.png');border-image-slice:4;border-image-width:var(--uni-frame-corner);background:#fff9ed;background-clip:padding-box}
html body #university-dialog .uni-button[data-tone=pink]{border-image-source:url('/assets/university-ui-v02/pink-normal.png');color:#753d50}
html body #university-dialog .uni-button[data-tone=teal]{border-image-source:url('/assets/university-ui-v02/blue-normal.png');filter:hue-rotate(32deg) saturate(1.45);color:#284f64}
html body #university-dialog .uni-pair-column>.uni-button[data-selected=true]{outline:3px solid #796086;outline-offset:2px;transform:none}
html body #university-dialog .uni-pair-column>.uni-button[data-tone=mint]{border-image-source:url('/assets/university-ui-v02/mint-normal.png')}
html body #university-dialog .uni-pair-column>.uni-button[data-tone=blue]{border-image-source:url('/assets/university-ui-v02/blue-normal.png')}
html body #university-dialog .uni-pair-column>.uni-button[data-tone=lavender]{border-image-source:url('/assets/university-ui-v02/lavender-normal.png')}
html body #university-dialog .uni-pair-feedback{display:table;margin:4px auto;padding:8px 20px;border:0;border-image:url('/assets/university-ui-v02/mint-normal.png') 4 fill stretch;border-image-width:var(--uni-frame-corner);animation:uni-pop 200ms ease-out both;font-size:18px}
html body #university-dialog .uni-pair-feedback[data-tone=pink]{border-image-source:url('/assets/university-ui-v02/pink-normal.png')}
html body #university-dialog .uni-button.uni-lexicon-word{width:auto;height:auto;min-height:64px;display:grid}
html body #university-dialog .uni-result-sheet{display:block;height:auto;min-height:0;max-height:85dvh;padding:16px var(--uni-gutter) var(--uni-bottom);animation:uni-result-rise var(--uni-sheet-spring-ms,240ms) linear both;touch-action:none;overflow:hidden;will-change:transform}
html body #university-dialog .uni-result-sheet[data-tone=mint]{background:#d8f1e3;border-color:#79bba2;color:#285e4e}
html body #university-dialog .uni-result-sheet[data-tone=gold]{background:#fff0ca;border-color:#d3b576;color:#725a32}
html body #university-dialog .uni-result-sheet[data-tone=pink]{background:#f7d7db;border-color:#c58a99;color:#783e51}
html body #university-dialog .uni-sheet-inner{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:12px;min-height:0;max-height:calc(85dvh - 16px - var(--uni-bottom))}
html body #university-dialog .uni-sheet-content{min-height:0;overflow:auto;overscroll-behavior:contain}
html body #university-dialog .uni-sheet-title{min-height:0;font-size:28px;margin:0 0 6px}
html body #university-dialog .uni-sheet-correction{margin:4px 0 8px}
html body #university-dialog .uni-correction-answer{margin:0;white-space:pre-line;font-size:22px;line-height:1.4}
html body #university-dialog .uni-sheet-actions{display:flex;flex-direction:column;gap:10px}
html body #university-dialog .uni-why{display:block;padding:4px 0;border:0;background:none;box-shadow:none;text-decoration:underline;text-underline-offset:4px;font:17px/1.4 system-ui,sans-serif;color:inherit;text-align:left;min-height:32px}
html body #university-dialog .uni-sheet-explanation{margin:2px 0 0;padding:4px 0;cursor:pointer;outline-offset:3px;touch-action:pan-y}
html body #university-dialog .uni-sheet-explanation p{margin:3px 0;font-size:16px;line-height:1.4}
html body #university-dialog .uni-sheet-explanation .uni-jp{font-size:24px;line-height:1.7}
html body #university-dialog .uni-sheet-actions>.uni-button[data-tone=gold]{border-image-source:url('/assets/university-ui-v02/gold-normal.png')}
/* Match sheetSpring's cadence and maximum-pull rebounds: 40% * 12% / 2.5%.
   The initial rise starts below the screen; the pull remains capped at 40%. */
@keyframes uni-result-rise{0%{transform:translateY(100%);animation-timing-function:cubic-bezier(.18,.72,.28,1)}55%{transform:translateY(-4.8%);animation-timing-function:ease-in-out}80%{transform:translateY(1%);animation-timing-function:ease-out}100%{transform:translateY(0)}}
/* Timetable and day: paper, native subject emblems, three clear entrances. */
html body #university-dialog:is([data-screen=home],[data-screen=timetable]) .uni-shell{max-width:850px}
html body #university-dialog:is([data-screen=home],[data-screen=timetable]) .uni-header>.uni-note{display:none}
html body #university-dialog .uni-timetable{max-width:620px;margin:18px auto;padding:28px}
html body #university-dialog .uni-timetable h2{font-size:36px;margin:12px 0}
html body #university-dialog .uni-day-subtitle{font-size:18px;color:#715981}
html body #university-dialog .uni-timetable-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:4px 14px;padding:18px 0;border-top:2px solid #d9c7dc;align-items:center}
html body #university-dialog .uni-timetable-row img{width:40px;height:40px;image-rendering:pixelated;grid-row:1/3}
html body #university-dialog .uni-timetable-row strong{font-size:23px}
html body #university-dialog .uni-timetable-row>span{font:14px system-ui}
html body #university-dialog .uni-timetable-row small{grid-column:2/-1;font:14px/1.4 system-ui;color:#715981}
html body #university-dialog .uni-lobby-actions{display:flex;flex-direction:column;gap:12px;max-width:620px;margin:auto}
html body #university-dialog .uni-lobby-actions .uni-button{font-family:UniversityActions;font-size:26px}
html body #university-dialog .uni-day-heading{position:relative;padding:8px 110px 12px 0;margin-bottom:10px}
html body #university-dialog .uni-day-heading h2{font-size:48px;margin:6px 0}
html body #university-dialog .uni-day-seal{position:absolute;right:0;top:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;width:94px;height:94px;border:0;border-image:url('/assets/university-ui-v02/mint-normal.png') 4 fill stretch;border-image-width:var(--uni-frame-corner)}
html body #university-dialog .uni-day-seal strong{font-size:34px}
html body #university-dialog .uni-day-seal span{font:12px system-ui}
html body #university-dialog .uni-day-courses{display:flex;flex-direction:column;gap:16px}
html body #university-dialog .uni-day-course{display:grid;grid-template-columns:68px minmax(0,1fr) 145px;align-items:center;min-height:148px;padding:20px;gap:16px;cursor:pointer}
html body #university-dialog .uni-subject-emblem{padding:9px;width:66px;height:66px;border:0;border-image:url('/assets/university-ui-v02/lavender-normal.png') 4 fill stretch;border-image-width:var(--uni-frame-corner)}
html body #university-dialog .uni-subject-emblem[data-tone=mint]{border-image-source:url('/assets/university-ui-v02/mint-normal.png')}
html body #university-dialog .uni-subject-emblem[data-tone=blue]{border-image-source:url('/assets/university-ui-v02/blue-normal.png')}
html body #university-dialog .uni-subject-emblem img{width:48px;height:48px;object-fit:contain;image-rendering:pixelated}
html body #university-dialog .uni-course-info h3{margin:0;font-size:27px}
html body #university-dialog .uni-course-info p{margin:4px 0;font-size:15px}
html body #university-dialog .uni-course-info small{font:12px system-ui;color:#715981}
html body #university-dialog .uni-course-info .uni-badge{font-size:12px;margin-top:8px}
html body #university-dialog .uni-day-course>.uni-button{font:21px UniversityActions;margin:0}
@media(max-width:600px){
 html body #university-dialog .uni-day-course{grid-template-columns:48px minmax(0,1fr);gap:6px 12px;padding:14px;min-height:0}
 html body #university-dialog .uni-subject-emblem{width:46px;height:46px;padding:7px}
 html body #university-dialog .uni-subject-emblem img{width:32px;height:32px}
 html body #university-dialog .uni-day-course>.uni-button{grid-column:1/-1;min-height:42px}
 html body #university-dialog .uni-course-info h3{font-size:24px}
 html body #university-dialog .uni-course-info p{font-size:13px}
 html body #university-dialog .uni-timetable{padding:20px}
 html body #university-dialog .uni-timetable-row{grid-template-columns:32px minmax(0,1fr) auto;gap:4px 8px}
 html body #university-dialog .uni-timetable-row img{width:32px;height:32px}
 html body #university-dialog .uni-timetable-row strong{font-size:21px}
}
@media(max-height:720px) and (orientation:portrait){
 html body #university-dialog .uni-target-word{min-height:76px;padding:12px;margin:7px 0;font-size:25px}
 html body #university-dialog .uni-target-word>.uni-jp{font-size:30px}
 html body #university-dialog .uni-options .uni-button{min-height:60px;padding:9px 6px 5px}
 html body #university-dialog .uni-options .uni-jp{font-size:24px}
 html body #university-dialog .uni-pair-column>.uni-button{min-height:65px}
 html body #university-dialog .uni-keyboard-choices>.uni-button{font-size:18px}
 html body #university-dialog .uni-day-heading{margin:0;padding-top:0;padding-bottom:4px}
 html body #university-dialog .uni-day-heading h2{font-size:36px}
 html body #university-dialog .uni-day-heading p{margin:4px 0}
 html body #university-dialog .uni-day-courses{gap:10px}
}
@media(orientation:landscape) and (max-height:550px){
 html body #university-dialog .uni-target-word{min-height:70px;padding:10px;margin:6px 0;font-size:25px}
 html body #university-dialog .uni-target-word>.uni-jp{font-size:28px}
 html body #university-dialog .uni-options{margin:8px 0;gap:8px}
 html body #university-dialog .uni-options .uni-button{min-height:60px;padding:8px 6px 4px}
 html body #university-dialog .uni-options .uni-jp{font-size:24px}
 html body #university-dialog .uni-sheet-inner{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:24px}
 html body #university-dialog .uni-sheet-actions{align-self:end}
 html body #university-dialog .uni-pairs{gap:12px;margin:4px 0}
 html body #university-dialog .uni-pair-column{gap:7px}
 html body #university-dialog .uni-pair-column>.uni-button{min-height:50px;padding:8px 5px 4px;font-size:17px}
 html body #university-dialog .uni-pair-column .uni-jp{font-size:22px}
 html body #university-dialog .uni-pair-feedback{margin:0 auto;padding:4px 12px;font-size:15px}
}
@media(prefers-reduced-motion:reduce){html body #university-dialog .uni-result-sheet{animation:none;will-change:auto}}
html body #university-dialog .uni-result-sheet *{touch-action:none}
html body #university-dialog .uni-correction-answer>.uni-jp{font-size:22px;line-height:1.8;margin:0}
@media(max-height:600px) and (orientation:portrait){
 html body #university-dialog[data-screen=exercise][data-gameplay=LEX_FR_JA] .uni-question h2{font-size:20px;line-height:1.2}
 html body #university-dialog[data-screen=exercise][data-gameplay=LEX_FR_JA] .uni-target-word{min-height:58px;font-size:23px;padding:6px}
 html body #university-dialog[data-screen=exercise][data-typing=true] .uni-option-row>.uni-button{min-height:52px;padding:8px 6px 4px}
 html body #university-dialog[data-screen=exercise][data-typing=true] .uni-options{gap:6px}
}
html body #university-dialog[data-screen=intro][data-practice=true] .uni-shell{padding-top:var(--pixel-close-top,max(4px,env(safe-area-inset-top)))}
html body #university-dialog[data-screen] .uni-stimulus.uni-source-phrase{display:flow-root;white-space:normal;overflow-wrap:normal}
html body #university-dialog[data-screen] .uni-source-phrase>.uni-jp{display:inline;white-space:normal;line-height:1.85}
html body #university-dialog[data-screen] .uni-source-phrase>.uni-listen-icon{float:left;margin:2px 12px -10px 0;width:44px;height:44px;min-height:44px;flex:none;padding:8px}
html body #university-dialog[data-screen] .uni-source-phrase>.uni-jp{line-height:2.15}
html body #university-dialog .uni-day-heading{padding-top:0;padding-bottom:4px;margin-bottom:8px}
html body #university-dialog .uni-day-heading h2{font-size:38px;line-height:1.1;margin:4px 0}
html body #university-dialog .uni-day-heading p{margin:4px 0}
html body #university-dialog .uni-day-seal{top:4px;width:78px;height:78px}
html body #university-dialog .uni-day-seal strong{font-size:30px}
html body #university-dialog .uni-course-info h3{line-height:1.1}
html body #university-dialog .uni-course-info p{line-height:1.25;margin:3px 0}
html body #university-dialog .uni-course-info .uni-badge{display:flex;margin-top:4px;font-size:12px;line-height:1.2}
html body #university-dialog .uni-course-info .uni-badge img{width:18px;height:18px}
@media(max-width:600px){html body #university-dialog .uni-day-course{padding:10px;gap:6px 10px}html body #university-dialog .uni-day-course>.uni-button{min-height:42px;padding:8px}}
@media(max-height:720px) and (orientation:portrait){
 html body #university-dialog .uni-day-course{grid-template-columns:32px minmax(0,1fr) 94px;gap:7px;padding:8px;min-height:94px}
 html body #university-dialog .uni-day-course>.uni-button{grid-column:3;grid-row:1;min-height:40px;font-size:18px;width:94px;padding:6px}
 html body #university-dialog .uni-subject-emblem{width:32px;height:36px;padding:5px}
 html body #university-dialog .uni-subject-emblem img{width:22px;height:26px}
 html body #university-dialog .uni-course-info p{display:none}
 html body #university-dialog .uni-course-info h3{font-size:21px}
 html body #university-dialog .uni-course-info small{font-size:10px}
}
html body #university-dialog .uni-day-courses{gap:12px}
@media(min-width:1000px) and (min-height:551px){html body #university-dialog[data-screen=exercise][data-typing=true] .uni-keyboard-slot{height:min(43dvh,360px);max-height:360px;align-self:start}}
@media(max-height:720px) and (orientation:portrait){
 html body #university-dialog .uni-day-heading{min-height:82px;margin-bottom:4px;padding-right:90px}
 html body #university-dialog .uni-day-heading .uni-kicker{font-size:10px;white-space:nowrap}
 html body #university-dialog .uni-day-heading .uni-day-subtitle{display:none}
 html body #university-dialog .uni-day-course{height:96px;min-height:96px;grid-template-columns:32px minmax(0,1fr) 100px;grid-template-rows:1fr;gap:6px}
 html body #university-dialog .uni-day-course>.uni-button{width:100px;font-size:16px;white-space:nowrap;padding:4px}
 html body #university-dialog .uni-course-info{min-width:0}
 html body #university-dialog .uni-course-info h3{font-size:19px}
 html body #university-dialog[data-screen=home] .uni-footer>.uni-link{font-size:12px;padding:6px}
}

/* Shared course refinements only. The University lobby keeps its V3 design. */
html body #university-dialog{--uni-word-font:'Noto Sans JP','Yu Gothic',system-ui,sans-serif;--uni-annotation-size:13px}
html body #university-dialog .uni-jp,html body #university-dialog .uni-target-word>strong,html body #university-dialog .uni-inline-input{font-family:var(--uni-word-font);font-weight:400}
/* Readings are annotations, never part of the Japanese inline advance. */
html body #university-dialog .uni-jp ruby{display:inline-block;position:relative;ruby-position:over;line-height:1;vertical-align:baseline}
html body #university-dialog .uni-jp rt{display:contents;font:inherit;color:#6b547b}
html body #university-dialog .uni-jp .uni-ruby-reading{position:absolute;bottom:calc(100% - .04em);left:50%;transform:translateX(-50%);font:400 min(var(--uni-annotation-size),.42em)/1 system-ui,sans-serif;white-space:nowrap;color:#6b547b;pointer-events:none}
html body #university-dialog .uni-jp{line-height:1.45}
/* Pronunciation aids: center the complete reading/kana stack, independently
   of the listen icon. Keep this scoped away from lesson cards and answers. */
html body #university-dialog[data-screen] .uni-question>.uni-pronunciation-aids{justify-content:flex-start}
html body #university-dialog[data-screen] .uni-answers:has(>.uni-pronunciation-aids){width:100%;align-self:stretch}
html body #university-dialog[data-screen] .uni-question .uni-pronunciation-aids .uni-option-row:last-of-type:nth-of-type(odd){justify-self:start}
html body #university-dialog[data-screen] .uni-pronunciation-aids{--uni-aid-font-size:27px;--uni-aid-padding:30px;container-type:inline-size;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:stretch;align-content:start;width:100%;align-self:stretch}
html body #university-dialog[data-voice=true] .uni-pronunciation-aids{--uni-aid-font-size:24px}
/* Only kana contributes to intrinsic width. The reserved top inset makes room
   for readings without stretching the Japanese line or shifting its center. */
html body #university-dialog[data-screen] .uni-pronunciation-aids .uni-option-row,
html body #university-dialog[data-screen] .uni-question .uni-pronunciation-aids .uni-option-row:last-of-type:nth-of-type(odd){flex:0 1 auto;width:max-content;max-width:100%;min-width:0}
html body #university-dialog[data-screen] .uni-pronunciation-aids .uni-button.uni-pronunciation-button{container-type:normal;display:flex;flex:0 1 auto;flex-direction:column;align-items:center;justify-content:center;width:max-content;min-width:0;max-width:100%;padding:8px var(--uni-aid-padding)!important}
html body #university-dialog[data-screen] .uni-pronunciation-aids .uni-button.uni-pronunciation-button .uni-jp{font-size:inherit;line-height:1}
html body #university-dialog[data-screen] .uni-pronunciation-aids .uni-button.uni-pronunciation-button>.uni-jp{font-size:min(var(--uni-aid-font-size),calc((100cqi - 2 * var(--uni-aid-padding)) / var(--uni-aid-units)));margin:0;flex:none;max-width:100%}
html body #university-dialog[data-screen] .uni-pronunciation-button .uni-jp-word{display:inline-block;vertical-align:middle}
html body #university-dialog[data-screen] .uni-pronunciation-button ruby{display:inline-block;vertical-align:baseline}
html body #university-dialog[data-screen] .uni-pronunciation-button rt{display:contents;font:inherit}
html body #university-dialog[data-screen] .uni-pronunciation-button>.uni-jp:has(rt){padding-top:.42em}
html body #university-dialog[data-screen] .uni-pronunciation-aids .uni-pronunciation-button>img{width:22px;height:22px;left:6px}
@media(max-height:650px){
 html body #university-dialog[data-screen] .uni-pronunciation-aids{--uni-aid-font-size:23px;--uni-aid-padding:24px}
 html body #university-dialog[data-voice=true] .uni-pronunciation-aids{--uni-aid-font-size:18px}
 html body #university-dialog[data-screen] .uni-pronunciation-aids .uni-button.uni-pronunciation-button{padding:4px var(--uni-aid-padding)!important}
 html body #university-dialog[data-screen] .uni-pronunciation-aids .uni-pronunciation-button>img{width:18px;height:18px;left:4px}
}
@media(orientation:portrait) and (max-height:650px){
 html body #university-dialog[data-screen] .uni-question:has(>.uni-voice-return) .uni-pronunciation-aids .uni-button.uni-pronunciation-button{padding-block:2px!important}
}
html body #university-dialog .uni-pair-column .uni-jp,html body #university-dialog .uni-options .uni-jp{font:400 27px/1.4 var(--uni-word-font);margin:0}
html body #university-dialog .uni-option-row>.uni-button,html body #university-dialog .uni-lexicon-word{position:relative;padding-left:36px;padding-right:36px;text-align:center}
html body #university-dialog .uni-option-row>.uni-button>img,html body #university-dialog .uni-lexicon-word>img{position:absolute;left:9px;top:50%;transform:translateY(-50%);width:22px;height:22px;margin:0}
html body #university-dialog .uni-option-row>.uni-button>.uni-jp,html body #university-dialog .uni-lexicon-word>.uni-jp{display:inline-block;grid-column:1/-1;position:relative}
html body #university-dialog .uni-lexicon-word>small{grid-column:1/-1;font:13px/1.3 system-ui}
html body #university-dialog .uni-lexicon-word{display:flex!important;flex-direction:column;justify-content:center;gap:3px;padding:22px 36px 8px!important;min-height:84px}
html body #university-dialog .uni-target-word{font-size:clamp(30px,4.7dvh,40px);margin:22px 0 12px;min-height:112px}
html body #university-dialog .uni-target-word>.uni-jp{font-size:inherit;line-height:1.45}
html body #university-dialog .uni-target-word>strong{font-size:inherit;line-height:1.25;text-align:center;overflow-wrap:anywhere}
html body #university-dialog .uni-target-sentence{font-size:clamp(25px,3.8dvh,34px)}
html body #university-dialog[data-screen=intro][data-lesson=word] .uni-lesson-word{position:relative;min-height:180px;margin-top:25px;display:block;padding:0}
html body #university-dialog[data-screen=intro][data-lesson=word] .uni-lesson-word>.uni-jp{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);text-align:center;font-size:44px;line-height:1.4;margin:0}
html body #university-dialog[data-screen=intro][data-lesson=word] .uni-lesson-word>p{position:absolute;top:calc(50% + 34px);left:8px;right:8px;margin:0;text-align:center;font:16px/1.3 system-ui}
html body #university-dialog .uni-question>.uni-listen-icon,html body #university-dialog .uni-exercise>.uni-listen-icon{display:flex;margin:4px auto 0;align-self:center}
html body #university-dialog[data-screen] .uni-source-phrase>.uni-jp{font-size:clamp(26px,3.6dvh,34px);line-height:2.1}
html body #university-dialog[data-screen] .uni-source-phrase>.uni-listen-icon{margin-top:calc((2.1 * clamp(26px,3.6dvh,34px) - 44px)/2);margin-bottom:-10px}
html body #university-dialog .uni-button.uni-audio-button:hover{border-image-source:url('/assets/university-ui-v02/blue-normal.png');background:none;filter:none}
html body #university-dialog .uni-button.uni-audio-button:active{border-image-source:url('/assets/university-ui-v02/blue-pressed.png');transform:translateY(2px)}
html body #university-dialog .uni-button:is([aria-pressed=true],[data-selected=true]){outline:none;box-shadow:none}
html body #university-dialog .uni-button:focus-visible{outline:2px solid #665575;outline-offset:2px}
html body #university-dialog .uni-pair-column>.uni-button,
html body #university-dialog .uni-pair-column>.uni-button:is([data-selected=true],[aria-pressed=true],:focus-visible){outline:none;box-shadow:none}
html body #university-dialog .uni-pair-column>.uni-button:focus-visible{filter:brightness(.94)}
html body #university-dialog .uni-button[data-tone=paper]{background:#fff9ed;border-image-slice:4}
html body #university-dialog .uni-button[data-tone=coral],html body #university-dialog .uni-pair-column>.uni-button[data-tone=pink]{border-image-source:url('/assets/university-ui-v02/pink-normal.png');border-image-slice:4 fill;background:none;filter:none}
html body #university-dialog .uni-pair-column>.uni-button[data-tone=mint]{border-image-source:url('/assets/university-ui-v02/mint-normal.png');border-image-slice:4 fill;background:none}
html body #university-dialog .uni-pair-column>.uni-button[data-tone=blue]{border-image-source:url('/assets/university-ui-v02/blue-normal.png');border-image-slice:4 fill;background:none}
html body #university-dialog .uni-pair-column>.uni-button[data-tone=lavender]{border-image-source:url('/assets/university-ui-v02/lavender-normal.png');border-image-slice:4 fill;background:none}
html body #university-dialog .uni-pair-column>.uni-button[data-tone=gold]{border-image-source:url('/assets/university-ui-v02/gold-normal.png');border-image-slice:4 fill;background:none}
html body #university-dialog .uni-pair-feedback{margin:28px auto 4px}
html body #university-dialog .uni-footer>[data-action=submit]:disabled{opacity:1;filter:grayscale(1);border-image-slice:4;background:#ded9df;color:#8a818d;cursor:default}
html body #university-dialog .uni-keyboard-choices{margin:34px auto 12px;max-width:none;width:100%;display:block}
html body #university-dialog .uni-keyboard-choice-hint{max-width:420px;margin:clamp(18px,3dvh,32px) auto 0;text-align:center;text-wrap:balance;font:18px/1.4 var(--uni-ui-font);color:#6b547b}
html body #university-dialog .uni-keyboard-choices .settings-toggle{position:relative;display:flex;justify-content:center;padding:18px 0;border:0;font-size:22px;gap:0}
html body #university-dialog .uni-keyboard-choices .settings-toggle>span{position:relative;display:block;text-align:center}
html body #university-dialog .uni-keyboard-choices .settings-toggle>input[type=checkbox]{position:absolute;right:calc(50% + 106px);top:50%;transform:translateY(-50%)}
/* Exact shared settings switch skin (interface-parity / interface-v2). */
html body #university-dialog .uni-keyboard-choices input[type=checkbox]{appearance:none;width:60px;height:34px;margin:0;flex:none;position:relative;border:3px solid #191722;border-radius:10px;background:#b5a7bd;box-shadow:inset 0 3px #00000013;transition:background-color .18s;overflow:hidden;cursor:pointer}
html body #university-dialog .uni-keyboard-choices input[type=checkbox]::after{content:'';display:block;box-sizing:border-box;position:absolute;left:2px;top:2px;width:24px;height:24px;border:3px solid #191722;border-radius:7px;background:#fffdf5;transform:translateX(0);transition:transform .18s}
html body #university-dialog .uni-keyboard-choices input[type=checkbox]:checked{background:#67dbb7}
html body #university-dialog .uni-keyboard-choices input[type=checkbox]:checked::after{transform:translateX(26px)}
html body #university-dialog .pixel-keyboard:is([data-mode=hiragana],[data-mode=katakana]) .pixel-keyboard-row button{font-family:'Noto Sans JP','Yu Gothic',sans-serif}
html body #university-dialog .uni-grammar-parts{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:22px 0 10px}
html body #university-dialog .uni-grammar-parts>.uni-button{padding:20px 12px 10px;min-height:68px;flex:0 1 auto}
html body #university-dialog .uni-grammar-parts .uni-jp{font-size:30px}
html body #university-dialog .uni-grammar-invitation{font:18px/1.4 var(--uni-ui-font);margin:16px 0 0;text-align:center}
html body #university-dialog .uni-grammar-explanation{font:20px/1.45 var(--uni-ui-font);margin:12px 0;min-height:120px}
html body #university-dialog[data-screen=intro] .uni-teacher-bubble{font:20px/1.45 var(--uni-ui-font)}
html body #university-dialog .uni-grammar-parts>.uni-button{--token-normal:url('/assets/university-ui-v02/paper-normal.png');--token-pressed:url('/assets/university-ui-v02/paper-pressed.png')}
html body #university-dialog .uni-grammar-parts>.uni-button[data-tone=mint]{--token-normal:url('/assets/university-ui-v02/mint-normal.png');--token-pressed:url('/assets/university-ui-v02/mint-pressed.png')}
html body #university-dialog .uni-grammar-parts>.uni-button[data-tone=blue]{--token-normal:url('/assets/university-ui-v02/blue-normal.png');--token-pressed:url('/assets/university-ui-v02/blue-pressed.png')}
html body #university-dialog .uni-grammar-parts>.uni-button[data-tone=lavender]{--token-normal:url('/assets/university-ui-v02/lavender-normal.png');--token-pressed:url('/assets/university-ui-v02/lavender-pressed.png')}
html body #university-dialog .uni-grammar-parts>.uni-button[data-tone=gold]{--token-normal:url('/assets/university-ui-v02/gold-normal.png');--token-pressed:url('/assets/university-ui-v02/gold-pressed.png')}
html body #university-dialog .uni-grammar-parts>.uni-button[data-tone],
html body #university-dialog .uni-grammar-parts>.uni-button[data-tone]:is(:hover,:focus-visible,[aria-pressed=true]){border:0;border-image-source:var(--token-normal);border-image-slice:4 fill;border-image-width:var(--uni-frame-corner);background:none;color:inherit;box-shadow:none;outline:none}
html body #university-dialog .uni-grammar-parts>.uni-button[data-tone]:active{border-image-source:var(--token-pressed)}
html body #university-dialog .uni-grammar-parts>.uni-button[data-tone]:focus-visible{filter:brightness(.94)}
html body #university-dialog .uni-exercise-context{font:500 19px/1.4 system-ui;margin:8px 0 22px}
html body #university-dialog .uni-inline-phrase{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px 3px;margin:32px 0 14px;line-height:1.7;padding-top:14px}
html body #university-dialog .uni-inline-phrase>.uni-jp{font-size:29px}
html body #university-dialog .uni-inline-input{box-sizing:border-box;width:calc(var(--field-ch,4) * 1em);max-width:100%;min-width:2.5em;height:50px;text-align:center;font-size:27px;padding:4px 6px;border:3px solid #ac92b9;border-radius:5px;background:#fff9ed;color:#493260;min-height:0}
html body #university-dialog .uni-inline-input:disabled{opacity:1}
html body #university-dialog .uni-inline-translation{font:17px/1.4 system-ui;text-align:center;margin:10px 0}
html body #university-dialog .uni-word-tile{font-family:var(--uni-word-font);overflow:visible}
html body #university-dialog .uni-word-tile>.uni-jp{font-size:24px;margin:0;line-height:1.2}
html body #university-dialog .uni-word-tile[lang=ja]{height:54px;padding:15px 12px 8px}
html body #university-dialog .uni-word-translation:has([lang=ja]){--uni-tile-height:54px;--uni-line-height:68px}
html body #university-dialog .uni-word-tile>.uni-inline-input{width:3em;height:38px;font-size:24px;margin:0 12px 0 0;padding:0;border:0;background:transparent;box-shadow:none;outline-offset:2px}
html body #university-dialog .uni-editable-remove{position:absolute;right:3px;top:0;background:none;border:0;font:20px system-ui;padding:3px;color:#685271}
html body #university-dialog .uni-word-tile[data-revealed=true][data-verdict=correct]{border-image-source:url('/assets/university-ui-v02/mint-normal.png')}
html body #university-dialog .uni-word-tile[data-revealed=true][data-verdict=wrong]{border-image-source:url('/assets/university-ui-v02/pink-normal.png')}
html body #university-dialog .uni-phrase-lines{overflow:visible}
html body #university-dialog[data-input=hybrid_tiles] .uni-word-translation{gap:15px}
html body #university-dialog[data-input=hybrid_tiles] .uni-exercise{display:flex;flex-direction:column;gap:10px}
html body #university-dialog[data-input=hybrid_tiles] .uni-answers{flex:1;display:flex;min-height:0}
html body #university-dialog[data-input=hybrid_tiles] .uni-question{flex:none}
/* Same enlargement as the kana keyboard, without a second selection frame. */
html[data-input-mode=mouse] body #university-dialog .uni-pair-column{box-sizing:border-box;padding-inline:5%}
html body #university-dialog [data-action=pair-card].is-pair-cursor{scale:1.1;position:relative;z-index:3;transform-origin:center}
html body #university-dialog [data-action=pair-card].is-pair-key-pressed:not(:disabled){transform:translateY(2px) scale(.97)!important;filter:brightness(1.12)!important}
html body #university-dialog .is-tile-cursor{scale:1.1;z-index:3;transform-origin:var(--tile-cursor-origin,center)}
html body #university-dialog .is-tile-key-pressed{transform:translateY(2px) scale(.97)!important;filter:brightness(1.12)!important}
html body #university-dialog[data-tile-navigation=true] .pixel-keyboard button.is-key-cursor{scale:1}
html body #university-dialog .uni-shell[data-transition=preparing]>:not(.uni-header){visibility:hidden}
html body #university-dialog .uni-shell[data-transition=preparing]>:not(.uni-header) *{animation:none!important}
html body #university-dialog .uni-course[data-locked=true]{cursor:default}
html body #university-dialog .uni-course-lock{display:block;color:#7b597c;margin-top:3px}
@media(max-height:720px) and (orientation:portrait){
 html body #university-dialog .uni-keyboard-choices{margin:16px auto 8px}
 html body #university-dialog .uni-keyboard-choice-hint{margin-top:16px;font-size:16px}
 html body #university-dialog .uni-target-word{min-height:84px;font-size:30px;margin-top:18px;padding:12px}
 html body #university-dialog .uni-grammar-explanation{font-size:18px;min-height:100px}
 html body #university-dialog[data-screen=intro] .uni-teacher-bubble{font-size:18px}
 html body #university-dialog .uni-inline-phrase{margin-top:22px}
 html body #university-dialog .uni-inline-phrase>.uni-jp{font-size:25px}
 html body #university-dialog .uni-inline-input{font-size:23px;height:44px}
 html body #university-dialog .uni-exercise-context{font-size:17px;margin-bottom:16px}
}
@media(max-height:600px) and (orientation:portrait){
 html body #university-dialog .uni-target-word{min-height:65px;font-size:27px;margin:14px 0 10px;padding:8px}
 html body #university-dialog[data-screen=exercise][data-typing=true] .uni-option-row>.uni-button{min-height:52px;padding-top:13px}
 html body #university-dialog .uni-options .uni-jp{font-size:23px}
 html body #university-dialog .uni-word-tile[lang=ja]{height:47px;padding:15px 9px 6px}
 html body #university-dialog .uni-word-translation:has([lang=ja]){--uni-tile-height:47px;--uni-line-height:58px}
 html body #university-dialog .uni-grammar-parts .uni-jp{font-size:25px}
 html body #university-dialog .uni-grammar-parts{gap:8px}
 html body #university-dialog .uni-inline-phrase{gap:7px 2px;margin:17px 0 8px}
 html body #university-dialog .uni-inline-phrase>.uni-jp{font-size:22px}
 html body #university-dialog .uni-inline-input{font-size:20px;height:39px}
}
@media(orientation:landscape) and (max-height:550px){
 html body #university-dialog .uni-keyboard-choices{margin:12px auto 8px}
 html body #university-dialog .uni-keyboard-choice-hint{margin-top:12px;font-size:16px}
 html body #university-dialog .uni-keyboard-choices .settings-toggle{padding:8px 0}
 html body #university-dialog[data-screen=intro] .uni-exercise:has(>.uni-grammar-parts){grid-template-rows:auto auto 1fr;align-content:start;gap:8px 22px}
 html body #university-dialog .uni-grammar-invitation{grid-column:1;grid-row:2;align-self:start}
 html body #university-dialog .uni-grammar-explanation{grid-column:1;grid-row:3;align-self:start;min-height:0}
 html body #university-dialog .uni-grammar-parts{grid-column:2;grid-row:2/4;align-self:start}
 html body #university-dialog .uni-target-word{min-height:82px;margin:20px 0 8px;font-size:29px}
 html body #university-dialog .uni-inline-phrase{margin:18px 0 10px}
 html body #university-dialog .uni-inline-phrase>.uni-jp{font-size:24px}
 html body #university-dialog .uni-inline-input{font-size:21px;height:40px}
 html body #university-dialog .uni-grammar-parts{margin:16px 0;gap:9px}
 html body #university-dialog .uni-grammar-parts .uni-jp{font-size:25px}
 html body #university-dialog .uni-grammar-explanation{font-size:18px;margin:0}
 html body #university-dialog .uni-grammar-invitation{text-align:left;margin-top:8px;font-size:17px}
 html body #university-dialog[data-screen=intro] .uni-teacher-bubble{font-size:18px}
 html body #university-dialog[data-screen=intro] .uni-teacher{grid-column:1/-1}
 html body #university-dialog .uni-exercise-context{font-size:17px;margin:6px 0 16px}
 html body #university-dialog .uni-word-tile[lang=ja]{height:46px}
 html body #university-dialog .uni-word-translation:has([lang=ja]){--uni-tile-height:46px;--uni-line-height:58px}
}
/* Sentence targets and their audio aids share one measured spacing rhythm. */
html body #university-dialog .uni-question.uni-has-models{--aid-gap:20px;display:flex;flex-direction:column}
html body #university-dialog .uni-question.uni-has-models>:is(.uni-target-word,.uni-target-sentence){margin-bottom:var(--aid-gap)}
html body #university-dialog .uni-question.uni-has-models>:is(.uni-options,.uni-lexicon){position:relative;gap:var(--aid-gap);margin:0}
/* Keep the label in the layout: the same gap separates frame, label and aids. */
html body #university-dialog[data-screen] .uni-question.uni-has-models{row-gap:0}
html body #university-dialog[data-screen] .uni-question.uni-has-models>:is(.uni-target-word,.uni-target-sentence){margin-bottom:var(--aid-gap)}
html body #university-dialog[data-screen] .uni-question.uni-has-models>.uni-pronunciation-aids:has(>.uni-model-label){flex-wrap:wrap;flex-shrink:0;row-gap:var(--aid-gap);align-content:start}
html body #university-dialog .uni-model-label{position:static;grid-column:1/-1;flex:0 0 100%;width:100%;margin:0;font:13px/1 var(--uni-ui-font);text-align:left}
html body #university-dialog .uni-question.uni-has-models .uni-option-row:last-of-type:nth-of-type(odd){grid-column:1/-1;width:calc((100% - var(--aid-gap)) / 2);justify-self:center}
html body #university-dialog .uni-reading-model{padding:8px 0;text-decoration:none;min-height:40px}
html body #university-dialog .uni-reading-model>.uni-jp{font-size:22px}
html body #university-dialog .uni-capsule-general{font:18px/1.4 var(--uni-ui-font);margin:8px 0}
/* Rich analysis uses the same lesson/interaction controls, with prose scrolling
   inside its own region when a small viewport cannot show the whole explanation. */
html body #university-dialog .uni-scroll:has(.uni-analysis-body){display:flex;overflow:hidden}
html body #university-dialog .uni-exercise[data-analysis=true]{display:flex;flex:1;flex-direction:column;min-height:0;height:100%;gap:8px}
html body #university-dialog .uni-analysis-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:0 2px 8px}
html body #university-dialog .uni-analysis-body .uni-grammar-parts{flex-wrap:wrap;margin:12px 0}
html body #university-dialog .uni-analysis-body .uni-grammar-invitation{margin:8px 0}
html body #university-dialog .uni-exercise[data-analysis=true]>.uni-stimulus{flex:none;padding-top:22px;margin:6px 0;min-height:104px}
html body #university-dialog .uni-exercise[data-analysis=true]>.uni-lesson-word{min-height:130px}
html body #university-dialog .uni-exercise[data-analysis=true]>.uni-listen-icon{flex:none}
@media(orientation:landscape){
 html body #university-dialog .uni-exercise[data-analysis=true]{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto minmax(0,1fr);gap:8px 22px}
 html body #university-dialog .uni-exercise[data-analysis=true]>h2{grid-column:1/-1}
 html body #university-dialog .uni-exercise[data-analysis=true]>.uni-stimulus{grid-column:1;grid-row:2}
 html body #university-dialog .uni-exercise[data-analysis=true]>.uni-listen-icon{grid-column:1;grid-row:3;align-self:start;justify-self:center}
 html body #university-dialog .uni-analysis-body{grid-column:2;grid-row:2/4}
}
html body #university-dialog[data-input=jp_sentence_input] .uni-question{--aid-gap:20px;display:flex;flex-direction:column}
html body #university-dialog[data-input=jp_sentence_input] .uni-question>.uni-target-sentence{margin:22px 0 var(--aid-gap);flex:none;font-size:clamp(22px,3.1dvh,27px)}
html body #university-dialog[data-input=jp_sentence_input] .uni-lexicon{display:flex;justify-content:center;gap:var(--aid-gap);margin:0}
html body #university-dialog[data-input=jp_sentence_input] .uni-lexicon>.uni-button{width:calc((100% - var(--aid-gap)) / 2);min-width:0}
@media(max-width:600px){
 html body #university-dialog .uni-grammar-parts{display:flex;flex-wrap:nowrap;gap:8px;margin-top:12px}
 html body #university-dialog .uni-grammar-parts>.uni-button{padding:16px 6px 8px;min-height:62px;min-width:0}
 html body #university-dialog .uni-grammar-parts .uni-jp{font-size:27px}
}
@media(max-width:350px){
 html body #university-dialog .uni-grammar-parts .uni-jp{font-size:22px}
 html body #university-dialog .uni-lexicon-word>.uni-jp{font-size:18px}
 html body #university-dialog .uni-lexicon-word{padding:18px 32px 6px!important;min-height:76px}
}
@media(max-width:350px),(orientation:landscape) and (max-height:550px){
 html body #university-dialog .uni-keyboard-choices .settings-toggle{font-size:19px}
 html body #university-dialog .uni-keyboard-choices .settings-toggle>input[type=checkbox]{right:calc(50% + 86px);width:48px;height:30px}
 html body #university-dialog .uni-keyboard-choices input[type=checkbox]::after{width:20px;height:20px}
 html body #university-dialog .uni-keyboard-choices input[type=checkbox]:checked::after{transform:translateX(18px)}
}
@media(max-height:600px){
 html body #university-dialog .uni-question.uni-has-models{--aid-gap:14px}
 html body #university-dialog[data-input=jp_sentence_input] .uni-question{--aid-gap:14px}
 html body #university-dialog[data-input=jp_sentence_input] .uni-question>.uni-target-sentence{margin-top:16px}
 html body #university-dialog .uni-pair-feedback{margin-top:18px}
 html body #university-dialog[data-screen=intro] .uni-exercise:has(>.uni-grammar-parts){gap:8px}
 html body #university-dialog .uni-grammar-invitation{margin-top:8px}
 html body #university-dialog .uni-grammar-parts{margin:12px 0 4px}
 html body #university-dialog .uni-grammar-explanation{margin:8px 0;min-height:0}
}
@media(max-height:600px) and (orientation:portrait){
 html body #university-dialog .uni-question.uni-has-models{--aid-gap:10px}
 html body #university-dialog .uni-question.uni-has-models>.uni-target-word{margin-top:4px;min-height:44px;padding:0;font-size:23px;line-height:1}
 html body #university-dialog .uni-question.uni-has-models>.uni-target-word>strong{line-height:1}
 html body #university-dialog .uni-question.uni-has-models>.uni-target-word .uni-jp{font-size:25px;line-height:1}
 html body #university-dialog[data-screen=exercise][data-typing=true] .uni-question.uni-has-models .uni-option-row>.uni-button{min-height:46px;padding:12px 8px 4px;line-height:1.2}
}
@media(orientation:landscape) and (max-height:550px){
 html body #university-dialog .uni-exercise[data-analysis=true]>.uni-lesson-word{min-height:112px}
 html body #university-dialog[data-screen=intro] .uni-exercise:has(>.uni-lesson-word):has(>.uni-teacher){grid-template-rows:auto auto auto}
 html body #university-dialog[data-screen=intro] .uni-exercise:has(>.uni-lesson-word):has(>.uni-teacher)>.uni-lesson-word{grid-column:1;grid-row:2/4;min-height:155px;margin:0}
 html body #university-dialog[data-screen=intro] .uni-exercise:has(>.uni-lesson-word):has(>.uni-teacher)>.uni-listen-icon{grid-column:2;grid-row:2;justify-self:center}
 html body #university-dialog[data-screen=intro] .uni-exercise:has(>.uni-lesson-word):has(>.uni-teacher)>.uni-teacher{grid-column:2;grid-row:3;align-self:start}
 html body #university-dialog[data-screen=intro] .uni-exercise:has(>.uni-grammar-parts){grid-template-rows:auto auto 1fr;gap:8px 18px}
 html body #university-dialog .uni-pair-column>.uni-button{height:48px;min-height:48px}
 html body #university-dialog[data-screen=intro] .uni-exercise:has(>.uni-grammar-parts)>h2{grid-column:1;grid-row:1}
 html body #university-dialog .uni-grammar-parts{grid-row:1/3;margin:4px 0;gap:8px}
 html body #university-dialog .uni-grammar-parts>.uni-button{padding:16px 6px 8px;min-height:62px;min-width:0}
 html body #university-dialog .uni-grammar-parts .uni-jp{font-size:22px}
 html body #university-dialog .uni-grammar-explanation{grid-column:1/-1;grid-row:3;margin:0}
}

/* Shared oral stimulus: the waveform comes from the recording's PCM envelope. */
#university-dialog .uni-oral-player{display:grid;gap:14px;width:min(100%,386px);margin:14px auto 16px;}
#university-dialog .uni-oral-line{display:flex;align-items:center;justify-content:center;gap:12px;min-width:0;}
#university-dialog .uni-oral-speaker{flex:0 0 auto;min-width:58px;font:600 clamp(17px,2.5vw,22px)/1.2 system-ui,sans-serif;color:#49372e;}
html body #university-dialog .uni-button.uni-audio-button.uni-oral-button{flex:0 0 48px;min-width:48px;width:48px;height:48px;min-height:48px;margin:0;padding:5px;}
#university-dialog .uni-oral-button img{width:28px;height:28px;object-fit:contain;image-rendering:pixelated;}
html body #university-dialog .uni-button.uni-audio-button.uni-oral-button:hover:not(:active):not(:disabled){border-image-source:url('/assets/university-ui-v02/blue-normal.png');color:inherit;filter:none;}
#university-dialog .uni-oral-waveform{position:relative;flex:0 1 256px;width:256px;min-width:0;height:44px;color:#759bb8;}
#university-dialog .uni-oral-waveform svg{display:block;width:100%;height:100%;overflow:visible;}
#university-dialog .uni-oral-waveform rect{fill:#b4cada;}
#university-dialog .uni-oral-waveform rect[data-played=true]{fill:#527f9f;}
#university-dialog .uni-oral-baseline{stroke:#b4cada;stroke-width:2;}
#university-dialog .uni-oral-cursor{position:absolute;top:1px;bottom:1px;width:2px;background:#416c90;transform:translateX(-1px);pointer-events:none;}
#university-dialog .uni-oral-cursor[hidden],#university-dialog .uni-oral-hint[hidden]{display:none;}
#university-dialog .uni-oral-hint{margin:0;font:14px/1.35 system-ui,sans-serif;color:#635651;}
@media(max-height:600px){#university-dialog .uni-oral-player{gap:8px;margin:8px auto 10px;}#university-dialog .uni-oral-line{gap:9px;}html body #university-dialog .uni-button.uni-audio-button.uni-oral-button{width:42px;height:42px;min-width:42px;min-height:42px;flex-basis:42px;}#university-dialog .uni-oral-waveform{height:38px;}}

/* Shared V4 result and course completion presentation; no new native drawing. */
html body #university-dialog .is-action-cursor{scale:1.1;position:relative;z-index:3}
html body #university-dialog .uni-options .is-action-cursor{transform-origin:var(--action-cursor-origin,center)}
html body #university-dialog .uni-voice-word{pointer-events:none}
html body #university-dialog .is-action-key-pressed:not(:disabled){transform:translateY(2px) scale(.97)!important;filter:brightness(1.12)!important}
html body #university-dialog .uni-finish-actions>.is-action-cursor{transform-origin:center}
/* Reserve zoom clearance from first paint: selection must never change layout. */
@media(min-width:1000px) and (min-height:700px){html body #university-dialog .uni-footer .uni-finish-actions{gap:5%}}
/* Keep typed answers in their original slot when the keyboard and Validate leave.
   Long feedback scrolls inside the sheet, below the learner's unchanged answer. */
html body #university-dialog[data-screen=exercise] .uni-shell:has(>.uni-response>.uni-answer) .uni-footer{min-height:var(--uni-action-height)}
html body #university-dialog .uni-shell:has(>.uni-response>.uni-answer[readonly]) .uni-result-sheet{display:flex;max-height:min(85dvh,max(240px,var(--uni-answer-sheet-max,85dvh)))}
html body #university-dialog .uni-shell:has(>.uni-response>.uni-answer[readonly]) .uni-sheet-inner{max-height:none;flex:0 1 auto}
@media(orientation:landscape) and (max-height:500px){
 html body #university-dialog[data-screen=exercise] .uni-shell:has(>.uni-response>.uni-answer){row-gap:5px}
}
@media(max-width:360px) and (max-height:600px) and (orientation:portrait){
 /* Fit a short correction plus both actions below the retained answer. */
 html body #university-dialog .uni-shell:has(>.uni-response>.uni-answer[readonly]) .uni-result-sheet:has([data-action=save-card]){padding-top:8px}
 html body #university-dialog .uni-shell:has(>.uni-response>.uni-answer[readonly]) .uni-result-sheet:has([data-action=save-card]) .uni-sheet-inner{gap:8px}
 html body #university-dialog .uni-shell:has(>.uni-response>.uni-answer[readonly]) .uni-result-sheet:has([data-action=save-card]) .uni-sheet-title{font-size:23px;line-height:1.1;margin:0}
 html body #university-dialog .uni-shell:has(>.uni-response>.uni-answer[readonly]) .uni-result-sheet:has([data-action=save-card]) .uni-result-icon{font-size:28px}
 html body #university-dialog .uni-shell:has(>.uni-response>.uni-answer[readonly]) .uni-result-sheet:has([data-action=save-card]) .uni-sheet-correction{margin:2px 0}
 html body #university-dialog .uni-shell:has(>.uni-response>.uni-answer[readonly]) .uni-correction-answer:has(>.uni-editorial-correction){display:flex;align-items:center;gap:8px;font-size:20px}
 html body #university-dialog .uni-shell:has(>.uni-response>.uni-answer[readonly]) .uni-editorial-correction{flex:1;min-width:0}
 html body #university-dialog .uni-shell:has(>.uni-response>.uni-answer[readonly]) .uni-correction-answer:has(>.uni-editorial-correction)>.uni-audio-button{flex:none;width:36px;height:36px;min-width:36px;min-height:36px;padding:6px;margin:0}
 html body #university-dialog .uni-shell:has(>.uni-response>.uni-answer[readonly]) .uni-sheet-actions>[data-action=save-card]{font-size:18px;padding:4px 6px}
}
html body #university-dialog .uni-why{text-decoration:none}
/* The collapsed prompt and a one-line explanation occupy the same line slot. */
html body #university-dialog :is(.uni-why,.uni-sheet-explanation){box-sizing:border-box;min-height:34px;margin:0;padding:4px 0;border:0;font:18px/1.4 var(--uni-ui-font)}
html body #university-dialog .uni-sheet-explanation p{margin:0;font:inherit}
html body #university-dialog .uni-sheet-explanation p+p{margin-top:8px}
/* Feedback readings remain per-kana annotations, with enough room above them. */
html body #university-dialog .uni-result-sheet :is(.uni-sheet-correction,.uni-sheet-explanation) .uni-jp{font-size:26px;line-height:1.85}
html body #university-dialog .uni-result-sheet .uni-jp .uni-ruby-reading{font-size:13px}
@media(max-width:360px),(max-height:500px){
 html body #university-dialog .uni-result-sheet :is(.uni-sheet-correction,.uni-sheet-explanation) .uni-jp{font-size:24px}
 html body #university-dialog .uni-result-sheet .uni-jp .uni-ruby-reading{font-size:12px}
}
html body #university-dialog .uni-sheet-inner{display:flex;flex-direction:column;align-items:stretch;gap:12px}
html body #university-dialog .uni-sheet-content{flex:0 1 auto;min-height:0}
html body #university-dialog .uni-sheet-actions{flex:0 0 auto;margin-top:auto}
/* Animating content height changes only the top edge of the bottom-fixed sheet. */
html body #university-dialog .uni-result-sheet{overflow:hidden}
@media(max-width:360px),(max-height:500px){html body #university-dialog :is(.uni-why,.uni-sheet-explanation){min-height:32px;font-size:17px}}
html body #university-dialog[data-screen=result] .uni-shell{max-width:var(--uni-page);padding:var(--pixel-close-top,max(4px,env(safe-area-inset-top))) var(--uni-gutter) var(--uni-bottom);gap:12px}
html body #university-dialog[data-screen=result] .uni-header{height:48px;min-height:48px;align-items:center;padding:0 28px}
html body #university-dialog[data-screen=result] .uni-header :is(h1,.uni-heading>p,.uni-note){display:none}
html body #university-dialog[data-screen=result] .uni-heading{display:block;width:100%}
html body #university-dialog[data-screen=result] .uni-progress{display:block;margin:0;width:100%;height:16px;border-width:3px}
html body #university-dialog[data-screen=result] .uni-scroll{display:flex;flex-direction:column;overflow:hidden;padding:0}
html body #university-dialog[data-screen=result] .uni-exercise{flex:1;width:100%;max-width:none;min-height:0;display:flex;flex-direction:column}
html body #university-dialog[data-screen=result] .uni-footer{padding:0;min-height:var(--uni-action-height);width:100%;max-width:none}
html body #university-dialog .uni-course-finish{flex:1;min-height:0;display:flex;flex-direction:column;gap:clamp(16px,3dvh,32px)}
html body #university-dialog .uni-finish-title{margin:0;font:700 clamp(24px,3.7dvh,38px)/1.2 var(--uni-ui-font)}
html body #university-dialog .uni-finish-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(8px,1.5vw,18px)}
html body #university-dialog .uni-finish-metric{container-type:inline-size;min-width:0;border:8px solid transparent;border-image:url('/assets/university-ui-v02/paper-normal.png') 4 stretch;border-image-width:var(--uni-frame-corner);background:#fff9ed;background-clip:padding-box;padding:clamp(14px,2.5dvh,30px) 4px;text-align:center;display:flex;flex-direction:column;gap:8px}
html body #university-dialog .uni-finish-metric[data-state=waiting]{visibility:hidden}
html body #university-dialog .uni-finish-metric[data-tone=mint]{border-image-source:url('/assets/university-ui-v02/mint-normal.png');background-color:#d8f1e3;color:#285e4e}
html body #university-dialog .uni-finish-metric[data-tone=gold]{border-image-source:url('/assets/university-ui-v02/gold-normal.png');background-color:#fff0ca;color:#725a32}
html body #university-dialog .uni-finish-metric[data-tone=pink]{border-image-source:url('/assets/university-ui-v02/pink-normal.png');background-color:#f7d7db;color:#783e51}
html body #university-dialog .uni-finish-value{display:block;font:500 clamp(25px,4dvh,46px)/1.1 var(--uni-ui-font);white-space:nowrap;font-variant-numeric:tabular-nums}
html body #university-dialog .uni-finish-metric-label{font:16px/1.3 var(--uni-ui-font);min-height:1.3em}
html body #university-dialog .uni-finish-celebration{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:clamp(10px,2dvh,22px)}
html body #university-dialog .uni-finish-star{width:clamp(82px,17dvh,170px);height:clamp(82px,17dvh,170px);object-fit:contain;image-rendering:pixelated}
html body #university-dialog .uni-finish-star:is([data-star=completed],[data-star=perfect]){filter:none}
html body #university-dialog .uni-finish-star[data-star=empty]{filter:grayscale(1);opacity:.35}
html body #university-dialog .uni-finish-completed{font:700 clamp(29px,4.5dvh,46px)/1.2 var(--uni-ui-font);margin:0;text-align:center}
html body #university-dialog .uni-finish-celebration [data-visible=false]{visibility:hidden}
html body #university-dialog .uni-finish-actions{display:flex;gap:12px;width:100%;justify-content:space-between}
html body #university-dialog .uni-finish-actions>.uni-button{flex:1;min-width:0;max-width:calc(50% - 6px);height:var(--uni-action-height,56px);padding:8px 6px;font:clamp(18px,3.8vw,27px)/1.1 UniversityActions,var(--uni-ui-font);text-transform:uppercase}
@media(max-width:380px){
 html body #university-dialog .uni-finish-value{font-size:20px}
 html body #university-dialog .uni-finish-metric-label{font-size:14px}
 html body #university-dialog .uni-finish-metric{padding:14px 2px}
 html body #university-dialog .uni-finish-actions>.uni-button{font-size:16px;padding:4px 6px}
}
@media(max-height:720px) and (orientation:portrait){html body #university-dialog[data-screen=result] .uni-shell{gap:8px}}
@media(max-height:500px) and (orientation:landscape){
 html body #university-dialog[data-screen=result] .uni-shell{gap:6px}
 html body #university-dialog .uni-sheet-inner{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto;gap:24px;align-items:end}
 html body #university-dialog .uni-sheet-actions{align-self:end}
 html body #university-dialog .uni-course-finish{display:grid;grid-template-columns:1fr 170px;grid-template-rows:auto 1fr;gap:10px 18px}
 html body #university-dialog .uni-finish-title{grid-column:1/-1;font-size:24px}
 html body #university-dialog .uni-finish-metrics{align-self:center;gap:8px}
 html body #university-dialog .uni-finish-metric{padding:12px 2px;gap:4px}
 html body #university-dialog .uni-finish-value{font-size:28px}
 html body #university-dialog .uni-finish-metric-label{font-size:14px}
 html body #university-dialog .uni-finish-star{width:74px;height:74px}
 html body #university-dialog .uni-finish-celebration{gap:6px}
 html body #university-dialog .uni-finish-completed{font-size:26px}
}
@media(prefers-reduced-motion:reduce){html body #university-dialog .uni-course-finish *{animation:none!important;transition:none!important}}
/* The value follows its own card width, not the screen height (100,0 % must
   still fit on a tall narrow phone). Other typography keeps its normal size. */
html body #university-dialog .uni-finish-value{max-width:100%;font-size:clamp(16px,23cqi,46px)}
html body #university-dialog .uni-finish-star.uni-finish-grade{padding:4px;filter:url(#uni-grade-outline)}
html body #university-dialog .uni-assessment-grade{align-items:center;max-width:100%;margin:16px 0;gap:12px}
html body #university-dialog .uni-assessment-grade .uni-grade-outlined{display:grid;place-items:center;filter:url(#uni-grade-outline);padding:4px}
html body #university-dialog .uni-assessment-grade .uni-assessment-letter{margin:0}
html body #university-dialog .uni-assessment-grade strong{max-width:100%;font-size:clamp(28px,10vw,46px)}
/* Subject summary is the correction navigation: one expanded section at a
   time, native details keyboard behavior, stable item order within a subject. */
html body #university-dialog .uni-subject-review{display:block;text-align:left;max-width:100%;margin:12px auto}
html body #university-dialog .uni-subject-review > h3{margin:12px 0}
html body #university-dialog .uni-subject-review-group{margin:10px 0;border:0}
html body #university-dialog .uni-subject-review-group > summary{display:flex;align-items:center;gap:12px;min-height:54px;padding:12px 14px;border:0;border-image:url('/assets/university-ui-v02/lavender-normal.png') 4 fill stretch;border-image-width:var(--uni-frame-corner);cursor:pointer;list-style:none;font:20px/1.3 var(--uni-ui-font)}
html body #university-dialog .uni-subject-review-group > summary::-webkit-details-marker{display:none}
html body #university-dialog .uni-subject-review-group > summary::after{content:'+';font:24px/1 system-ui;margin-left:2px;flex:none}
html body #university-dialog .uni-subject-review-group[open] > summary::after{content:'−'}
html body #university-dialog .uni-subject-review-label{flex:1;min-width:0;overflow-wrap:anywhere}
html body #university-dialog .uni-subject-review-score{white-space:nowrap;flex:none}
html body #university-dialog .uni-subject-review-group > summary:focus-visible{outline:none;filter:brightness(.94)}
html body #university-dialog .uni-subject-review-items{padding:4px 6px 12px}
html body #university-dialog .uni-subject-review-items .uni-review-entry > summary{position:relative;padding:10px 10px 10px 36px;border:0;border-image:url('/assets/university-ui-v02/pink-normal.png') 4 fill stretch;border-image-width:var(--uni-frame-corner);color:#843e49;list-style:none;overflow-wrap:anywhere}
html body #university-dialog .uni-subject-review-items .uni-review-entry > summary::-webkit-details-marker{display:none}
html body #university-dialog .uni-subject-review-items .uni-review-entry > summary::before{content:'×';position:absolute;left:12px;font:700 22px/1.3 system-ui}
html body #university-dialog .uni-subject-review-items .uni-review-entry[data-outcome=succeeded] > summary{border-image-source:url('/assets/university-ui-v02/mint-normal.png');color:#285f54}
html body #university-dialog .uni-subject-review-items .uni-review-entry[data-outcome=succeeded] > summary::before{content:'✓'}
html body #university-dialog .uni-subject-review-items .uni-review-entry p{overflow-wrap:anywhere}
@media(max-width:380px){html body #university-dialog .uni-subject-review-group > summary{font-size:17px;gap:8px;padding:12px}html body #university-dialog .uni-subject-review-items .uni-review-entry > summary{font-size:18px}}

/* The timetable is the window, above its two actions, over the live town. */
html body #university-dialog[data-screen=timetable]{
 inset:0;margin:auto;width:min(680px,calc(100% - 24px));height:fit-content;
 max-height:calc(100dvh - 24px);padding:0;overflow:visible;background:transparent;
 border:0;border-radius:0;box-shadow:none;
 --uni-timetable-height:clamp(208px,35dvh,288px);--uni-timetable-reveal:72px;--uni-timetable-title-lift:20px;
}
html body #university-dialog[data-screen=timetable][data-timetable-anchored=true]{top:auto;bottom:max(6px,min(calc((100dvh - var(--uni-timetable-rest-height)) / 2),calc(100dvh - var(--uni-timetable-rest-height) - var(--uni-timetable-reveal) - 6px)));margin:0 auto}
html body #university-dialog[data-screen=timetable]::backdrop{background:rgb(28 21 43 / .35);backdrop-filter:none}
html body #university-dialog[data-screen=timetable] .uni-shell{
 position:relative;display:flex;width:100%;max-width:none;height:auto;min-height:0;padding:8px;gap:0;
 border:0;border-image:url('/assets/university-ui-v02/paper-normal.png') 4 fill stretch;border-image-width:var(--uni-frame-corner);
 transform-origin:center;animation:uni-pop 320ms ease-out both;
}
html body #university-dialog[data-screen=timetable] :is(.uni-response,.uni-keyboard-slot,.uni-footer){display:none}
html body #university-dialog[data-screen=timetable] .uni-header{display:contents}
html body #university-dialog[data-screen=timetable] .uni-header>:not(.uni-close){display:none}
/* Shared 48px target / 28px icon, regardless of the window size. */
html body #university-dialog[data-screen=timetable] .uni-close{position:absolute;left:6px;top:6px;display:grid;place-items:center}
html body #university-dialog[data-screen=timetable][data-departing=true]{pointer-events:none}
html body #university-dialog[data-screen=timetable] .uni-alert:empty{display:none}
html body #university-dialog[data-screen=timetable] .uni-scroll{flex:none;overflow:visible;min-height:0;padding:0}
html body #university-dialog[data-screen=timetable] .uni-timetable{border:0;border-image:none;padding:0;margin:0;max-width:none;text-align:center}
html body #university-dialog[data-screen=timetable] h2{font:700 36px/1.1 var(--uni-ui-font);margin:0 46px 10px}
html body #university-dialog[data-screen=timetable] .uni-day-subtitle{font:20px/1.3 var(--uni-ui-font);margin:0 14px 0;text-wrap:balance}
html body #university-dialog[data-screen=timetable] .uni-timetable-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);align-items:end;gap:8px;height:calc(var(--uni-timetable-height) + 8px);padding:8px 4px 0;transition:height 220ms ease-out}
html body #university-dialog[data-screen=timetable] .uni-timetable-columns[data-expanded=true]{height:calc(var(--uni-timetable-height) + var(--uni-timetable-reveal) + 8px)}
html body #university-dialog[data-screen=timetable] .uni-timetable-subject{display:contents}
html body #university-dialog[data-screen=timetable] .uni-timetable-toggle{
 position:relative;display:grid;grid-template-rows:42px minmax(0,1fr) auto 38px;justify-items:center;align-items:center;
 width:100%;min-width:0;min-height:0;height:var(--uni-timetable-height);padding:10px 10px 8px;gap:6px;
 border:0;border-radius:0;border-image:url('/assets/university-ui-v02/mint-normal.png') 4 fill stretch;border-image-width:var(--uni-frame-corner);background:none;color:#365749;
 transition:height 220ms ease-out;
}
html body #university-dialog[data-screen=timetable] .uni-timetable-toggle[data-tone=lavender]{border-image-source:url('/assets/university-ui-v02/lavender-normal.png');color:#59456f}
html body #university-dialog[data-screen=timetable] .uni-timetable-toggle[data-tone=blue]{border-image-source:url('/assets/university-ui-v02/blue-normal.png');color:#365e7b}
html body #university-dialog[data-screen=timetable] .uni-timetable-toggle[data-tone=gold]{border-image-source:url('/assets/university-ui-v02/gold-normal.png');color:#78582d}
html body #university-dialog[data-screen=timetable] .uni-timetable-toggle[aria-expanded=true]{height:calc(var(--uni-timetable-height) + var(--uni-timetable-reveal))}
html body #university-dialog[data-screen=timetable] .uni-timetable-toggle:focus-visible{outline:2px solid #765099;outline-offset:1px}
html body #university-dialog[data-screen=timetable] .uni-timetable-subject-title{font:700 20px/1.1 var(--uni-ui-font);text-align:center;text-wrap:balance;overflow-wrap:anywhere}
html body #university-dialog[data-screen=timetable] .uni-timetable-emblem{container-type:size;display:grid;place-items:center;width:100%;height:100%;min-height:0;min-width:0}
html body #university-dialog[data-screen=timetable] .uni-timetable-emblem img{width:min(var(--uni-icon-fit-width,100cqw),calc(min(100cqw,100cqh,144px) * var(--uni-icon-scale,1)));height:auto;aspect-ratio:1;object-fit:contain;image-rendering:pixelated;pointer-events:none;transform:translateX(var(--uni-icon-offset-x,0%))}
/* Lift only the label. Keep the original auto row and logo alignment in both
   states, so opening/closing never switches grid allocation or image anchoring. */
html body #university-dialog[data-screen=timetable] .uni-timetable-description{display:grid;grid-template-rows:0fr;width:100%;font:16px/1.2 var(--uni-ui-font);text-wrap:balance;overflow-wrap:anywhere;opacity:0;transform:translateY(calc(-1 * var(--uni-timetable-title-lift)));transition:grid-template-rows 220ms ease-out,opacity 160ms ease-out}
html body #university-dialog[data-screen=timetable] .uni-timetable-description>span{min-height:0;overflow:hidden}
html body #university-dialog[data-screen=timetable] [aria-expanded=true] .uni-timetable-description{grid-template-rows:1fr;opacity:1}
html body #university-dialog[data-screen=timetable] .uni-timetable-xp{display:inline-flex;align-items:center;justify-content:center;height:38px;max-width:100%;padding:6px 10px;border:0;border-image:url('/assets/university-ui-v02/blue-normal.png') 4 fill stretch;border-image-width:var(--uni-frame-corner);color:#365e7b;font:20px/1 var(--uni-ui-font);white-space:nowrap}
html body #university-dialog[data-screen=timetable] .uni-lobby-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:28px 4px 0;max-width:none}
html body #university-dialog[data-screen=timetable] .uni-lobby-actions>.uni-button{min-width:0;width:100%;height:50px;min-height:50px;padding:8px 6px;font:25px/1.1 UniversityActions,var(--uni-ui-font);text-transform:uppercase;white-space:nowrap;overflow-wrap:normal}
html body #university-dialog[data-screen=timetable] .uni-day-navigation{gap:0 12px;margin:8px 4px 0}
html body #university-dialog[data-screen=timetable] .uni-day-navigation .uni-link{font:12px/1.2 var(--uni-ui-font);padding:5px 0}
@media(max-width:600px){
 html body #university-dialog[data-screen=timetable]{--uni-timetable-reveal:80px}
 html body #university-dialog[data-screen=timetable] h2{font-size:clamp(28px,7.8vw,34px);margin:0 36px 10px}
 html body #university-dialog[data-screen=timetable] .uni-day-subtitle{font-size:16px;margin-inline:8px}
 html body #university-dialog[data-screen=timetable] .uni-timetable-columns{gap:6px}
 html body #university-dialog[data-screen=timetable] .uni-timetable-toggle{padding:8px 6px;grid-template-rows:36px minmax(0,1fr) auto 32px;gap:5px}
 html body #university-dialog[data-screen=timetable] .uni-timetable-subject-title{font-size:clamp(12px,3.8vw,18px)}
 html body #university-dialog[data-screen=timetable] .uni-timetable-description{font-size:14px}
 html body #university-dialog[data-screen=timetable] .uni-timetable-xp{font-size:16px;height:32px;padding:4px 8px}
 html body #university-dialog[data-screen=timetable] .uni-lobby-actions{margin-top:24px}
 html body #university-dialog[data-screen=timetable] .uni-lobby-actions>.uni-button{font-size:clamp(15px,4.9vw,24px);height:46px;min-height:46px}
}
@media(max-width:350px){
 html body #university-dialog[data-screen=timetable]{--uni-timetable-title-lift:10px}
 html body #university-dialog[data-screen=timetable] h2{margin-inline:38px 4px}
 html body #university-dialog[data-screen=timetable] .uni-lobby-actions>.uni-button{font-size:15px}
}
@media(orientation:landscape) and (max-height:550px){
 html body #university-dialog[data-screen=timetable]{width:min(660px,calc(100% - 24px));--uni-timetable-height:128px;--uni-timetable-reveal:44px;--uni-timetable-title-lift:0px;max-height:calc(100dvh - 12px)}
 html body #university-dialog[data-screen=timetable] h2{font-size:28px;margin:0 48px 6px}
 html body #university-dialog[data-screen=timetable] .uni-day-subtitle{font-size:15px}
 html body #university-dialog[data-screen=timetable] .uni-timetable-toggle{grid-template-rows:30px minmax(0,1fr) auto 26px;padding:4px 8px;gap:2px}
 html body #university-dialog[data-screen=timetable] .uni-timetable-subject-title{font-size:16px}
 html body #university-dialog[data-screen=timetable] .uni-timetable-description{font-size:13px}
 html body #university-dialog[data-screen=timetable] .uni-timetable-xp{font-size:16px;height:26px;padding:3px 10px}
 html body #university-dialog[data-screen=timetable] .uni-lobby-actions{margin-top:16px;gap:8px}
 html body #university-dialog[data-screen=timetable] .uni-lobby-actions>.uni-button{height:40px;min-height:40px;font-size:21px}
 html body #university-dialog[data-screen=timetable] .uni-day-navigation{margin-top:4px;gap:0 10px}
}
@media(orientation:landscape) and (max-height:350px){
 html body #university-dialog[data-screen=timetable]{--uni-timetable-height:114px}
 html body #university-dialog[data-screen=timetable] h2{margin-block:0;font-size:27px}
 html body #university-dialog[data-screen=timetable] .uni-day-subtitle{font-size:14px}
 html body #university-dialog[data-screen=timetable] .uni-lobby-actions{margin-top:14px}
 html body #university-dialog[data-screen=timetable] .uni-day-navigation .uni-link{padding-block:2px;font-size:11px}
}
@media(prefers-reduced-motion:reduce){
 html body #university-dialog[data-screen=timetable] .uni-shell{animation:none}
 html body #university-dialog[data-screen=timetable] :is(.uni-timetable-toggle,.uni-timetable-description,.uni-timetable-columns){transition:none}
}

/* J2 uses shared J1 lesson, model and interaction layouts. */
html body #university-dialog .uni-day-navigation{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 20px;margin:12px auto 0;font:16px var(--uni-ui-font)}
html body #university-dialog .uni-day-navigation [aria-current=true]{font-weight:bold;text-decoration:underline}
html body #university-dialog .uni-developer-tools{position:fixed;z-index:12;right:5px;top:3px;max-width:min(95vw,480px);background:#eee3f8;border:1px solid #967da4;padding:4px 8px;font:12px/1.3 system-ui;color:#483354;box-shadow:0 3px 6px #49326030}
html body #university-dialog .uni-developer-tools summary{cursor:pointer;list-style:none;font-size:10px}
html body #university-dialog .uni-developer-tools[open]{padding:12px;z-index:2001}
html body #university-dialog .uni-developer-tools small{display:block;margin-top:10px}
html body #university-dialog .uni-developer-tools button{font:13px system-ui;min-height:36px;margin-right:12px}
html body #university-dialog .uni-editorial-segments{font:400 clamp(26px,3.8dvh,38px)/1.65 var(--uni-word-font);white-space:normal}
html body #university-dialog .uni-editorial-segments .uni-jp{font-size:inherit;display:inline;margin:0}
html body #university-dialog .uni-jp-segments>.uni-jp{font-size:inherit;display:inline;margin:0}
html body #university-dialog .uni-focus-word{background:#fff0bd;border-bottom:0;text-decoration:none;padding:0 4px}
html body #university-dialog .uni-editorial-model .uni-editorial-segments{font-size:24px}
html body #university-dialog .uni-pair-column .uni-editorial-segments{font-size:26px}
html body #university-dialog .uni-pair-column button:has(small){display:flex;flex-direction:column;justify-content:center}
html body #university-dialog .uni-pair-column small{font:14px system-ui}
html body #university-dialog .uni-kanji-reveal{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin-top:12px;font:18px var(--uni-ui-font)}
html body #university-dialog .uni-kanji-reveal>.uni-jp{font-size:26px}
html body #university-dialog .uni-editorial-correction>.uni-jp{font-size:inherit;display:inline;line-height:1.4}
@media(orientation:landscape) and (max-height:550px){
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=false] .uni-scroll{grid-column:1/-1}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=false] .uni-exercise{display:grid;grid-template-columns:1fr 1fr;gap:24px}
 html body #university-dialog[data-editorial=true] .uni-word-tile>.uni-jp{font-size:20px}
 html body #university-dialog[data-editorial=true] .uni-word-tile[lang=ja]{height:40px;padding:13px 8px 6px}
 html body #university-dialog[data-editorial=true] .uni-word-translation:has([lang=ja]){--uni-tile-height:40px;--uni-line-height:46px;--uni-tile-gap:6px}
}
@media(orientation:portrait),(max-height:650px){
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-question{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:36px 8px}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-question h2{grid-column:1/-1;margin:0 0 4px}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-target-sentence{min-height:44px;font-size:18px;margin:0;padding:4px;grid-row:2}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-options{margin:0;grid-column:2;grid-row:2}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-options .uni-option-row{width:100%;max-width:100%;flex:1}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-options .uni-button{padding:12px 8px 4px 22px;min-height:44px}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-options img{width:14px;height:14px;left:5px}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-jp{font-size:18px}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-word-translation{grid-template-rows:auto auto;align-content:start;gap:6px;--uni-tile-height:34px;--uni-line-height:40px;--uni-tile-gap:6px}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-word-tile[lang=ja]{height:34px;padding:11px 6px 4px}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-word-tile>.uni-jp{font-size:18px}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-word-tile>.uni-inline-input{font-size:20px;width:2.5em;height:28px;margin-right:12px}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-phrase-lines{padding:4px 0;align-self:start}
}

/* Extensions use the existing fonts, buttons, frames and keyboards. */
html body #university-dialog .uni-day-navigation{flex-wrap:wrap;gap:8px 16px}
html body #university-dialog .uni-reading-support{font-size:clamp(21px,3.5vmin,30px);line-height:1.9;max-height:26vh;overflow-y:auto;text-align:left;padding:12px 16px;border-left:4px solid #cab5dc;white-space:pre-wrap;overscroll-behavior:contain;scrollbar-width:thin}
html body #university-dialog[data-editorial=true] .uni-stimulus.uni-long-prompt{font-size:clamp(18px,3.2dvh,25px);min-height:0;padding:12px;margin-top:10px}
html body #university-dialog:has(.uni-reading-support) .uni-question{gap:12px;min-height:0}
html body #university-dialog:has(.uni-reading-support) .uni-answers{min-height:0}
.uni-voice-input{max-width:640px;width:100%;margin:10px auto 0;text-align:center}
html body #university-dialog .uni-answer[hidden]{display:none}
html body #university-dialog:has(.uni-voice-targets[data-auto-submit=true]) .uni-footer{display:none}
.uni-voice-targets{width:100%;text-align:center}
.uni-voice-instruction{font-family:var(--uni-ui-font);font-size:17px;line-height:1.3;margin:0 0 12px}
.uni-voice-words{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;align-items:center;--uni-tile-height:54px;--uni-tile-font:24px;padding-top:10px}
html body #university-dialog .uni-voice-word{cursor:default;user-select:text;filter:none}
html body #university-dialog .uni-voice-word[data-recognized=false]{filter:grayscale(1);color:#6b6373}
html body #university-dialog .uni-voice-word[lang=ja]{padding-top:8px}
.uni-voice-debug{margin:10px auto 0;text-align:left;width:100%;max-width:680px}
.uni-voice-debug-label{display:block;font:14px/1.3 var(--uni-ui-font);margin-bottom:3px}
html body #university-dialog input.uni-voice-raw{width:100%;min-height:32px;height:34px;box-sizing:border-box;padding:3px 8px;font:18px/1.2 'Noto Sans JP','Yu Gothic',Meiryo,sans-serif;color:#44344e;background:#fffaf0;border:2px solid #b5a6c4;border-radius:0}
.uni-voice-reading{font:15px/1.4 'Noto Sans JP','Yu Gothic',Meiryo,sans-serif;margin:3px 0 0;white-space:nowrap;overflow-x:auto;scrollbar-width:thin}
@media(max-height:650px){.uni-voice-instruction{font-size:14px;margin-bottom:4px}.uni-voice-words{gap:6px;--uni-tile-height:40px}.uni-voice-debug{margin-top:5px}.uni-voice-debug-label{font-size:12px}.uni-voice-reading{font-size:13px}html body #university-dialog input.uni-voice-raw{height:28px;min-height:28px;font-size:16px}}
.uni-voice-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}
html body #university-dialog .uni-voice-actions .uni-button{min-height:44px;font-size:22px;padding:10px 12px;min-width:0;width:0;flex:1 1 0}
.uni-voice-notice{font-family:var(--uni-ui-font);font-size:16px;line-height:1.3;margin:8px 0}
.uni-voice-status{font-family:var(--uni-ui-font);font-size:18px;line-height:1.3;margin:10px 0;min-height:1.3em}
.uni-voice-input audio{width:min(100%,300px);height:32px}
.uni-spoken-prompt{display:flex;gap:12px;align-items:center;justify-content:center;font-family:var(--uni-ui-font);font-size:18px}
html body #university-dialog[data-voice=true] .uni-question{gap:8px}
html body #university-dialog[data-voice=true] .uni-target-sentence{margin:8px auto;padding:12px}
html body #university-dialog[data-voice=true] .uni-voice-input{margin-top:4px}
html body #university-dialog .uni-result-sheet[data-neutral=true] .uni-result-icon{display:none}
html body #university-dialog .uni-result-sheet[data-neutral=true]{background:#d4e7fc;border-color:#8aacc7;color:#394c66}
html body #university-dialog .uni-result-sheet[data-neutral=true]::before{border-color:#8aacc7}
html body #university-dialog .uni-result-sheet[data-neutral=true] .uni-sheet-title{color:#394c66}
html body #university-dialog[data-screen=assessment-result] .uni-scroll{overflow:auto;min-height:0;padding-bottom:24px}
html body #university-dialog .uni-bulletin{display:block;text-align:center;max-width:900px;margin:auto;height:auto;overflow:visible}
.uni-assessment-grade{display:flex;flex-direction:column;gap:4px;margin:16px}
.uni-assessment-grade strong{font-size:46px}
.uni-subject-scores{width:100%;max-width:560px;margin:12px auto;border-collapse:collapse;font-size:20px;text-align:left}
.uni-subject-scores th,.uni-subject-scores td{padding:6px 10px;border-bottom:1px solid #d9cfe0;font-weight:normal}
.uni-subject-scores td{text-align:right;white-space:nowrap}
.uni-assessment-modalities{font-size:18px;line-height:1.5}
.uni-assessment-review{text-align:left;margin-top:24px}
.uni-review-entry{padding:12px 0;border-bottom:1px solid #d9cfe0;line-height:1.6}
.uni-review-entry summary{cursor:pointer;font-size:20px}
.uni-review-entry .uni-jp{font-size:22px;white-space:pre-wrap}
.uni-assessment-home{max-width:640px;margin:auto;padding:24px;text-align:center;line-height:1.5}
.uni-message-dialog{width:min(92vw,680px);max-height:88dvh;padding:0;border:0;background:transparent;overflow:auto;font-family:var(--uni-ui-font)}
.uni-message-dialog .uni-panel{position:relative;padding:60px 24px 24px;background:#fff8df;border:4px solid #44344e}
.uni-message-dialog .uni-close{position:absolute;left:6px;top:6px;width:48px;height:48px;border:0;background:transparent}
.uni-message-dialog .uni-close img{width:28px;height:28px;image-rendering:pixelated}
.uni-message-recap .uni-jp{font-family:'Noto Sans JP','Yu Gothic',Meiryo,sans-serif;font-size:23px;line-height:1.8;white-space:pre-wrap}
@media(max-height:650px){
 html body #university-dialog[data-voice=true] .uni-question{overflow-y:auto;max-height:100%;padding:2px 6px;scrollbar-width:thin}
 html body #university-dialog .uni-voice-notice{font-size:14px;margin:5px 0}
 html body #university-dialog .uni-voice-status{font-size:16px;margin:6px 0}
 html body #university-dialog .uni-voice-actions .uni-button{font-size:19px;min-height:40px;padding:6px 14px}
 html body #university-dialog .uni-reading-support{max-height:24vh;font-size:20px;line-height:1.7;padding:6px 10px}
}
@media(max-width:600px){html body #university-dialog .uni-reading-support{font-size:22px;max-height:24dvh}html body #university-dialog .uni-day-navigation{gap:4px 12px}.uni-subject-scores{font-size:17px}}

html body #university-dialog[data-voice=true] .uni-question{flex:1;min-height:0;overflow-y:auto;max-height:100%;scrollbar-width:thin;overscroll-behavior:contain}
html body #university-dialog[data-voice=true] .uni-exercise{height:100%;min-height:0}
html body #university-dialog[data-voice=true] .uni-question>.uni-voice-input{flex:none}
html body #university-dialog[data-voice=true] .uni-keyboard-slot>.uni-voice-input{height:100%;box-sizing:border-box;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:4px;margin:0 auto;overflow-y:auto;scrollbar-width:thin}
html body #university-dialog[data-voice=true] .uni-keyboard-slot>.uni-voice-input .uni-voice-actions{flex:none}
html body #university-dialog[data-voice=true] .uni-keyboard-slot>.uni-voice-input .uni-voice-notice{margin:2px 0;font-size:15px}
html body #university-dialog[data-voice=true] .uni-keyboard-slot>.uni-voice-input .uni-voice-status{margin:4px 0;font-size:17px}
html body #university-dialog[data-voice=true] .uni-keyboard-slot>.uni-voice-input{justify-content:safe center}
html body #university-dialog[data-voice=true] .uni-keyboard-slot>.uni-voice-input>.uni-voice-status,
html body #university-dialog[data-voice=true] .uni-keyboard-slot>.uni-voice-input>.uni-voice-notice,
html body #university-dialog[data-voice=true] .uni-keyboard-slot>.uni-voice-input>.uni-voice-replay{flex:none}
html body #university-dialog[data-voice=true] .uni-keyboard-slot>.uni-voice-input[data-state=error]>.uni-voice-notice{display:none}
html body #university-dialog[data-voice=true] .uni-keyboard-slot>.uni-voice-input[data-state=idle]>.uni-voice-notice:last-child{display:none}
@media(orientation:landscape) and (max-height:550px),(min-width:1000px) and (min-height:551px){
 html body #university-dialog[data-screen=exercise][data-typing=true][data-block1=true] .uni-shell{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 html body #university-dialog[data-block1=true] .uni-response{min-width:0}
}
html body #university-dialog[data-screen=assessment-result] .uni-footer .uni-button{font-family:UniversityActions,Tiny5,system-ui;font-weight:400}
/* Word tracking uses the space available after its wrapping rows, rather than
   the fixed height of a kana keyboard. Scope this to guided oral practice. */
@media(orientation:landscape) and (max-height:550px),(min-width:1000px) and (min-height:551px){
 html body #university-dialog[data-screen=exercise][data-voice=true]:has(.uni-voice-targets) .uni-keyboard-slot{height:auto;max-height:none;min-height:0;align-self:stretch}
}
@media(max-height:650px){
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-voice-notice{display:none}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-voice-actions .uni-button{font-size:18px}
 html body #university-dialog:has(.uni-voice-debug) .uni-voice-instruction{display:none}
 html body #university-dialog:has(.uni-voice-debug) .uni-voice-reading[data-empty=true]{display:none}
}
@media(orientation:portrait) and (max-height:650px){
 html body #university-dialog[data-screen=exercise][data-voice=true]:has(.uni-voice-targets) .uni-keyboard-slot{height:110px}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-question.uni-has-models{--aid-gap:10px}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-model-label{display:block}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-lexicon{margin:0;gap:5px}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-lexicon-word{min-height:40px;padding:3px 8px}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-lexicon-word .uni-jp{font-size:21px}
}
/* Oral practice: a compact vertical flow, with the voice action taking priority. */
html body #university-dialog{--uni-mic-width:240px;--uni-mic-height:100px;--uni-mic-padding:14px}
html body #university-dialog .uni-voice-instruction{display:none}
html body #university-dialog .uni-voice-reading[data-empty=true]{display:none}
html body #university-dialog .uni-voice-actions{display:grid;grid-template-columns:minmax(0,var(--uni-mic-width)) 72px;align-items:center;justify-content:center;gap:16px;width:100%;margin:0 auto}
html body #university-dialog .uni-voice-actions .uni-button{display:flex;align-items:center;justify-content:center;width:100%;height:var(--uni-mic-height);min-height:var(--uni-mic-height);padding:var(--uni-mic-padding);flex:none;color:#456c8b}
html body #university-dialog .uni-voice-actions .uni-button[data-voice=fallback]{height:68px;min-height:68px;color:#6b527e;grid-column:2;grid-row:1}
html body #university-dialog .uni-voice-actions .uni-button:is([data-voice=record],[data-voice=stop]){grid-column:1;grid-row:1}
html body #university-dialog .uni-voice-actions .uni-button[hidden]{display:none}
html body #university-dialog :is(.uni-voice-actions,.uni-question) .uni-button:is([data-voice=record],[data-voice=stop],.uni-voice-return):hover:not(:disabled){border-image-source:url('/assets/university-ui-v02/blue-hover.png')}
html body #university-dialog :is(.uni-voice-actions,.uni-question) .uni-button:is([data-voice=record],[data-voice=stop],.uni-voice-return):active:not(:disabled){border-image-source:url('/assets/university-ui-v02/blue-pressed.png')}
html body #university-dialog[data-voice=true] .uni-lexicon{gap:12px}
html body #university-dialog[data-voice=true] .uni-lexicon>.uni-lexicon-word{flex:1 1 0;min-width:0;padding:22px 12px 8px 36px!important}
html body #university-dialog[data-voice=true] .uni-lexicon-word .uni-jp{font-size:24px}
html body #university-dialog .uni-voice-icon{display:block;width:40px;height:40px;flex:none}
html body #university-dialog .uni-keyboard-icon{width:30px;height:30px}
html body #university-dialog .uni-live-wave{display:none;width:min(100%,192px);height:56px;fill:currentColor}
html body #university-dialog .uni-voice-input:is([data-state=listening],[data-state=transcribing]) [data-voice=stop]>.uni-voice-icon{display:none}
html body #university-dialog .uni-voice-input:is([data-state=listening],[data-state=transcribing]) .uni-live-wave{display:block}
html body #university-dialog .uni-voice-input[data-state=transcribing] .uni-live-wave{opacity:.55}
html body #university-dialog .uni-voice-status{position:absolute;width:1px;min-height:0;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);margin:0}
html body #university-dialog .uni-voice-input:is([data-state=error],[data-notice=true]) .uni-voice-status{position:static;width:auto;height:auto;clip-path:none;overflow:visible;font-size:15px;line-height:1.3;margin:8px 0 0}
html body #university-dialog .uni-voice-replay{display:none}
html body #university-dialog .uni-voice-return{display:flex;align-items:center;justify-content:center;align-self:center;flex:none;width:min(100%,var(--uni-mic-width));height:var(--uni-mic-height);min-height:var(--uni-mic-height);padding:var(--uni-mic-padding);margin:12px auto;color:#456c8b}
html body #university-dialog[data-voice=true] .uni-question:has(>.uni-voice-return){height:100%}
html body #university-dialog[data-voice=true] .uni-exercise:has(.uni-voice-return)>.uni-answers:empty{display:none}
html body #university-dialog .uni-question>.uni-voice-return{margin-block:auto}
html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-keyboard-slot>.uni-voice-input{height:auto;justify-content:flex-start;overflow:visible;gap:0}
html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-voice-words{padding-top:8px}
@media(orientation:portrait),(min-height:551px) and (max-width:999px){
 html body #university-dialog[data-screen=exercise][data-voice=true]:has(.uni-voice-targets) .uni-scroll{flex:0 1 auto;max-height:47dvh}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-exercise{height:auto}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-question{flex:none;max-height:none}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-response{margin-top:clamp(12px,2dvh,22px)}
 html body #university-dialog[data-screen=exercise][data-voice=true]:has(.uni-voice-targets) .uni-keyboard-slot{height:auto;max-height:none;min-height:0;margin-top:clamp(16px,3dvh,28px)}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-question.uni-has-models{--aid-gap:22px}
}
@media(max-height:650px){
 html body #university-dialog{--uni-mic-width:210px;--uni-mic-height:76px;--uni-mic-padding:10px}
 html body #university-dialog[data-voice=true] .uni-lexicon{gap:8px}
 html body #university-dialog[data-voice=true] .uni-lexicon>.uni-lexicon-word{padding:18px 12px 6px 32px!important}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-lexicon-word .uni-jp{font-size:18px}
 html body #university-dialog .uni-voice-actions{grid-template-columns:minmax(0,var(--uni-mic-width)) 60px;gap:12px}
 html body #university-dialog .uni-voice-actions .uni-button[data-voice=fallback]{height:54px;min-height:54px}
 html body #university-dialog .uni-voice-icon{width:34px;height:34px}
 html body #university-dialog .uni-keyboard-icon{width:26px;height:26px}
 html body #university-dialog[data-voice=true]:has(.uni-voice-targets) .uni-response{margin-top:4px}
 html body #university-dialog[data-screen=exercise][data-voice=true]:has(.uni-voice-targets) .uni-keyboard-slot{margin-top:12px}
}
@media(orientation:portrait) and (max-height:650px){
 html body #university-dialog[data-voice=true] .uni-question:has(>.uni-voice-return){--aid-gap:clamp(8px,calc(12.2dvh - 61.3px),18px);padding-block:0;gap:0}
 html body #university-dialog[data-screen=exercise][data-voice=true] .uni-question:has(>.uni-voice-return)>h2{margin-bottom:2px}
 html body #university-dialog .uni-question:has(>.uni-voice-return)>.uni-target-sentence{margin-top:0;min-height:36px;padding:0 6px;font-size:18px;line-height:1.2}
 html body #university-dialog .uni-question:has(>.uni-voice-return) .uni-lexicon-word{min-height:42px;padding:14px 8px 3px 28px!important}
 html body #university-dialog .uni-question:has(>.uni-voice-return) .uni-lexicon-word .uni-jp{font-size:18px;line-height:1.2}
}
@media(orientation:landscape) and (max-height:550px){
 html body #university-dialog .uni-question:has(>.uni-voice-return)>.uni-target-sentence{margin-top:8px}
}
@media(orientation:landscape) and (max-height:550px),(min-width:1000px) and (min-height:551px){
 html body #university-dialog[data-screen=exercise][data-voice=true]:has(.uni-voice-targets) .uni-shell{grid-template-rows:auto auto auto 1fr}
 html body #university-dialog[data-screen=exercise][data-voice=true]:has(.uni-voice-targets) .uni-keyboard-slot{align-self:start;margin-top:20px}
}

/* Review 2026-10-02: shared presentation; original native frame corners retained. */
/* Phone review R1: constrain the children that used to grow a scrollable page,
   while retaining vertical scrolling and normal Japanese typography. */
html body #university-dialog :is(.uni-shell,.uni-exercise,.uni-question,.uni-answers,.uni-response,.uni-sheet-inner,.uni-sheet-content,.uni-analysis-body,.uni-bulletin){min-width:0}
html body #university-dialog :is(.uni-exercise,.uni-question,.uni-answers,.uni-sheet-content) > :not(.uni-classroom){max-width:100%;min-width:0}
html body #university-dialog :is(.uni-scroll,.uni-question,.uni-reading-support,.uni-analysis-body,.uni-sheet-content){touch-action:pan-y pinch-zoom;overscroll-behavior-x:none}
html body #university-dialog :is(.uni-stimulus,.uni-teacher-bubble,.uni-grammar-explanation,.uni-review-entry,.uni-finish-title,.uni-sheet-explanation){overflow-wrap:anywhere}
/* Prefer moving a whole Japanese word to the next line. Unlike nowrap, a
   width-capped inline box still permits wrapping when the word itself is too
   wide. Readings stay attached to each kana, not to the complete word. */
html body #university-dialog .uni-jp-word{display:inline-block;max-width:100%;white-space:normal;overflow-wrap:anywhere;vertical-align:baseline}
/* Only a final kana/ruby unit and its closing punctuation travel together.
   Oversized words and long sentences can still wrap inside their word box. */
html body #university-dialog .uni-jp-ending{display:inline-block;white-space:nowrap;vertical-align:baseline}
html body #university-dialog .uni-jp-ending .uni-jp-word{white-space:nowrap}
html body #university-dialog :is(.uni-options,.uni-option-row,.uni-pair-column,.uni-tile-slot){min-width:0;max-width:100%}
html body #university-dialog .uni-button:not(.uni-audio-button):not(.uni-classroom-start){overflow-wrap:anywhere;white-space:normal}
html body #university-dialog .uni-button > :is(.uni-jp,small,span:not(.uni-choice-mark)){max-width:100%;min-width:0}
html body #university-dialog .uni-word-tile{height:auto;min-height:var(--uni-tile-height);white-space:normal;text-align:center}
html body #university-dialog .uni-word-tile[lang=ja]{height:auto}
html body #university-dialog[data-screen][data-input] :is(.uni-options .uni-button,.uni-pair-column>.uni-button,.uni-word-tile[lang=ja]){height:auto}
html body #university-dialog .uni-word-tile > .uni-jp{overflow-wrap:anywhere}
html body #university-dialog .uni-grammar-parts{flex-wrap:wrap}
html body #university-dialog .uni-grammar-parts > .uni-button{max-width:100%}
html body #university-dialog .uni-voice-reading{white-space:normal;overflow-wrap:anywhere;overflow:visible}
/* Focus belongs to the input's own native frame, not a second CSS rectangle. */
html body #university-dialog :is(input.uni-answer,textarea.uni-answer,.uni-inline-input):is(:focus,:focus-visible){outline:none;border-color:#72538e;background-color:#fff6db;box-shadow:inset 0 0 0 1px #72538e}
html body #university-dialog .uni-word-tile:has(>.uni-inline-input:focus){border-image-source:url('/assets/university-ui-v02/gold-normal.png')}
/* Simple answer choices resolve frame and ink in a single state, including
   sticky touch hover. Tile/association/primary-action state machines are separate. */
html body #university-dialog .uni-button[data-action=choice]{transition:none;animation:none;background:none;filter:none}
html body #university-dialog .uni-button[data-action=choice]:is(:hover,:active,:focus-visible){border-image-source:url('/assets/university-ui-v02/lavender-normal.png');color:#493260}
html body #university-dialog .uni-button[data-action=choice][aria-pressed=true]{border-image-source:url('/assets/university-ui-v02/mint-normal.png');color:#285f54}
html body #university-dialog .uni-button[data-action=choice][data-result=correct]{border-image-source:url('/assets/university-ui-v02/mint-normal.png');color:#285f54}
html body #university-dialog .uni-button[data-action=choice][data-result=wrong]{border-image-source:url('/assets/university-ui-v02/pink-normal.png');color:#843e49}
html body #university-dialog .uni-button[data-action=choice] :is(.uni-jp,rt,.uni-ruby-reading){color:inherit;transition:none}
html body #university-dialog .uni-button[data-action=choice]:focus-visible{outline:none;filter:brightness(.94)}
/* B02+ help is a compact script/audio control, not an empty ruby stack. */
html body #university-dialog[data-screen] .uni-pronunciation-aids[data-readings=script]{--uni-aid-font-size:26px;--uni-aid-padding:18px;gap:12px}
html body #university-dialog[data-screen] .uni-pronunciation-aids[data-readings=script] .uni-button.uni-pronunciation-button{flex-direction:row;gap:10px;min-height:54px;height:auto;padding:12px var(--uni-aid-padding)!important}
html body #university-dialog[data-screen] .uni-pronunciation-aids[data-readings=script] .uni-pronunciation-button>img{position:static;transform:none;width:22px;height:22px;margin:0;flex:none}
html body #university-dialog[data-screen] .uni-pronunciation-aids[data-readings=script] .uni-pronunciation-button>.uni-jp{font-size:var(--uni-aid-font-size);line-height:1.3;padding:0;flex:0 1 auto;overflow-wrap:anywhere}
html body #university-dialog .uni-instruction-box{flex:none;min-height:0;text-wrap:pretty}
html body #university-dialog[data-screen] .uni-instruction-box > p.uni-instruction-text{margin:0;font:400 clamp(18px,2.6dvh,24px)/1.4 var(--uni-ui-font);overflow-wrap:anywhere}
@media(orientation:landscape) and (max-height:550px){html body #university-dialog[data-screen] .uni-instruction-box > p.uni-instruction-text{font-size:17px;line-height:1.35}}
@media(max-height:550px){html body #university-dialog[data-screen] .uni-pronunciation-aids[data-readings=script]{--uni-aid-font-size:21px;--uni-aid-padding:12px;gap:8px}html body #university-dialog[data-screen] .uni-pronunciation-aids[data-readings=script] .uni-button.uni-pronunciation-button{min-height:44px;padding-block:8px!important}}
html body #university-dialog .uni-pair-column>.uni-button[data-pair-settled=true]{filter:grayscale(1);color:#727078;opacity:.65;cursor:default}
html body #university-dialog .uni-teaching-focus{background:#ffe58d;box-shadow:none;text-decoration:none;padding:0 2px}
html body #university-dialog[data-screen=intro] .uni-stimulus>.uni-jp{font-size:clamp(30px,4.5dvh,44px)}
html body #university-dialog .uni-reading-support .uni-jp{font:400 clamp(24px,3.5dvh,32px)/1.85 var(--uni-word-font);white-space:pre-wrap}
html body #university-dialog .uni-reading-support{max-height:none;overflow:visible;flex:none}
html body #university-dialog .uni-reading-paragraph{margin:0;font:inherit}
html body #university-dialog .uni-reading-paragraph+.uni-reading-paragraph{margin-top:8px}
html body #university-dialog:has(.uni-reading-support) .uni-scroll{overflow-y:auto;scrollbar-width:auto;overscroll-behavior:contain}
html body #university-dialog:has(.uni-reading-support) .uni-exercise{min-height:0;flex:none}
html body #university-dialog:has(.uni-reading-support) .uni-answers>.uni-options{min-height:0;height:auto;flex:none}
html body #university-dialog:has(.uni-reading-support) .uni-options .uni-button{min-height:48px;height:auto}
html body #university-dialog:has(.uni-reading-support) .uni-pair-column>.uni-button{font-size:23px;font-weight:400;padding:10px 8px;overflow-wrap:normal}
html body #university-dialog:has(.uni-reading-support) .uni-pair-column>.uni-button .uni-jp{font-size:23px;font-weight:400}
html body #university-dialog .uni-source-words{min-width:0;text-align:center}
html body #university-dialog[data-screen] .uni-stimulus.uni-source-phrase:has(>.uni-source-words){display:flex;flex-direction:row;align-items:center;gap:12px}
html body #university-dialog[data-screen] .uni-source-phrase:has(>.uni-source-words)>.uni-listen-icon{float:none;margin:0;align-self:center}
html body #university-dialog .uni-exercise[data-analysis=true]:not(:has(>.uni-stimulus))>.uni-analysis-body{grid-column:1/-1;grid-row:2/-1}
/* Empty aid columns must not squeeze the prompt. Keep the same geometry before
   and after mounting the keyboard; focus must never scroll the entire dialog. */
html body #university-dialog[data-input=hybrid_tiles] .uni-question:not(:has(.uni-options .uni-button)){grid-template-columns:minmax(0,1fr);gap:12px}
/* A physical keyboard needs no empty on-screen keyboard column. Voice controls
   have their own slot and intentionally keep their existing layout. */
html[data-input-mode=mouse] body #university-dialog[data-screen=exercise][data-input=fr_input] .uni-shell{display:flex;flex-direction:column}
html[data-input-mode=mouse] body #university-dialog[data-screen=exercise][data-input=fr_input] .uni-keyboard-slot{display:none;height:0;min-height:0}
/* Keep the physical-keyboard answer above a real feedback reserve in both
   states. The old flex stack placed it at the very bottom and left 75px. */
html[data-input-mode=mouse] body #university-dialog[data-screen=exercise][data-input=fr_input] .uni-scroll{flex:0 1 auto;max-height:calc(100% - var(--uni-result-height) - 160px);overflow-y:auto}
html[data-input-mode=mouse] body #university-dialog[data-screen=exercise][data-input=fr_input] .uni-exercise{min-height:0;display:flex}
html[data-input-mode=mouse] body #university-dialog[data-screen=exercise][data-input=fr_input] .uni-footer{margin-top:auto}
/* A microphone is not a full-height kana keyboard. Keep intention, received
   question and optional model command in the normal flow before the answer. */
html body #university-dialog[data-voice-mode=microphone] :is(.uni-spoken-prompt,.uni-voice-help){flex:none}
/* Context and lexical aids have intrinsic height. They must scroll within the
   question reserve, never overflow over the separate answer/keyboard rows. */
html body #university-dialog[data-input=jp_sentence_input]:has(.uni-exercise-context) .uni-scroll{overflow-y:auto;overflow-x:hidden;min-height:0;overscroll-behavior:contain;scrollbar-width:thin}
html body #university-dialog[data-input=jp_sentence_input]:has(.uni-exercise-context) .uni-exercise{flex:none;min-height:0;height:auto}
html body #university-dialog[data-input=jp_sentence_input]:has(.uni-exercise-context) .uni-question{flex:none;height:auto;max-height:none;justify-content:flex-start;overflow:visible}
html body #university-dialog[data-input=jp_sentence_input]:has(.uni-exercise-context) .uni-question>*{flex-shrink:0}
html body #university-dialog[data-input=jp_sentence_input]:has(.uni-exercise-context) .uni-response{flex-shrink:0}
html body #university-dialog[data-voice-mode=microphone]:is([data-voice-stage=first-formulation],[data-voice-stage=assessment]) .uni-question{justify-content:flex-start;gap:8px}
html body #university-dialog[data-voice-mode=microphone]:is([data-voice-stage=first-formulation],[data-voice-stage=assessment]) .uni-keyboard-slot{height:auto;max-height:none;min-height:0;align-self:stretch}
html body #university-dialog[data-voice-mode=microphone]:is([data-voice-stage=first-formulation],[data-voice-stage=assessment]) .uni-keyboard-slot>.uni-voice-input{height:auto;justify-content:flex-start}
@media(orientation:portrait),(min-height:551px) and (max-width:999px){
 html body #university-dialog[data-voice-mode=microphone]:is([data-voice-stage=first-formulation],[data-voice-stage=assessment]) .uni-scroll{flex:0 1 auto;max-height:none;overflow-y:auto}
 html body #university-dialog[data-voice-mode=microphone]:is([data-voice-stage=first-formulation],[data-voice-stage=assessment]) .uni-exercise{height:auto;min-height:0}
 html body #university-dialog[data-voice-mode=microphone]:is([data-voice-stage=first-formulation],[data-voice-stage=assessment]) .uni-question{height:auto;max-height:none;flex:none;padding:0}
 html body #university-dialog[data-voice-mode=microphone]:is([data-voice-stage=first-formulation],[data-voice-stage=assessment]) .uni-target-sentence{margin:8px auto;min-height:0;font-size:24px;line-height:1.3}
 html body #university-dialog[data-voice-mode=microphone]:is([data-voice-stage=first-formulation],[data-voice-stage=assessment]) .uni-response{margin-top:12px;flex:none}
 html body #university-dialog[data-voice-mode=microphone]:is([data-voice-stage=first-formulation],[data-voice-stage=assessment]) .uni-keyboard-slot{flex:none;margin-top:16px}
 html body #university-dialog[data-voice-mode=microphone]:is([data-voice-stage=first-formulation],[data-voice-stage=assessment]) .uni-footer{margin-top:auto}
}
@media(orientation:landscape) and (max-height:550px){
 html body #university-dialog[data-input=hybrid_tiles][data-typing=true] .uni-shell{grid-template-columns:minmax(0,1fr) minmax(280px,1fr);gap:6px 16px}
 html body #university-dialog[data-input=hybrid_tiles] .uni-question:not(:has(.uni-options .uni-button)){gap:6px}
 html body #university-dialog[data-input=hybrid_tiles] .uni-question h2{font-size:22px;line-height:1.15}
}
@media(orientation:landscape) and (max-height:350px){
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-question h2{font-size:20px;line-height:1.1;margin:0}
 html body #university-dialog[data-input=hybrid_tiles] .uni-question:not(:has(.uni-options .uni-button)){gap:4px}
 html body #university-dialog[data-editorial=true][data-input=hybrid_tiles][data-typing=true] .uni-target-sentence{font-size:16px;line-height:1.3}
}
@media(max-height:650px){
 html body #university-dialog[data-screen=intro] .uni-stimulus>.uni-jp{font-size:28px}
 html body #university-dialog .uni-reading-support .uni-jp{font-size:22px;line-height:1.75}
 html body #university-dialog:has(.uni-reading-support) .uni-pair-column>.uni-button,html body #university-dialog:has(.uni-reading-support) .uni-pair-column>.uni-button .uni-jp{font-size:20px}
}

/* Audio and the text occupy separate columns. Center the complete ruby stack
   in the remaining text column, rather than centering kana behind the icon. */
html body #university-dialog[data-screen] .uni-button:is(.uni-pronunciation-button,.uni-lexicon-word,.uni-audio-button):has(>.uni-jp){
 --uni-listen-size:22px;--uni-listen-gap:10px;--uni-listen-inset:12px;
 display:grid!important;grid-template-columns:var(--uni-listen-size) minmax(0,1fr);column-gap:var(--uni-listen-gap);row-gap:3px;
 align-items:center;justify-items:center;align-content:center;
 padding:8px var(--uni-listen-inset)!important;
}
html body #university-dialog[data-screen] .uni-button:is(.uni-pronunciation-button,.uni-lexicon-word,.uni-audio-button):has(>.uni-jp)>:is(img,.uni-css-listen){
 position:relative!important;inset:auto!important;transform:none!important;grid-column:1;grid-row:1/-1;
 width:var(--uni-listen-size)!important;height:var(--uni-listen-size)!important;margin:0;
}
html body #university-dialog[data-screen] .uni-button:is(.uni-pronunciation-button,.uni-lexicon-word,.uni-audio-button):has(>.uni-jp)>.uni-jp{
 grid-column:2;grid-row:1;display:block;margin:0;line-height:1;
 padding:0;max-width:100%;min-width:0;text-align:center;transform:translateY(-.12em);
}
html body #university-dialog[data-screen] .uni-pronunciation-aids .uni-pronunciation-button>.uni-jp{
 font-size:min(var(--uni-aid-font-size),calc((100cqi - 2 * var(--uni-listen-inset) - var(--uni-listen-size) - var(--uni-listen-gap)) / var(--uni-aid-units)));
}
html body #university-dialog[data-screen] .uni-button:is(.uni-pronunciation-button,.uni-lexicon-word,.uni-audio-button):has(>.uni-jp)>.uni-jp:has(rt){padding-top:.42em}
html body #university-dialog[data-screen] .uni-button:is(.uni-pronunciation-button,.uni-lexicon-word,.uni-audio-button):has(>.uni-jp) .uni-jp-word{vertical-align:baseline}
html body #university-dialog[data-screen] .uni-button:is(.uni-pronunciation-button,.uni-lexicon-word,.uni-audio-button):has(>.uni-jp)>small{grid-column:2;grid-row:2;margin:0}
@media(max-height:650px){html body #university-dialog[data-screen] .uni-button:is(.uni-pronunciation-button,.uni-lexicon-word,.uni-audio-button):has(>.uni-jp){--uni-listen-size:18px;--uni-listen-gap:8px;--uni-listen-inset:10px;padding-block:6px!important}}
/* Large tablets and desktops retain the phone's reading order. The legacy
   wide-screen grids and align-self:start used to shrink the keyboard to its
   intrinsic width (315px on a 1024px portrait iPad) and detach it from Submit.
   Keep this layout local to lessons: shared keyboards and small formats retain
   their own arrangements. No transform scaling: text and frame geometry stay real. */
@media(min-width:1000px) and (min-height:700px){
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]){
  --uni-page:min(1020px,94vw);--uni-gutter:40px;--uni-action-height:clamp(62px,6.4dvh,76px);--uni-action-font:30px;
  --uni-large-gap:clamp(14px,1.65dvh,23px);--uni-keyboard-height:clamp(260px,34dvh,460px);
 }
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-shell,
 html body #university-dialog[data-screen=exercise][data-typing=true] .uni-shell,
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-shell{
  display:flex;flex-direction:column;max-width:var(--uni-page);gap:var(--uni-large-gap);
  padding:18px var(--uni-gutter) max(20px,env(safe-area-inset-bottom));
  --uni-keyboard-height:clamp(260px,34dvh,460px);
 }
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-header{padding-inline:0;flex:0 0 48px}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-progress{height:20px}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-scroll{width:100%;flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden}
 html body #university-dialog[data-screen=exercise] .uni-exercise{display:flex;flex-direction:column;min-height:0;gap:var(--uni-large-gap)}
 html body #university-dialog[data-screen=exercise] .uni-question{justify-content:flex-start}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-exercise h2{font-size:clamp(30px,3.1dvh,40px);line-height:1.25;margin-bottom:18px}
 html body #university-dialog[data-screen=exercise] .uni-question>.uni-stimulus{flex:none}
 html body #university-dialog[data-screen=exercise] .uni-target-word{min-height:clamp(140px,16dvh,210px);font-size:clamp(34px,3.6dvh,46px)}
 html body #university-dialog[data-screen=exercise] .uni-answers{justify-content:flex-start}
 html body #university-dialog[data-screen=exercise] .uni-answers>.uni-options{min-height:0;max-height:none}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-response{width:100%;max-width:none;flex:none;padding:0;margin:0}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-answer{height:clamp(56px,6.5dvh,72px);min-height:56px;font-size:clamp(26px,2.8dvh,36px);padding:10px 16px}
 html body #university-dialog[data-screen=exercise][data-typing=true] .uni-keyboard-slot,
 html body #university-dialog[data-screen=intro][data-practice=true] .uni-keyboard-slot{
  width:100%;min-width:0;max-width:none;align-self:stretch;flex:none;
  height:var(--uni-keyboard-height);max-height:none;margin:0;
 }
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .pixel-keyboard.is-docked{
  --key-size:46px;width:100%;max-width:none;padding:6px 0 0;font-size:clamp(25px,2.8dvh,34px);
 }
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .pixel-keyboard-keys{gap:8px}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .pixel-keyboard-row,
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .pixel-keyboard-actions{gap:8px;margin-top:6px}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .pixel-keyboard[data-japanese=true] .pixel-keyboard-keys{gap:8px}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .pixel-keyboard:is([data-mode=hiragana],[data-mode=katakana]) .pixel-keyboard-row button{font-size:clamp(28px,3dvh,38px)}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .pixel-keyboard button[data-key=script]{font-size:19px}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .pixel-key-preview.is-cross>span{font-size:clamp(28px,3dvh,38px)}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .pixel-keyboard[data-japanese=true] .pixel-keyboard-row button:is([data-key=latin],[data-key=close]){font-size:22px}
 html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-footer{flex:none;margin-top:0;width:100%}
 /* Speaking remains a compact action, not a keyboard-sized empty reserve. */
 html body #university-dialog[data-screen=exercise][data-voice-mode=microphone] .uni-scroll{flex:0 1 auto}
 html body #university-dialog[data-screen=exercise][data-voice-mode=microphone] .uni-keyboard-slot{height:auto;max-height:none;margin:0;align-self:stretch}
 html body #university-dialog[data-screen=exercise][data-voice-mode=microphone] .uni-footer{margin-top:auto}
}

/* On the shorter landscape tablet, keep a short prompt and its audio aids
   visible together above the input, without reducing the keyboard targets. */
@media(min-width:1000px) and (min-height:700px) and (max-height:849px){
  html body #university-dialog[data-screen=exercise] .uni-target-word{min-height:108px}
  html body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-exercise h2{margin-bottom:10px}
}

/* Review R3: shared sizes, independent of the source adapter or theme. */
html body #university-dialog{
 --uni-main-text:clamp(26px,3.8dvh,34px);--uni-main-text-long:clamp(20px,2.8dvh,26px);
 --uni-review-tile-text:24px;--uni-review-tile-height:54px;
}
html body #university-dialog[data-screen] .uni-question>[data-main-size]{font-size:var(--uni-main-text);line-height:1.4}
html body #university-dialog[data-screen] .uni-question>[data-main-size=long]{font-size:var(--uni-main-text-long)}
html body #university-dialog[data-screen] .uni-question>[data-main-size]>:is(strong,p.uni-instruction-text,.uni-jp){font-size:inherit;line-height:inherit}
html body #university-dialog[data-screen][data-editorial][data-typing] .uni-word-translation{--uni-tile-height:var(--uni-review-tile-height);--uni-line-height:66px;--uni-tile-gap:8px;gap:12px}
html body #university-dialog[data-screen][data-editorial][data-typing] .uni-word-tile[lang=ja]{height:auto;min-height:var(--uni-review-tile-height);padding:15px 12px 8px}
html body #university-dialog[data-screen][data-editorial][data-typing] .uni-word-tile>.uni-jp{font-size:var(--uni-review-tile-text)}
html body #university-dialog[data-screen][data-editorial][data-typing] .uni-word-tile>.uni-inline-input{font-size:var(--uni-review-tile-text);min-width:3em;width:3.5em;height:36px}
html body #university-dialog[data-screen] .uni-pair-column>.uni-button:has(.uni-pair-number){position:relative;padding-right:28px}
html body #university-dialog .uni-pair-number{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:16px/1 var(--uni-ui-font);color:inherit;pointer-events:none;border:0;padding:0;min-width:0;background:none;box-shadow:none;outline:0}
html[data-university-theme=dark] body #university-dialog :is(.uni-focus-word,.uni-teaching-focus){--uni-teaching-highlight:#ffe45e;background:var(--uni-teaching-highlight)!important;color:#1b1d1f!important;text-decoration:none;border:0}
html[data-university-theme=dark] body #university-dialog[data-screen] :is(.uni-focus-word,.uni-teaching-focus) :is(ruby,rt,.uni-jp-word,.uni-jp,span.uni-ruby-reading){color:inherit!important}
@media(min-width:1000px) and (min-height:700px){html body #university-dialog{--uni-main-text:clamp(34px,3.6dvh,46px);--uni-main-text-long:clamp(26px,2.8dvh,34px);--uni-review-tile-text:28px;--uni-review-tile-height:60px}}
@media(orientation:landscape) and (max-height:550px){html body #university-dialog{--uni-main-text:24px;--uni-main-text-long:20px;--uni-review-tile-text:22px;--uni-review-tile-height:48px}}

/* Desktop close button follows the centered progress bar, not the viewport. */
@media(min-width:1000px) and (min-height:700px){
 html[data-device-type=desktop] body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-header{position:relative}
 html[data-device-type=desktop] body #university-dialog:is([data-screen=exercise],[data-screen=intro]) .uni-header>.uni-close{position:absolute;left:-60px;top:50%;transform:translateY(-50%)}
}

/* Only the classroom and grade presentation; lesson/library layout is untouched. */
html body #university-dialog[data-screen=classroom]{background:#f8ecfe;--uni-page:1000px}
html body #university-dialog[data-screen=classroom] .uni-shell{display:flex;flex-direction:column;max-width:none;height:100dvh;padding:0;gap:0;animation:none}
html body #university-dialog[data-screen=classroom] .uni-header{position:relative;z-index:5;flex:none;height:auto;min-height:76px;max-width:100%;padding:12px 60px;background:#f8ecfe;box-shadow:none}
html body #university-dialog[data-screen=classroom] .uni-heading{display:block;text-align:center}
html body #university-dialog[data-screen=classroom] .uni-heading h1{display:block;font-size:32px;margin:0}
html body #university-dialog[data-screen=classroom] .uni-heading>p{display:block;font:16px/1.4 var(--uni-ui-font);margin:4px 0 0}
html body #university-dialog[data-screen=classroom] :is(.uni-progress,.uni-note,.uni-response,.uni-keyboard-slot){display:none!important}
html body #university-dialog[data-screen=classroom] .uni-scroll{display:block;position:relative;flex:1;width:100%;max-width:none;min-height:0;margin:0;padding:0;overflow:auto;overflow-x:hidden;scrollbar-gutter:stable both-edges;overflow-anchor:none;touch-action:pan-y}
html body #university-dialog[data-screen=classroom] .uni-footer{display:flex;flex:none;justify-content:center;gap:4px;min-height:0;padding:6px 12px max(6px,env(safe-area-inset-bottom));width:100%;max-width:none;background:#f8ecfe}
html body #university-dialog[data-screen=classroom] .uni-footer .uni-link{font:15px/1.3 var(--uni-ui-font);padding:4px 10px}
html body #university-dialog[data-screen=classroom] .uni-alert:empty{display:none}
html body #university-dialog .uni-classroom{position:relative;width:100%;min-height:100%}
/* A single continuous, lighter veil covers every background region. Selected
   native door art, grades and picker share the dialog's stacking context. */
html body #university-dialog .uni-classroom-veil{position:fixed;inset:0;z-index:6;background:#291831;opacity:0;transition:opacity 180ms ease-out;pointer-events:none}
html body #university-dialog[data-classroom-focus=true] .uni-classroom-veil{opacity:.25}
html body #university-dialog[data-screen=classroom] .uni-footer{position:relative}
html body #university-dialog .uni-classroom-caption{position:absolute;width:100%;margin:0;text-align:center;font:14px/1.4 var(--uni-ui-font);color:#846690}
html body #university-dialog .uni-classroom-door{position:absolute;display:block;border:0;padding:0;background:none;opacity:1;overflow:visible;min-width:0;min-height:0;box-shadow:none;border-radius:0;transform:none}
html body #university-dialog .uni-classroom-door:active{transform:none}
html body #university-dialog .uni-classroom-door:focus-visible{outline:2px dashed #8e6b9e;outline-offset:8px}
html body #university-dialog .uni-classroom-art{display:block;width:100%;height:100%;image-rendering:pixelated;pointer-events:none}
html body #university-dialog .uni-classroom-art-on{position:absolute;inset:0;visibility:hidden}
html body #university-dialog .uni-classroom-door[aria-expanded=true] .uni-classroom-art-on{visibility:visible}
html body #university-dialog .uni-classroom-door-front{display:none;position:absolute;z-index:7;max-width:none;image-rendering:pixelated;pointer-events:none}
html body #university-dialog .uni-classroom-door[aria-expanded=true] .uni-classroom-door-front{display:block}
html body #university-dialog .uni-classroom-gray-front{overflow:hidden}
html body #university-dialog .uni-classroom-marks{position:absolute;inset:0;pointer-events:none}
html body #university-dialog .uni-classroom-marks>.uni-grade-glyph{position:absolute;pointer-events:none}
html body #university-dialog .uni-classroom-day-label{position:absolute;top:100%;left:-24px;right:-24px;padding-top:6px;font:18px/1.2 var(--uni-ui-font);white-space:nowrap;text-align:center;color:#644b76}
html body #university-dialog .uni-classroom-door[aria-expanded=true] .uni-classroom-day-label{color:#49305f}
html body #university-dialog .uni-classroom[data-focus=true] .uni-classroom-door[aria-expanded=true] .uni-classroom-day-label{z-index:7}
html body #university-dialog .uni-classroom-door[data-locked=true] .uni-classroom-day-label{color:#79747e}
html body #university-dialog .uni-classroom-status{position:sticky;z-index:4;top:6px;max-width:480px;margin:0 auto;text-align:center;font:16px/1.3 var(--uni-ui-font);background:#f8ecfe}
html body #university-dialog .uni-classroom-status:empty{display:none}
/* Compact picker: expansion is above a stable logo/XP/action baseline. */
/* Native iOS haptic inputs on the doors use inline z-index:10. The entire
   picker must be above them for hit-testing as well as for visible painting. */
html body #university-dialog .uni-classroom-schedule.uni-panel[data-tone=paper]{position:absolute;z-index:11;display:block;padding:var(--picker-padding,10px);overflow:visible;border:0;border-image:none;background:none;box-shadow:none;text-align:center}
html body #university-dialog .uni-classroom-paper{position:absolute;bottom:0;left:0;right:0;z-index:-1;border:0;border-image:url('/assets/university-ui-v02/paper-normal.png') 4 fill stretch;border-image-width:8px;pointer-events:none}
/* Keep the classic paper, with only a 20% hint of the block's colour. Both
   native frames share the same pixel silhouette and the same 8px corners. */
html body #university-dialog .uni-classroom-paper::after{content:'';position:absolute;inset:0;border:0;border-image:var(--classroom-frame-tint-image,url('/assets/university-ui-v02/paper-normal.png')) 4 fill stretch;border-image-width:8px;opacity:var(--classroom-frame-tint-strength,.2);pointer-events:none}
html body #university-dialog .uni-classroom-schedule[data-frame-tone=lavender]{--classroom-frame-tint-image:url('/assets/university-ui-v02/lavender-normal.png')}
html body #university-dialog .uni-classroom-schedule[data-frame-tone=blue]{--classroom-frame-tint-image:url('/assets/university-ui-v02/blue-normal.png')}
html body #university-dialog .uni-classroom-schedule[data-frame-tone=mint]{--classroom-frame-tint-image:url('/assets/university-ui-v02/mint-normal.png')}
html body #university-dialog .uni-classroom-schedule[data-frame-tone=pink]{--classroom-frame-tint-image:url('/assets/university-ui-v02/pink-normal.png')}
html body #university-dialog .uni-classroom-schedule[data-readonly=true]{filter:grayscale(1)}
html body #university-dialog .uni-classroom-schedule[data-readonly=true] button:disabled{filter:none;opacity:1;cursor:default}
html body #university-dialog .uni-classroom-schedule-heading{padding:0 26px}
html body #university-dialog .uni-classroom-schedule h2{font:700 var(--picker-heading-font,24px)/1.1 var(--uni-ui-font);margin:0}
html body #university-dialog .uni-classroom-schedule-subtitle{font:var(--picker-copy-font,16px)/1.25 var(--uni-ui-font);margin:8px 0 12px}
html body #university-dialog .uni-classroom-schedule .uni-timetable-columns{--card-height:var(--picker-card,116px);--card-reveal:var(--picker-reveal,44px);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:var(--picker-gap,6px);height:var(--card-height);transition:height 220ms ease-in-out}
html body #university-dialog .uni-classroom-schedule .uni-timetable-columns[data-expanded=true]{height:calc(var(--card-height) + var(--card-reveal))}
html body #university-dialog .uni-classroom-schedule .uni-timetable-subject{display:contents}
html body #university-dialog .uni-classroom-schedule .uni-timetable-toggle{position:relative;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:var(--picker-gap,6px);width:100%;height:var(--card-height);min-width:0;min-height:0;padding:8px var(--picker-gap,6px);border:0;border-radius:0;border-image:url('/assets/university-ui-v02/mint-normal.png') 4 fill stretch;border-image-width:8px;background:none;color:#365749;transition:height 220ms ease-in-out;transform:none}
html body #university-dialog .uni-classroom-schedule .uni-timetable-toggle[aria-expanded=true]{height:calc(var(--card-height) + var(--card-reveal))}
html body #university-dialog .uni-classroom-schedule[data-sizing=true] :is(.uni-timetable-columns,.uni-timetable-toggle){transition:none}
html body #university-dialog .uni-classroom-schedule .uni-timetable-toggle[data-tone=lavender]{border-image-source:url('/assets/university-ui-v02/lavender-normal.png');color:#59456f}
html body #university-dialog .uni-classroom-schedule .uni-timetable-toggle[data-tone=gold]{border-image-source:url('/assets/university-ui-v02/gold-normal.png');color:#78582d}
html body #university-dialog .uni-classroom-schedule .uni-timetable-toggle:disabled{filter:grayscale(1);opacity:.65}
html body #university-dialog .uni-classroom-schedule .uni-timetable-emblem{container-type:size;display:grid;place-items:center;width:100%;height:var(--picker-icon,64px);flex:none}
html body #university-dialog .uni-classroom-schedule .uni-timetable-emblem img{width:min(var(--uni-icon-fit-width,100cqw),calc(min(100cqw,100cqh) * var(--uni-icon-scale,1)));height:auto;aspect-ratio:1;object-fit:contain;image-rendering:pixelated;transform:translateX(var(--uni-icon-offset-x,0%))}
html body #university-dialog .uni-classroom-schedule .uni-timetable-description{position:absolute;top:var(--picker-subject-top,10px);left:4px;right:4px;height:var(--picker-subject-height,36px);display:grid;place-items:center;font:var(--picker-subject-font,14px)/1.2 var(--uni-ui-font);text-wrap:balance;opacity:0;visibility:hidden;transition:opacity 140ms ease-out;pointer-events:none}
html body #university-dialog .uni-classroom-schedule [aria-expanded=true] .uni-timetable-description{opacity:1;visibility:visible;transition-delay:60ms}
html body #university-dialog .uni-classroom-schedule .uni-timetable-xp{display:grid;place-items:center;flex:none;height:var(--picker-xp,28px);max-width:100%;padding:5px 8px;border:0;border-image:url('/assets/university-ui-v02/blue-normal.png') 4 fill stretch;border-image-width:8px;color:#365e7b;font:var(--picker-xp-font,16px)/1 var(--uni-ui-font);white-space:nowrap}
html body #university-dialog .uni-classroom-start{display:block;width:100%;height:var(--picker-action,44px);min-height:var(--picker-action,44px);margin-top:var(--picker-action-gap,12px);padding:6px;font:var(--picker-action-font,24px)/1 UniversityActions,var(--uni-ui-font);text-transform:uppercase}
html body #university-dialog .uni-classroom-start:disabled{filter:grayscale(1);opacity:.7}
html body #university-dialog .uni-classroom-control-copy{font:var(--picker-copy-font,16px)/1.4 var(--uni-ui-font)}
html body #university-dialog .uni-classroom-floating-grade{position:absolute;left:0;top:0;z-index:8;pointer-events:none;image-rendering:pixelated;max-width:none;will-change:transform}
html body #university-dialog .uni-classroom-floating-grade>.uni-grade-glyph{position:absolute;inset:0;width:100%;height:100%;transition:background-color 180ms ease-out}
/* One 2px dilation keeps the outline equally thick on every side. The two
   presentation-only comparison modes share these exact production rules. */
html body #university-dialog .uni-classroom-floating-grade[data-lit=true]{filter:url(#uni-grade-outline)}
html body #university-dialog .uni-classroom[data-grade-outline=none] .uni-classroom-floating-grade{filter:none}
html body #university-dialog .uni-classroom[data-grade-outline=always] :is(.uni-classroom-marks,.uni-classroom-floating-grade){filter:url(#uni-grade-outline)}
html body #university-dialog .uni-classroom-floating-grade[data-lit=true]>.uni-grade-glyph{background-color:var(--grade-lit-colour)}
html body #university-dialog .uni-classroom-block-label{position:absolute;left:0;right:0;margin:0;text-align:center;font:16px/1.2 var(--uni-ui-font);color:#8a828f;pointer-events:none}
/* Keep the old star's exact layout footprint. The 10×16 glyph inside uses only
   whole-number enlargement and sits at the same centre. */
html body #university-dialog .uni-finish-star.uni-finish-grade{display:grid;place-items:center;flex:none}
html body #university-dialog .uni-grade-glyph{position:relative;display:inline-block;flex:none;width:10px;height:16px;max-width:none;image-rendering:pixelated;background:var(--grade-colour);-webkit-mask-image:var(--grade-mask);mask-image:var(--grade-mask);-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;mask-mode:alpha}
html body #university-dialog .uni-grade-glyph[data-grade=S]::after{content:'';position:absolute;inset:0;background:linear-gradient(120deg,transparent 0% 28%,#ffe596 35% 42%,#cbf2df 45% 48%,#fff6cc 51% 56%,#d6c3f3 59% 62%,#ffd46c 67% 73%,transparent 80% 100%);background-size:250% 250%;opacity:.85;animation:uni-grade-hologram 3600ms steps(24,end) infinite alternate;pointer-events:none}
@keyframes uni-grade-hologram{from{background-position:0% 0%}to{background-position:100% 100%}}
html body #university-dialog .uni-assessment-letter{width:40px;height:64px;object-fit:contain;image-rendering:pixelated;vertical-align:middle;margin-inline-end:16px}
@media(max-width:380px){
 html body #university-dialog[data-screen=classroom] .uni-footer .uni-link{font-size:13px;padding-inline:5px;white-space:nowrap}
 html body #university-dialog[data-screen=classroom] .uni-header{min-height:68px;padding-inline:48px}
 html body #university-dialog[data-screen=classroom] .uni-heading h1{font-size:24px}
 html body #university-dialog .uni-classroom-schedule .uni-timetable-description{font-size:12px}
 html body #university-dialog .uni-classroom-schedule .uni-timetable-xp{font-size:14px;padding-inline:6px}
}
@media(orientation:landscape) and (max-height:550px){
 html body #university-dialog[data-screen=classroom] .uni-header{min-height:48px;padding-block:6px}
 html body #university-dialog[data-screen=classroom] .uni-heading h1{font-size:26px}
 html body #university-dialog[data-screen=classroom] .uni-heading{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;column-gap:14px}
 html body #university-dialog[data-screen=classroom] .uni-heading>p{display:block;font-size:14px;margin:0}
}
@media(prefers-reduced-motion:reduce){html body #university-dialog .uni-classroom-schedule *,html body #university-dialog .uni-classroom-veil,html body #university-dialog .uni-classroom-floating-grade,html body #university-dialog .uni-classroom-floating-grade>.uni-grade-glyph{transition:none!important}html body #university-dialog .uni-grade-glyph[data-grade=S]::after{animation:none;background-position:50% 50%}}

/* New lot only. All frames, fonts, colours and motions remain the live J1 UI. */
#university-dialog[data-draft-lot=true] .uni-stimulus{white-space:pre-line}
#university-dialog[data-draft-lot=true] .uni-draft-scenes{display:flex;justify-content:center;gap:12px;margin:8px 0 16px;flex-wrap:wrap}
#university-dialog[data-draft-lot=true] .uni-draft-scenes .uni-button{min-height:44px;font-size:18px;padding:8px 12px}
#university-dialog[data-draft-lot=true] .uni-draft-reading{cursor:pointer;border-bottom:2px dotted #b5a6c4}
#university-dialog[data-draft-lot=true] .uni-draft-reading:focus-visible{outline:2px solid #8a63b1;outline-offset:3px}
#university-dialog[data-draft-lot=true] .uni-draft-tile-gloss{display:block;font:14px/1.2 var(--uni-ui-font);margin-top:4px;color:#594364}
html body #university-dialog[data-draft-lot=true] .uni-word-tile:has(.uni-draft-tile-gloss){flex-direction:column;height:auto;min-height:62px;padding:16px 10px 6px}
html body #university-dialog[data-draft-lot=true] .uni-word-tile .uni-draft-tile-gloss{white-space:normal;text-align:center;max-width:160px}
#university-dialog[data-draft-lot=true] .uni-draft-glosses{display:flex;flex-wrap:wrap;gap:8px 16px;margin:14px 0;font-size:17px}
#university-dialog[data-draft-lot=true] .uni-draft-glosses .uni-jp{font-size:20px}
#university-dialog[data-draft-lot=true] .uni-draft-voice-model{display:flex;align-items:center;gap:16px;margin:12px 0}
#university-dialog[data-draft-lot=true] .uni-draft-pending{font-size:18px;padding:12px;max-width:100%;margin:12px 0}
#university-dialog[data-draft-lot=true] .uni-draft-retry{font-size:16px;line-height:1.3;margin:12px 0}
#university-dialog[data-draft-lot=true][data-screen=intro] .uni-lexicon{display:flex;flex-wrap:wrap;justify-content:center;gap:16px;max-width:850px;margin-inline:auto}
#university-dialog[data-draft-lot=true][data-screen=intro] .uni-lexicon-word{width:auto;flex:0 1 auto;min-width:100px;padding:14px 20px;max-width:100%}
#university-dialog[data-draft-lot=true][data-screen=intro] .uni-lexicon-word small{display:block;font-size:17px;white-space:normal}
html body #university-dialog[data-draft-lot=true] .uni-scroll{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:auto}
html body #university-dialog[data-draft-lot=true] .uni-question{overflow:visible;flex-shrink:0}
html body #university-dialog[data-draft-lot=true] .uni-exercise{min-height:0;height:auto}
html body #university-dialog[data-draft-lot=true][data-screen=intro] .uni-lexicon-word .uni-jp{font-size:clamp(26px,4dvh,34px)}
html body #university-dialog[data-draft-lot=true] .uni-draft-scenes .uni-button{font-family:var(--uni-ui-font)}
html body #university-dialog[data-draft-lot=true] .uni-options .uni-button{height:auto;min-height:48px}
@media(max-height:500px){#university-dialog[data-draft-lot=true] .uni-draft-scenes{gap:6px;margin:4px 0}#university-dialog[data-draft-lot=true] .uni-draft-scenes .uni-button{padding:4px 8px;font-size:16px}}

/* Tap adds/removes; moving a held tile drags immediately. The rest still scrolls. */
#university-dialog :is(.uni-word-tile,.uni-composed [data-action=edit-segment],.uni-word-bank [data-action=token]){touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}
#university-dialog :is(.uni-word-tile,.uni-composed button,.uni-word-bank button):disabled{cursor:default}
#university-dialog [data-tile-dragging=true]{user-select:none;-webkit-user-select:none}
#university-dialog .uni-tile-drop-gap{display:inline-block;flex:none;box-sizing:border-box;border:0;border-radius:5px;background:#9e83b72b;box-shadow:inset 0 2px 0 #9e83b735;pointer-events:none}
/* A bank slot becomes empty as soon as its tile is lifted, before any drop. */
html body #university-dialog .uni-tile-slot[data-drag-source=true]{background:#9e83b72b;box-shadow:inset 0 2px 0 #9e83b735}
/* A queued verdict must keep the neutral tile until its own reveal, even disabled. */
html body #university-dialog .uni-word-tile:not([data-revealed=true]):not(.uni-voice-word){border-image-source:url('/assets/university-ui-v02/paper-normal.png')}
#university-dialog .uni-tile-drag-ghost{cursor:grabbing;pointer-events:none!important}
#university-dialog .uni-tile-drag-ghost *{pointer-events:none!important}
.integrated-library-footer{display:none}
#vocabulary-dialog[data-university-library] :is(#dictionary-tab,#collection-tab){display:none!important}
#vocabulary-dialog[data-university-library] .v2-home-dock{display:none!important}
#vocabulary-dialog[data-university-library] .integrated-library-footer{position:fixed;bottom:env(safe-area-inset-bottom,0px);height:var(--main-height,72px);left:0;right:0;display:grid;place-items:center;z-index:100;background:#f8ecfe}
#vocabulary-dialog[data-university-library] .integrated-library-footer button{border:2px solid #ae95c1;border-radius:12px;background:#e8dafa;color:#49345f;padding:12px 18px;min-height:48px;font:22px/1 UniversityActions,CityTiny5,sans-serif}
html[data-university-theme=dark] #vocabulary-dialog[data-university-library] .integrated-library-footer{background:#202224}
html[data-university-theme=dark] #vocabulary-dialog[data-university-library] .integrated-library-footer button{border-color:#828977;background:#292c2f;color:#d6ddd1}
