/* OMI Pro V26 — UI Precision, compact question controls, stable header */
:root{
  --v26-green:#08745c;--v26-green-dark:#055746;--v26-blue:#188bc3;--v26-gold:#c98912;
  --v26-purple:#6c55c6;--v26-red:#b44755;--v26-ink:#172a23;--v26-muted:#687970;
  --v26-line:#d9e6e1;--v26-surface:#fff;--v26-soft:#f2f8f5;
  --v26-shadow:0 10px 26px rgba(27,62,51,.09);
}

/* === ONE TRUE APP HEADER ================================================== */
#omi-fixed-header{
  display:flex!important;grid-template-columns:none!important;flex-wrap:nowrap!important;align-items:center!important;
  gap:7px!important;height:calc(64px + var(--omi-safe-top,0px))!important;min-height:64px!important;
  padding:var(--omi-safe-top,0px) max(10px,env(safe-area-inset-right)) 0 max(10px,env(safe-area-inset-left))!important;
  background:rgba(255,255,255,.985)!important;border-bottom:1px solid #dfe9e5!important;
  box-shadow:0 5px 18px rgba(24,60,49,.065)!important;backdrop-filter:saturate(120%) blur(12px)!important;
  -webkit-backdrop-filter:saturate(120%) blur(12px)!important;overflow:hidden!important;
}
#omi-fixed-header .omi-back{order:1!important;flex:0 0 44px!important}
#omi-fixed-header .omi-brand-link{order:2!important;flex:0 0 44px!important;width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;padding:3px!important;justify-content:center!important}
#omi-fixed-header .omi-brand-link img{width:36px!important;height:36px!important;border-radius:11px!important}
#omi-fixed-header .omi-brand-link span{display:none!important}
#omi-fixed-header .omi-page-name{order:3!important;flex:1 1 auto!important;min-width:0!important;max-width:none!important;text-align:left!important;font-size:14px!important;font-weight:900!important;color:#415a50!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
#omi-fixed-header .omi-sound-toggle{order:4!important;display:flex!important;flex:0 0 44px!important;width:44px!important;min-width:44px!important;height:44px!important}
#omi-fixed-header .omi-menu-toggle{order:5!important;display:flex!important;flex:0 0 44px!important;width:44px!important;min-width:44px!important;height:44px!important}
#omi-fixed-header .omi-back,#omi-fixed-header .omi-sound-toggle,#omi-fixed-header .omi-menu-toggle{
  border-radius:14px!important;background:linear-gradient(145deg,#fbfefd,#eaf4f0)!important;border:1px solid #dbe8e3!important;
  color:var(--v26-green)!important;box-shadow:0 4px 10px rgba(21,63,51,.07),inset 0 1px 0 #fff!important;
}
#omi-fixed-header .omi-menu-toggle{background:linear-gradient(145deg,#e8f6f1,#d9ede6)!important}
#omi-fixed-header svg{width:23px!important;height:23px!important}
body.omi-native-android #omi-fixed-header{display:none!important}
@media(max-width:360px){
  #omi-fixed-header{gap:4px!important;padding-inline:6px!important}
  #omi-fixed-header .omi-back,#omi-fixed-header .omi-sound-toggle,#omi-fixed-header .omi-menu-toggle,#omi-fixed-header .omi-brand-link{flex-basis:40px!important;width:40px!important;min-width:40px!important;height:40px!important}
  #omi-fixed-header .omi-brand-link img{width:34px!important;height:34px!important}
  #omi-fixed-header .omi-page-name{font-size:12.5px!important}
}

/* Keep contextual actions below the app bar; never overlap it. */
.omi-context-actions{position:relative!important;top:auto!important;z-index:20!important;margin:8px auto!important;max-width:min(1180px,calc(100% - 24px))!important}

