/* Mobile layout only: existing actions, themes and user content remain in place. */
@media(max-width:700px){
 :root{--mobile-top:56px;--mobile-bottom:70px}
 html{scroll-padding-top:72px}
 .app,.main,.content{min-width:0;max-width:100%}
 .topbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;height:var(--mobile-top)!important;min-height:var(--mobile-top)!important;padding:6px 12px!important;gap:10px!important}
 .topbar .breadcrumb{display:flex;align-items:center;gap:10px;font-size:13px;min-width:0;overflow:hidden}
 .topbar .breadcrumb-origin{display:none}
 .topbar .breadcrumb>b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.4}
 .topbar .back-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:42px;height:42px;min-height:42px;padding:9px!important;margin:0!important;border-radius:12px}
 .topbar .back-button>span{display:none}
 .topbar .back-button-icon{width:20px;height:20px}
 .topbar .mobile-menu summary{min-height:42px;padding:8px 10px;border-radius:12px;font-size:13px}
 .topbar .avatar{width:36px;height:36px}
 .topbar .date{display:none}
 .mobile-menu[open]>nav{position:fixed;inset:calc(var(--mobile-top) + 6px) 12px auto;max-height:calc(100dvh - var(--mobile-top) - var(--mobile-bottom) - 32px);overflow-y:auto;overscroll-behavior:contain;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:auto;padding:10px;gap:6px;border:1px solid var(--edge);border-radius:16px;background:var(--panel);box-shadow:0 12px 40px #0003;z-index:1100}
 .mobile-menu nav button{min-width:0;min-height:48px;white-space:normal;line-height:1.4;text-align:left;padding:10px;font-size:13px;gap:8px}
 .content{padding:20px 14px calc(var(--mobile-bottom) + 22px + env(safe-area-inset-bottom))!important}
 .content>.heading{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px;margin-bottom:20px}
 .heading h1{font-size:clamp(23px,6vw,28px);line-height:1.25;overflow-wrap:anywhere}
 .heading p{font-size:14px;line-height:1.6}
 .heading>.actions{width:100%;gap:8px}
 .heading>.actions>.btn{flex:1 1 140px;min-width:0}
 .content :is(.card,.nexo-card){padding:18px;border-radius:18px;min-width:0}
 .content :is(.form,.two-col,.grid,.reading-options,.activity-generator-options){min-width:0}
 .content .form :is(input:not([type=checkbox]):not([type=radio]),textarea,select){width:100%;min-width:0;max-width:100%;font-size:16px;box-sizing:border-box}
 .content input[type=file]{min-width:0;max-width:100%;font-size:13px!important;padding:10px}
 .content :is(.btn,.back-button){min-height:44px;line-height:1.4;white-space:normal}
 .content .actions{flex-wrap:wrap;gap:10px}
 .content .actions>.btn{max-width:100%;min-width:0}
 .content :is(p,h2,h3,.notice,.empty){overflow-wrap:anywhere}
 .mobile-nav{height:calc(var(--mobile-bottom) + env(safe-area-inset-bottom));min-height:0;padding:5px 8px calc(5px + env(safe-area-inset-bottom));gap:4px;align-items:stretch;background:var(--panel);border-color:var(--edge)}
 .mobile-nav button{flex:1 1 0;min-width:0;min-height:0;max-width:100%;padding:5px 2px;gap:3px;border-radius:13px}
 .mobile-nav button>span:first-child{width:27px;height:27px;flex:none}
 .mobile-nav button>span.mobile-nav-label{font-size:10px!important;line-height:1.3;width:auto;height:auto;white-space:nowrap;background:transparent;color:inherit}
 .nexo-welcome{margin-bottom:18px;gap:12px}
 .nexo-welcome h1{font-size:25px;line-height:1.3}
 .nexo-hero{padding:21px 18px;gap:16px;border-radius:21px}
 .nexo-hero h2{font-size:28px;line-height:1.2;margin-top:8px;letter-spacing:-.8px}
 .nexo-hero-copy>p{font-size:14px;line-height:1.65;margin-bottom:18px}
 .nexo-start{min-height:48px!important;padding:12px 16px!important}
 .nexo-companion{gap:12px}
 .nexo-mascot-button{width:84px}
 .nexo-folder-description{min-height:90px;gap:8px}
 .nexo-folder-description strong{line-height:1.45}
 .nexo-folder-description small{gap:8px;flex-wrap:wrap}
 .folder-gallery{gap:14px}
 .folder-card{min-width:0}
 .folder-card :is(h2,h3,strong){overflow-wrap:anywhere}
 .notebook-layout{gap:14px}
 .content[data-page=caderno] .notebook-main{padding:14px}
 .notebook-main>.study-resource-tabs{display:flex;overflow-x:auto;overflow-y:hidden;gap:8px;padding:2px 2px 10px;margin:0 0 16px;scroll-padding-inline:4px;scroll-snap-type:x proximity;scrollbar-width:thin;max-width:100%}
 .study-resource-tabs>button.study-resource{flex:0 0 116px;min-height:72px;padding:10px;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;text-align:left;gap:8px;scroll-snap-align:start}
 .study-resource strong{font-size:12px;line-height:1.35}
 .study-resource small{display:none}
 .study-resource-tabs .study-resource-icon{width:27px;height:27px;flex:none}
 .summary-reader-document{padding:8px 0;max-width:100%;min-width:0}
 .summary-reader-document h1{font-size:25px;line-height:1.35}
 .summary-reader-toolbar,.summary-reader-navigation,.study-paging{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
 .summary-library-list article{gap:10px;min-width:0;grid-template-columns:30px minmax(0,1fr)}
 .summary-library-list article>.btn{grid-column:2;justify-self:start}
 .summary-library-list article h3{font-size:16px;line-height:1.45}
 .guided-reading{margin-top:18px}.guided-example,.guided-question{padding:16px;margin-block:20px}
 .main:has(.community-shell){height:calc(100dvh - var(--mobile-bottom) - env(safe-area-inset-bottom))}
 .content[data-page=social]{padding:0!important;min-height:0}
 .community-shell{min-width:0;max-width:100%}
 .community-shell .community-fixed-top{padding:10px 12px 0}
 .community-shell .community-head h1{font-size:18px}
 .community-shell .community-feed-tabs{gap:2px;scroll-padding-inline:6px;scrollbar-width:thin}
 .community-shell .community-feed-tabs button{min-height:44px;min-width:80px;padding:10px 12px}
 .community-shell>.community-bottom{padding:4px 12px;gap:6px}
 .community-shell>.community-bottom button{min-height:40px;flex:1;min-width:0}
 .community-shell .community-scroll{padding:12px}
 .community-shell .community-post{padding:16px;border-radius:16px}
 .community-shell .community-person strong{font-size:14px;line-height:1.45}
 .community-shell .community-person small{font-size:12px}
 .community-shell .community-text{font-size:15px;line-height:1.7}
 .community-shell .community-actions button{min-height:44px;font-size:12px;padding:8px}
 .community-profile-identity{min-width:0}.community-profile-identity h2{overflow-wrap:anywhere}
 .community-shell .community-scroll:has(.community-chats){padding:0}
 .community-chat-messages{padding:14px}
 .private-chat-compose{padding:10px 12px!important}
 .chat-send-row{gap:8px}.chat-send-row>button{min-width:44px;min-height:44px}
 .chat-send-row textarea{min-height:46px;border-radius:12px;padding:11px;font-size:16px}
 .admin-person{min-width:0;gap:12px;flex-wrap:wrap}
 .admin-person .btn{min-height:44px;max-width:100%}
 .modal{max-width:100%;max-height:calc(100dvh - 32px);overflow-y:auto}
 .study-keyboard-open .content{padding-bottom:24px!important}
 .nexo-focus .content{padding:14px 10px!important}
}
@media(max-width:430px){
 .nexo-folder-grid,.folder-gallery{grid-template-columns:minmax(0,1fr)}
 .nexo-folder-cover{height:138px}.nexo-new-folder{min-height:145px}
 .nexo-folder-description{min-height:0;padding:15px 16px}
 .nexo-resume-body{gap:12px}.nexo-resume-body h3{font-size:17px}
 .content .summary-generation{padding:14px}
}
@media(max-width:359px){
 .topbar{padding-inline:8px!important;gap:6px!important}
 .topbar .mobile-menu summary{padding-inline:8px}
 .content{padding-inline:10px!important}
 .mobile-nav{padding-inline:4px;gap:1px}
 .mobile-nav button>span.mobile-nav-label{font-size:9px!important}
}
.mobile-progress-fold{border:0}.mobile-progress-fold>summary{display:none}
@media(max-width:700px){
 .mobile-progress-fold{border:1px solid var(--edge);background:var(--panel);border-radius:14px;margin:14px 0}
 .mobile-progress-fold>summary{display:list-item;cursor:pointer;min-height:48px;padding:13px 16px;font-size:14px;line-height:1.5;color:var(--text)}
 .mobile-progress-fold>.coach-progress{border:0;border-top:1px solid var(--edge);border-radius:0 0 14px 14px;margin:0;padding:16px}
 .coach-progress .useful-progress.compact{padding:14px 0;border:0;box-shadow:none}
 .coach-progress .learning-metrics{gap:8px}.coach-progress .learning-metrics>div{padding:10px}
 .study-resources-organized{margin-bottom:16px}
 .study-resources-organized .study-resource-tabs{gap:8px;margin-bottom:10px}
 .study-resources-organized .study-resource{min-height:62px;padding:9px 6px;gap:6px}
 .study-journey{gap:6px;padding:8px 0;margin-block:10px 16px}
 .study-journey button{min-width:0;padding:10px 6px;gap:5px}
 .study-journey button small{font-size:10px;line-height:1.4}
 .content .study-tools{margin:12px 0;gap:8px}
}
.nexo-focus .mobile-progress-fold{display:none}
@media(max-width:700px){
 .study-resources-organized>.study-resource-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;overflow:visible}
 .study-resources-organized .study-resource-tabs>.study-resource{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:76px;padding:9px 5px;gap:6px;text-align:center}
 .study-resources-organized .study-resource-tabs>.study-resource strong{font-size:12px;line-height:1.35}
 .study-extra-grid>.study-resource{min-height:62px;padding:10px;gap:8px}
 .study-journey>button{min-height:58px;font-size:12px}
}
/* Keep the Professor avatar circular when its adjacent description wraps. */
.professor-chat-head>.professor-avatar{flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;aspect-ratio:1 / 1;line-height:1;align-self:center}
.professor-chat-head>.professor-avatar+div{flex:1 1 0;min-width:0;overflow-wrap:anywhere}
