.lms-shell-ui, .lms-shell-ui * { box-sizing: border-box; }
.lms-shell-ui { position: fixed; z-index: 50; inset: 0; pointer-events: none; color: #f6fbff; font-family: Inter, ui-rounded, "Segoe UI", system-ui, sans-serif; }
.lms-shell-ui [hidden] { display: none !important; }
.side-dock {
  position: fixed;
  z-index: 55;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.2vh, 12px);
  padding: 7px;
  transform: translateY(-50%);
  pointer-events: auto;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
/* Docks remain reachable on every route. Compact labels leave room for content. */
.lms-shell-ui.is-content-route .side-dock { width:54px!important; opacity:1;visibility:visible;pointer-events:auto; }
.lms-shell-ui.is-content-route .dock-button {justify-content:center;padding:7px;}
.lms-shell-ui.is-content-route .dock-button span {display:none;}
.side-dock{max-height:calc(100dvh - 12px);overflow-y:auto;scrollbar-width:thin}
.side-dock-left { left: max(2px, env(safe-area-inset-left)); align-items: flex-start; }
.side-dock-right { right: max(2px, env(safe-area-inset-right)); align-items: flex-end; }
.dock-button {
  width: 100%;
  min-width: 48px;
  min-height: clamp(48px, 7.5vh, 68px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(6px, .8vw, 11px);
  padding: 8px clamp(7px, 1vw, 13px);
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255, 213, 106, .76);
  border-radius: clamp(14px, 1.5vw, 21px);
  background: linear-gradient(145deg, rgba(10, 65, 128, .94), rgba(3, 24, 59, .97));
  box-shadow: inset 0 1px rgba(255,255,255,.24), 0 8px 25px rgba(0,0,0,.38), 0 0 18px rgba(30,128,255,.14);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.side-dock-right .dock-button { flex-direction: row-reverse; text-align: right; }
.dock-button:hover, .dock-button:focus-visible { outline: 2px solid #fff8dc; border-color: #ffe89b; background: linear-gradient(145deg, #1265bb, #052d68); transform: translateY(-1px); }
.dock-button svg { width: clamp(26px, 2.7vw, 36px); height: clamp(26px, 2.7vw, 36px); flex: 0 0 auto; fill: none; stroke: #fff7d5; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.dock-button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(.68rem, 1.05vw, .92rem); font-weight: 850; }
.side-dock.is-compact { width: 58px !important; }
.side-dock.is-compact .dock-button { justify-content: center; padding: 8px; }
.side-dock.is-compact .dock-button span { display: none; }

.panel-shade { position: fixed; z-index: 70; inset: 0; opacity: 0; background: rgba(0, 7, 20, .58); backdrop-filter: blur(2px); pointer-events: auto; transition: opacity .18s ease; }
.panel-shade.is-visible { opacity: 1; }
.utility-panel {
  position: fixed;
  z-index: 75;
  top: max(calc(var(--lms-panel-header-bottom, 0px) + 8px), env(safe-area-inset-top));
  bottom: max(8px, env(safe-area-inset-bottom));
  left: max(8px, env(safe-area-inset-left));
  width: min(430px, calc(100vw - 20px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: none;
  border: 1px solid rgba(255, 213, 106, .72);
  border-radius: 0 28px 28px 0;
  background: linear-gradient(160deg, rgba(7, 39, 83, .985), rgba(2, 14, 38, .995) 68%);
  box-shadow: 0 28px 90px rgba(0,0,0,.62), inset 0 1px rgba(255,255,255,.15);
  backdrop-filter: blur(18px);
  transform: translateX(calc(-100% - 22px));
  transition: transform .22s cubic-bezier(.2,.85,.25,1);
}
.utility-panel[data-side="left"] { left: max(8px, env(safe-area-inset-left)); border-radius: 0 28px 28px 0; transform: translateX(calc(-100% - 22px)); }
.utility-panel[data-side="right"] { right: max(8px, env(safe-area-inset-right)); left: auto; border-radius: 28px 0 0 28px; transform: translateX(calc(100% + 22px)); }
.utility-panel.is-open { pointer-events: auto; transform: translateX(0); }
.utility-panel-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 16px 13px 21px; border-bottom: 1px solid rgba(255,213,106,.24); background: rgba(5,31,70,.72); }
.utility-panel-header small { display: block; color: #79d9ff; font-size: .63rem; font-weight: 900; letter-spacing: .12em; }
.utility-panel-header h2 { margin: 3px 0 0; color: #ffe292; font: 800 clamp(1.35rem, 3.4vw, 2rem) Georgia, serif; line-height: 1.05; }
.panel-close { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; color: white; border: 1px solid rgba(255,213,106,.58); border-radius: 50%; background: #082b62; cursor: pointer; }
.panel-close:hover, .panel-close:focus-visible { outline: 2px solid white; background: #0d4f9c; }
.panel-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.utility-panel-body { flex: 1; min-height: 0; padding: 18px 19px 28px; overflow: auto; overscroll-behavior: contain; scrollbar-color: #2e78b9 #061b3c; }
.panel-lead { margin: 0 0 15px; color: #cdeeff; font-weight: 680; line-height: 1.45; }
.panel-note { margin: 14px 0 0; color: #9dcbe3; font-size: .78rem; line-height: 1.45; }

.hero-link, .trainer-list button, .app-actions button { width: 100%; display: flex; align-items: center; gap: 13px; text-align: left; color: white; border: 1px solid rgba(127,201,255,.26); border-radius: 17px; background: rgba(9,52,105,.74); box-shadow: inset 0 1px rgba(255,255,255,.08); cursor: pointer; }
.hero-link { padding: 13px 15px; margin-bottom: 17px; }
.hero-link:hover, .hero-link:focus-visible, .trainer-list button:hover, .trainer-list button:focus-visible, .app-actions button:hover, .app-actions button:focus-visible { outline: 2px solid #ffe6a2; background: rgba(14,78,148,.88); }
.hero-link svg { width: 34px; height: 34px; fill: none; stroke: #ffe292; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-link span, .trainer-list button span, .app-actions button span { display: flex; min-width: 0; flex-direction: column; }
.hero-link strong, .trainer-list strong, .app-actions strong { color: #fff; font-size: .94rem; }
.hero-link small, .trainer-list small, .app-actions small { margin-top: 3px; color: #b9def2; font-size: .72rem; line-height: 1.25; }

.map-form, .profile-form, .signin-form { display: grid; gap: 13px; }
.map-form label, .profile-form label:not(.file-button):not(.check-line), .signin-form label { display: grid; gap: 6px; color: #d8efff; font-size: .76rem; font-weight: 850; }
.map-form select, .profile-form input:not([type="checkbox"]):not([type="file"]), .profile-form select, .signin-form input, .signin-form select {
  width: 100%; min-height: 43px; padding: 8px 11px; color: #fff; border: 1px solid rgba(123,202,255,.42); border-radius: 12px; background: #051d42; outline: none;
}
.map-form select:focus, .profile-form input:focus, .profile-form select:focus, .signin-form input:focus, .signin-form select:focus { border-color: #ffe18a; box-shadow: 0 0 0 3px rgba(255,213,106,.15); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.map-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.map-actions button, .primary, .text-button, .file-button, .back-to-app {
  min-height: 42px; padding: 9px 12px; color: #fff; border: 1px solid rgba(127,201,255,.36); border-radius: 12px; background: #0a3977; cursor: pointer; font-weight: 850;
}
.map-actions button:hover, .map-actions button:focus-visible, .primary:hover, .primary:focus-visible, .text-button:hover, .text-button:focus-visible, .file-button:hover, .file-button:focus-within, .back-to-app:hover, .back-to-app:focus-visible { outline: 2px solid #fff; background: #0d56a9; }
.map-actions .primary, .primary { color: #092146; border-color: #fff0bd; background: linear-gradient(145deg, #ffe999, #eeb944); }
.map-actions .primary:hover, .primary:hover { background: #fff0b3; }
.wide { width: 100%; }
.map-legend { margin-top: 16px; padding: 10px 12px; color: #8ddfff; border-radius: 12px; background: rgba(0,12,32,.42); text-align: center; font-size: .75rem; font-weight: 800; }

.trainer-list, .app-actions { display: grid; gap: 9px; }
.trainer-list button, .app-actions button { min-height: 62px; padding: 10px 12px; }
.trainer-list button > b { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; color: #08234e; border-radius: 13px; background: linear-gradient(145deg,#9cecff,#36b6ec); font-size: 1.3rem; }
.trainer-list button > span, .app-actions button > span { flex: 1; }
.trainer-list button > i { color: #ffe08a; font-size: 1.8rem; font-style: normal; }

.training-room-loading { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 9px; color: #bcecff; text-align: center; }
.training-room-loading span { color: #ffe292; font-size: 2.5rem; animation: training-pulse 1.1s ease-in-out infinite alternate; }
.training-room-loading p { margin: 0; font-size: .82rem; font-weight: 750; }
@keyframes training-pulse { to { opacity: .55; transform: scale(.94); } }
.training-room-hero {
  position: relative;
  display: grid;
  gap: 13px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid rgba(255, 221, 126, .68);
  border-radius: 22px;
  background: radial-gradient(circle at 95% 0, rgba(124, 87, 255, .42), transparent 44%), linear-gradient(145deg, rgba(13, 86, 155, .94), rgba(5, 30, 75, .98));
  box-shadow: inset 0 1px rgba(255,255,255,.19), 0 14px 38px rgba(0,0,0,.28);
}
.training-room-hero::after { content: "♪"; position: absolute; right: -8px; bottom: -30px; color: rgba(255,255,255,.055); font: 900 9rem Georgia, serif; transform: rotate(-12deg); pointer-events: none; }
.training-room-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.training-room-brand > b { width: 55px; height: 55px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.66); border-radius: 17px; background: linear-gradient(145deg,#8bedff,#5687ff 58%,#a95cff); box-shadow: 0 9px 25px rgba(0,0,0,.3); font-size: 1.75rem; }
.training-room-brand span { min-width: 0; display: grid; gap: 3px; }
.training-room-brand small, .training-room-heading small { color: #91e6ff; font-size: .59rem; font-weight: 900; letter-spacing: .12em; }
.training-room-brand strong { color: #fff3bd; font: 800 1.16rem Georgia, serif; line-height: 1.05; }
.training-room-hero > p { position: relative; z-index: 1; margin: 0; color: #d5effc; font-size: .76rem; line-height: 1.45; }
.trainer-stat-strip { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,1fr); overflow: hidden; border: 1px solid rgba(136,211,255,.2); border-radius: 14px; background: rgba(0,13,39,.42); }
.trainer-stat-strip span { min-width: 0; display: grid; gap: 1px; padding: 8px 5px; text-align: center; }
.trainer-stat-strip span + span { border-left: 1px solid rgba(136,211,255,.18); }
.trainer-stat-strip b { color: #fff3bd; font-size: 1rem; }
.trainer-stat-strip small { color: #9ed7ef; font-size: .57rem; font-weight: 750; }
.trainer-launch { position: relative; z-index: 1; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px; color: #09234a; border: 1px solid #fff7d4; border-radius: 14px; background: linear-gradient(145deg,#fff0a9,#f2bd48); box-shadow: inset 0 1px white, 0 8px 22px rgba(0,0,0,.25); cursor: pointer; font-weight: 950; }
.trainer-launch:hover, .trainer-launch:focus-visible { outline: 2px solid white; background: #fff3bd; transform: translateY(-1px); }
.trainer-launch i { font-size: 1.35rem; font-style: normal; }
.training-room-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 19px 2px 10px; }
.training-room-heading.compact { margin-top: 22px; }
.training-room-heading h3 { margin: 2px 0 0; color: #fff1b8; font: 800 1.02rem Georgia, serif; }
.training-room-heading > span { padding: 5px 9px; color: #bcecff; border: 1px solid rgba(110,204,255,.28); border-radius: 999px; background: rgba(10,66,124,.56); font-size: .64rem; font-weight: 850; white-space: nowrap; }
.trainer-mode-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.trainer-mode-grid button { min-width: 0; min-height: 91px; display: grid; grid-template-columns: 38px minmax(0,1fr) 14px; align-items: center; gap: 8px; padding: 10px; color: white; border: 1px solid rgba(118,204,255,.28); border-radius: 17px; background: linear-gradient(145deg,rgba(10,61,119,.86),rgba(5,29,70,.95)); box-shadow: inset 0 1px rgba(255,255,255,.1); cursor: pointer; text-align: left; }
.trainer-mode-grid button:hover, .trainer-mode-grid button:focus-visible { outline: 2px solid #ffe292; border-color: #ffe292; background: linear-gradient(145deg,#105aa8,#082c68); transform: translateY(-1px); }
.trainer-mode-grid button > b { width: 38px; height: 38px; display: grid; place-items: center; color: #08234e; border-radius: 12px; background: linear-gradient(145deg,#a4f1ff,#4bbfee); font-size: 1.05rem; }
.trainer-mode-grid button > span { min-width: 0; display: grid; gap: 3px; }
.trainer-mode-grid strong { color: #fff5ce; font-size: .75rem; line-height: 1.15; }
.trainer-mode-grid small { color: #abd8ec; font-size: .61rem; line-height: 1.25; }
.trainer-mode-grid button > i { color: #ffe292; font-size: 1.35rem; font-style: normal; }
.guided-practice { margin-top: 19px; padding: 13px; border: 1px solid rgba(124,200,255,.2); border-radius: 17px; background: rgba(1,15,38,.46); }
.guided-practice h3 { margin: 0 0 10px; color: #ffe292; font: 800 .94rem Georgia, serif; }
.guided-practice > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.guided-practice button { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: white; border: 1px solid rgba(124,200,255,.25); border-radius: 12px; background: #0a3977; cursor: pointer; font-size: .68rem; font-weight: 850; }
.guided-practice button:hover, .guided-practice button:focus-visible { outline: 2px solid white; background: #0d56a9; }
.guided-practice button b { color: #ffe292; font-size: 1rem; }

.encyclopedia-panel-intro { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; padding: 15px; overflow: hidden; border: 1px solid rgba(255,221,126,.56); border-radius: 20px; background: radial-gradient(circle at 100% 0,rgba(130,85,255,.35),transparent 48%),linear-gradient(145deg,rgba(13,83,150,.9),rgba(5,31,75,.97)); }
.encyclopedia-panel-intro > b { width: 56px; height: 56px; display: grid; flex: 0 0 auto; place-items: center; color: #ffe292; border: 1px solid rgba(255,255,255,.5); border-radius: 17px; background: rgba(5,36,82,.7); box-shadow: 0 9px 22px #0005; }
.encyclopedia-panel-intro > b svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.encyclopedia-panel-intro > div { min-width: 0; display: grid; gap: 3px; }
.encyclopedia-panel-intro small { color: #86e1ff; font-size: .57rem; font-weight: 900; letter-spacing: .12em; }
.encyclopedia-panel-intro strong { color: #fff2bb; font: 800 1.12rem Georgia,serif; }
.encyclopedia-panel-intro p { margin: 2px 0 0; color: #c6e9f7; font-size: .7rem; line-height: 1.35; }
.encyclopedia-all { width: 100%; min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding: 9px 14px; color: #08234d; border: 1px solid #fff4c5; border-radius: 14px; background: linear-gradient(145deg,#ffed9b,#efbb45); cursor: pointer; font-weight: 900; }
.encyclopedia-all:hover,.encyclopedia-all:focus-visible { outline: 2px solid white; transform: translateY(-1px); }
.encyclopedia-all i { font-size: 1.3rem; font-style: normal; }
.encyclopedia-panel-list { display: grid; gap: 8px; }
.encyclopedia-panel-list > button { min-height: 65px; display: grid; grid-template-columns: 43px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 9px 11px; color: white; border: 1px solid color-mix(in srgb,var(--accent) 48%,rgba(127,201,255,.25)); border-radius: 15px; background: radial-gradient(circle at 0 0,color-mix(in srgb,var(--accent) 20%,transparent),transparent 52%),rgba(7,43,89,.77); cursor: pointer; text-align: left; }
.encyclopedia-panel-list > button:hover,.encyclopedia-panel-list > button:focus-visible { outline: 2px solid #fff0b5; border-color: var(--accent); transform: translateY(-1px); }
.encyclopedia-panel-list > button > b { width: 40px; height: 40px; display: grid; place-items: center; color: #06204a; border-radius: 12px; background: linear-gradient(145deg,#fff,var(--accent)); font-size: 1.1rem; }
.encyclopedia-panel-list > button > span { min-width: 0; display: grid; gap: 3px; }
.encyclopedia-panel-list strong { color: #fff2c2; font-size: .82rem; }
.encyclopedia-panel-list small { overflow: hidden; color: #b7ddec; font-size: .65rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.encyclopedia-panel-list > button > i { color: var(--accent); font-size: 1.55rem; font-style: normal; }
.encyclopedia-panel-empty { padding: 15px; color: #b9ddeb; border: 1px dashed rgba(120,204,246,.37); border-radius: 15px; background: rgba(1,16,39,.45); font-size: .74rem; line-height: 1.5; text-align: center; }

.security-banner { display: grid; gap: 4px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid rgba(89,224,190,.34); border-radius: 15px; background: rgba(8,91,94,.27); }
.security-banner strong { color: #8cf4d7; font-size: .86rem; }
.security-banner span { color: #c8f3eb; font-size: .72rem; line-height: 1.4; }
.panel-section { margin-top: 14px; padding: 15px; border: 1px solid rgba(127,201,255,.2); border-radius: 17px; background: rgba(1,15,38,.48); }
.panel-section:first-child { margin-top: 0; }
.panel-section h3, .instruction-card h3 { margin: 0 0 12px; color: #ffe292; font: 800 1.04rem Georgia, serif; }
.panel-section small { color: #9bc9e4; font-weight: 600; }
.form-error { min-height: 1.2em; margin: 0; color: #ff9eae; font-size: .78rem; font-weight: 750; }
.avatar-field { display: flex; align-items: center; gap: 14px; }
.avatar-preview { flex: 0 0 auto; }
.file-button { display: inline-grid; place-items: center; position: relative; overflow: hidden; }
.file-button input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.profile-avatar { width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center; object-fit: cover; color: #06204a; border: 2px solid #ffe292; border-radius: 50%; background: linear-gradient(145deg,#90eaff,#8b6fff); font-size: 1.2rem; font-weight: 900; }
.profile-avatar.large { width: 68px; height: 68px; font-size: 1.7rem; }
.check-line { display: flex !important; grid-template-columns: none !important; align-items: flex-start; gap: 9px !important; color: #cceaff !important; line-height: 1.35; font-size: .74rem !important; }
.check-line input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #ffd56a; }
.student-card { display: grid; gap: 12px; padding: 16px; border: 1px solid rgba(255,213,106,.5); border-radius: 20px; background: linear-gradient(145deg,rgba(13,77,145,.72),rgba(7,33,75,.88)); }
.student-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.student-identity div { min-width: 0; }
.student-identity span { color: #9fe5ff; font-size: .72rem; font-weight: 800; }
.student-identity h3 { margin: 2px 0; overflow: hidden; color: #fff4c8; font: 800 1.35rem Georgia, serif; text-overflow: ellipsis; }
.student-identity small { display: block; overflow: hidden; color: #c4e4f5; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.text-button { justify-self: end; min-height: 34px; padding: 6px 10px; font-size: .72rem; }
.subscription-status { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; padding: 9px 11px; border-radius: 12px; background: rgba(8,60,121,.6); }
.subscription-status span { color: #aedbf1; font-size: .73rem; }
.subscription-status strong { color: #ffe292; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 11px; }
.plan-grid button { min-height: 84px; display: flex; flex-direction: column; gap: 5px; padding: 11px; text-align: left; color: white; border: 1px solid rgba(127,201,255,.26); border-radius: 14px; background: #072957; cursor: pointer; }
.plan-grid button.is-selected { border-color: #ffe292; box-shadow: inset 0 0 0 2px rgba(255,213,106,.18); background: #0c478d; }
.plan-grid small { line-height: 1.25; }
.compact-profile dl, .record-board dl { display: grid; gap: 7px; margin: 0; }
.compact-profile dl div, .record-board dl div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(9,54,109,.48); }
.compact-profile dt, .record-board dt { color: #a9d4ea; font-size: .74rem; }
.compact-profile dd, .record-board dd { margin: 0; color: #fff1b7; font-weight: 850; }

.dashboard-owner { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.dashboard-owner div { display: grid; }
.dashboard-owner small { color: #91cce9; }
.dashboard-owner strong { color: #fff4c8; font-size: 1.06rem; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.metric-grid article { min-height: 78px; display: grid; place-items: center; align-content: center; border: 1px solid rgba(126,204,255,.25); border-radius: 15px; background: linear-gradient(145deg,rgba(12,77,145,.75),rgba(5,34,76,.82)); }
.metric-grid b { color: #ffe292; font-size: 1.55rem; line-height: 1; }
.metric-grid span { margin-top: 6px; color: #c7eaff; font-size: .7rem; font-weight: 800; }
.progress-row { display: grid; gap: 6px; margin-top: 11px; }
.progress-row > span { display: flex; justify-content: space-between; gap: 8px; color: #d9f2ff; font-size: .76rem; font-weight: 800; }
.progress-row > span b { color: #8bdcff; font-size: .7rem; }
.progress-row > div { height: 9px; overflow: hidden; border-radius: 999px; background: #03132f; }
.progress-row i { display: block; min-width: 2px; height: 100%; border-radius: inherit; box-shadow: 0 0 10px currentColor; }
.activity-chart { height: 112px; display: grid; grid-template-columns: repeat(7,1fr); align-items: end; gap: 7px; padding-top: 8px; }
.activity-chart > div { height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; gap: 5px; }
.activity-chart i { min-height: 5px; display: grid; place-items: start center; align-self: end; border-radius: 7px 7px 3px 3px; background: linear-gradient(#55ddff,#1769c2); box-shadow: 0 0 12px rgba(60,190,255,.24); }
.activity-chart i b { margin-top: 3px; color: #001838; font-size: .62rem; font-style: normal; }
.activity-chart span { color: #8fcbe7; text-align: center; font-size: .63rem; font-weight: 800; }
.badge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.badge-grid article { display: flex; align-items: center; gap: 8px; min-height: 72px; padding: 9px; opacity: .56; border: 1px solid rgba(127,201,255,.18); border-radius: 13px; background: #051d42; }
.badge-grid article.earned { opacity: 1; border-color: rgba(255,213,106,.52); background: #0a3974; }
.badge-grid article > b { color: #ffe292; font-size: 1.45rem; }
.badge-grid article span { display: grid; gap: 3px; }
.badge-grid strong { font-size: .75rem; }
.badge-grid small { font-size: .62rem; line-height: 1.25; }

.leader-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.leader-list li { min-height: 60px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid rgba(127,201,255,.2); border-radius: 15px; background: rgba(5,34,76,.75); }
.leader-list li.is-current { border-color: #ffe292; background: rgba(12,69,132,.86); }
.leader-list em { width: 22px; color: #ffe292; text-align: center; font: 800 1.15rem Georgia, serif; }
.leader-list li > span { min-width: 0; flex: 1; display: grid; }
.leader-list li > span strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .83rem; }
.leader-list li > span small { color: #9ccde7; font-size: .66rem; }
.leader-list li > b { color: #ffe292; font-size: 1.02rem; }
.leader-list .empty-list { justify-content: center; color: #a7d0e5; text-align: center; }

.version-card { display: grid; gap: 4px; margin-bottom: 15px; padding: 17px; border: 1px solid rgba(255,213,106,.45); border-radius: 18px; background: linear-gradient(145deg,rgba(13,78,148,.73),rgba(5,31,70,.85)); }
.version-card span { color: #a6d8ef; font-size: .72rem; }
.version-card strong { color: #ffe292; font: 800 1.38rem Georgia, serif; }
.version-card small { color: #d3edfa; }
.app-actions button { flex-direction: column; align-items: flex-start; gap: 0; }
.app-actions button:disabled { opacity: .45; cursor: default; }
.app-actions button.danger { border-color: rgba(255,115,139,.45); background: rgba(106,20,47,.52); }
.instruction-card { padding: 15px; border: 1px solid rgba(127,201,255,.23); border-radius: 17px; background: rgba(1,15,38,.5); }
.instruction-card h3:not(:first-child) { margin-top: 18px; }
.instruction-card p { color: #c9e6f4; font-size: .8rem; line-height: 1.5; }
.back-to-app { margin-bottom: 13px; }

.app-toast { position: fixed; z-index: 90; left: 50%; bottom: max(17px, env(safe-area-inset-bottom)); max-width: min(520px,calc(100vw - 24px)); padding: 11px 16px; opacity: 0; color: #06204b; border: 1px solid #fff4c4; border-radius: 999px; background: #ffe292; box-shadow: 0 10px 35px #0008; transform: translate(-50%,20px); transition: opacity .18s ease,transform .18s ease; pointer-events: none; font-size: .78rem; font-weight: 850; text-align: center; }
.app-toast.is-visible { opacity: 1; transform: translate(-50%,0); }
.exit-screen { position: fixed; z-index: 95; inset: 0; display: grid; place-items: center; padding: 24px; pointer-events: auto; background: radial-gradient(circle at 50% 30%,#0d4b91,#051b3f 52%,#020817); }
.exit-card { width: min(440px,100%); padding: 34px; color: white; border: 1px solid #ffe292; border-radius: 26px; background: rgba(4,26,61,.9); box-shadow: 0 25px 80px #000a; text-align: center; }
.exit-card > span { color: #ffe292; font-size: 4rem; }
.exit-card h2 { margin: 8px 0; color: #fff1b7; font: 800 1.8rem Georgia,serif; }
.exit-card p { color: #c6e8f8; }
.exit-card button { min-height: 44px; padding: 9px 18px; color: #08234e; border: 1px solid white; border-radius: 999px; background: #ffe292; cursor: pointer; font-weight: 900; }

@media (max-height: 570px) and (orientation: landscape) {
  .side-dock { gap: 5px; padding: 4px; }
  .dock-button { min-height: 40px; padding-block: 5px; border-radius: 12px; }
  .dock-button svg { width: 25px; height: 25px; }
  .utility-panel { top: max(calc(var(--lms-panel-header-bottom, 0px) + 4px), env(safe-area-inset-top)); bottom: 4px; width: min(410px,calc(100vw - 10px)); }
  .utility-panel-header { min-height: 56px; padding: 9px 12px 8px 16px; }
  .utility-panel-header h2 { font-size: 1.25rem; }
  .panel-close { width: 36px; height: 36px; }
  .utility-panel-body { padding: 12px 14px 20px; }
  .panel-section { padding: 11px; }
}
@media (max-width: 720px) and (orientation: landscape) {
  .dock-button span { display: none; }
  .side-dock { width: 52px !important; }
  .dock-button { justify-content: center !important; padding: 6px; }
}
@media (orientation: portrait) { .lms-shell-ui { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .lms-shell-ui *, .lms-shell-ui *::before, .lms-shell-ui *::after { transition: none !important; animation: none !important; } }

/* === NAVIGATION FIX 2026-09-28 ===
   Normal course screens use the same full side docks as Home.
   Utility areas opened from those docks hide the docks completely.
   This block intentionally overrides the legacy is-content-route/is-compact rules.
*/
@media (min-width: 721px) and (orientation: landscape) {
  html body .lms-shell-ui .side-dock,
  html body .lms-shell-ui.is-content-route .side-dock,
  html body .lms-shell-ui .side-dock.is-compact {
    width: 210px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  html body .lms-shell-ui .dock-button,
  html body .lms-shell-ui.is-content-route .dock-button,
  html body .lms-shell-ui .side-dock.is-compact .dock-button {
    justify-content: flex-start !important;
    padding: 8px clamp(7px, 1vw, 13px) !important;
  }

  html body .lms-shell-ui .dock-button span,
  html body .lms-shell-ui.is-content-route .dock-button span,
  html body .lms-shell-ui .side-dock.is-compact .dock-button span {
    display: block !important;
  }

  /* Keep enough room around the artwork for two 210px docks. */
  html body .app-shell .art-stage {
    width: min(calc(100vw - 440px), calc(100dvh * var(--art-ratio-num))) !important;
    height: min(100dvh, calc((100vw - 440px) * var(--art-ratio-inv))) !important;
  }
}

/* While a slide-out utility section (Account, Progress, Honor roll, App,
   Program map, Training room, Encyclopedia menu, etc.) is open, remove both docks. */
html body .lms-shell-ui:has(.utility-panel.is-open) .side-dock {
  display: none !important;
}

/* Full utility routes launched from the side navigation: Piano / cards / trainers,
   Encyclopedia and Homework. These modules already provide their own navigation. */
html body:has(#app .trainer-route-shell) .lms-shell-ui .side-dock,
html body:has(#app .encyclopedia-route-shell) .lms-shell-ui .side-dock,
html body:has(#app .learning-host) .lms-shell-ui .side-dock {
  display: none !important;
}


/* LADYS PATCH-001 — vintage training-room cards */
.training-room-heading>span{color:#ffe5a1;border-color:#6a84a4;background:#0b335f}
.trainer-mode-grid>button{background:linear-gradient(145deg,#103d74,#06244c)!important;color:#f8e7b7!important;border:1px solid #48769e!important;border-radius:16px!important;box-shadow:inset 0 1px #ffffff13,0 4px 12px #0003}
.trainer-mode-grid>button:hover,.trainer-mode-grid>button:focus-visible{border-color:#f5c96b!important;box-shadow:inset 0 0 0 1px #f5c96b44,0 8px 20px #0005}
.trainer-mode-grid>button b{background:linear-gradient(145deg,#fff1c4,#e3b657)!important;color:#092b51!important;border-radius:12px!important}
.trainer-mode-grid>button strong{color:#ffedbc!important;font-family:Georgia,serif}.trainer-mode-grid>button small{color:#bbd8ed!important}.trainer-mode-grid>button i{color:#ffd47c!important;font-size:1rem!important;font-style:normal}


/* Phone/tablet: original three school buttons move into the account header. */
.auth-mobile-tools { display: none; }
@media (max-width: 1100px), (pointer: coarse) and (max-width: 1400px) {
  html body .auth-header {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    min-height: 54px;
    padding-left: max(5px, env(safe-area-inset-left)) !important;
    padding-right: max(5px, env(safe-area-inset-right)) !important;
    box-sizing: border-box;
  }
  html body .auth-header .auth-mobile-tools {
    display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-start;
    gap: clamp(3px, .7vw, 7px); margin-right: auto; min-width: 0;
  }
  html body .auth-header .auth-mobile-tools .dock-button {
    width: 36px !important; min-width: 36px !important; height: 38px; min-height: 38px;
    padding: 6px !important; margin: 0; justify-content: center !important;
    border-radius: 10px; flex-direction: row; pointer-events: auto;
    overflow: visible;
  }
  html body .auth-header .auth-mobile-tools .dock-button svg { width: 24px; height: 24px; }
  html body .auth-header .auth-mobile-tools .dock-button span { display: none !important; }
  html body .auth-header .auth-links { margin-left: auto; min-width: 0; flex: 0 1 auto; }
  html body .auth-header .auth-language { flex-shrink: 0; }
  html body .lms-shell-ui .side-dock-left { display: none !important; }
}
@media (max-width: 460px) {
  html body .auth-header { gap: 3px; }
  html body .auth-header .auth-mobile-tools { gap: 3px; }
  html body .auth-header .auth-mobile-tools .dock-button {
    width: 31px !important; min-width: 31px !important; height: 36px; min-height: 36px; padding: 5px !important;
  }
  html body .auth-header .auth-mobile-tools .dock-button svg { width: 21px; height: 21px; }
  html body .auth-header .auth-links { gap: 4px; font-size: 11px; }
}
/* Full screen invitation is visible even when portrait-mode shell UI is hidden. */
.lms-shell-ui .mobile-fullscreen-offer[hidden] { display: none !important; }
.lms-shell-ui .mobile-fullscreen-offer {
  position: fixed; inset: 0; z-index: 20000; pointer-events: auto;
  display: grid; place-items: center; padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: rgba(1, 12, 32, .81); backdrop-filter: blur(8px);
}
.mobile-fullscreen-card {
  width: min(440px, 100%); padding: 26px 21px; text-align: center;
  border: 2px solid #d6b573; border-radius: 25px;
  background: linear-gradient(160deg,#183a59,#071e3d);
  box-shadow: 0 30px 90px #000a; color: #f7e9c5; font-family: Georgia, serif;
}
.mobile-fullscreen-symbol { font-size: 44px; color: #f5cc79; }
.mobile-fullscreen-card h2 { margin: 8px 0 11px; font-size: clamp(22px, 5vw, 30px); color: #f8d88f; }
.mobile-fullscreen-card p { margin: 0 0 17px; font: 15px/1.5 system-ui,sans-serif; color: #d3e5f1; }
.mobile-fullscreen-card .mobile-fullscreen-hint { color: #ffdd94; }
.mobile-fullscreen-card button { display: block; width: 100%; min-height: 48px; margin-top: 9px; border-radius: 12px; cursor: pointer; font: 700 16px system-ui,sans-serif; }
.mobile-fullscreen-enter { color:#122846; background:#f2cc7d; border:1px solid #fff0c4; }
.mobile-fullscreen-skip { color:#f0e4cb; background:#163653; border:1px solid #a88750; }
.auth-header .school-fullscreen-toggle {
  display: inline-grid; place-items: center; flex: 0 0 38px;
  width: 38px; min-width: 38px; height: 38px; padding: 0; margin: 0;
  border: 1px solid #d6b573; border-radius: 10px; background: #163653;
  color: #f8d88f; font: 27px/1 system-ui,sans-serif; cursor: pointer;
}
.auth-header .school-fullscreen-toggle[hidden] { display: none !important; }
.auth-header .school-fullscreen-toggle:focus-visible { outline: 2px solid #fff0c4; outline-offset: 2px; }
.auth-header .school-fullscreen-toggle[aria-pressed="true"] { color: #122846; background: #f2cc7d; }
@media (orientation: portrait) {
  .lms-shell-ui:has(.mobile-fullscreen-offer:not([hidden])) { visibility: visible !important; }
  .lms-shell-ui .mobile-fullscreen-offer { visibility: visible !important; }
}

/* Mobile navigation state reversal: idle has the former selected/gold look;
   opened/selected has the former idle/dark-navy look. Desktop unchanged. */
@media (max-width: 1100px), (pointer: coarse) and (max-width: 1400px) {
  html body .auth-header .auth-mobile-tools .dock-button:not(.is-current) {
    color: #112b4a !important;
    border-color: #f8dd9e !important;
    background: linear-gradient(155deg, #fff0c7, #deb66a) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.75), 0 3px 10px rgba(0,0,0,.17) !important;
  }
  html body .auth-header .auth-mobile-tools .dock-button:not(.is-current) svg {
    stroke: #102f52 !important;
  }
  html body .auth-header .auth-mobile-tools .dock-button.is-current {
    color: #fff7dc !important;
    border-color: rgba(255,213,106,.75) !important;
    background: linear-gradient(145deg, #104780, #031a3d) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.2), 0 4px 12px rgba(0,0,0,.24) !important;
  }
  html body .auth-header .auth-mobile-tools .dock-button.is-current svg {
    stroke: #ffe5a3 !important;
  }
  html body .auth-header .auth-mobile-tools .dock-button:focus-visible {
    outline: 2px solid #fff !important; outline-offset: 2px;
  }
}

/* Touch-orientation recovery: never strand a learner behind a static guard. */
.orientation-guard .orientation-continue {
  display: inline-flex; align-items:center; justify-content:center;
  min-height:48px; margin-top:20px; padding:10px 20px;
  border:1px solid #ffe7a4; border-radius:13px;
  background:linear-gradient(#ffe9a1,#eebb56);color:#0c2a50;
  font:800 16px system-ui,sans-serif;cursor:pointer;touch-action:manipulation;
}
html.lms-orientation-dismissed body .orientation-guard,
html.lms-landscape-detected body .orientation-guard { display:none!important;pointer-events:none!important; }
html.lms-orientation-dismissed body #app,
html.lms-landscape-detected body #app { visibility:visible!important; }
html.lms-orientation-dismissed body .lms-shell-ui,
html.lms-landscape-detected body .lms-shell-ui { visibility:visible!important; }
/* A landscape fullscreen dialog must never be masked by the portrait guard. */
@media (orientation:portrait) {
  html:not(.lms-orientation-dismissed):not(.lms-landscape-detected) .lms-shell-ui .mobile-fullscreen-offer { display:none!important; }
}

/* Orientation priority: portrait always asks for landscape; never bypass it.
   In landscape the rotation guard is not rendered and never captures taps. */
html body .orientation-guard .orientation-continue { display: none !important; }
html body .orientation-guard { pointer-events: none; }
@media (orientation: portrait) {
  html body .orientation-guard { display: grid !important; pointer-events: auto !important; }
  html body #app { visibility: hidden !important; }
  html body .lms-shell-ui .mobile-fullscreen-offer { display: none !important; }
}
@media (orientation: landscape) {
  html body .orientation-guard { display: none !important; pointer-events: none !important; }
  html body #app, html body .lms-shell-ui { visibility: visible !important; }
}
/* Server-backed worldwide Honor Roll and rewards shop. */
.lms-shell-ui #rewards-redeem-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:10px;align-items:end;margin:14px 0}
.lms-shell-ui #rewards-redeem-form label{display:grid;gap:5px;color:#f9e7b0;font-weight:650;font-size:13px}
.lms-shell-ui #rewards-redeem-form select{min-width:0;width:100%;min-height:40px;border-radius:9px;padding:7px;background:#f7f0d7;color:#112d49}
.lms-shell-ui #rewards-redeem-form button{grid-column:1/-1;min-height:44px;border-radius:10px;background:#f2c65d;color:#102b3c;font-weight:800;cursor:pointer}
.lms-shell-ui #rewards-redeem-form button:disabled{opacity:.52;cursor:not-allowed}

/* Training Room: full-width piano, then five paired rows of activities. */
.trainer-mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
}
.trainer-mode-grid > button[data-route="#/trainer/note-lab/piano"] {
  grid-column: 1 / -1;
}

/* The learner can reach the lesson and its start button in either orientation. */
html.nr-test-route body .orientation-guard { display: none !important; }
html.nr-test-route body #app,
html.nr-test-route #app .learning-host { visibility: visible !important; }

/* The app owns this viewport only for the duration of a Note Reading attempt. */
html.nr-test-active body > :not(#app) { display: none !important; }
html.nr-test-active body #app {
  --auth-header-height: 0px;
  --school-view-height: 100%;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  max-height: none !important;
  padding: 0 !important;
  visibility: visible !important;
}
html.nr-test-active #app :is(.trainer-route-shell,.note-lab-host,.learning-host,.note-lab) {
  box-sizing: border-box;
  inset: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
}
html.nr-test-active #app .note-lab {
  display: grid;
  grid-template: minmax(0,1fr) / minmax(0,1fr) !important;
  gap: 0 !important;
  padding: env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px) !important;
}
html.nr-test-active #app .note-lab > :not(.lab-workspace):not(.lab-toast),
html.nr-test-active #app :is(.g5-music-trainer,.exercise-settings-summary,.learning-app > header),
html.nr-test-active #app .reading407-controls > label,
html.nr-test-active #app .reading407 [data-start] { display: none !important; }
html.nr-test-active #app .lab-toast:not(.is-visible) { display: none; }
html.nr-test-active #app .lab-workspace {
  box-sizing: border-box;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: clamp(4px,1vw,16px) !important;
  border: 0;
  border-radius: 0;
  overflow: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: auto !important;
}
html.nr-test-active #app .exercise-shell { min-height: 0; grid-template-rows: auto auto; }
html.nr-test-active #app :is(.course-toolbar,.exercise-heading,.quiz-progress) { flex-wrap: wrap; }
html.nr-test-active #app :is(.question-panel,.answer-panel,.reading407,.exercise-content > *) { min-width: 0; }
html.nr-test-active #app :is(.learning-app,.feature-page) {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  padding: max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)) !important;
  overflow: auto !important;
}
html.nr-test-active #app .reading407 { width: 100%; }
html.nr-test-active #app .reading407-notes { grid-template-columns: repeat(auto-fit,minmax(min(100%,50px),1fr)); }
html.nr-test-active #app .quiz-progress button { min-height: 40px; }
@media (max-width: 680px) {
  html.nr-test-active #app .exercise-content { grid-template-columns: minmax(0,1fr) !important; }
  html.nr-test-active #app :is(.answer-grid,.fixed404-option-grid,.course-answers) {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  html.nr-test-active #app .reading407 { padding: 8px; }
  html.nr-test-active #app .reading407-controls { gap: 6px; }
  html.nr-test-active #app .quiz-progress { position: static; }
}
@media (max-height: 540px) {
  html.nr-test-active #app .reading407-stage { min-height: 95px; }
  html.nr-test-active #app .reading407-stage svg { max-height: 38dvh; }
  html.nr-test-active #app .reading407-count { padding: 4px; font-size: 3rem; }
  html.nr-test-active #app .reading407 header h2 { font-size: 1.1rem; margin: 2px 0; }
  html.nr-test-active #app .reading407-controls { margin: 4px 0; }
}
html.nr-test-active #app .exercise-heading > div > small { display: none; }

/* Keep the staff and its answer keys together on compact screens. */
@media (max-width: 680px), (max-height: 540px) {
  html.nr-test-active #app .reading407[data-nr-test] {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    grid-template-areas: "title" "status" "staff" "notes" "controls" "help";
    align-content: start;
    gap: 6px;
    box-sizing: border-box;
    padding: 6px;
  }
  html.nr-test-active #app .reading407 header { grid-area: title; }
  html.nr-test-active #app .reading407 header small { display: none; }
  html.nr-test-active #app .reading407 header h2 { margin: 0; font-size: clamp(1rem,3.8vw,1.3rem); }
  html.nr-test-active #app .reading407 [data-status] { grid-area: status; margin: 0; }
  html.nr-test-active #app .reading407 .reading407-stage { grid-area: staff; min-height: clamp(80px,18dvh,128px); }
  html.nr-test-active #app .reading407 :is(.reading407-notes,.reading407-recognition) { grid-area: notes; margin: 0; }
  html.nr-test-active #app .reading407 .reading407-help { grid-area: help; margin: 0; }
  html.nr-test-active #app .reading407 .reading407-controls {
    grid-area: controls;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-content: start;
    gap: 6px;
    margin: 0;
  }
  html.nr-test-active #app .reading407 .reading407-transport,
  html.nr-test-active #app .reading407 [data-back-quizzes] { grid-column: 1 / -1; }
  html.nr-test-active #app .reading407.reading407.reading407 .reading407-timer output { min-width: 0; }
}
@media (min-width: 620px) and (max-height: 540px) {
  html.nr-test-active #app .reading407[data-nr-test] {
    grid-template-columns: minmax(0,1fr) minmax(205px,29%);
    grid-template-areas: "title controls" "status controls" "staff controls" "notes controls" "help controls";
    column-gap: 12px;
  }
}
