/* Mobile platform5.5. Desktop styles and data models remain with their existing components. */
@media(max-width:700px), (max-width:1000px) and (max-height:600px){
 html[data-density]{scrollbar-gutter:auto;--layout-sticky:calc(var(--mobile-header-height,56px) + 10px)}
 html[data-density]:has(body.mobile-shell:not(.question-workspace):not(.theory-reader)){scroll-padding-top:calc(var(--mobile-header-height,56px) + var(--mobile-tech-height,0px) + 14px);scroll-padding-bottom:calc(var(--mobile-nav-height,70px) + 20px)}
 body.mobile-shell{font-size:16px;line-height:1.6}body.mobile-menu-open{overflow:hidden}
 body.mobile-shell #drones-account-bar{position:absolute}body.mobile-shell #drones-account-bar .drones-account-status{font-size:13px;line-height:1.5}
 body.mobile-shell:not(.question-workspace):not(.theory-reader) .topbar{position:sticky;top:0;z-index:45}
 body.mobile-shell .topbar{min-height:54px;height:auto;padding:5px 12px;gap:8px;background:var(--canvas);border-bottom:1px solid var(--line);flex-wrap:nowrap}
 body.mobile-shell .mobile-brand{font-size:18px;white-space:nowrap;flex-shrink:0}body.mobile-shell .top-actions{gap:6px;margin-left:auto}
 body.mobile-shell #layout-density,body.mobile-shell .topbar .un-app-navigation{display:none}
 body.mobile-shell .language-switch button{min-width:40px;min-height:44px;padding:6px;font-size:13px}body.mobile-shell .profile-button{min-height:44px;min-width:40px;padding:4px}
 body.mobile-shell .shell{padding-bottom:calc(78px + env(safe-area-inset-bottom,0px))}
 body.mobile-shell #main{padding-inline:12px;padding-top:16px;min-width:0}body.mobile-shell:not(.has-question-dock) #main{padding-bottom:24px}
 body.mobile-shell .panel{min-width:0}body.mobile-shell .page-heading{gap:12px;margin-bottom:16px;flex-wrap:wrap}body.mobile-shell .page-heading h1{font-size:25px;line-height:1.3;overflow-wrap:break-word;hyphens:auto}
 body.mobile-shell .page-heading .lead,body.mobile-shell .lead{font-size:16px;line-height:1.65}body.mobile-shell .eyebrow{font-size:11px;line-height:1.5;letter-spacing:.08em}
 body.mobile-shell .button,body.mobile-shell .button.small,body.mobile-shell .text-link,body.mobile-shell .icon-button,body.mobile-shell summary{min-height:44px}
 body.mobile-shell .button{font-size:14px;line-height:1.4;white-space:normal;text-align:center;padding:10px 12px;max-width:100%;overflow-wrap:break-word}
 body.mobile-shell .text-link{display:inline-flex;align-items:center;font-size:14px;line-height:1.5;max-width:100%;overflow-wrap:break-word}
 body.mobile-shell label,body.mobile-shell .field-grid label,body.mobile-shell .author-filter label{font-size:14px;line-height:1.5}
 body.mobile-shell input:not([type=checkbox]):not([type=radio]),body.mobile-shell select,body.mobile-shell textarea{font-size:16px;line-height:1.5;min-height:46px;max-width:100%}
 body.mobile-shell textarea{min-height:130px;resize:vertical}body.mobile-shell input[type=checkbox],body.mobile-shell input[type=radio]{width:20px;height:20px;min-height:20px}
 body.mobile-shell .inline-check{min-height:44px;font-size:14px;gap:8px;align-items:center}
 body.mobile-shell .field-grid,body.mobile-shell .author-filter,body.mobile-shell .series-form,body.mobile-shell .revision-form,body.mobile-shell .exercise-search,body.mobile-shell .stats-filters{grid-template-columns:minmax(0,1fr);gap:12px}
 body.mobile-shell .field-grid>*,body.mobile-shell form>label{min-width:0}body.mobile-shell .field-grid input:not([type=checkbox]):not([type=radio]),body.mobile-shell .field-grid select,body.mobile-shell .field-grid textarea{width:100%}
 body.mobile-shell .small,body.mobile-shell .panel>p.small,body.mobile-shell .quiet-note,body.mobile-shell .notice p{font-size:13px;line-height:1.65}
 body.mobile-shell .notice{padding:14px;overflow-wrap:break-word}body.mobile-shell .sources>summary{font-size:14px;line-height:1.5;align-content:center}body.mobile-shell .sources a{font-size:14px;line-height:1.6;padding-block:10px;overflow-wrap:anywhere}
 /* Four stable tabs; all other destinations are available from the native menu sheet. */
 body.mobile-shell .mobile-tabbar{position:fixed;inset:auto 0 0;z-index:70;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;overflow:visible;padding:5px 6px max(5px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line)}
 body.mobile-shell .mobile-tabbar>a,body.mobile-shell .mobile-tabbar>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:56px;padding:5px 2px;margin:0;border:0;border-radius:6px;font:inherit;font-size:11px;font-weight:550;line-height:1.3;background:transparent;color:var(--muted);text-align:center}
 body.mobile-shell .mobile-tabbar .icon{width:22px;height:22px}body.mobile-shell .mobile-tabbar .active{background:var(--uui-soft);color:var(--green);font-weight:650}
 /* Collapse long filters, without replacing their controls or values. */
 .mobile-filter-fold{border:1px solid var(--line);border-radius:7px;background:#fff;margin:12px 0 16px;min-width:0}
 .mobile-filter-fold>summary{padding:12px 14px;font-size:15px;font-weight:650;line-height:1.5;color:var(--green);cursor:pointer}
 body.mobile-shell .mobile-filter-fold>form{border:0;box-shadow:none;margin:0!important;padding:4px 14px 16px!important}
 body.mobile-shell .author-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;overflow:visible;margin-top:0}
 body.mobile-shell .author-tabs a{min-height:48px;font-size:13px;line-height:1.4;padding:10px 4px;white-space:normal;text-align:center;align-content:center;overflow-wrap:break-word}
 body.mobile-shell .author-actions,body.mobile-shell .question-row-actions,body.mobile-shell .saved-plan-row>div:last-child{gap:8px;align-items:stretch}
 body.mobile-shell .author-actions>.button,body.mobile-shell .question-row-actions>.button{flex:1 1 100%;width:100%}
 body.mobile-shell .author-actions>.text-link,body.mobile-shell .question-row-actions>.text-link{flex:1 1 44%;justify-content:center;padding:8px}
 body.mobile-shell .library-card{padding:14px}body.mobile-shell .library-card summary{gap:8px;min-width:0}body.mobile-shell .library-card summary>strong{font-size:16px;line-height:1.6;overflow-wrap:break-word}
 body.mobile-shell .library-card .question-category{font-size:12px;line-height:1.5}body.mobile-shell .library-body{padding:12px 0 0}
 body.mobile-shell .review-answer,body.mobile-shell .review-explanation,body.mobile-shell .review-explanation p{font-size:16px;line-height:1.65}
 body.mobile-shell .question-editor .choice-edit-row{grid-template-columns:24px minmax(0,1fr) 44px;gap:8px}body.mobile-shell .question-editor .choice-edit-row textarea{min-height:90px}
 body.mobile-shell .editor-actions{display:flex;flex-wrap:wrap;gap:8px}body.mobile-shell .editor-actions>.button{flex:1 1 100%}
 body.mobile-shell .bank-grid,body.mobile-shell .resource-grid,body.mobile-shell .exercise-grid,body.mobile-shell .technical-module-grid,body.mobile-shell .theory-chapters{grid-template-columns:minmax(0,1fr);gap:12px}
 body.mobile-shell .bank-card h2,body.mobile-shell .resource-card h2,body.mobile-shell .exercise-card h2,body.mobile-shell .technical-module h2,body.mobile-shell .theory-chapter h2{font-size:20px;line-height:1.4;overflow-wrap:break-word;hyphens:auto}
 body.mobile-shell .bank-card p,body.mobile-shell .resource-card p,body.mobile-shell .exercise-card p{font-size:15px;line-height:1.65}
 body.mobile-shell .source-edit-row{gap:12px}body.mobile-shell .source-edit-row input{width:100%}
 /* Setup, exams and progress: readable labels; horizontal scroll stays inside real tables. */
 body.mobile-shell .subject-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body.mobile-shell .option-card>span{min-height:100px;padding:12px 10px}body.mobile-shell .option-card b{font-size:14px;line-height:1.4}body.mobile-shell .option-card small{font-size:12px;line-height:1.5}
 body.mobile-shell .plan-row{grid-template-columns:minmax(0,1fr) 40px 76px;font-size:14px;line-height:1.5;padding:10px 8px;gap:6px}body.mobile-shell .plan-row input{min-height:46px;padding:6px;font-size:16px}
 body.mobile-shell .setup-form .submit-row{display:flex;flex-wrap:wrap;gap:8px}body.mobile-shell .setup-form .submit-row .button{width:100%}
 body.mobile-shell .exam-option h2{font-size:22px;line-height:1.4}body.mobile-shell .exam-option p{font-size:15px;line-height:1.6}
 body.mobile-shell .stats-grid,body.mobile-shell .stats-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body.mobile-shell .stat-card,body.mobile-shell .stats-kpi{padding:13px}
 body.mobile-shell .stat-card>strong,body.mobile-shell .stats-kpi strong{font-size:25px}body.mobile-shell .stat-card>span,body.mobile-shell .stats-kpi span{font-size:13px;line-height:1.5}
 body.mobile-shell .stats-current{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}body.mobile-shell .stats-format{gap:12px;flex-wrap:wrap}
 body.mobile-shell .history-row{gap:10px;flex-wrap:wrap;padding:15px 0}body.mobile-shell .history-row strong{font-size:15px;line-height:1.5}body.mobile-shell .history-row small{font-size:13px;line-height:1.5}
 body.mobile-shell .history-score{font-size:20px;flex-shrink:0}body.mobile-shell .result-meta{flex-wrap:wrap;gap:10px}
 body.mobile-shell .chart{overflow-x:auto;justify-content:flex-start;gap:10px;padding-bottom:8px}body.mobile-shell .chart-column{flex:0 0 44px;min-width:44px}
 .mobile-table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}.mobile-table-note{font-size:12px;line-height:1.5;color:var(--muted);margin:8px 0}.mobile-table-note[hidden]{display:none}
 body.mobile-shell .stats-table-wrap{overflow-x:auto;max-width:100%;overscroll-behavior-x:contain}body.mobile-shell table{font-size:13px;line-height:1.5}body.mobile-shell th,body.mobile-shell td{padding:10px 8px}
 body.mobile-shell .profile-choice{min-height:56px;font-size:15px}body.mobile-shell #rename-form input,body.mobile-shell #new-profile-form input{width:100%}
 body.mobile-shell .inline-form{flex-wrap:wrap;gap:10px}body.mobile-shell .inline-form>label{flex:1 1 100%}body.mobile-shell .inline-form>.button{flex:1 1 100%}
 /* Technical course navigation remains reachable after leaving the module heading. */
 body.mobile-shell .technical-toc{display:none}.mobile-tech-bar{position:sticky;top:var(--mobile-header-height,56px);z-index:32;background:var(--canvas);padding:6px 0;margin:0 0 12px;border-bottom:1px solid var(--line)}.mobile-tech-bar .button{width:100%;min-height:44px}
 body.mobile-shell .technical-reading{grid-template-columns:minmax(0,1fr)}body.mobile-shell .technical-lesson{padding:16px}body.mobile-shell .technical-lesson p,body.mobile-shell .technical-linked p{font-size:16px;line-height:1.75}
 body.mobile-shell .technical-lesson h2{font-size:22px;line-height:1.4;hyphens:auto}body.mobile-shell .technical-lesson-actions .button{justify-self:stretch;width:100%}
 body.mobile-shell .question-panel h2{font-size:20px;line-height:1.5}body.mobile-shell .answer,body.mobile-shell .exercise-answer{font-size:16px;line-height:1.6}
 body.mobile-shell .question-dock>.button{min-height:44px}body.mobile-shell .question-dock-tools>.button{font-size:12px;min-height:44px}
 body.mobile-shell .dialog-actions{display:flex;flex-wrap:wrap;gap:8px}body.mobile-shell .dialog-actions>.button{flex:1 1 100%}
 body.mobile-shell footer{gap:10px;padding:18px 12px;font-size:12px;line-height:1.6;flex-wrap:wrap}body.mobile-shell .toast{bottom:calc(var(--mobile-nav-height,70px) + 12px);left:12px;right:12px;width:auto;max-width:none;font-size:14px}
}
.mobile-sheet{position:fixed;inset:auto 0 0;margin:0 auto;width:min(700px,100vw);max-width:100vw;max-height:90dvh;border:1px solid var(--line);border-bottom:0;border-radius:14px 14px 0 0;padding:0;background:var(--white);color:var(--ink);overscroll-behavior:contain}
.mobile-sheet[open]{display:flex;flex-direction:column;overflow:hidden}.mobile-sheet::backdrop{background:#122b2677}
.mobile-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);flex-shrink:0;background:var(--white)}.mobile-sheet-head h2{font-size:22px;line-height:1.3;margin:0}.mobile-sheet-head .button{font-size:14px;min-height:44px;margin:0}
.mobile-sheet-body{padding:0 16px max(18px,env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;min-height:0}.mobile-sheet-body section{padding:16px 0 0}.mobile-sheet-body h3{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:0 0 8px}.mobile-sheet-body section nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.mobile-sheet-body nav a{display:flex;align-items:center;gap:9px;min-width:0;min-height:58px;padding:11px 10px;font-size:14px;line-height:1.5;border:1px solid var(--line);border-radius:7px;overflow-wrap:break-word;background:#fff}.mobile-sheet-body nav a.active{background:var(--uui-soft);border-color:var(--green);color:var(--green);font-weight:650}.mobile-sheet-body nav .icon{width:20px;height:20px;flex-shrink:0}.mobile-density{width:100%;margin-top:16px;font-size:14px;min-height:44px}.mobile-urban-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.mobile-sheet-body .mobile-urban-links a{flex:1;font-size:13px;min-height:44px;justify-content:center}
.mobile-tech-links{padding:4px 16px max(18px,env(safe-area-inset-bottom));overflow-y:auto;min-height:0;overscroll-behavior:contain;display:grid}.mobile-tech-links a{display:flex;gap:10px;padding:12px 0;min-height:48px;border-bottom:1px solid var(--line);font-size:15px;line-height:1.6}.mobile-tech-links [aria-current]{color:var(--green);font-weight:650}
@media print{.mobile-sheet,.mobile-tech-bar{display:none!important}.mobile-filter-fold>form{display:grid!important}.mobile-filter-fold>summary,.mobile-table-note{display:none}}