/* === LEARNING HUB / 6 STEPS ============================================ */
.guidance-main{gap:14px!important;padding-bottom:calc(94px + env(safe-area-inset-bottom))!important}
.guidance-hero{margin:0!important;padding:0!important}
.guidance-method{margin:0!important;padding:15px!important;border-radius:20px!important;background:#fff!important;border:1px solid var(--v26-line)!important;box-shadow:var(--v26-shadow)!important}
.guidance-method .section-heading{margin:0 0 10px!important}
.guidance-method .section-heading h2{margin:0!important;font-size:clamp(21px,4vw,28px)!important}
.step-list{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important;margin:0!important;padding:0!important;list-style:none!important;counter-reset:v26step!important}
.step-list li{counter-increment:v26step!important;display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;align-items:center!important;gap:10px!important;min-width:0!important;min-height:80px!important;padding:11px!important;border:1px solid #dce7e3!important;border-radius:16px!important;background:linear-gradient(180deg,#fff,#f8fbfa)!important;box-shadow:0 3px 9px rgba(25,61,50,.04)!important;position:relative!important}
.step-list li::before{content:counter(v26step)!important;position:static!important;grid-column:1!important;grid-row:1!important;width:40px!important;height:40px!important;border-radius:13px!important;display:grid!important;place-items:center!important;background:linear-gradient(145deg,#dff4eb,#c9e9dd)!important;color:var(--v26-green)!important;font-size:14px!important;font-weight:950!important;box-shadow:0 5px 10px rgba(9,113,88,.10),inset 0 1px 0 #fff!important}
.step-list .step-copy{grid-column:2!important;min-width:0!important;display:block!important}
.step-list .step-copy b{display:block!important;margin:0!important;font-size:13.5px!important;line-height:1.25!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;hyphens:none!important;color:#173028!important}
.step-list .step-copy span{display:block!important;margin-top:3px!important;font-size:11.5px!important;line-height:1.4!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;color:var(--v26-muted)!important}
@media(max-width:860px){.step-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){
 .guidance-method{padding:12px!important}.step-list{grid-template-columns:1fr!important;gap:7px!important}
 .step-list li{min-height:66px!important;padding:9px 10px!important;grid-template-columns:38px minmax(0,1fr)!important}
 .step-list li::before{width:36px!important;height:36px!important;border-radius:12px!important}
 .step-list .step-copy b{font-size:13px!important}.step-list .step-copy span{font-size:11.25px!important}
}

/* === COMPACT ICON-ONLY QUESTION TOOLBAR ================================ */
body.legacy-app .q-nav{
  position:sticky!important;bottom:calc(7px + env(safe-area-inset-bottom))!important;z-index:260!important;
  display:flex!important;align-items:center!important;justify-content:stretch!important;gap:6px!important;flex-wrap:nowrap!important;
  width:min(680px,calc(100% - 10px))!important;min-height:0!important;margin:8px auto!important;
  padding:7px!important;border:1px solid #dbe7e2!important;border-radius:19px!important;
  background:rgba(255,255,255,.985)!important;box-shadow:0 12px 30px rgba(22,58,47,.14)!important;
  backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;
}
body.legacy-app .q-nav .nav-mid{display:none!important}
body.legacy-app .q-nav button{
  position:relative!important;display:grid!important;place-items:center!important;flex:1 1 0!important;min-width:44px!important;max-width:none!important;
  width:auto!important;height:48px!important;min-height:48px!important;padding:0!important;margin:0!important;border-radius:14px!important;
  font-size:0!important;line-height:0!important;text-indent:0!important;overflow:hidden!important;white-space:nowrap!important;
  border:1px solid #d9e5e0!important;box-shadow:0 5px 10px rgba(25,58,49,.08),inset 0 1px 0 rgba(255,255,255,.8)!important;
}
body.legacy-app .q-nav button::before{display:block!important;font-size:25px!important;line-height:1!important;font-weight:950!important;text-indent:0!important;color:currentColor!important}
body.legacy-app #prevBtn{order:1!important;background:linear-gradient(145deg,#f7fafb,#e9eef2)!important;color:#607585!important}
body.legacy-app #prevBtn::before{content:'←'!important}
body.legacy-app #flagBtn{order:2!important;background:linear-gradient(145deg,#fff6d9,#f4dc90)!important;color:#9a6500!important}
body.legacy-app #flagBtn::before{content:'☆'!important;font-size:28px!important}
body.legacy-app #flagBtn.flagged::before{content:'★'!important}
body.legacy-app #nextBtn{order:3!important;background:linear-gradient(145deg,#1bc18f,#089f78)!important;color:#fff!important;border-color:#078c6c!important;box-shadow:0 7px 12px rgba(5,150,111,.20),inset 0 1px 0 #69d9b9!important}
body.legacy-app #nextBtn::before{content:'→'!important}
body.legacy-app #checkBtn{order:4!important;background:linear-gradient(145deg,#e6f7ff,#cae9f8)!important;color:#147bb2!important;border-color:#c1dfed!important}
body.legacy-app #checkBtn::before{content:'✓'!important}
body.legacy-app #skipBtn{order:5!important;background:linear-gradient(145deg,#f1ecff,#ded4fa)!important;color:#654db9!important;border-color:#d5caf3!important}
body.legacy-app #skipBtn::before{content:'↷'!important}
body.legacy-app .q-nav .hidden{display:none!important}
body.legacy-app .q-nav button:disabled{opacity:.34!important;filter:grayscale(.15)!important}
body.legacy-app .q-nav button:not(:disabled):active{transform:translateY(2px) scale(.96)!important;box-shadow:0 2px 5px rgba(25,58,49,.08)!important}
@media(max-width:390px){body.legacy-app .q-nav{gap:4px!important;padding:6px!important;width:calc(100% - 8px)!important}body.legacy-app .q-nav button{height:45px!important;min-height:45px!important;border-radius:12px!important}body.legacy-app .q-nav button::before{font-size:23px!important}}

/* Official exam toolbar uses the same language and remains one row on every viewport. */
body.omi-exam-active .exam-actions,body.omi-secure-exam .exam-actions{
  position:sticky!important;bottom:calc(7px + env(safe-area-inset-bottom))!important;z-index:260!important;
  display:flex!important;grid-template-columns:none!important;align-items:center!important;justify-content:stretch!important;gap:6px!important;flex-wrap:nowrap!important;
  width:min(720px,calc(100% - 10px))!important;min-height:0!important;margin:8px auto!important;padding:7px!important;
  border:1px solid #dbe7e2!important;border-radius:19px!important;background:rgba(255,255,255,.985)!important;box-shadow:0 12px 30px rgba(22,58,47,.14)!important;
}
body.omi-exam-active .exam-actions .btn,body.omi-secure-exam .exam-actions .btn{
  display:grid!important;place-items:center!important;flex:1 1 0!important;min-width:44px!important;max-width:none!important;width:auto!important;
  height:48px!important;min-height:48px!important;padding:0!important;margin:0!important;border-radius:14px!important;font-size:0!important;line-height:0!important;overflow:hidden!important;
}
body.omi-exam-active .exam-actions .btn::before,body.omi-secure-exam .exam-actions .btn::before{display:block!important;font-size:25px!important;line-height:1!important;font-weight:950!important;color:currentColor!important}
body.omi-exam-active #prev,body.omi-secure-exam #prev{order:1!important;background:linear-gradient(145deg,#f7fafb,#e9eef2)!important;color:#607585!important}body.omi-exam-active #prev::before,body.omi-secure-exam #prev::before{content:'←'!important}
body.omi-exam-active #flagBtn,body.omi-secure-exam #flagBtn{order:2!important;background:linear-gradient(145deg,#fff6d9,#f4dc90)!important;color:#9a6500!important}body.omi-exam-active #flagBtn::before,body.omi-secure-exam #flagBtn::before{content:'☆'!important;font-size:28px!important}body.omi-exam-active #flagBtn.flagged::before,body.omi-secure-exam #flagBtn.flagged::before{content:'★'!important}
body.omi-exam-active #next,body.omi-secure-exam #next{order:3!important;background:linear-gradient(145deg,#1bc18f,#089f78)!important;color:#fff!important}body.omi-exam-active #next::before,body.omi-secure-exam #next::before{content:'→'!important}
body.omi-exam-active #reviewBtn,body.omi-secure-exam #reviewBtn{order:4!important;background:linear-gradient(145deg,#e6f7ff,#cae9f8)!important;color:#147bb2!important}body.omi-exam-active #reviewBtn::before,body.omi-secure-exam #reviewBtn::before{content:'☷'!important}
body.omi-exam-active #submitFixed,body.omi-secure-exam #submitFixed{order:5!important;background:linear-gradient(145deg,#ffe7ea,#f4cbd1)!important;color:#a33f4b!important}body.omi-exam-active #submitFixed::before,body.omi-secure-exam #submitFixed::before{content:'✓'!important}
@media(max-width:390px){body.omi-exam-active .exam-actions,body.omi-secure-exam .exam-actions{gap:4px!important;padding:6px!important;width:calc(100% - 8px)!important}body.omi-exam-active .exam-actions .btn,body.omi-secure-exam .exam-actions .btn{height:45px!important;min-height:45px!important;border-radius:12px!important}}

/* Keep question content visible above compact toolbars. */
body.legacy-app .exam-main,body.omi-exam-active .exam-fixed,body.omi-secure-exam .exam-fixed{padding-bottom:8px!important}
body.legacy-app .question-card{margin-bottom:0!important}

/* === ARCHIVE CBT TOOLBAR =============================================== */
.omi-cbt-archive .cbt-nav{display:flex!important;align-items:center!important;gap:6px!important;position:sticky!important;bottom:calc(7px + env(safe-area-inset-bottom))!important;z-index:240!important;width:min(620px,calc(100% - 8px))!important;margin:10px auto 0!important;padding:7px!important;border:1px solid #dbe7e2!important;border-radius:18px!important;background:rgba(255,255,255,.985)!important;box-shadow:0 10px 28px rgba(22,58,47,.13)!important}
.omi-cbt-archive .cbt-icon-btn{flex:1 1 0!important;min-width:44px!important;max-width:none!important;height:47px!important;border-radius:14px!important;font-size:24px!important;box-shadow:0 5px 10px rgba(25,58,49,.08),inset 0 1px 0 #fff!important}

/* === DIALOG RELIABILITY ================================================ */
dialog.omi-modal[open]{max-height:min(86dvh,720px)!important;overflow:auto!important}
dialog.omi-modal .icon-close{position:relative!important;z-index:3!important;pointer-events:auto!important}

/* === QUESTION BANK EDITOR ============================================== */
.qeditor-toolbar{display:flex;gap:7px;flex-wrap:wrap;margin:7px 0 0}
.qeditor-toolbar .btn{min-height:42px!important}
.qbank-quality-note{padding:10px 12px;border-radius:12px;background:#eef8f4;color:#2f5d4d;font-size:12px;line-height:1.45}

/* Prevent all global bottom nav overlap with editable/input content. */
body.omi-layout:not(.omi-exam-active):not(.omi-secure-exam) main{padding-bottom:max(96px,calc(82px + env(safe-area-inset-bottom)))!important}

/* V26 final: practice footer has exactly four visible primary controls. "Next" already
   permits moving past an unanswered item, so the separate Skip control is redundant
   and is removed from the visual toolbar without deleting its legacy handler. */
body.legacy-app .q-nav #skipBtn{display:none!important}
body.legacy-app .q-nav button{flex:1 1 25%!important}
.omi-cbt-archive .cbt-nav .flag{background:linear-gradient(145deg,#fff6d9,#f4dc90)!important;color:#9a6500!important;border-color:#ead278!important}
.omi-cbt-archive .cbt-nav .flag.flagged{background:linear-gradient(145deg,#ffe6a3,#e9bd3d)!important;color:#714800!important}
.omi-cbt-archive .cbt-nav .prev{background:linear-gradient(145deg,#f7fafb,#e9eef2)!important;color:#607585!important}
.omi-cbt-archive .cbt-nav .check{background:linear-gradient(145deg,#e6f7ff,#cae9f8)!important;color:#147bb2!important}
.omi-cbt-archive .cbt-nav .save{background:linear-gradient(145deg,#e6f7ff,#cae9f8)!important;color:#147bb2!important}
.omi-cbt-archive .cbt-nav .next{background:linear-gradient(145deg,#1bc18f,#089f78)!important;color:#fff!important;border-color:#078c6c!important}
