/* Shared iOS grouped hierarchy across every route; no attendance logic changes. */
:root[data-theme="light"]{--bg:#f2f2f7;--surface:#fff;--card:#fff;--text:#1c1c1e;--sub:#6c6c70;--line:#dedee3;--blue:#007aff;--glass:#fff;--glass-line:transparent;--glass-shadow:none;--tint:#eaf3ff}
:root[data-theme="dark"]{--bg:#000;--surface:#1c1c1e;--card:#1c1c1e;--text:#f5f5f7;--sub:#98989f;--line:#38383a;--blue:#0a84ff;--glass:#1c1c1e;--glass-line:transparent;--glass-shadow:none;--tint:#162b44;--selected:#173557}
body{font-size:16px;line-height:1.5}main{padding-bottom:calc(110px + env(safe-area-inset-bottom))}h1,.home-title{font-size:34px!important;line-height:1.16;letter-spacing:-1px;font-weight:700}h2{font-weight:600}label{font-size:15px;color:var(--text)}.muted,.note,.field-help,.native-note{font-size:13px;color:var(--sub)}
.panel,.metric,.analysis-card,.today-course,.minimal-courses,.import-panel,.draft-course,.mode,.navigation-sheet{background:var(--surface)!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-radius:24px}.panelhead{padding:20px;border-color:var(--line)}.panelbody{padding:22px 20px}.panelbody>h2{font-size:20px;margin-bottom:20px}.heading{margin-bottom:24px}.sectionrow h2{font-size:20px}
input,select,textarea{min-height:46px;font-size:16px;border-radius:12px;background:var(--bg)!important;color:var(--text)!important;border:1px solid var(--line)!important;padding:11px 12px}input[type=checkbox]{min-height:22px;width:22px;height:22px;accent-color:var(--blue);flex-shrink:0}.check{min-height:48px;font-size:15px;gap:12px}.school-shortcut{background:var(--tint)!important;border:0!important;border-radius:16px;padding:13px!important}.conversion-row{padding:14px 0}.rule-extra summary,details>summary{min-height:44px;padding-top:10px;padding-bottom:10px}.formgrid{gap:4px 16px}
.button,.native-continue{min-height:48px;border-radius:999px!important;font-size:16px;font-weight:600;background:var(--blue);color:#fff!important;box-shadow:none!important;border:0}.button.secondary,.button.ghost{background:var(--tint)!important;color:var(--blue)!important}.button.small{min-height:40px;font-size:14px}.button.red{color:var(--red)!important;background:var(--surface)!important}.text-button,.linkbtn{min-height:44px;font-size:15px}.iconbtn{width:40px!important;height:40px!important;min-width:40px;background:var(--line)!important;color:var(--text)!important}.iconbtn svg{width:20px;height:20px}
dialog{background:var(--surface)!important;border-radius:30px;padding:24px;box-shadow:0 24px 100px #0005}.sheethead{position:sticky;top:-24px;z-index:2;background:var(--surface);padding:12px 0;margin-top:-12px}.sheethead h2{font-size:24px}.sheetfoot{position:sticky;bottom:-24px;background:var(--surface);padding:18px 0 8px;z-index:2}.sheetfoot .button{flex:1}.navigation-sheet nav a{color:var(--text)!important;font-size:17px!important;min-height:52px;border-radius:0!important;border-bottom:1px solid var(--line)!important}.navigation-sheet nav a:last-child{border:0!important}.navigation-sheet .menu-action{min-height:52px;font-size:17px!important}.navigation-sheet nav{gap:0!important}.tabbar{background:color-mix(in srgb,var(--surface) 85%,transparent)!important;border:1px solid var(--line)!important;box-shadow:0 6px 30px #0002!important}.tabbar a{min-height:52px;color:var(--sub)!important}.tabbar a.active{background:var(--bg)!important;color:var(--blue)!important;border-radius:999px!important}
.modegrid{gap:0;border-radius:22px;overflow:hidden;background:var(--surface)!important}.mode{border-radius:0!important;border-bottom:1px solid var(--line)!important;padding:18px!important}.mode.selected{background:var(--tint)!important;box-shadow:inset 3px 0 var(--blue)!important}.mode strong{font-size:16px}.mode small{font-size:13px}.dropzone{border:0!important;border-radius:22px;background:var(--surface)!important;padding:32px 20px}.draft{padding:18px 0}.draft small{font-size:12px}.draft-course summary{font-size:14px}.course h3,.minimal-course strong{font-size:17px}.course{padding:20px}.meta{font-size:13px}.today-courses.big .today-course{padding:22px}.quick-btn{min-height:44px;border-radius:999px!important}.week-picker button,.week-chip{min-height:44px}.back-link{color:var(--blue);min-height:44px;font-size:16px}
.native-welcome{width:100%;max-width:560px;min-height:calc(100dvh - 32px);margin:auto;padding:52px 28px 28px;border-radius:34px!important;background:var(--surface);display:flex;flex-direction:column}.native-welcome-title{text-align:left!important;padding:0!important}.native-welcome-title .welcome-logo{width:64px;height:64px;margin:0 0 24px;border-radius:16px}.native-welcome-title h1{font-size:32px!important;margin:0;letter-spacing:-.8px}.welcome-features{list-style:none;margin:38px 0 40px;padding:0;display:grid;gap:26px}.welcome-features li{display:flex;align-items:flex-start;gap:18px}.welcome-features svg{width:30px;height:34px;flex:none;fill:none;stroke:var(--blue);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;margin-top:4px}.welcome-features strong{font-size:18px;font-weight:600}.welcome-features p{font-size:15px;line-height:1.5;color:var(--sub);margin:3px 0 0}.native-welcome-bottom{margin-top:auto;padding:0!important}.native-continue{width:100%;height:50px}.welcome-login{display:block;text-align:center;padding:14px;font-size:14px;color:var(--blue)}.start-screen .app-header,.start-screen .tabbar{display:none!important}.start-screen main{padding:16px!important;margin:0!important;max-width:none!important}.start-screen{background:var(--bg)!important}
@media(max-width:600px){main{padding:24px 16px calc(110px + env(safe-area-inset-bottom))!important}.formgrid{grid-template-columns:1fr}.full{grid-column:auto}.modegrid{display:grid;grid-template-columns:1fr}.mode small{display:block}.mode .emoji{display:none}.analysis-grid{grid-template-columns:1fr}.native-welcome{padding:44px 24px 20px;min-height:calc(100dvh - 24px)}.start-screen main{padding:12px!important}.native-welcome-title h1{font-size:30px!important}dialog{width:calc(100% - 16px);max-height:92dvh;padding:22px 20px;border-radius:30px}.sheethead{top:-22px}.sheetfoot{bottom:-22px}.actions>.button[type=submit]{width:100%}.bell-row{grid-template-columns:50px minmax(0,1fr) minmax(0,1fr)}.bell-row input{font-size:15px;min-width:0}.navigation-sheet{padding:22px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
.native-welcome{background:var(--surface)!important}.native-welcome-title{margin:0!important}.native-welcome-title h1{color:var(--text)!important}.welcome-features{flex:none}.native-welcome-bottom{width:100%}.native-continue{background:var(--blue)!important}
