/* OMI Pro V9 Unified Student App Shell
   One visual shell: one header, one content scroller, one bottom navigation.
*/
:root{
  --omi-v9-header-h:64px;
  --omi-v9-nav-h:76px;
  --omi-v9-green:#086451;
  --omi-v9-line:#dbe5e1;
  --omi-v9-bg:#f4f7f6;
}
html{overflow-x:hidden;scroll-padding-top:calc(var(--omi-v9-header-h) + env(safe-area-inset-top));}
body{overflow-x:hidden;min-height:100dvh;}
/* The generated app shell is the only non-exam student header. */
body.omi-has-app-bar > header.omi-topbar,
body.omi-has-app-bar > header.app-header,
body.omi-has-app-bar > header.topbar,
body.omi-has-app-bar > main > header.top,
body.omi-has-app-bar > header.top{display:none!important}
body.omi-has-app-bar > .omi-app-bar{
  position:sticky!important;
  top:0!important;
  z-index:125!important;
  display:flex!important;
  flex:0 0 auto;
  align-items:center;
  gap:10px;
  width:100%;
  min-height:calc(var(--omi-v9-header-h) + env(safe-area-inset-top));
  padding:calc(8px + env(safe-area-inset-top)) 14px 8px;
  background:rgba(255,255,255,.97);
  border-bottom:1px solid var(--omi-v9-line);
  box-shadow:0 3px 18px rgba(18,62,52,.055);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.omi-v9-brandmark{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,#086451,#075042);color:#fff;font-weight:900;font-size:15px;flex:none}
.omi-bar-home{width:40px;height:40px;flex:0 0 40px;display:grid!important;place-items:center;text-decoration:none;border-radius:12px;background:#eef6f3;border:1px solid #dce9e4;overflow:hidden}
.omi-bar-home img{width:34px;height:34px;border-radius:10px;display:block}
.omi-bar-title{min-width:0;flex:1;line-height:1.15}
.omi-bar-title strong{display:block;font-size:17px;font-weight:900;color:#15251f;letter-spacing:-.02em}
.omi-bar-title span{display:block;margin-top:2px;font-size:12px;color:#66766f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.omi-bar-menu{width:44px!important;height:44px!important;min-height:44px!important;flex:none;border:1px solid #dbe5e1!important;background:#eef6f3!important;border-radius:13px!important;color:#075f4d!important;font-size:23px!important;line-height:1!important;display:grid;place-items:center;cursor:pointer}
/* Do not let old local app headers reappear through inline styles. */
body.omi-has-app-bar .legacy-app > .app-header,
body.omi-has-app-bar.legacy-app > .app-header{display:none!important}
/* Single vertical scrolling surface on normal student pages. */
body.omi-has-app-bar:not(.omi-exam-active):not(.omi-secure-exam){
  padding-top:0!important;
  padding-bottom:calc(var(--omi-v9-nav-h) + 24px + env(safe-area-inset-bottom))!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
body.omi-has-app-bar:not(.omi-exam-active):not(.omi-secure-exam) > main,
body.omi-has-app-bar:not(.omi-exam-active):not(.omi-secure-exam) > .archive-main,
body.omi-has-app-bar:not(.omi-exam-active):not(.omi-secure-exam) > .guidance-main{
  min-height:0;
}
/* Student navigation: exactly four primary destinations. */
body.omi-has-app-bar > .omi-bottom-nav{
  position:fixed!important;
  z-index:130!important;
  left:50%!important;
  right:auto!important;
  bottom:max(10px,env(safe-area-inset-bottom))!important;
  transform:translateX(-50%)!important;
  width:min(560px,calc(100vw - 20px))!important;
  height:72px!important;
  padding:7px 8px!important;
  border:1px solid rgba(213,226,220,.96)!important;
  border-radius:24px!important;
  background:rgba(255,255,255,.97)!important;
  box-shadow:0 12px 34px rgba(16,52,42,.18),inset 0 1px 0 #fff!important;
  backdrop-filter:blur(14px)!important;
  -webkit-backdrop-filter:blur(14px)!important;
  display:grid!important;
  grid-template-columns:repeat(4,1fr)!important;
  gap:4px!important;
}
body.omi-has-app-bar > .omi-bottom-nav a,
body.omi-has-app-bar > .omi-bottom-nav .omi-nav-item{
  min-height:56px!important;height:56px!important;border-radius:17px!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
  gap:3px!important;padding:4px!important;text-decoration:none!important;color:#60716a!important;
  font-size:12px!important;font-weight:700!important;line-height:1.05!important;
}
body.omi-has-app-bar > .omi-bottom-nav a svg{width:21px;height:21px;stroke:currentColor;stroke-width:2;fill:none}
body.omi-has-app-bar > .omi-bottom-nav a.active{color:#075f4d!important;background:#edf7f3!important;font-weight:850!important}
body.omi-has-app-bar.omi-exam-active > .omi-bottom-nav,
body.omi-has-app-bar.omi-secure-exam > .omi-bottom-nav{display:none!important}
/* Global app shell menu stays inside the shell; it must not create a second page header. */
.omi-menu-dialog{z-index:1000!important}
.omi-menu-heading{padding-top:max(14px,env(safe-area-inset-top))!important}
/* Avoid nested scroll containers on the legacy subject apps. */
body.legacy-app:not(.omi-exam-active) .screen.active{overflow:visible!important}
body.legacy-app:not(.omi-exam-active) main{overflow:visible!important}
@media(max-width:760px){
  .omi-bar-title strong{font-size:16px}
  body.omi-has-app-bar > .omi-bottom-nav{width:calc(100vw - 20px)}
}
@media(min-width:761px){
  body.omi-has-app-bar > .omi-app-bar{padding-left:max(18px,calc((100vw - 1120px)/2));padding-right:max(18px,calc((100vw - 1120px)/2));}
  body.omi-has-app-bar > .omi-bottom-nav{display:none!important}
}
@media(prefers-reduced-motion:reduce){body.omi-has-app-bar > .omi-bottom-nav a{transition:none!important}}
