/* Direct measurements: MainShellView.swift, StudentTabBar.swift,
   MaterialsHomeView.swift. CSS pixels correspond to native layout points. */
.native-shell{max-width:none;background:#f8fafc;position:relative;grid-template-columns:minmax(0,1fr);min-width:0}
.native-shell .shell-header{height:52px;padding:0 20px;gap:8px;border-bottom:0;color:#1f2937}
.native-shell .shell-header h1{font-size:22px;font-weight:700;line-height:1.2;text-align:center;flex:1}
.native-shell .icon-button{display:flex;align-items:center;justify-content:center;padding:0;min-width:44px;width:44px;height:44px;flex:0 0 44px}
.native-shell .top-navigation-icon{background:#f1f5f9;border:.7px solid #e2e8f0;color:#334155;border-radius:22px}
.native-shell .quit-icon{background:#f1f5f9;border:1px solid #cbd5e1;color:#64748b;border-radius:50%;width:40px;height:40px;min-width:40px;flex-basis:40px;margin:2px}
.native-shell .quit-icon .native-icon{width:20px!important;height:20px!important}
.native-shell .screen-content{background:#f8fafc;min-width:0}
.native-shell .bottom-tabs{min-height:74px;padding:0 0 env(safe-area-inset-bottom);border-top:1px solid #00000017}
.native-shell .bottom-tabs button{gap:5px;padding:10px 0;font-size:11px;font-weight:400;color:#64748b;line-height:13px;min-width:0}
.native-shell .bottom-tabs button>span:last-child{white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:clip}
.native-shell .bottom-tabs button[aria-current=page]{color:#4f46e5}
.tab-icon{width:36px;height:36px;display:flex;align-items:center;justify-content:center}
.training-tab-icon{background:#4f46e5;color:white;border-radius:50%}
.native-shell.player-active{grid-template-rows:auto minmax(0,1fr)}
.native-shell.player-active>.bottom-tabs{display:none}
.native-shell.materials-home>.screen-content{padding:8px 16px;gap:12px;position:relative;justify-content:safe center}
.native-shell.materials-home .levels{display:flex;flex-wrap:nowrap;gap:5px;padding-top:8px;margin:0 0 4px;flex-shrink:0}
.native-shell.materials-home .levels button{flex:1 1 0;min-width:0;min-height:34px;padding:0 3px;border-radius:8px;background:white;border:1px solid #8080804d;color:#000;font-size:12px;font-weight:400;line-height:14px}
.native-shell.materials-home .levels button[aria-pressed=true]{background:#d7faf0;border-color:transparent;color:#000}
.native-shell.materials-home .folder-grid{gap:8px 12px;grid-template-columns:repeat(2,minmax(0,1fr));flex-shrink:0}
.native-shell.materials-home .folder{min-height:110px;padding:8px 10px;gap:6px;border-radius:18px;border:1px solid #8080801a;background:#fff;box-shadow:0 2px 4px #0000001a;color:#1f2937;font-size:16px;font-weight:600;line-height:19px;position:relative}
.native-folder-icon{width:44px;height:44px;display:flex;align-items:center;justify-content:center;background:#f1f5f9;border-radius:13px;flex-shrink:0}
.native-shell.materials-home .folder>span:last-child{white-space:pre-line}
.native-new-lessons{position:absolute;right:8px;top:8px;white-space:pre-line;text-align:center;font-size:9px;font-weight:600;line-height:11px;color:#dc2626}
.materials-more{position:absolute;z-index:2;bottom:calc(82px + env(safe-area-inset-bottom));left:calc(50% - 20px);width:40px;height:40px;min-height:40px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:50%;background:white;color:#64748b;box-shadow:0 2px 6px #0000001f}
@media(min-width:600px) and (min-height:450px){.native-shell.materials-home>.screen-content{gap:20px}.native-shell.materials-home .levels{padding-top:12px;margin-bottom:0}.native-shell.materials-home .folder-grid{margin-top:0}}
@media(max-height:449px){.native-shell .shell-header{height:44px;padding:0 12px;gap:4px}.native-shell .shell-header h1{font-size:16px}.native-shell .bottom-tabs{min-height:44px}.native-shell .bottom-tabs button{flex-direction:row;font-size:11px;padding:0 2px;gap:4px}.native-shell .tab-icon{width:24px;height:24px}.native-shell .tab-icon .native-icon{width:18px!important;height:18px!important}}

.native-shell.lesson-player>.shell-header,.native-shell.assessment-player>.shell-header{display:flex}
.native-shell.lesson-player>.shell-header{height:auto;min-height:76px;padding:4px 12px}
.native-shell.lesson-player>.shell-header h1{font-size:17px;white-space:normal;font-weight:600;display:flex;flex-direction:column;gap:3px;line-height:1.2}
.native-shell.lesson-player>.shell-header h1 small{font-size:16px;font-weight:600}
.native-shell.assessment-player>.shell-header h1{font-size:17px;white-space:normal}
.native-shell.assessment-player>.shell-header{display:none}
.native-shell.assessment-player{grid-template-rows:minmax(0,1fr)}
.native-browse-back-row{grid-column:1/-1;display:flex;justify-content:center;align-items:center;padding:10px 0;background:white}
.native-shell .bottom-tabs .native-browse-back{width:48px;height:48px;min-height:48px;padding:0;display:flex;align-items:center;justify-content:center;background:#333;color:white;border-radius:50%;box-shadow:0 3px 6px #0003}
.native-shell:has([data-native-account=settings])>.bottom-tabs{display:none}
.native-shell:has([data-native-account=settings]){grid-template-rows:auto minmax(0,1fr)}
.native-shell:has([data-native-account=settings])>.shell-header,.packages-overlay:has([data-native-account=settings])>.shell-header{height:44px;min-height:44px;padding:0 16px}
.native-shell:has([data-native-account=settings])>.shell-header h1,.packages-overlay:has([data-native-account=settings])>.shell-header h1{font-size:17px;font-weight:600;line-height:1.2}
.native-shell:has([data-native-account=settings])>.shell-header>button:first-child{visibility:hidden}
.native-shell:has([data-native-account=settings][data-settings-page=faq])>.shell-header>button:first-child{visibility:visible}
.packages-overlay:has([data-native-account=settings])>.shell-header>.settings-navigation-back{visibility:hidden}
.packages-overlay:has([data-native-account=settings][data-settings-page=faq])>.shell-header>.settings-navigation-back{visibility:visible}
.native-shell:has([data-native-account=settings])>.shell-header>.top-navigation-icon,
.packages-overlay:has([data-native-account=settings])>.shell-header>.top-navigation-icon{background:transparent;border:0;border-radius:0;color:#523de0}
.native-shell:has([data-native-account=settings])>.shell-header>.top-navigation-icon>.native-icon,
.packages-overlay:has([data-native-account=settings])>.shell-header>.top-navigation-icon>.native-icon{width:24px!important;height:24px!important}
.native-shell:has([data-native-account=settings][data-settings-page=faq])>.shell-header>button:first-child>.native-icon,
.packages-overlay:has([data-native-account=settings][data-settings-page=faq])>.shell-header>.settings-navigation-back>.native-icon{-webkit-mask-image:url('../public/assets/native-icons/chevron_right.svg')!important;mask-image:url('../public/assets/native-icons/chevron_right.svg')!important;transform:rotate(180deg)}
.native-shell.lesson-player>.screen-content,.native-shell.assessment-player>.screen-content{padding:0}
@media(max-height:449px){.native-shell .materials-more{bottom:52px}}

.native-shell.training-header-hidden>.shell-header{display:none}
.native-shell.training-tabs-hidden>.bottom-tabs{display:none}
.native-shell.training-header-hidden{grid-template-rows:minmax(0,1fr) auto}
.native-shell.training-header-hidden.training-tabs-hidden{grid-template-rows:minmax(0,1fr)}

.native-shell.lesson-player>.shell-header .native-lesson-counter{height:22px;font-size:14px;font-weight:400;margin-top:2px}
.native-quit-dialog{padding:24px;border:0;border-radius:16px;background:white;color:#0f172a;width:min(560px,calc(100% - 48px));max-height:calc(100dvh - 48px);box-shadow:0 3px 12px #0000002e}
.native-quit-dialog::backdrop{background:#00000052}
.native-quit-dialog h2{font-size:24px;font-weight:700;line-height:1.2;margin:0 0 16px}
.native-quit-dialog .modal-content{padding:0;margin:0 0 24px;overflow:auto}
.native-quit-dialog p{font-size:14px;font-weight:400;line-height:1.4;margin:0}
.native-quit-dialog .modal-actions{display:flex;flex-direction:row;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:0}
.native-quit-dialog .modal-actions>button{min-height:44px;font-size:14px;font-weight:500;padding:0 12px;background:none;color:#2563eb;border:0;border-radius:0}
.native-quit-dialog .modal-actions>.danger{padding:0 24px;background:#ef4444;color:white;border-radius:999px}

/* ContentReportView owns its navigation stack and its Close/Send dock. */
.native-shell .shell-header.native-standalone-header{height:44px;min-height:44px;justify-content:center}.native-shell .native-standalone-header h1{font-size:17px;font-weight:600;text-transform:none}
/* Owner-approved desktop framing. Touch phones/tablets retain their full layout. */
@media (min-width:1100px) and (hover:hover) and (pointer:fine){
 #app{width:100%;max-width:480px;margin-inline:auto}
 .folder-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 dialog{max-width:448px!important}
 dialog:is(.native-settings-sheet,.native-pq-consent-sheet,.native-pq-review-screen,.native-content-requests,.training-history-dialog){max-width:480px!important}
}

/* Materials: all three curriculum choices remain visible in one green row. */
.native-shell.materials-home>.screen-content{justify-content:flex-start}
.native-shell.materials-home .materials-level-selector{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;background:#d7faf0;border-radius:10px;padding:4px;margin:0;flex-shrink:0}
.native-shell.materials-home .materials-level-selector button{min-height:40px;padding:4px 2px;border:0;border-radius:7px;background:transparent;font-size:12px;font-weight:500;line-height:16px;white-space:nowrap}
.native-shell.materials-home .materials-level-selector button[aria-pressed=true]{background:#a5ecd4;color:#111827;font-weight:700}
.native-shell.materials-home>.screen-content>.folder-grid{margin-block:auto}
