/* Compact workstation, tablet rail and touch-first phone layouts. */
:root{--sidebar-width:184px;--compact-gap:12px}
.workspace{display:flex;flex-direction:column;min-height:100dvh}
.topbar{height:64px;min-height:64px;padding:0 18px;gap:12px;flex-shrink:0}
.page-heading{gap:12px}.heading-icon{width:32px;height:32px}
.page-heading h1{font-size:26px;letter-spacing:-.6px}.page-heading p{font-size:12px}
.header-actions{gap:10px}.language-switch{padding:2px}.language-switch button{min-height:30px;padding:4px 12px;font-size:13px}.language-switch button span{font-size:16px}
.brand{font-size:25px;padding:14px 13px;gap:6px;letter-spacing:-.8px}.brand-cap{width:43px}.brand-cap svg{height:42px}
.nav-list{padding:10px;gap:7px}.nav-link{height:46px;font-size:16px;padding:0 13px;gap:11px;border-radius:12px}.nav-link .icon{width:23px;height:23px}
.sidebar-bottom{padding-bottom:22px}.sidebar-bottom p{font-size:16px;margin:8px 10px}.sidebar-illustration{width:184px;height:146px;background-size:1131px 636.6px;background-position:0 -341.4px}.sidebar-swoosh{width:95px;height:25px}
main{padding:12px 16px;min-height:0;flex:1}.app-footer{padding:2px 16px 10px;font-size:10px;flex-shrink:0}
.stats-grid,.classes-focus .stats-grid{gap:12px;margin-bottom:12px}.stat{min-height:72px;border-radius:16px;padding:10px 14px;gap:12px}.stat-icon{display:grid;width:44px;height:44px}.stat-icon .icon{width:27px;height:27px}.stat-value{font-size:26px}.stat-label{font-size:13px}.stat-watermark{display:none}
.panel{border-radius:16px;padding:12px 16px}.panel h2{font-size:17px;gap:9px}.panel h2 .icon{width:21px;height:21px}
.charts-grid{gap:12px;margin-bottom:12px;grid-template-columns:1fr 1fr}.distribution-content{min-height:155px;padding-top:10px;flex-direction:row;gap:15px}.donut-wrap{width:44%}.donut{width:140px}.donut-center strong{font-size:26px}.donut-center span{font-size:13px}.ability-legend{width:50%;display:block}.ability-legend li{font-size:13px;gap:7px;padding:9px 0;display:flex;flex-wrap:nowrap;justify-content:flex-start}.ability-legend .dot{width:11px;height:11px}.legend-count{margin-left:auto!important}.legend-percent{font-size:12px;min-width:38px}.bar-chart{height:155px;padding-top:23px;gap:9px}.chart-scale{font-size:12px}.bar-value{font-size:14px;top:-20px}.bar-labels{font-size:12px;height:25px;padding-top:7px}.chart-grid{bottom:25px}.chart-scale{padding-bottom:25px}
.classes-section,.classes-focus .classes-section{padding:10px 0;margin:0}.section-toolbar{padding:0 4px;margin-bottom:12px;gap:10px;flex-wrap:nowrap}.section-toolbar h2{font-size:21px;gap:9px}.section-toolbar h2 .icon{width:25px;height:25px}.class-tools{width:auto;gap:9px;flex-wrap:nowrap}.search-box{height:38px;border-radius:12px;padding:0 11px;width:230px;min-width:130px;gap:8px}.search-box input{font-size:13px}.search-box .icon{width:17px;height:17px}.class-tools #class-sort{font-size:12px;width:135px;max-width:135px;padding:8px}.button,.create-class{font-size:13px;min-height:36px;padding:7px 12px;border-radius:10px;gap:7px}.create-class .icon{width:18px;height:18px}.classes-grid{gap:10px}.class-card{border-radius:15px}.class-card header{min-height:55px;padding:10px;gap:8px}.class-card h3{font-size:18px;margin-bottom:3px}.class-card header p{font-size:12px}.class-avatar{width:36px;height:36px}.class-avatar .icon{width:25px;height:25px}.class-breakdown{padding:5px 12px}.class-breakdown li{height:26px;font-size:12px;gap:7px}.class-breakdown .dot{width:11px;height:11px}.card-actions{padding:8px 10px;gap:6px}.card-actions .button{min-height:32px;font-size:12px;padding:5px 8px}.card-actions .icon-button{width:31px;height:32px}.card-actions .icon{width:15px;height:15px}
.classes-focus .classes-grid{gap:14px;grid-template-columns:repeat(3,minmax(0,1fr))}.classes-focus .class-card header{padding:12px 34px 9px 13px;min-height:64px}.classes-focus .class-avatar{width:42px;height:42px}.classes-focus .class-avatar .icon{width:29px;height:29px}.classes-focus .class-card h3{font-size:21px}.classes-focus .class-breakdown{padding:6px 12px 10px;gap:6px}.classes-focus .class-breakdown li{height:48px;padding:6px 8px;grid-template-columns:12px 1fr;grid-template-rows:20px 15px;gap:0 5px}.classes-focus .class-breakdown strong{font-size:21px}.classes-focus .class-breakdown li>span:nth-child(2){font-size:11px}.classes-focus .card-actions{padding:0 12px 12px;gap:8px}.classes-focus .card-actions .button{min-height:34px;font-size:13px}.classes-focus .card-actions .icon-button{width:40px;height:34px}
.class-overview{padding:9px 12px;gap:10px;margin-bottom:10px;min-height:70px;flex-wrap:nowrap}.class-overview>a{width:32px;height:32px}.class-overview .overview-name{min-width:140px;padding:5px 10px;gap:10px;border-radius:12px}.overview-name h2{font-size:19px;line-height:1.2}.overview-name span{font-size:12px}.overview-name .class-avatar{width:42px;height:42px}.class-overview .level-tile{min-width:70px;padding:7px 10px;gap:8px;border-radius:12px}.level-tile .icon{width:24px;height:24px}.level-tile strong{font-size:23px}.level-tile span{font-size:11px}.class-overview .last-stat{min-width:76px;padding:5px;gap:8px}.last-stat .icon{width:22px;height:22px}.last-stat span{font-size:10px}.class-overview .last-stat:last-of-type{min-width:115px}.last-stat:last-of-type strong{font-size:12px}.class-overview>button:last-child{width:32px;height:32px}.detail-tabs{margin-bottom:10px;padding:2px}.detail-tabs button{padding:7px 21px;min-height:36px;gap:7px;font-size:13px}.detail-tabs .icon{width:19px;height:19px}.screen-panel-heading,.roster-panel .screen-panel-heading{padding:10px 13px;min-height:44px}.class-workspace h2{font-size:16px}.class-workspace h2>.icon{width:21px;height:21px}
.generation-column{gap:10px}.generator-panel form{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:14px;align-items:center;padding:0 13px}.generator-controls{margin:0;gap:10px;flex-wrap:nowrap}.generator-controls>label{flex:1;min-width:0;padding:5px 10px;font-size:12px;gap:10px}.generator-controls input[type=number]{width:62px;padding:5px 8px}.generator-panel form>.button{grid-column:2;grid-row:1;min-width:180px;margin:0;padding:8px 13px}.generator-panel form>.snapshot-note{grid-column:1/-1;margin:7px 0 0;padding:0;font-size:11px;line-height:1.4}.class-workspace .generator-panel{padding-bottom:10px}.generated-panel>.screen-panel-heading{padding:10px 13px}.generation-meta{min-height:38px;margin:0 10px 10px;padding:5px 7px;gap:8px;font-size:11px}.generation-meta>span{font-size:11px}.save-pill{font-size:12px;padding:6px 10px;min-height:30px}.generation-meta>.button{font-size:11px;min-height:30px;padding:5px 9px}.generation-actions{gap:5px}.generation-actions .icon-button{width:30px;height:30px}.status-pill{font-size:10px}.generated-grid{gap:10px;margin:0 10px;grid-template-columns:repeat(4,minmax(0,1fr))}.generated-card{padding:10px 11px;border-radius:12px}.generated-card h3{font-size:14px;margin-bottom:4px;gap:6px}.generated-card h3 .icon{width:18px;height:18px}.group-student-count{font-size:10px;margin-bottom:6px}.level-counts{margin-bottom:7px}.level-counts span{font-size:10px;padding:2px 5px}.generated-card ul{gap:5px}.generated-card li{font-size:12px;line-height:1.3}.generated-card .dot{width:8px;height:8px}.class-workspace .generated-panel{padding-bottom:10px!important}.snapshot-note{font-size:11px;margin:6px 0 8px}.roster-filters{padding:8px 13px}.roster-filters .search-box{height:34px;max-width:340px}.roster-filters select{font-size:12px;padding:6px 8px}.select-all{padding:7px 14px;font-size:11px}.student-row{padding:7px 14px;min-height:42px;gap:11px}.student-row strong{font-size:13px}.student-avatar{width:28px;height:28px;font-size:10px}.student-row .ability-badge{font-size:11px;padding:4px 8px}.roster-footer{min-height:46px;padding:7px 13px}.roster-footer select{padding:6px 8px}.history-panel #history-list{padding:10px 13px}.history-day{font-size:13px;margin:6px 0 9px}.history-day:not(:first-child){margin-top:17px}.history-record{padding:10px 12px;gap:12px;border-radius:12px;margin-bottom:8px}.history-description strong{font-size:13px}.history-description small{font-size:11px}.history-actions .icon-button{width:32px;height:32px}.history-preview-notice{padding:12px;gap:12px;margin-bottom:12px}.history-preview-notice p{font-size:12px;margin-top:4px}.history-preview-notice strong{font-size:13px}
.settings-grid{gap:14px;max-width:none}.preference-card{padding:16px 19px}.preference-card>h2{font-size:19px;margin-bottom:8px}.preference-card>p{font-size:12px;margin-bottom:12px}.language-options{padding:3px 0;gap:12px}.language-options .choice{min-height:68px;padding:12px 15px;gap:12px;flex-direction:row}.language-options .choice-check{position:static;width:19px;height:19px}.flag{font-size:28px}.theme-options{gap:12px}.theme-preview{height:51px}.theme-choice{padding:6px 6px 9px;gap:7px;border-radius:12px}.theme-choice strong{font-size:12px}.accent-row{flex-direction:row;align-items:center;margin-top:15px;gap:20px;font-size:12px}.accent-options{gap:10px}.accent-options button{width:24px;height:24px}.preference-row{padding:12px 0;gap:14px}.preference-row strong{font-size:13px}.preference-row small{font-size:11px;margin-top:4px}.app-preferences>.muted{font-size:11px;line-height:1.5;margin:10px 0 0}.data-actions{margin:12px 0;gap:10px}.preference-card .muted{font-size:12px;line-height:1.5}.storage-alert{padding:10px 13px;margin-bottom:10px;gap:14px;font-size:12px}.storage-alert p{font-size:11px;margin-top:4px;line-height:1.4}.storage-alert strong{font-size:12px}.empty-state{padding:25px 16px}.empty-state h3{font-size:20px}.empty-state p{font-size:13px}.toast{bottom:14px;padding:10px 16px;font-size:12px}
/* Desktop: the application frame fits the viewport; long lists scroll inside panels. */
@media(min-width:1180px){
 html,body{height:100%;overflow:hidden}.workspace{height:100dvh;min-height:0}main{overflow:auto;scrollbar-width:thin}.app-footer{height:22px;padding:2px 16px 6px}
 #detail-view:not([hidden]){height:100%;display:flex;flex-direction:column;min-height:0}.class-overview,.detail-tabs{flex-shrink:0}.class-workspace{flex:1;min-height:0}
 .class-workspace>[role=tabpanel]:not([hidden]){height:100%;min-height:0}.class-workspace .student-list{height:auto;min-height:0;flex:1;overflow:auto}.roster-panel>.screen-panel-heading,.roster-filters,.select-all,.roster-footer{flex-shrink:0}
 .generation-column{min-height:0}.generator-panel{flex-shrink:0}.generated-panel{display:flex;flex-direction:column;min-height:0}.generated-panel>.screen-panel-heading{flex-shrink:0}#generation-result{flex:1;min-height:0;overflow:auto;scrollbar-width:thin}.generation-meta{position:sticky;top:0;z-index:2;background:var(--surface);box-shadow:0 2px 5px #40206b0b}
 .history-panel>.screen-panel-heading{flex-shrink:0}.history-panel #history-list{min-height:0;overflow:auto;scrollbar-width:thin}
}
@media(min-width:1180px) and (max-height:800px){.sidebar-bottom{padding-bottom:15px}.sidebar-illustration{height:115px;background-position:0 -350px}.sidebar-bottom p{font-size:14px}.sidebar-swoosh{height:20px}}
/* Tablet: narrow navigation rail preserves working space in both orientations. */
@media(min-width:640px) and (max-width:1179px){
 :root{--sidebar-width:76px}.sidebar{width:76px;transform:none;border-radius:0 14px 14px 0}.workspace{margin-left:76px;width:calc(100% - 76px)}.brand{padding:16px 0;justify-content:center}.brand>span:last-child{display:none}.brand-cap{width:45px}.nav-list{padding:8px}.nav-link{justify-content:center;padding:0;height:52px}.nav-link .icon{width:27px;height:27px}.nav-link>span{display:none}.sidebar-bottom{display:none}.mobile-menu{display:none!important}.sidebar-overlay{display:none!important}
 .topbar{height:66px;min-height:66px;padding:0 16px}.page-heading h1{font-size:25px}.page-heading p{font-size:11px}.heading-icon{width:29px;height:29px}main{padding:14px}.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.stat{padding:11px;min-height:77px}.stat-icon{display:none}.stat-label{font-size:12px;white-space:normal}.stat-value{font-size:27px}.classes-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.classes-focus .classes-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.section-toolbar{flex-wrap:wrap}.class-tools{width:100%;flex-wrap:wrap}.class-tools .search-box{flex:1}.class-tools #class-sort{order:0;width:145px;max-width:145px}.class-tools .create-class{flex:none}.class-overview{display:grid;grid-template-columns:1.5fr repeat(3,1fr);gap:9px}.class-overview>a{display:none}.class-overview .overview-name{grid-column:auto;min-width:0;padding:8px}.overview-name .class-avatar{display:none}.class-overview .last-stat{grid-column:auto;min-width:0;border:0}.class-overview .last-stat:last-of-type{grid-column:span 2;min-width:0}.class-overview>button:last-child{justify-self:end}.level-tile .icon{display:none}.level-tile{justify-content:center}.overview-name h2{font-size:18px}.overview-name span{font-size:11px}.class-overview .last-stat:last-of-type strong{font-size:12px;white-space:normal}.detail-tabs{width:100%;justify-content:space-between}.detail-tabs button{flex:1;min-height:44px;font-size:14px}.generation-column{gap:14px}.generator-panel form{grid-template-columns:minmax(0,1fr) auto;gap:10px}.generator-controls{flex-wrap:wrap;gap:7px}.generator-controls>label{flex:1 1 100%;min-height:40px}.generator-panel form>.button{min-width:170px;min-height:44px}.generated-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.generated-card{padding:13px}.generated-card h3{font-size:15px}.generated-card li{font-size:13px}.generation-meta{gap:9px;padding:8px;min-height:44px}.save-pill,.generation-meta>.button{min-height:40px}.generation-actions .icon-button{width:40px;height:40px}.student-row{min-height:53px;padding:10px 14px}.student-row strong{font-size:14px}.student-avatar{width:33px;height:33px;font-size:12px}.student-row input,.select-all input{width:20px;height:20px}.roster-filters{flex-wrap:nowrap}.roster-filters .search-box{max-width:none;flex-basis:auto;height:42px}.roster-filters select{width:140px}.roster-footer{min-height:58px}.roster-footer select,.roster-footer .icon-button{min-height:40px}.class-workspace .student-list{height:min(55vh,540px)}.history-actions .icon-button{width:42px;height:42px}.history-actions .button{min-height:42px}.history-record{padding:14px}.history-description strong{font-size:14px}.history-description small{font-size:12px}.settings-grid{gap:16px}.preference-card{padding:20px}.preference-row{min-height:67px}.preference-card>h2{font-size:19px}.preference-card .button{min-height:42px;white-space:normal}.theme-preview{height:64px}.language-options .choice{min-height:80px}.accent-row{flex-wrap:wrap;gap:15px}.button,.icon-button{min-height:40px}
}
@media(min-width:640px) and (max-width:899px){.page-heading p{display:none}.charts-grid{gap:12px}.distribution-content{flex-direction:column;gap:10px;min-height:204px}.donut-wrap{width:100%}.donut{width:125px}.ability-legend{width:100%;display:flex;justify-content:space-around;gap:5px}.ability-legend li{flex-direction:column;font-size:11px;gap:4px;padding:0;border:0}.ability-legend .legend-count{margin:0!important}.legend-percent{font-size:10px;min-width:0}.bar-chart{height:204px;padding-top:28px}.bar-labels{font-size:10px}.settings-grid{grid-template-columns:1fr}.generated-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.classes-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.class-overview .level-tile{padding:8px}.class-overview .overview-name{background:none}.screen-panel-heading>span{font-size:11px}}
/* Phones: stacked content, large touch targets and visible saving actions. */
@media(max-width:639px){
 :root{--sidebar-width:0px}.sidebar{width:260px;transform:translateX(-105%)}.sidebar.open{transform:translateX(0)}.sidebar .brand{font-size:29px;padding:18px}.sidebar .brand-cap{width:48px}.sidebar .nav-link{height:52px;font-size:18px}.sidebar .nav-list{padding:12px}.sidebar-bottom{display:none}.workspace{margin-left:0;width:100%;min-height:100dvh}.topbar{height:62px;min-height:62px;padding:0 12px;position:sticky;top:0;z-index:12;background:var(--surface)}.mobile-menu{display:inline-flex!important;width:42px;height:42px;min-height:42px}.page-heading{flex:1;min-width:0;gap:0}.heading-icon{display:none}.page-heading h1{font-size:22px}.page-heading p{display:none}.language-switch{padding:2px;border-width:1px}.language-switch button{padding:5px 8px;min-height:34px;font-size:12px}.language-switch button span{display:none}.header-actions{gap:6px}main{padding:12px 10px 18px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat{min-height:82px;padding:12px;gap:10px}.stat-icon{display:grid;width:35px;height:35px}.stat-icon .icon{width:23px;height:23px}.stat-value{font-size:26px}.stat-label{font-size:12px;white-space:normal}.charts-grid{grid-template-columns:1fr;gap:12px}.panel{padding:14px}.panel h2{font-size:16px}.distribution-content{min-height:160px;gap:18px;flex-direction:row}.donut-wrap{width:46%}.donut{width:132px}.ability-legend{width:50%;display:block}.ability-legend li{display:flex;flex-direction:row;font-size:12px;padding:10px 0;gap:6px}.legend-count{margin-left:auto!important}.legend-percent{font-size:11px;min-width:33px}.bar-chart{height:178px}.bar-labels{font-size:11px}.section-toolbar{flex-wrap:wrap;padding:0;gap:12px}.section-toolbar h2{font-size:21px}.class-tools{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}.class-tools .search-box{grid-column:1/-1;width:100%;height:44px;max-width:none}.class-tools #class-sort{width:100%;max-width:none;order:0;min-height:44px;font-size:12px}.class-tools .create-class{min-height:44px;font-size:13px;padding:8px}.classes-grid,.classes-focus .classes-grid{grid-template-columns:1fr;gap:12px}.class-card header,.classes-focus .class-card header{padding:13px 35px 10px 13px;min-height:65px}.class-card h3,.classes-focus .class-card h3{font-size:21px}.class-avatar,.classes-focus .class-avatar{width:42px;height:42px}.class-avatar .icon{width:29px;height:29px}.class-breakdown,.classes-focus .class-breakdown{display:flex;padding:5px 13px 12px;gap:8px}.class-breakdown li,.classes-focus .class-breakdown li{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:5px;flex:1;border:0;border-radius:10px;min-height:40px;height:auto;padding:8px 5px;font-size:12px;background:var(--bg)}.class-breakdown strong,.classes-focus .class-breakdown strong{font-size:15px;margin:0;line-height:1.2}.classes-focus .class-breakdown li>span:nth-child(2){font-size:11px}.card-actions,.classes-focus .card-actions{padding:0 13px 13px;gap:9px;border:0}.card-actions .button,.classes-focus .card-actions .button{min-height:44px;font-size:14px}.card-actions .icon-button,.classes-focus .card-actions .icon-button{width:46px;height:44px}.card-actions .icon{width:18px;height:18px}.class-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:10px;gap:8px;margin-bottom:10px}.class-overview>a{display:none}.class-overview .overview-name{grid-column:1/-1;padding:8px 10px;min-width:0;gap:12px}.overview-name .class-avatar{width:39px;height:39px}.overview-name h2{font-size:21px}.overview-name span{font-size:12px}.class-overview .level-tile{min-width:0;justify-content:center;padding:9px 6px;gap:6px}.level-tile .icon{display:none}.level-tile strong{font-size:22px}.level-tile span{font-size:11px}.class-overview .last-stat{min-width:0;padding:5px;border:0;gap:5px}.class-overview .last-stat:last-of-type{min-width:0;grid-column:auto}.last-stat .icon{display:none}.class-overview .last-stat:first-of-type strong{font-size:20px}.last-stat:last-of-type strong{font-size:11px;white-space:normal}.last-stat span{font-size:10px}.class-overview>button:last-child{justify-self:end;width:40px;height:40px}.detail-tabs{width:100%;padding:3px;margin-bottom:12px;position:sticky;top:66px;z-index:8;background:var(--surface)}.detail-tabs button{flex:1;min-height:43px;padding:9px 5px;font-size:12px;gap:6px}.detail-tabs .icon{width:18px;height:18px}.screen-panel-heading,.roster-panel .screen-panel-heading{padding:13px 12px;min-height:53px;gap:8px}.class-workspace h2{font-size:16px}.screen-panel-heading>span{font-size:11px}.roster-panel .compact{min-height:42px;padding:8px 10px;font-size:12px}.roster-filters{padding:10px;gap:8px;flex-wrap:nowrap}.roster-filters .search-box{height:42px;max-width:none;flex-basis:auto;padding:0 8px}.roster-filters select{width:106px;min-height:42px;font-size:12px}.select-all{padding:10px 12px;font-size:12px}.select-all input,.student-row input{width:19px;height:19px}.class-workspace .student-list{height:380px;max-height:55dvh;min-height:140px}.student-row{padding:11px 10px;min-height:55px;gap:7px}.student-row strong{font-size:13px}.student-avatar{width:29px;height:29px;font-size:10px}.student-row .ability-badge{font-size:10px;min-width:0;padding:5px 6px;gap:5px}.student-row .more-menu{margin-left:0}.student-row .more-menu summary{padding:5px;min-width:28px;text-align:center}.roster-footer{min-height:60px;padding:9px 10px;gap:8px}.roster-footer .icon-button{width:42px;height:42px}.roster-footer select{width:110px;min-height:42px;font-size:12px}.generator-panel form{display:flex;flex-direction:column;padding:0 12px;gap:10px;align-items:stretch}.generator-controls{display:flex;flex-direction:column;gap:8px;margin:0}.generator-controls>label{flex:auto;min-width:0;min-height:44px;padding:7px 10px;font-size:13px}.generator-controls input[type=number]{width:72px;min-height:35px;font-size:14px}.generator-panel form>.snapshot-note{order:2;font-size:11px;margin:0;line-height:1.5}.generator-panel form>.button{order:3;min-height:46px;min-width:0;width:100%;font-size:14px}.class-workspace .generator-panel{padding-bottom:13px}.generation-column{gap:14px}.generated-panel>.screen-panel-heading{padding:13px 12px;flex-wrap:wrap}.generation-meta{display:flex;position:sticky;top:117px;z-index:4;background:var(--surface);border:1px solid var(--border);padding:9px;margin:0 8px 10px;gap:8px;border-radius:12px}.generation-meta>span:first-child{flex:1 1 100%;font-size:10px}.generation-meta .save-pill{min-height:44px;padding:8px 12px;font-size:13px;flex:1}.generation-meta>.button{min-height:40px;font-size:11px;white-space:normal}.generation-actions{width:100%;justify-content:flex-end;border-top:1px solid var(--border);padding-top:7px;margin:0;gap:8px}.generation-actions .icon-button{width:42px;height:42px}.status-pill{font-size:10px}.generated-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0 8px}.generated-card{padding:12px 9px}.generated-card h3{font-size:13px;margin-bottom:6px}.group-student-count{font-size:10px}.generated-card li{font-size:12px;line-height:1.4}.generated-card ul{gap:7px}.level-counts{gap:3px}.level-counts span{padding:3px 4px;font-size:10px}.history-panel #history-list{padding:10px}.history-record{flex-wrap:wrap;padding:12px;gap:9px}.history-description strong{font-size:12px}.history-description small{font-size:11px}.history-actions{width:100%;justify-content:flex-end;border-top:1px solid var(--border);padding-top:9px;gap:8px}.history-actions .icon-button{width:42px;height:42px}.history-actions .button{min-height:42px}.history-preview-notice{flex-direction:column;align-items:stretch;padding:13px;gap:10px}.history-preview-notice .button{min-height:44px}.settings-grid{grid-template-columns:1fr;gap:14px}.preference-card{padding:18px 16px}.preference-card>h2{font-size:19px}.preference-card>p{font-size:12px;line-height:1.6}.language-options .choice{min-height:76px;padding:12px;gap:8px;flex-direction:row}.flag{font-size:26px}.language-options strong{font-size:14px}.language-options .choice-check{width:17px;height:17px}.theme-preview{height:59px}.theme-choice{padding:6px 6px 12px}.theme-choice strong{font-size:12px}.accent-row{flex-direction:column;align-items:flex-start;gap:14px;margin-top:18px}.accent-options{gap:13px}.accent-options button{width:30px;height:30px}.preference-row{padding:16px 0;min-height:75px}.preference-row strong{font-size:14px}.preference-row small{font-size:12px}.switch{width:45px;height:27px}.switch:after{width:21px;height:21px}.switch:checked:after{transform:translateX(18px)}.data-actions{flex-direction:column;align-items:stretch}.data-actions .button,.preference-card>.button{min-height:46px;white-space:normal}.storage-alert{flex-direction:column;align-items:stretch;padding:12px;gap:10px}.storage-alert strong{font-size:13px}.storage-alert p{font-size:12px;line-height:1.5}.recovery-actions{justify-content:flex-end;flex-wrap:wrap}.recovery-actions .button{min-height:42px;white-space:normal}.app-footer{font-size:9px;padding:0 12px 15px;gap:10px}.modal{padding:19px;max-height:88dvh}.modal .button,.modal .icon-button{min-height:42px}.toast{bottom:12px;max-width:calc(100% - 24px);font-size:12px}.empty-state{padding:27px 14px}.empty-state .button{min-height:44px;white-space:normal}
}
@media(max-width:359px){.generated-grid{grid-template-columns:1fr}.generated-card{padding:14px}.generated-card h3{font-size:15px}.generated-card li{font-size:14px}.page-heading h1{font-size:20px}.language-switch button{padding:5px 6px;font-size:11px}.stat{padding:10px;gap:7px}.stat-icon{width:29px;height:29px}.stat-label{font-size:11px}.student-avatar{display:none}.distribution-content{gap:10px}.donut{width:120px}.generation-meta>.button{padding:6px}.detail-tabs button{gap:4px;font-size:11px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
/* Keep eight standard groups fully visible on a 1280×720 laptop. */
@media(min-width:1180px){
 .class-workspace[data-tab=groups] #generation-panel{display:grid;grid-template-columns:220px minmax(0,1fr);gap:12px;align-items:stretch}
 .generation-column>.generator-panel{min-width:0;height:fit-content}
 .generator-panel form{display:flex;flex-direction:column;align-items:stretch;padding:0 12px;gap:10px}
 .generator-controls{flex-direction:column;gap:9px}
 .generator-controls>label{min-height:38px;flex:auto;gap:7px}
 .generator-panel form>.button{order:3;min-width:0;width:100%;font-size:12px;white-space:normal;min-height:38px}
 .generator-panel form>.snapshot-note{order:2;margin:0;font-size:11px;line-height:1.5}
 .generation-column>.generated-panel{height:100%;min-width:0}
 .generated-card{padding:8px 9px}.generated-card h3{font-size:13px;line-height:1.3;margin-bottom:4px}.group-student-count{margin:0 0 5px;font-size:10px;line-height:1.2}.generated-card ul{gap:4px}.generated-card li{font-size:12px;line-height:1.25}.level-counts{margin-bottom:6px}
 .generation-meta{gap:6px}.generation-meta>[data-action="show-history"] .icon{display:none}.generation-meta>.status-pill{display:none}
}
@media(min-width:1600px){.class-workspace[data-tab=groups] #generation-panel{grid-template-columns:240px minmax(0,1fr)}.generated-card{padding:12px}.generated-card li{font-size:13px}}
@media(max-width:1179px){.student-row .more-menu summary{display:grid;place-items:center;min-width:36px;min-height:40px;padding:4px}.more-menu>div button{min-height:42px}}
.generation-actions>[data-action="export-names"]{min-height:30px;font-size:11px;padding:5px 9px}.history-actions{flex-wrap:wrap}@media(max-width:1179px){.generation-actions>[data-action="export-names"]{min-height:42px;font-size:12px}.history-actions>[data-action="export-history-names"]{min-height:42px}}@media(max-width:639px){.generation-actions>[data-action="export-names"]{margin-right:auto}.history-actions>[data-action="export-history-names"]{margin-right:auto}}
