/* UX Design Casagrande: shared interaction and responsive refinements. */
:root{--ux-focus:#075275;--ux-muted:#48665d}
#portal button,#portal input,#portal select{min-height:44px}
#portal input,#portal select,#portal label{font-size:16px}
#portal .login-links button{min-height:44px;font-size:14px;padding:8px 4px}
#portal .menu-account .plain-button{min-height:44px;font-size:14px}
#portal .grade-card,#portal .module-card{font-size:16px}
#portal .grade-caption,#portal .small-note,#portal small{color:var(--ux-muted);font-size:14px}
#portal .login-links button{color:#17616e}
#portal input,#portal select{border-color:#718c84}
#portal :is(button,a,input,select):focus-visible,#conversation-home:focus-visible,#record:focus-visible,#quota-help:focus-visible,#quota-dialog button:focus-visible{outline:3px solid var(--ux-focus);outline-offset:3px;box-shadow:0 0 0 6px #fffdf3}
#portal h1:focus{outline:none}
#portal .portal-page{overflow-y:auto;overscroll-behavior:contain;scroll-padding:12px}
#portal .login-layout{flex-shrink:0}
#portal .login-card{position:relative}
#portal .login-card #portal-message{position:static;width:100%;margin:0;padding:12px;box-shadow:none;font-size:15px;line-height:1.45}
#portal .password-hint{font-size:14px;color:var(--ux-muted);margin:0;line-height:1.4}
#portal .table-scroll{max-width:100%;outline-offset:2px}
#portal .wide .filter-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
#portal .wide .admin-panel{min-width:0}
#portal .wide td:first-child{min-width:170px;overflow-wrap:anywhere}
#portal .wide td small{font-size:14px}
#portal .video-page .video-hint{color:var(--ux-muted)}
#portal .video-page .video-shell{flex-shrink:0}
#portal .video-page .video-poster h2{overflow-wrap:normal;word-break:normal}
#portal .video-actions button{font-size:16px}
#portal .missing-video-dialog{max-height:calc(100dvh - 32px);overflow:auto}
#quota-help{position:relative;overflow:visible}
#quota-help::before{content:"";position:absolute;inset:-10px;border-radius:50%}
#quota-dialog{max-height:calc(100dvh - 32px);overflow:auto}
#quota-dialog button,#notice button{min-height:44px;padding:10px 18px;background:#087f99;color:white;border:0;border-radius:14px;font-size:16px}
#notice button{display:block;margin:10px auto 0}
@media(min-width:761px) and (max-width:1023px) and (orientation:portrait){
 #portal .view-menu .module-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
 #portal .view-menu .menu-welcome{flex-basis:22%;min-height:120px}
 #portal .view-menu .module-card{gap:12px;font-size:22px;padding:18px}
 #portal .view-menu .module-characters{height:auto;flex:1;width:100%;max-height:210px}
 #portal .view-menu .module-characters .character-art{height:100%;max-height:210px}
 #portal .view-menu .module-card>span{max-width:100%;min-height:2.4em}
 #portal .login-layout{grid-template-columns:1fr;gap:22px;max-width:500px;align-content:center}
 #portal .login-welcome{display:flex;align-items:center;gap:20px}
 #portal .login-welcome .welcome-bird{height:180px;max-width:160px}
}
@media(min-width:1024px){
 #portal .view-menu .module-card{font-size:clamp(24px,2vw,34px)}
 #portal .grade-card{font-size:18px}
}
@media(max-width:360px){
 #portal .lesson-card[data-lesson="combinados"] .lesson-title{font-size:14px;padding:5px;gap:3px}
 #portal .view-musicas .lesson-card[data-lesson="combinados"] .character-art{width:20px;min-width:20px;flex-basis:20px}
 #portal .view-menu .menu-welcome{min-height:94px;flex-basis:20%}
 #portal .view-menu .module-grid{grid-template-rows:repeat(2,minmax(120px,1fr));flex-shrink:0}
 #portal .menu-account{gap:6px}
 #portal .login-card{padding:14px}
}
@media(max-height:500px){
 #portal .portal-page{height:auto;min-height:100%;overflow:visible}
 #portal{overflow-y:auto}
 #portal .login-layout{min-height:320px}
 #portal .module-grid{min-height:180px}
 #portal .lesson-grid{grid-auto-rows:minmax(80px,1fr)}
 #portal .grade-grid{grid-auto-rows:minmax(88px,1fr)}
 #portal .video-page-content{flex:none}
 #portal .video-page .video-shell{max-width:580px}
}
@media(prefers-reduced-motion:reduce){
 #portal *,#notice{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media(forced-colors:active){
 #portal button,#portal input,#portal select,#record,#quota-help{border:1px solid ButtonText}
 #portal .grade-card.selected{outline:3px solid Highlight}
 #quota-fill{background:Highlight}
}

@media(max-width:760px){
 #portal .video-page .video-poster{grid-template-columns:20% 80%;padding:8px}
 #portal .video-page .video-poster-copy{gap:8px}
 #portal .video-page .video-poster h2{font-size:16px;line-height:1.15}
 #portal .video-page .poster-play{font-size:16px;padding:8px 16px;min-height:40px}
}

#portal .wide #portal-message{position:fixed;bottom:16px;max-height:35dvh;overflow:auto}
body[data-state=listening] .record{background:#a94f30;box-shadow:0 6px 0 #813d27}

#portal .portal-page>#portal-message{position:static;flex:none;left:auto;width:100%;font-size:15px;line-height:1.4;margin:0;padding:12px 16px}
#portal .video-page .video-shell.is-expanded{position:fixed!important;inset:0;width:100vw!important;height:100dvh!important;max-width:none;max-height:none;aspect-ratio:auto;border-radius:0;background:#000;z-index:100}
#portal .video-shell.is-expanded .fullscreen-exit{display:block}
@media(min-width:1024px){
 #portal .video-page:has(#portal-message:not([hidden])) .video-shell:not(.is-expanded){width:min(100%,calc((100dvh - 300px)*16/9))}
}
/* Approved audience groups: only the home menu changes. */
#portal .view-menu{gap:10px}
#portal .view-menu .menu-welcome{flex:0 0 clamp(100px,19dvh,175px);min-height:0;padding-right:30px}
#portal .view-menu .menu-groups{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:18px;flex:1;min-height:0;width:100%}
#portal .view-menu .menu-group{position:relative;display:flex;min-height:0;min-width:0;padding:18px 9px 10px;border:2px solid #edbd48;border-radius:38px;background:#fff5ce38}
#portal .view-menu .group-professores{border-color:#73c8b4;background:#dff5eb38}
#portal .view-menu .menu-group h2{position:absolute;top:0;left:50%;transform:translate(-50%,-50%);margin:0;border-radius:30px;padding:5px 18px;background:#ffeda8;color:#075275;font-size:clamp(17px,2.4vw,26px);line-height:1.15;white-space:nowrap}
#portal .view-menu .group-professores h2{background:#c7eedf}
#portal .view-menu .group-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;min-height:0}
#portal .view-menu .module-card{padding:8px;gap:5px;min-width:0;min-height:0;justify-content:center;border-radius:25px;font-size:clamp(16px,2.3vw,24px);display:grid;grid-template-rows:minmax(0,1fr) auto}
#portal .view-menu .module-characters{width:100%;height:100%;min-height:0;max-height:none;margin:0;align-items:center;justify-content:center}
#portal .view-menu .module-characters .character-art{height:100%;width:90%;max-width:90%;max-height:none;object-fit:contain;object-position:center}
#portal .view-menu .module-characters.character-pair .character-art{width:49%;max-width:49%}
#portal .view-menu .module-card>span{margin:0;width:100%;max-width:none;min-height:2.4em;line-height:1.2;display:flex;align-items:center;justify-content:center;text-wrap:balance}
#portal .view-menu .menu-account{gap:6px}
#portal .view-menu .menu-account .plain-button{padding:8px 11px}
@media(min-width:761px) and (max-width:1023px){#portal .view-menu .menu-group{padding:23px 14px 14px;border-radius:44px}#portal .view-menu .menu-groups{gap:24px}#portal .view-menu .module-card{font-size:24px;padding:12px}}
@media(min-width:1024px){#portal .view-menu .menu-groups{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:22px;margin-top:10px}#portal .view-menu .menu-group{padding:28px 15px 16px;border-radius:48px}#portal .view-menu .module-card{padding:16px 10px;font-size:clamp(22px,1.8vw,32px)}#portal .view-menu .menu-welcome{flex-basis:clamp(120px,24dvh,240px)}}
@media(max-width:360px){#portal .view-menu{padding-left:10px;padding-right:10px;gap:7px}#portal .view-menu .menu-welcome{flex-basis:90px}#portal .view-menu .menu-welcome h1{font-size:20px;padding:10px}#portal .view-menu .menu-group{padding:15px 6px 7px;border-radius:28px}#portal .view-menu .group-cards{gap:8px}#portal .view-menu .module-card{font-size:14px;padding:6px}#portal .view-menu .menu-group h2{font-size:16px}#portal .view-menu .menu-account .plain-button{font-size:12px;padding:6px 8px}}
@media(max-height:500px){#portal .view-menu .menu-groups{flex:none;min-height:380px}#portal .view-menu .menu-welcome{flex-basis:95px}}
#portal #cost-totals[hidden]{display:none}

#portal .delete-user{border:1px solid #a33232;background:#fff3ef;color:#942727;border-radius:14px;padding:12px 18px;min-height:44px;width:100%;font-weight:700}#portal .delete-user[hidden]{display:none}

#portal [data-home],#conversation-home{background:#fff3c9;box-shadow:0 3px 0 #d8c78c55} .home-art{display:block;width:36px;height:36px;object-fit:contain;pointer-events:none}
/* Tablet bezel surrounds the content; it never covers player controls. */
#portal .video-page .video-shell{padding:10px 18px;aspect-ratio:auto;height:auto;border:2px solid #507482;border-radius:24px;background:linear-gradient(145deg,#315866,#173a48);box-shadow:0 5px 0 #102f3b,0 12px 26px #153d4926;overflow:visible}
#portal .video-page .video-shell.is-playing{background:linear-gradient(145deg,#315866,#173a48)}
#portal .video-shell::before{content:"";position:absolute;left:6px;top:50%;width:5px;height:5px;border-radius:50%;background:#0a222b;box-shadow:inset 0 0 0 1px #82a5af;pointer-events:none}
#portal .tablet-screen{width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:12px;background:#000;position:relative}
#portal .tablet-screen .video-poster{border-radius:0}
#portal .video-page .tablet-screen iframe{position:absolute;inset:0;width:100%;height:100%}
#portal .video-page .video-shell:is(:fullscreen,.is-expanded){padding:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;background:#000}
#portal .video-shell:is(:fullscreen,.is-expanded)::before{display:none}
#portal .video-shell:is(:fullscreen,.is-expanded) .tablet-screen{height:100%;aspect-ratio:auto;border-radius:0;overflow:visible}
@media(min-width:1024px){#portal .video-page .video-shell{padding:14px 24px;border-radius:30px}#portal .video-shell::before{left:9px;width:6px;height:6px}#portal .tablet-screen{border-radius:16px}}
@media(max-width:360px){#portal .video-page .video-shell{padding:8px 13px;border-radius:20px}#portal .video-shell::before{left:4px;width:4px;height:4px}}
@media(min-width:1024px){#portal .video-page .video-shell:not(:fullscreen):not(.is-expanded){width:min(100%,calc((100dvh - 270px)*16/9))}}
