/* ProfiProfit shared dashboard design system — teacher and student only.
   Classroom editor, modals, landing and lesson exercises are intentionally excluded. */
:root {
  --pp-ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pp-ui-radius-header: 26px;
  --pp-ui-radius-panel: 24px;
  --pp-ui-radius-card: 16px;
  --pp-ui-radius-control: 12px;
  --pp-ui-gap: 16px;
  --pp-ui-accent:#D99B26;
  --pp-ui-accent-hover:#C48918;
  --pp-ui-focus:#a98fc5;
  --pp-ui-input-border:#e1d9e9;
}
#teacher-app, #student-public-view.pp-student-one-page {
  font-family: var(--pp-ui-font);
}
:is(#teacher-app #teacher-header.app-header, #student-public-view .app-header.student-brand-header) {
  border-radius: var(--pp-ui-radius-header) !important;
  margin-bottom: var(--pp-ui-gap) !important;
}
:is(#teacher-app #teacher-header.app-header, #student-public-view .app-header.student-brand-header)
.app-header-brand .text-2xl {
  font-family: var(--pp-ui-font) !important;
}
/* Actual production DOM: .native-layout is a DIRECT child of #teacher-app.
   .native-workspace wraps the header only. */
#teacher-app > .native-layout {
  margin: 0 !important;
  padding: 0 12px !important;
  align-items: start !important;
  box-sizing: border-box !important;
}
#teacher-app > .native-layout > .native-sidebar {
  margin: 0 !important;
  border-radius: var(--pp-ui-radius-card) !important;
}
#teacher-app #tab-dashboard {
  border-radius: var(--pp-ui-radius-panel) !important;
}
#teacher-app #dashboard-cards > * {
  border-radius: var(--pp-ui-radius-card) !important;
}
#teacher-app #tab-dashboard :is(.native-calendar-controls button, .native-calendar-title button) {
  border-radius: var(--pp-ui-radius-control) !important;
}
@media (min-width: 701px) {
  #teacher-app > .native-layout {
    display: grid !important;
    grid-template-columns: 220px minmax(0, 1fr) !important;
    gap: var(--pp-section-gap, 14px) !important;
    width: 100% !important;
    max-width: none !important;
  }
  #teacher-app > .native-layout > #teacher-main {
    margin: 0 !important;
    min-width: 0 !important;
  }
}

/* Migrated canonical shared header, sidebar and dashboard component styles.
   Formerly scattered in classroom-redesign.css; now maintained here. */
/* Teacher navigation rail: use the same neutral surface as the student portal. */
html:not([data-theme="dark"]) #teacher-app .native-layout>.native-sidebar{
 background:#fff!important;border:1px solid #e1e4e8!important;
 box-shadow:none!important;color:#716680!important;
}
html:not([data-theme="dark"]) #teacher-app .native-layout>.native-sidebar .native-sidebar-toggle{
 background:#f0f1f4!important;color:#4e2a84!important;
}
/* AppHeader — one geometric contract for every role and viewport.
   Theme changes only tokens (colors), never spacing, typography or layout. */
#teacher-header.app-header,
#student-public-view .app-header.student-brand-header,
#student-live-material .app-header.pp-student-live-header{
 --app-header-surface:#fff;--app-header-border:#e0e3e9;
 --app-header-title:#1f242d;--app-header-subtitle:#6b7280;
 display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
 align-items:center!important;justify-content:space-between!important;
 gap:14px!important;box-sizing:border-box!important;width:100%!important;
 min-height:0!important;margin:0 0 14px!important;padding:12px 20px!important;
 border:1px solid var(--app-header-border)!important;border-radius:22px!important;
 background:var(--app-header-surface)!important;box-shadow:none!important;
}
#teacher-header.app-header>.app-header-brand,
#student-public-view .app-header>.app-header-brand,
#student-live-material .app-header>.app-header-brand{
 display:flex!important;align-items:center!important;flex:0 1 auto!important;
 min-width:0!important;gap:12px!important;margin:0!important;padding:0!important;
 background:transparent!important;border:0!important;box-shadow:none!important;
 text-align:left!important;
}
#teacher-header.app-header>.app-header-brand img,
#student-public-view .app-header>.app-header-brand img,
#student-live-material .app-header>.app-header-brand img{
 width:50px!important;height:50px!important;max-width:50px!important;
 flex:0 0 50px!important;object-fit:contain!important;
}
#teacher-header.app-header>.app-header-brand .text-2xl,
#student-public-view .app-header>.app-header-brand .text-2xl,
#student-live-material .app-header>.app-header-brand .text-2xl{
 font-size:21px!important;line-height:1.2!important;font-weight:750!important;
 letter-spacing:-.045em!important;color:var(--app-header-title)!important;
}
#teacher-header.app-header>.app-header-brand .text-sm,
#student-public-view .app-header>.app-header-brand .text-sm,
#student-live-material .app-header>.app-header-brand .text-sm{
 font-size:11px!important;line-height:1.35!important;
 color:var(--app-header-subtitle)!important;
}
#teacher-header.app-header>.app-header-actions,
#student-public-view .app-header>.app-header-actions,
#student-live-material .app-header>.app-header-actions{
 display:flex!important;align-items:center!important;justify-content:flex-end!important;
 flex:0 0 auto!important;min-width:0!important;gap:10px!important;
 margin-left:auto!important;flex-wrap:nowrap!important;
}
html[data-theme="dark"] #teacher-header.app-header,
html[data-theme="dark"] #student-public-view .app-header.student-brand-header,
html[data-theme="dark"] #student-live-material .app-header.pp-student-live-header{
 --app-header-surface:#30283b;--app-header-border:#51435f;
 --app-header-title:#f0eafa;--app-header-subtitle:#c6b9d3;
}
@media(max-width:760px){
 #teacher-header.app-header,
 #student-public-view .app-header.student-brand-header,
 #student-live-material .app-header.pp-student-live-header{
  flex-wrap:nowrap!important;padding:10px 12px!important;gap:8px!important;
 }
 #teacher-header.app-header>.app-header-brand,
 #student-public-view .app-header>.app-header-brand,
 #student-live-material .app-header>.app-header-brand{gap:8px!important}
 #teacher-header.app-header>.app-header-brand img,
 #student-public-view .app-header>.app-header-brand img,
 #student-live-material .app-header>.app-header-brand img{
  width:38px!important;height:38px!important;max-width:38px!important;flex-basis:38px!important;
 }
 #teacher-header.app-header>.app-header-brand .text-2xl,
 #student-public-view .app-header>.app-header-brand .text-2xl,
 #student-live-material .app-header>.app-header-brand .text-2xl{font-size:17px!important}
 #teacher-header.app-header>.app-header-brand .text-sm,
 #student-public-view .app-header>.app-header-brand .text-sm,
 #student-live-material .app-header>.app-header-brand .text-sm{display:none!important}
 #teacher-header.app-header>.app-header-actions,
 #student-public-view .app-header>.app-header-actions,
 #student-live-material .app-header>.app-header-actions{gap:6px!important}
 #student-public-view .app-header .pp-student-header-balance,
 #student-live-material .app-header .pp-student-header-balance{
  padding:6px 8px!important;gap:5px!important;
 }
 #student-public-view .app-header .pp-student-header-balance .text-xs,
 #student-live-material .app-header .pp-student-header-balance .text-xs{display:none!important}
 .app-header[data-app-header-role='student'] .app-header-greeting{
  font-size:13px!important;max-width:74px!important;overflow:hidden!important;
  text-overflow:ellipsis!important;
 }
 #student-live-material .app-header .pp-student-return{font-size:0!important;padding:8px!important;min-width:34px!important}
 #student-live-material .app-header .pp-student-return::before{content:'←';font-size:18px!important}
}
@media(max-width:420px){
 #student-public-view .app-header .pp-student-header-greeting,
 #student-live-material .app-header .pp-student-header-greeting{display:none!important}
}

/* Brand typography: original ProfiProfit system font, identical for teacher and student. */
#teacher-header.app-header .app-header-brand,
#student-public-view .app-header .app-header-brand,
#student-live-material .app-header .app-header-brand,
#teacher-header.app-header .app-header-brand .text-2xl,
#student-public-view .app-header .app-header-brand .text-2xl,
#student-live-material .app-header .app-header-brand .text-2xl{
 font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important;
}
#teacher-header.app-header .app-header-brand .text-2xl{
 background:transparent!important;text-shadow:none!important;
 color:var(--app-header-title)!important;
}
/* Shared header geometry is defined above for both roles. */
/* Shared student dashboard finance component (migrated without selector changes). */
/* Student finances: compact 3-column layout, with top-ups in the third column. */
#student-public-view .pp-finances-heading{margin-bottom:14px}
#student-public-view .pp-finances-grid{
 display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.15fr)!important;
 align-items:stretch;gap:14px;min-width:0;
}
#student-public-view .pp-finances-column{display:flex;flex-direction:column;gap:10px;min-width:0}
#student-public-view .pp-finances-stat.student-theme-panel{
 display:flex!important;align-items:center;justify-content:space-between;
 flex:1 1 0;gap:10px;min-width:0;padding:12px 14px!important;
 background:transparent!important;border:1px solid #e1e4e8!important;border-radius:12px!important;
}
#student-public-view .pp-finances-stat span{font-size:13px;line-height:1.35;color:#747186}
#student-public-view .pp-finances-stat b{font-size:15px;white-space:nowrap;text-align:right;color:#292336}
#student-public-view .pp-finances-topups{
 min-width:0;border:1px solid #e1e4e8;border-radius:12px;padding:12px 14px;
 background:transparent!important;
}
#student-public-view .pp-finances-topups h3{font-size:15px;margin:0 0 8px}
#student-public-view .pp-finances-payments{
 max-height:210px!important;overflow-y:auto!important;min-width:0;padding-right:3px!important;
}
#student-public-view .pp-finances-payments>div{
 display:flex!important;align-items:center!important;justify-content:space-between!important;
 gap:10px!important;padding:9px 0!important;margin:0!important;
 border-bottom:1px solid #e1e4e8!important;background:transparent!important;
}
#student-public-view .pp-finances-payments>div:last-child{border-bottom:0!important}
#student-public-view .pp-finances-payments>div>*{min-width:0}
@media(max-width:850px){
 #student-public-view .pp-finances-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #student-public-view .pp-finances-topups{grid-column:1/-1}
}
@media(max-width:520px){
 #student-public-view .pp-finances-grid{grid-template-columns:minmax(0,1fr)!important}
 #student-public-view .pp-finances-topups{grid-column:auto}
}

/* Shared dashboard controls: canonical styles, excluded from Classroom editor. */
#teacher-app button:where(:not(#classroom-materials-root *)) {
 transition:background .16s,box-shadow .16s,transform .16s;
}
#teacher-app button:where(:not(#classroom-materials-root *)):focus-visible {
 outline:3px solid var(--pp-ui-focus);outline-offset:2px;
}
#teacher-app :is(input:not([type=checkbox]),select,textarea):where(:not(#classroom-materials-root *)) {
 border-radius:var(--pp-ui-radius-control)!important;
 border-color:var(--pp-ui-input-border)!important;
}
html:not([data-theme="dark"]) #teacher-app :is(.primary-btn,button[data-variant="primary"]) {
 background:var(--pp-ui-accent)!important;
 color:#1F242D!important;
 border-color:var(--pp-ui-accent)!important;
}
html:not([data-theme="dark"]) #teacher-app :is(.primary-btn,button[data-variant="primary"]):hover {
 background:var(--pp-ui-accent-hover)!important;
}

/* Canonical dashboard summary cards: shared geometry and density. */
#teacher-app #dashboard-cards {gap:10px!important;margin-bottom:12px!important}
#teacher-app #dashboard-cards>* {
 border:1px solid var(--pp-light-border,#E0E3E9)!important;
 border-radius:var(--pp-ui-radius-card)!important;
 box-shadow:0 8px 28px rgba(74,50,108,.045)!important;
 min-height:92px!important;
 padding:14px 16px!important;
}
/* Teacher dashboard card primitives (migrated from legacy stylesheet).
   Keep legacy selectors and declarations until component markup is standardized. */
#teacher-app .app-card{border:1px solid var(--pp-light-border,#E0E3E9)!important;box-shadow:0 8px 30px rgba(69,44,104,.045)!important;background:#fff;border-radius:20px!important}
#teacher-app main>section>.app-card{padding:24px!important}


#tab-dashboard>.grid>.app-card{min-height:200px;padding:22px!important}
#tab-calendar>.app-card{padding:24px!important}
#tab-students .app-card,#tab-materials .app-card{padding:22px!important}

/* Shared light-theme semantic tokens, formerly declared in legacy CSS. */
html:not([data-theme="dark"]) :is(#teacher-app,#student-public-view){
  --bg-color:#F5F6F8;--card-bg:#FFFFFF;--text-color:#1F242D;
  --text-secondary:#6B7280;--primary-color:#4E2A84;
  --accent-soft:#F0F1F4;--border-color:#E1E4E8;
  --pp-light-surface:#FFFFFF;
  --pp-light-border:#E0E3E9;
}
/* The calendar container shares the dashboard panel radius. */
#teacher-app #dashboard-calendar{border-radius:var(--pp-ui-radius-panel)!important}

/* Teacher calendar component: consolidated from legacy CSS. */
/* Single hour-grid calendar, matching the supplied Classroom dashboard. */
#dashboard-calendar .native-calendar-scroll{height:clamp(280px,43vh,440px)!important;min-height:0!important;overflow:auto;position:relative;background:#faf8fd;border:1px solid #eee9f3;border-radius:4px}
#dashboard-calendar .native-week-calendar{display:grid;grid-template-columns:60px repeat(7,minmax(125px,1fr));min-width:920px;position:relative}
#dashboard-calendar .native-week-head-spacer{grid-column:1;height:66px;position:sticky;top:0;z-index:4;background:#fff}
#dashboard-calendar .native-day{min-width:0;border-left:1px solid #e7e2ec}
#dashboard-calendar .calendar-day-heading{height:66px;position:sticky;top:0;z-index:4;background:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;border-bottom:1px solid #e9e3ef}
#dashboard-calendar .calendar-day-heading.is-today .calendar-day-number{background:#d65d83;color:white;border-radius:50%;width:30px;height:30px;display:grid;place-items:center}
#dashboard-calendar .calendar-weekday{text-transform:uppercase;font-size:11px;color:#8d8494}
#dashboard-calendar .calendar-day-number{font-size:16px}
#dashboard-calendar .native-day-track{position:relative;background:repeating-linear-gradient(to bottom,transparent 0,transparent 71px,#e8e3ed 71px,#e8e3ed 72px)}
#dashboard-calendar .native-day:nth-child(even) .native-day-track{background-color:#f7f4fa}
#dashboard-calendar .native-time-axis{position:absolute;top:66px;left:0;width:60px;height:1152px;z-index:2;pointer-events:none}
#dashboard-calendar .native-time-axis span{position:absolute;right:8px;transform:translateY(-8px);font-size:11px;color:#99909f}
#dashboard-calendar .native-timed-event{position:absolute;left:3px;right:3px;width:calc(100% - 6px);z-index:1;display:flex;flex-direction:column;gap:2px;align-items:flex-start;overflow:hidden;padding:5px 7px!important;border-left:3px solid #5da477!important;background:#e9f0ee!important;border-radius:9px!important;text-align:left}
#dashboard-calendar .native-timed-event.is-cancelled{border-left-color:#ad9aaf!important;background:#f5f0f5!important}
#dashboard-calendar .native-timed-event .calendar-event-time{font-size:12px;font-weight:750}
#dashboard-calendar .native-timed-event .calendar-event-title{font-size:12px;font-weight:650}
#dashboard-calendar .native-timed-event .calendar-event-meta{font-size:11px}
#dashboard-calendar .native-timed-event .status{font-size:9px;padding:1px 5px}

/* Prevent the last weekday from wrapping into a second grid row. */
#dashboard-calendar .native-week-calendar{display:grid!important;grid-template-columns:60px repeat(7,minmax(0,1fr))!important;grid-template-rows:1fr!important;grid-auto-flow:column!important;min-width:980px!important;width:100%!important;align-items:stretch!important}
#dashboard-calendar .native-week-head-spacer{grid-column:1!important;grid-row:1!important}
#dashboard-calendar .native-week-calendar>.native-day{grid-row:1!important;min-width:0!important}
#dashboard-calendar .native-week-calendar>.native-day:nth-child(2){grid-column:2!important}
#dashboard-calendar .native-week-calendar>.native-day:nth-child(3){grid-column:3!important}
#dashboard-calendar .native-week-calendar>.native-day:nth-child(4){grid-column:4!important}
#dashboard-calendar .native-week-calendar>.native-day:nth-child(5){grid-column:5!important}
#dashboard-calendar .native-week-calendar>.native-day:nth-child(6){grid-column:6!important}
#dashboard-calendar .native-week-calendar>.native-day:nth-child(7){grid-column:7!important}
#dashboard-calendar .native-week-calendar>.native-day:nth-child(8){grid-column:8!important}

/* Compact two-line lesson events: time + student, price + status. */
#dashboard-calendar .native-timed-event{justify-content:flex-start;gap:5px!important;min-width:0}
#dashboard-calendar .native-timed-event .native-event-row{display:flex;align-items:center;justify-content:space-between;gap:5px;width:100%;min-width:0}
#dashboard-calendar .native-timed-event .native-event-row>*{min-width:0}
#dashboard-calendar .native-timed-event .calendar-event-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}
#dashboard-calendar .native-timed-event .calendar-event-meta{white-space:nowrap;font-weight:650}
#dashboard-calendar .native-timed-event .status{max-width:62%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}


/* Calendar panel must retain its own inner spacing; old padding:0 caused
   the heading to collide with the panel's rounded border. */
#teacher-app #dashboard-calendar > .app-card {
 padding:16px!important;
 border:1px solid var(--border-color,#E1E4E8)!important;
 border-radius:var(--pp-ui-radius-panel)!important;
 background:var(--card-bg,#fff)!important;
 box-sizing:border-box!important;
}
#teacher-app #dashboard-calendar > .app-card > .flex:first-child {
 margin-bottom:16px!important;
 gap:12px;
 flex-wrap:wrap;
}

/* Canonical teacher sidebar component — desktop and mobile. */
@media(min-width:701px){
 #teacher-app > .native-workspace{width:100%!important;max-width:none!important;padding:0 12px!important;margin:0!important;min-height:0!important;height:auto!important}

 #teacher-app > .native-layout > .native-sidebar{position:sticky!important;top:12px!important;align-self:start!important;display:flex!important;flex-direction:column!important;gap:3px!important;min-height:0!important;padding:10px 4px!important;margin:0!important;background:#fff!important;border:1px solid #E1E4E8!important;border-radius:12px!important;box-shadow:none!important;overflow:visible!important}
 #teacher-app .native-sidebar-label,#teacher-app .native-sidebar-footer{display:none!important}
 #teacher-app .native-sidebar button[data-native-tab]{display:flex!important;align-items:center!important;width:100%!important;flex:0 0 auto!important;height:48px!important;min-height:48px!important;padding:10px 12px!important;gap:12px!important;border-radius:12px!important;font:500 13px/1.35 Inter,ui-sans-serif,system-ui,sans-serif!important;white-space:nowrap!important;color:#6B7280!important}
 #teacher-app .native-sidebar button[data-native-tab].is-active{background:#EAE5F2!important;color:#4E2A84!important}
 #teacher-app .native-sidebar .native-nav-icon,#teacher-app .native-sidebar .native-nav-icon svg{width:21px!important;height:21px!important;flex:0 0 21px!important}
 #teacher-app .native-layout.sidebar-collapsed .native-sidebar button[data-native-tab]{justify-content:center!important;padding:10px 6px!important}
 #teacher-app .native-layout.sidebar-collapsed .native-nav-text{display:none!important}
 #teacher-app .native-sidebar .classroom-sidebar-toggle{border:0!important;background:transparent!important;box-shadow:none!important;color:#1F242D!important;border-radius:8px!important}
 #teacher-app .native-sidebar .classroom-sidebar-toggle svg{width:22px!important;height:22px!important}
 #teacher-app .native-layout.sidebar-collapsed .classroom-sidebar-toggle svg{transform:rotate(180deg)!important}
 #teacher-app > .native-layout > #teacher-main{margin:0!important;min-width:0!important;max-width:none!important}
}
html[data-theme=dark] #teacher-app > .native-layout > .native-sidebar{background:#30283b!important}


/* Teacher mobile navigation: one vertical icon rail, no horizontal scroll. */
@media(max-width:700px){
 #teacher-app .native-layout,
 #teacher-app .native-layout.sidebar-collapsed{grid-template-columns:60px minmax(0,1fr)!important}
 #teacher-app .native-sidebar{flex-direction:column!important;align-items:center!important;overflow-x:hidden!important;overflow-y:visible!important;width:60px!important;box-sizing:border-box!important;padding:8px 5px!important}
 #teacher-app .native-sidebar button[data-native-tab]{width:48px!important;min-width:0!important;flex:0 0 auto!important;justify-content:center!important;padding:10px!important;white-space:nowrap!important}
 #teacher-app .native-sidebar .native-nav-text{display:none!important}
 #teacher-app .native-sidebar .native-nav-icon{margin:0!important}
 #teacher-app .native-sidebar .classroom-sidebar-toggle{margin:0 auto 10px!important}
}

/* Final geometry contract: expanded and collapsed columns share one source. */
@media(min-width:701px){
 #teacher-app > .native-layout.sidebar-collapsed{grid-template-columns:70px minmax(0,1fr)!important}
 #teacher-app > .native-layout:not(.sidebar-collapsed) > .native-sidebar .native-nav-text{display:inline!important}
 #teacher-app > .native-layout:not(.sidebar-collapsed) > .native-sidebar button[data-native-tab]{justify-content:flex-start!important}
 #teacher-app > .native-layout.sidebar-collapsed > .native-sidebar .native-nav-text{display:none!important}
}

/* Shared dark-theme semantic palette for teacher and student dashboard surfaces.
   Keep these scoped to the two portal roots, not the Classroom editor. */
html[data-theme="dark"] :is(#teacher-app, #student-public-view.pp-student-one-page) {
 --pp-dark-surface:#211C2B;
 --pp-dark-surface-raised:#393245;
 --pp-dark-border:#51475f;
 --pp-dark-border-raised:#51475F;
 --pp-dark-text:#f4eefa;
}

/* Neutral portal outlines follow one token in both themes. Active/semantic
   states and the Classroom exercise editor are intentionally excluded. */
html:not([data-theme="dark"]) #teacher-app {
  --pp-shell-border:var(--pp-light-border,#e0e3e9);
}
html[data-theme="dark"] #teacher-app {
  --pp-shell-border:var(--pp-dark-border);
}
html[data-theme="dark"] #teacher-app :is(
  #dashboard-cards > *,
  #dashboard-calendar,
  .native-calendar,
  .native-calendar-scroll,
  .native-calendar-day,
  .native-calendar-time,
  .native-history-row,
  .native-student-stats > *,
  .native-section-card,
  .native-detail-panel
) {
  border-color:var(--pp-shell-border)!important;
}
html[data-theme="dark"] #teacher-app #tab-students :is(
  .native-student-row:not(.is-selected),
  .cw-student-row:not(.is-selected),
  .cw-student-list-item:not(.is-selected),
  .cw-directory-row:not(.is-selected)
) {
  border-color:var(--pp-shell-border)!important;
}
/* Dark theme: dashboard, calendar, student directory. Migrated unchanged. */
/* Dark mode contrast corrections for dashboard, calendar and student directory. */
html[data-theme="dark"] #teacher-app #dashboard-cards>*{background:var(--pp-dark-surface)!important;border-color:var(--pp-dark-border)!important;color:#f4eef9!important}
html[data-theme="dark"] #teacher-app #dashboard-cards>* :is(.text-slate-400,.text-slate-500,.text-slate-600){color:#c5b6d3!important}
html[data-theme="dark"] #teacher-app #dashboard-cards>* :is(strong,b,.text-slate-900,.text-slate-800){color:#f7f1fc!important}
html[data-theme="dark"] #teacher-app .native-calendar-header :is(.text-slate-400,.text-slate-500,.text-slate-600){color:#c8bad7!important}
html[data-theme="dark"] #teacher-app .native-calendar-day :is(.text-slate-400,.text-slate-500){color:#c5b6d3!important}
html[data-theme="dark"] #teacher-app .native-calendar :is(.native-calendar-day,.native-calendar-time){border-color:var(--pp-dark-border)!important}
html[data-theme="dark"] #teacher-app .native-calendar-header :is(button,.native-calendar-title){color:#f4eef9!important}
html[data-theme="dark"] #teacher-app #tab-students :is(.cw-student-title,.cw-profile-head,.cw-section-heading,.cw-directory-tabs,.cw-profile-tabs){color:#f4eef9!important}
html[data-theme="dark"] #teacher-app #tab-students :is(.cw-student-row,.cw-student-list-item,.cw-directory-row){color:#2b2138!important}
html[data-theme="dark"] #teacher-app #tab-students :is(.cw-student-row,.cw-student-list-item,.cw-directory-row) :is(strong,b){color:#2b2138!important}
html[data-theme="dark"] #teacher-app #tab-students :is(.cw-student-row,.cw-student-list-item,.cw-directory-row) :is(small,.text-slate-500){color:#685c76!important}
html[data-theme="dark"] #teacher-app #tab-students :is(.cw-profile-tabs button,.cw-directory-tabs button){color:#d8c9e6!important}
html[data-theme="dark"] #teacher-app #tab-students :is(.cw-profile-tabs button[aria-selected="true"],.cw-directory-tabs button[aria-selected="true"]){color:#d4a7ff!important}

/* Dark theme: student directory rows and tabs must retain legible contrast. */
html[data-theme="dark"] #teacher-app #tab-students :is(.cw-student-row,.cw-student-list-item,.cw-directory-row){background:var(--pp-dark-surface-raised)!important;color:var(--pp-dark-text)!important;border-color:var(--pp-dark-border-raised)!important}
html[data-theme="dark"] #teacher-app #tab-students :is(.cw-student-row,.cw-student-list-item,.cw-directory-row) :is(strong,b){color:#f8f2ff!important}
html[data-theme="dark"] #teacher-app #tab-students :is(.cw-student-row,.cw-student-list-item,.cw-directory-row) :is(small,.text-slate-500){color:#c6b8d5!important}
html[data-theme="dark"] #teacher-app #tab-students #students-list :is(button,.cursor-pointer){color:var(--pp-dark-text)!important}
html[data-theme="dark"] #teacher-app #tab-students #students-list :is(button,.cursor-pointer) :is(.font-semibold,.font-medium){color:#f8f2ff!important}
html[data-theme="dark"] #teacher-app #tab-students :is(.cw-profile-tabs button,.cw-directory-tabs button){color:#d8c9e6!important}
html[data-theme="dark"] #teacher-app #tab-students :is(.cw-profile-tabs button[aria-selected=true],.cw-directory-tabs button[aria-selected=true]){color:#e7c9ff!important}
/* Dark calendar: remove white dashboard wrapper and pale day headers. */
html[data-theme="dark"] #teacher-app #tab-dashboard{background:#17131f!important;color:var(--pp-dark-text)!important}
html[data-theme="dark"] #teacher-app #tab-dashboard>.app-card,
html[data-theme="dark"] #teacher-app #tab-dashboard .native-calendar{background:var(--pp-dark-surface)!important;border-color:var(--pp-dark-border)!important}
html[data-theme="dark"] #teacher-app .native-calendar-grid,
html[data-theme="dark"] #teacher-app .native-calendar-day,
html[data-theme="dark"] #teacher-app .native-calendar-time{background:var(--pp-dark-surface)!important;color:var(--pp-dark-text)!important;border-color:var(--pp-dark-border)!important}
html[data-theme="dark"] #teacher-app .native-calendar-header{background:var(--pp-dark-surface)!important;color:var(--pp-dark-text)!important}
html[data-theme="dark"] #teacher-app .native-calendar :is(.text-slate-300,.text-slate-400,.text-slate-500,.text-slate-600){color:#c6b8d5!important}
html[data-theme="dark"] #teacher-app .native-calendar .native-timed-event:not(.is-cancelled){background:#dce9e2!important;color:#241a31!important}


/* Dark-theme regression fix: student panels were forced white by role-only
   rules, while the inherited text remained light. Scope all overrides to dark. */
html[data-theme="dark"] #student-public-view.pp-student-one-page {
 padding-top:0!important;
 background:#1d1925!important;
 color:var(--pp-dark-text)!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page > .app-card,
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-public-content,
html[data-theme="dark"] #student-public-view.pp-student-one-page .pp-student-layout {
 background:transparent!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page .student-portal-panel,
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances {
 background:var(--pp-dark-surface)!important;
 border-color:var(--pp-dark-border)!important;
 color:var(--pp-dark-text)!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page .student-portal-panel :is(h1,h2,h3,h4),
html[data-theme="dark"] #student-public-view.pp-student-one-page .student-portal-panel :is(.text-slate-900,.text-slate-800,.text-slate-700) {
 color:var(--pp-dark-text)!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page .pp-student-lesson-row,
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances .student-theme-panel {
 background:var(--pp-dark-surface-raised)!important;
 border-color:var(--pp-dark-border-raised)!important;
 color:var(--pp-dark-text)!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page .pp-student-calendar-day,
html[data-theme="dark"] #student-public-view.pp-student-one-page .student-calendar-day {
 background:#211c29!important;
 border-color:var(--pp-dark-border)!important;
 color:var(--pp-dark-text)!important;
}
/* The teacher hour grid must use the same dark surfaces as its surrounding
   panel; the light calendar background was left visible after migration. */
html[data-theme="dark"] #teacher-app #dashboard-calendar :is(.native-calendar-scroll,.native-week-calendar,.native-day-track,.native-day,.native-time-axis,.native-week-head-spacer,.calendar-day-heading) {
 background-color:var(--pp-dark-surface)!important;
 border-color:var(--pp-dark-border)!important;
 color:var(--pp-dark-text)!important;
}
html[data-theme="dark"] #teacher-app #dashboard-calendar .native-day-track {
 background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 71px,#51445f 71px,#51445f 72px)!important;
}
html[data-theme="dark"] #teacher-app #dashboard-calendar .native-day:nth-child(even) .native-day-track {
 background-color:#352b40!important;
}
html[data-theme="dark"] #teacher-app #dashboard-calendar :is(.calendar-weekday,.calendar-day-number,.native-time-axis span) {
 color:#d8c9e6!important;
}

/* Dashboard density: reduce vertical footprint without changing lesson times. */


#teacher-app #dashboard-cards>* :is(.text-2xl,.text-3xl) {font-size:23px!important;line-height:1.2!important}
#teacher-app #dashboard-calendar .native-calendar-scroll :is(.native-calendar-event,.native-event) {font-size:12px}
@media(max-width:900px) {
 #teacher-app #dashboard-cards>* {min-height:88px!important;padding:12px!important}
 #teacher-app #dashboard-calendar .native-calendar-scroll {height:38vh!important;min-height:270px!important}
}
/* Finance text utilities: keep Tailwind overrides scoped to student finance. */
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances :is(.text-gray-900,.text-gray-800,.text-slate-900,.text-slate-800,.text-slate-700,.text-gray-700,.text-black) {
 color:var(--pp-dark-text)!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances :is(.text-gray-500,.text-gray-600,.text-slate-500,.text-slate-600) {
 color:#c8bcd5!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances #public-payments :is(li,div,span,p) {
 color:inherit;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances #public-payments :is(li,div) {
 border-color:var(--pp-dark-border-raised)!important;
}
/* Student lesson status pills must not clip at the bottom of calendar cards. */
#student-public-view.pp-student-one-page .pp-student-calendar-day,
#student-public-view.pp-student-one-page .student-calendar-day {
 min-height:116px!important;height:auto!important;overflow:visible!important;
}
#student-public-view.pp-student-one-page .pp-student-calendar-day :is(.lesson-status,.status-badge),
#student-public-view.pp-student-one-page .student-calendar-day :is(.lesson-status,.status-badge) {
 max-width:100%;white-space:normal;
}

/* Consistent teacher dashboard outer rhythm, including bottom edge.
   Keep the inner calendar scroll independent of its outer card. */
#teacher-app {
 --pp-page-edge:14px;
 --pp-section-gap:14px;
}
#teacher-app > .native-workspace {
 padding:var(--pp-page-edge) var(--pp-page-edge) 0!important;
 margin:0!important;
}
#teacher-app #teacher-header.app-header {
 margin:0 0 var(--pp-section-gap)!important;
}
#teacher-app > .native-layout {
 margin:0!important;
 padding:0 var(--pp-page-edge) var(--pp-page-edge)!important;
}
#teacher-app #teacher-main #tab-dashboard {
 padding-bottom:0!important;
 margin-bottom:0!important;
}
#teacher-app #dashboard-calendar {
 margin-bottom:0!important;
 padding-bottom:0!important;
}
#teacher-app #dashboard-calendar>.app-card {
 margin-bottom:0!important;
}
/* Payment rows may carry legacy light utility backgrounds.  Keep the
   row surface and date readable without overriding positive amount colors. */
html[data-theme="dark"] #student-public-view.pp-student-one-page #public-payments > :is(div,li) {
 background:var(--pp-dark-surface-raised)!important;
 border-color:var(--pp-dark-border-raised)!important;
 color:var(--pp-dark-text)!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page #public-payments > :is(div,li) :is(.text-gray-400,.text-gray-500,.text-slate-400,.text-slate-500) {
 color:#cbbfd8!important;
}
/* Canonical student finance dark-theme component rules (real DOM classes). */
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances .pp-finances-stat {
 background:var(--pp-dark-surface-raised)!important;
 border:1px solid var(--pp-dark-border-raised)!important;
 color:var(--pp-dark-text)!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances .pp-finances-stat > span {
 color:#cbbfd8!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances .pp-finances-stat > b,
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances .pp-finances-stat > b * {
 color:#f7f1fc!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances .pp-finances-topups {
 background:var(--pp-dark-surface)!important;
 color:var(--pp-dark-text)!important;
 border-color:var(--pp-dark-border-raised)!important;
}
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances .pp-finances-payments,
html[data-theme="dark"] #student-public-view.pp-student-one-page #student-portal-finances .pp-finances-payments > * {
 background:transparent!important;
 color:var(--pp-dark-text)!important;
 border-color:var(--pp-dark-border-raised)!important;
}

/* Shared outer spacing and branding, independent of role. */
#student-live-material{box-sizing:border-box!important;padding:14px!important}
#student-public-view{padding:14px!important}
:is(#teacher-header.app-header,#student-public-view .app-header.student-brand-header,#student-live-material .app-header.pp-student-live-header){border-radius:26px!important;min-height:74px!important;padding:12px 14px!important}
:is(#teacher-header.app-header,#student-public-view .app-header.student-brand-header,#student-live-material .app-header.pp-student-live-header) .app-header-brand .text-sm{display:block!important}
@media(max-width:768px){:is(#teacher-header.app-header,#student-public-view .app-header.student-brand-header,#student-live-material .app-header.pp-student-live-header){min-height:0!important;padding:10px 12px!important}:is(#teacher-header.app-header,#student-public-view .app-header.student-brand-header,#student-live-material .app-header.pp-student-live-header) .app-header-brand .text-sm{display:none!important}}

/* Canonical header: override legacy utility styles with identical role metrics. */
:is(#teacher-app #teacher-header,#student-public-view .student-brand-header,#student-live-material .pp-student-live-header).app-header{padding:12px 14px!important;margin:0 0 14px!important;min-height:76px!important;border-radius:26px!important;background:var(--app-header-surface)!important;gap:12px!important}
:is(#teacher-app #teacher-header,#student-public-view .student-brand-header,#student-live-material .pp-student-live-header).app-header > .app-header-brand img{width:50px!important;height:50px!important;flex:0 0 50px!important;max-width:50px!important}
:is(#teacher-app #teacher-header,#student-public-view .student-brand-header,#student-live-material .pp-student-live-header).app-header > .app-header-brand .text-2xl{font:750 24px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important;letter-spacing:-.045em!important;color:var(--app-header-title)!important;-webkit-text-fill-color:currentColor!important;background:none!important;text-shadow:none!important}
:is(#teacher-app #teacher-header,#student-public-view .student-brand-header,#student-live-material .pp-student-live-header).app-header > .app-header-brand .text-sm{font:400 11px/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important;color:var(--app-header-subtitle)!important}
#student-live-material#student-live-material,#student-public-view#student-public-view{padding:14px!important;box-sizing:border-box!important}
@media(min-width:769px){#teacher-app #pp-mobile-menu,#teacher-app .native-sidebar .pp-mobile-profile-entry{display:none!important}}
@media(max-width:768px){:is(#teacher-app #teacher-header,#student-public-view .student-brand-header,#student-live-material .pp-student-live-header).app-header{padding:10px 12px!important;min-height:0!important}:is(#teacher-app #teacher-header,#student-public-view .student-brand-header,#student-live-material .pp-student-live-header).app-header > .app-header-brand img{width:38px!important;height:38px!important;max-width:38px!important;flex-basis:38px!important}:is(#teacher-app #teacher-header,#student-public-view .student-brand-header,#student-live-material .pp-student-live-header).app-header > .app-header-brand .text-2xl{font-size:21px!important}}

/* Shared portal surface tokens. Keep dialogs and exercise feedback opaque. */
:root {
 --pp-shell-border:#DADCE3;
 --pp-shell-border-width:1px;
 --pp-glass-surface:rgba(244,245,247,.65);
 --pp-glass-raised:rgba(255,255,255,.75);
 --pp-glass-blur:blur(1px);
}
html[data-theme="dark"] {
 --pp-shell-border:#51475f;
 --pp-glass-surface:rgba(33,28,43,.90);
 --pp-glass-raised:#393245;
}
html:not([data-theme="dark"]) #teacher-app,
html[data-theme="dark"] #teacher-app {--pp-shell-border:inherit;}
:is(#teacher-app #teacher-header,#student-public-view .student-brand-header,#student-live-material .pp-student-live-header).app-header {
 --app-header-border:var(--pp-shell-border);
 border:var(--pp-shell-border-width) solid var(--pp-shell-border)!important;
}
#teacher-app > .native-layout > .native-sidebar,
#student-public-view.pp-student-one-page .student-portal-panel {
 border:var(--pp-shell-border-width) solid var(--pp-shell-border)!important;
}
html[data-pp-teacher-wallpaper] #teacher-app > .native-layout > .native-sidebar,
html[data-pp-student-background] #student-public-view .student-brand-header.student-brand-header[data-app-header-role="student"],
html[data-pp-student-background] #student-public-view.pp-student-one-page .student-portal-panel,
html[data-pp-student-background] #student-public-view.pp-student-one-page #student-portal-finances.student-portal-panel {
 --app-header-surface:var(--pp-glass-surface);
 background:var(--pp-glass-surface)!important;
 backdrop-filter:var(--pp-glass-blur)!important;
 -webkit-backdrop-filter:var(--pp-glass-blur)!important;
 border-color:var(--pp-shell-border)!important;
}
html #teacher-app > .native-layout > #teacher-main {
 border:0!important;box-shadow:none!important;
}

/* Wallpaper covers the viewport; only actual cards receive glass. */
html[data-pp-teacher-wallpaper] #teacher-app:not(.hidden) {
 min-height:100vh!important;
 min-height:100dvh!important;
}
html[data-pp-teacher-wallpaper] #teacher-app > .native-layout > #teacher-main,
html[data-pp-teacher-wallpaper] #teacher-app #tab-dashboard {
 background:transparent!important;
}
/* Teacher workspace surfaces are defined once with the Materials library below. */

/* Canonical surface tokens shared by portal and classroom. */
:root{--pp-surface:#F4F5F7;--pp-raised:#FFFFFF;--pp-panel-radius:12px;--pp-control-radius:8px;--app-header-surface:var(--pp-surface);--pp-glass-raised:var(--pp-raised)}
html[data-theme="dark"]{--pp-surface:var(--pp-dark-surface);--pp-raised:var(--pp-dark-surface-raised);--app-header-surface:var(--pp-surface)}

/* Calendar live picker must remain opaque over dashboard cards. */
html #calendar-live-picker > .app-card{background:var(--pp-raised,#fff)!important;opacity:1!important;backdrop-filter:none!important;}

/* Canonical portal frame and controls: semantic state borders remain independent. */
html[data-theme] #teacher-app #tab-dashboard{
 border:0!important;box-shadow:none!important;
 border-radius:var(--pp-panel-radius,12px)!important;
}
html[data-theme] #teacher-app :is(.native-students-panel,.native-student-detail,#dashboard-calendar,.native-history-row,.native-student-row,.group-card){
 border-radius:var(--pp-panel-radius,12px)!important;
}
html[data-theme] #teacher-app :is(.native-students-panel,.native-student-detail,#dashboard-calendar,.native-history-row,.native-student-row:not(.is-selected),.group-card:not(.is-selected)){
 border-color:var(--pp-shell-border)!important;
}
/* One opaque authentication surface, using shared palette instead of nested cards. */
html[data-theme] #landing-page dialog#lp-auth-dialog[open]{
 width:min(440px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;
 padding:24px!important;border:1px solid var(--pp-shell-border)!important;
 background:var(--pp-modal-surface)!important;color:var(--lp-ink,var(--text-color))!important;
 box-shadow:0 20px 60px #0004!important;backdrop-filter:none!important;
 border-radius:var(--pp-panel-radius,12px)!important;
}
html[data-theme] #landing-page #lp-auth-dialog::backdrop{background:#12102299;backdrop-filter:blur(4px)}
html[data-theme] #landing-page #lp-auth-dialog #auth{
 margin:0!important;padding:0!important;min-width:0!important;width:100%!important;
 max-width:none!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
}
html[data-theme] #landing-page #lp-auth-dialog .lp-auth-close{
 position:absolute!important;top:10px!important;right:10px!important;
 width:32px!important;height:32px!important;min-height:0!important;min-width:0!important;
 display:grid!important;place-items:center;padding:0!important;margin:0!important;
 border:0!important;border-radius:var(--pp-control-radius,8px)!important;
 background:transparent!important;color:inherit!important;font-size:22px!important;line-height:1!important;
}
html[data-theme] #landing-page #lp-auth-dialog #lp-auth-title{
 font-size:23px!important;line-height:1.25!important;font-weight:700!important;
 margin:0 30px 18px 0!important;letter-spacing:-.02em;color:inherit!important;
}
html[data-theme] #landing-page #lp-auth-dialog :is(#auth-login-form,#auth-register-form):not(.hidden){display:grid;gap:12px}
html[data-theme] #landing-page #lp-auth-dialog :is(#auth-login-form,#auth-register-form)>*{margin:0!important}
html[data-theme] #landing-page #lp-auth-dialog :is(#teacher-email-input,#teacher-password-input,.pp-auth-google,.primary-btn){
 box-sizing:border-box!important;width:100%!important;min-height:42px!important;
 border-radius:var(--pp-control-radius,8px)!important;border:1px solid var(--pp-shell-border)!important;
}
html[data-theme] #landing-page #lp-auth-dialog :is(#teacher-email-input,#teacher-password-input,.pp-auth-google){
 background:var(--pp-modal-input)!important;color:inherit!important;
}
html[data-theme] #landing-page #lp-auth-dialog #teacher-password-input{padding-inline-end:42px!important}
html[data-theme] #landing-page #lp-auth-dialog .primary-btn{background:var(--primary-color,#4E2A84)!important;color:white!important}
html[data-theme] #landing-page #lp-auth-dialog :is(#teacher-login-error,#teacher-register-error):empty{display:none!important}
html[data-theme] #landing-page #lp-auth-dialog :is(#turnstile-login-container,#turnstile-register-container){min-width:0;max-width:100%;display:flex;justify-content:center}
@media(max-width:380px){html[data-theme] #landing-page dialog#lp-auth-dialog[open]{padding:16px!important}}
/* Teacher lesson notes: let shared preview layout own sticky positioning and height.
   Do not stretch notes with the exercise or override their inner scroll. */
@media(min-width:701px){
 @container builder (min-width:621px){
  #teacher-app #classroom-materials-root .mb-builder.mb-student-preview .mb-preview-workspace>.mb-preview-notes:not(.expanded){
   border-radius:var(--pp-panel-radius,12px)!important;border-color:var(--pp-shell-border)!important;
  }
 }
}
/* Dialogs use solid surfaces, not the wallpaper glass used by workspace cards. */
:root{--pp-modal-surface:#F4F5F7;--pp-modal-input:#FFFFFF}
html[data-theme="dark"]{--pp-modal-surface:#292435;--pp-modal-input:#393245}
html[data-theme] :is(#teacher-app,#student-public-view,#student-live-material) .modal-bg>.app-card,
html[data-theme] :is(#lesson-modal,#calendar-live-picker,#student-payment-modal,#student-modal,#group-choice-modal,#add-modal,#help-modal)>.app-card,
html[data-theme] :is(#teacher-app,#student-public-view,#student-live-material) [role="dialog"].app-card,
html[data-theme] body dialog[open]{
 background:var(--pp-modal-surface)!important;background-image:none!important;
 opacity:1!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
 color:var(--text-color)!important;border-color:var(--pp-shell-border)!important;
}
html[data-theme][data-pp-teacher-wallpaper] #teacher-app .modal-bg>.app-card,
html[data-theme][data-pp-student-background] #student-public-view .modal-bg>.app-card{
 background:var(--pp-modal-surface)!important;background-color:var(--pp-modal-surface)!important;
}
/* Teacher hint starts inside the zone but its text is not constrained by zone width. */
html[data-theme] .mb-builder .mb-image-label-teacher-zone{overflow:visible!important}
html[data-theme] .mb-builder .mb-image-label-answer{
 left:0;top:0;transform:none;width:max-content;max-width:none;
 white-space:nowrap;overflow-wrap:normal;word-break:normal;
}
/* One scroll viewport for the complete student homework page, not the exercise. */
html[data-theme] #student-live-material#student-live-material[data-mode="homework"]{
 overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;
}
html[data-theme] #student-live-material[data-mode="homework"] .pp-student-live-main{
 flex:1 0 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important;
}
html[data-theme] #student-live-material[data-mode="homework"] .pp-homework-content{
 flex:1 0 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important;
}
html[data-theme] #student-live-material[data-mode="homework"] .pp-homework-content :is(.mb-builder,.mb-preview-workspace,.mb-student-card,.mb-student-body,.mb-student-content,.profiprofit-student-lesson){
 height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;
}
html[data-theme] #student-live-material[data-mode="homework"] .mb-student-card>.mb-preview-footer:first-child{
 position:static!important;top:auto!important;background:var(--pp-modal-surface)!important;
}
html[data-theme] #student-live-material[data-mode="homework"] .pp-homework-toolbar{
 position:sticky;bottom:0;z-index:20;background:var(--pp-modal-surface)!important;backdrop-filter:none!important;
}
html[data-theme] #student-live-material[data-mode="homework"] .pp-homework-feedback{
 max-height:none!important;overflow:visible!important;
}

/* Remove remaining form-shell decoration; only the dialog and its controls have borders. */
html[data-theme] #landing-page #lp-auth-dialog :is(#auth-login-form,#auth-register-form,.password-field){
 background:transparent!important;border:0!important;box-shadow:none!important;
 border-radius:0!important;padding:0!important;min-width:0!important;
}
:root{--pp-auth-field-border:#A5A0B1}
html[data-theme="dark"]{--pp-auth-field-border:#82768F}
html[data-theme] #landing-page #lp-auth-dialog :is(#teacher-email-input,#teacher-password-input,.pp-auth-google){
 border:1px solid var(--pp-auth-field-border)!important;
}
html[data-theme] #landing-page #lp-auth-dialog :is(#teacher-email-input,#teacher-password-input):focus{
 border-color:#A58ACB!important;outline:2px solid #A58ACB55!important;outline-offset:1px;
}
/* Short assignments fill the available viewport; long assignments grow naturally. */
html[data-theme] #student-live-material#student-live-material[data-mode="homework"]{
 min-height:100dvh!important;box-sizing:border-box;
}
html[data-theme] #student-live-material[data-mode="homework"] .pp-homework-content{
 display:flex!important;flex-direction:column;flex:1 0 auto!important;
}
html[data-theme] #student-live-material[data-mode="homework"] .pp-homework-content .mb-builder.mb-student-preview{
 flex:1 0 auto!important;display:flex!important;flex-direction:column;
}
html[data-theme] #student-live-material[data-mode="homework"] .pp-homework-content .mb-preview-workspace{
 flex:1 0 auto!important;align-items:stretch!important;
}
html[data-theme] #student-live-material[data-mode="homework"] .pp-homework-content .mb-student-card{
 flex:1 0 auto!important;align-self:stretch!important;min-width:0!important;
}

/* Keep only the outer calendar panel frame, not nested card/scroll frames. */
html[data-theme] #teacher-app #dashboard-calendar>.app-card{border:0!important;box-shadow:none!important;background:transparent!important;}
html[data-theme] #teacher-app #dashboard-calendar .native-calendar-scroll{border:0!important;box-shadow:none!important;}

/* Student day cards: paint a continuous rounded outline inside the scroll area.
   The outline is independent of frosted wallpaper backgrounds and child surfaces. */
html[data-theme] #student-public-view #public-week-calendar{padding:2px!important;box-sizing:border-box;scroll-padding-inline:2px;}
html[data-theme] #student-public-view #public-week-calendar>.calendar-day-column{position:relative;isolation:isolate;box-sizing:border-box;border:1px solid transparent!important;border-radius:var(--pp-panel-radius,12px)!important;background-clip:padding-box!important;}
html[data-theme] #student-public-view #public-week-calendar>.calendar-day-column::after{content:"";position:absolute;inset:-1px;border:1px solid var(--pp-shell-border,var(--border-color,#dfe3e8));border-radius:inherit;pointer-events:none;z-index:2;}
html[data-theme] #student-public-view #public-week-calendar>.calendar-day-column.is-today::after{border-color:var(--primary-color,#4E2A84);}
html[data-theme="dark"] #student-public-view #public-week-calendar>.calendar-day-column.is-today::after{border-color:#B59ADD;}

/* Sticky notes must share the document scroll, not a clipped intermediate shell. */
@media(min-width:701px){
 #teacher-app:has(.mb-student-preview) :is(.native-layout,.native-workspace,#teacher-main,#tab-materials,#tab-materials>.app-card,#classroom-materials-root,.ml-builder-host,.mb-builder.mb-student-preview,.mb-preview-workspace){overflow:visible!important;}
}

/* Native application modals must cover the raised shared header and profile menu. */
#teacher-app .modal-bg:not(.hidden),body>.modal-bg:not(.hidden){z-index:1100!important;}
#teacher-app #calendar-live-picker:not(.hidden),body>#calendar-live-picker:not(.hidden){z-index:1110!important;}
#lesson-modal:not(.hidden){padding:16px!important;align-items:center!important;}
#lesson-modal>.app-card{max-height:calc(100dvh - 32px)!important;overflow-y:auto!important;overscroll-behavior:contain;}

/* Settings form boundaries must remain visible against the dark cards. */
html[data-theme="dark"] #teacher-app #tab-settings :is(input:not([type=checkbox]),select){
 background:#393245!important;color:#F0EDF5!important;border:1px solid #82738F!important;
 box-shadow:none!important;color-scheme:dark;
}
html[data-theme="dark"] #teacher-app #tab-settings input::placeholder{color:#C6BCD0!important;opacity:1;}
html[data-theme="dark"] #teacher-app #tab-settings :is(input,select,button,a):focus-visible{
 outline:2px solid #C2A5EC!important;outline-offset:2px;
}
html[data-theme="dark"] #teacher-app #tab-settings :is(button:not(.primary-btn),a[href]){
 background:#393245!important;color:#E5D4FF!important;border:1px solid #82738F!important;
}
html[data-theme="dark"] #teacher-app #tab-settings :is(button:not(.primary-btn),a[href]):hover{
 background:#51475F!important;color:#fff!important;
}

/* The teacher brand header and breadcrumbs share the same readable surface.
   Override the older, more transparent app-header glass token. */
html[data-theme] #teacher-app #teacher-header.app-header{
 background:var(--pp-classroom-surface,var(--pp-surface))!important;
 background-image:none!important;
 backdrop-filter:var(--pp-classroom-blur)!important;-webkit-backdrop-filter:var(--pp-classroom-blur)!important;
}

/* Materials geometry: the outer grid owns the only horizontal page inset.
   Authoring keeps its navigation rail; Preview uses the full grid width. */
@media(min-width:769px){
 #teacher-app:has(#classroom-materials-root :is(.mb-authoring,.mb-student-preview))>.native-workspace,
 #teacher-app:has(#classroom-materials-root :is(.mb-authoring,.mb-student-preview))>.native-layout{
  padding-inline:12px!important;box-sizing:border-box!important;width:100%!important;max-width:none!important;
 }

}
#teacher-app #teacher-main:has(#classroom-materials-root .mb-authoring),
#teacher-app #tab-materials:has(.mb-authoring),
#teacher-app #tab-materials:has(.mb-authoring)>.app-card,
#teacher-app #classroom-materials-root:has(.mb-authoring),
#teacher-app #classroom-materials-root .ml-builder-host:has(.mb-authoring),
html[data-theme] #teacher-app #classroom-materials-root .ml-builder-host>.mb-builder.mb-authoring{
 padding-inline:0!important;margin-inline:0!important;width:100%!important;max-width:none!important;
 min-width:0!important;box-sizing:border-box!important;
}
html[data-theme] #teacher-app #classroom-materials-root .ml-builder-host>.mb-builder.mb-authoring{
 padding-top:0!important;border:0!important;
}
#teacher-app #classroom-materials-root .mb-authoring>.mb-builder-toolbar,
#teacher-app #classroom-materials-root .mb-authoring>.mb-breadcrumb,
#teacher-app #classroom-materials-root .mb-authoring>.mb-layout{
 width:100%!important;max-width:none!important;margin-inline:0!important;box-sizing:border-box!important;
}
#teacher-app #classroom-materials-root .mb-authoring>.mb-layout{gap:var(--pp-classroom-gap,12px)!important;}
#teacher-app #classroom-materials-root .mb-authoring .mb-builder-actions>.mb-builder-material-meta{
 flex:0 1 auto;min-width:0;margin:0!important;padding:0 4px!important;
 color:var(--muted);font-size:12px;line-height:1.35;
}
#teacher-app #classroom-materials-root .mb-authoring .mb-builder-actions>.mb-builder-material-meta small{
 white-space:normal;overflow-wrap:anywhere;
}

/* Match the Builder navigation surfaces to the toolbar, while keeping
   the actual exercise editor opaque and its inputs legible. */
#teacher-app #classroom-materials-root .mb-authoring .mb-layout>.mb-structure{
 background:var(--pp-classroom-surface,var(--pp-surface))!important;
 backdrop-filter:var(--pp-classroom-blur,none)!important;-webkit-backdrop-filter:var(--pp-classroom-blur,none)!important;
 background-image:none!important;opacity:1!important;
}

/* Builder is an edge-to-edge workspace. Reuse the native navigation as
   an on-demand, readable overlay instead of reserving a permanent rail. */
html[data-theme] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu]))>.native-layout,
html[data-theme] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu]))>.native-layout.sidebar-collapsed{
 grid-template-columns:minmax(0,1fr)!important;grid-template-areas:none!important;gap:0!important;
}
html[data-theme] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu]))>.native-layout>#teacher-main{
 grid-column:1/-1!important;grid-row:1!important;grid-area:auto!important;min-width:0!important;width:100%!important;
}
html[data-theme] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu]))>.native-layout>.native-sidebar{display:none!important;}
html[data-theme] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu]))>.native-layout.pp-mobile-open>.native-sidebar{
 display:flex!important;position:fixed!important;inset:auto!important;
 top:var(--pp-builder-nav-top,60px)!important;left:var(--pp-builder-nav-left,12px)!important;right:auto!important;bottom:auto!important;
 width:min(240px,calc(100vw - 24px))!important;max-height:var(--pp-builder-nav-height,calc(100dvh - 72px))!important;
 overflow:auto!important;z-index:1000!important;box-sizing:border-box!important;
 align-items:stretch!important;gap:4px!important;padding:8px!important;margin:0!important;
 border:1px solid var(--pp-shell-border)!important;border-radius:var(--pp-panel-radius,12px)!important;
 background:var(--pp-surface,#f4f5f7)!important;opacity:1!important;
 box-shadow:0 10px 32px #0003!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
html[data-theme] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu]))>.native-layout.pp-mobile-open>.native-sidebar :is(.native-sidebar-toggle,.pp-mobile-profile-entry){display:none!important;}
html[data-theme] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu]))>.native-layout.pp-mobile-open>.native-sidebar button[data-native-tab]{
 width:100%!important;min-width:0!important;justify-content:flex-start!important;gap:12px!important;padding:10px 12px!important;
}
html[data-theme] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu]))>.native-layout.pp-mobile-open>.native-sidebar .native-nav-text{
 display:inline!important;visibility:visible!important;opacity:1!important;
}
html[data-theme] #teacher-app :is(.mb-authoring>.mb-builder-toolbar,.mb-student-preview .mb-preview-tools-row)>.mb-builder-nav-toggle{
 order:-2;flex:0 0 40px;display:inline-flex!important;align-items:center;justify-content:center;
 box-sizing:border-box!important;width:40px!important;height:40px!important;min-height:40px!important;padding:8px!important;
 color:var(--ink,#1f242d)!important;background:var(--pp-raised,#fff)!important;
 border:1px solid var(--pp-shell-border)!important;border-radius:12px!important;box-shadow:none!important;
}
html[data-theme="dark"] #teacher-app :is(.mb-authoring>.mb-builder-toolbar,.mb-student-preview .mb-preview-tools-row)>.mb-builder-nav-toggle{color:#f0edf5!important;background:#302a3b!important;box-shadow:none!important;}
html[data-theme] #teacher-app :is(.mb-authoring>.mb-builder-toolbar,.mb-student-preview .mb-preview-tools-row)>.mb-builder-nav-toggle:focus-visible{outline:2px solid #9262ce;outline-offset:2px;}

html[data-theme="dark"] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu]))>.native-layout.pp-mobile-open>.native-sidebar{background:#30283b!important;color:#f0edf5!important;}

/* One stable menu anchor in Builder, independent of global header visibility.
   The mobile shell must not show a second hamburger in its brand header. */
html[data-theme] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu])) #teacher-header #pp-mobile-menu{display:none!important;}
html[data-theme] #teacher-app #classroom-materials-root .mb-authoring>.mb-builder-toolbar:has(>.mb-builder-nav-toggle){
 flex-wrap:nowrap!important;align-items:center!important;
}
html[data-theme] #teacher-app #classroom-materials-root .mb-authoring>.mb-builder-toolbar:has(>.mb-builder-nav-toggle)>.mb-builder-actions{
 flex:1 1 0%!important;width:auto!important;min-width:0!important;
}

html[data-theme] #teacher-app .mb-authoring .mb-builder-toolbar .mb-builder-actions>:is(.mb-builder-settings-toggle,.mb-structure-toggle){
 flex:0 0 40px!important;width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:8px!important;
 display:inline-flex!important;align-items:center;justify-content:center;
}
html[data-theme] #teacher-app .mb-authoring .mb-builder-toolbar .mb-builder-actions>.mb-structure-toggle[aria-expanded=true]{
 background:var(--pp-raised,#fff)!important;color:var(--ink,#1f242d)!important;
}
html[data-theme="dark"] #teacher-app .mb-authoring .mb-builder-toolbar .mb-builder-actions>.mb-structure-toggle[aria-expanded=true]{background:#302a3b!important;color:#f0edf5!important;}

/* Native checkbox, not the full-width text-input geometry used in Settings. */
html[data-theme] #teacher-app #tab-settings .pp-timer-autostart-label{display:flex!important;align-items:center;gap:10px;font-weight:600;cursor:pointer;}
html[data-theme] #teacher-app #tab-settings .pp-timer-autostart-label input[type="checkbox"]{appearance:auto!important;width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;flex:0 0 18px!important;padding:0!important;margin:0!important;accent-color:#7953a6;cursor:pointer;}

html[data-theme] #teacher-app .mb-student-preview .mb-preview-tools-row>.mb-builder-nav-toggle{order:-110!important;flex:0 0 40px!important;}
html[data-theme] #teacher-app .mb-student-preview .mb-preview-tools-row>.mb-focus-brand{width:40px!important;height:40px!important;flex:0 0 40px!important;object-fit:contain;}

/* Shared lesson and student dashboard chrome. The dashboard retains its subtitle and account actions. */
:root{--pp-lesson-toolbar-height:70px;--pp-lesson-logo-size:40px;--pp-lesson-toolbar-inset:12px 16px}
html[data-theme] #teacher-app #classroom-materials-root :is(.mb-authoring>.mb-builder-toolbar,.mb-builder.mb-student-preview[data-sticky-lesson-tools="true"]>.mb-preview-top),
html[data-theme] #student-public-view:is(#student-public-view) .app-header.student-brand-header,
html[data-theme] #student-live-material:is(#student-live-material[data-compact-student-live])>.app-header.pp-student-live-header{
 min-height:var(--pp-lesson-toolbar-height)!important;padding:var(--pp-lesson-toolbar-inset)!important;
 border:0!important;border-radius:var(--pp-panel-radius,12px)!important;box-sizing:border-box!important;
}
html[data-theme] #student-live-material:is(#student-live-material[data-compact-student-live])>.app-header.pp-student-live-header{
 gap:10px!important;margin:0!important;justify-content:flex-start!important;flex-wrap:wrap!important;
 background:var(--pp-classroom-surface,var(--pp-surface))!important;
 backdrop-filter:var(--pp-classroom-blur,none)!important;-webkit-backdrop-filter:var(--pp-classroom-blur,none)!important;
}
html[data-theme] #student-live-material:is(#student-live-material[data-compact-student-live])>.app-header.pp-student-live-header>.app-header-brand{
 gap:10px!important;min-height:var(--pp-lesson-logo-size)!important;height:auto!important;flex:0 0 auto!important;
}
html[data-theme] #student-public-view:is(#student-public-view) .app-header.student-brand-header>.app-header-brand img,
html[data-theme] #student-live-material:is(#student-live-material[data-compact-student-live])>.app-header.pp-student-live-header>.app-header-brand img,
html[data-theme] #teacher-app .mb-student-preview .mb-preview-tools-row>.mb-focus-brand,
html[data-theme] #teacher-app .mb-authoring>.mb-builder-toolbar>.mb-builder-focus-brand{
 width:var(--pp-lesson-logo-size)!important;height:var(--pp-lesson-logo-size)!important;
 max-width:var(--pp-lesson-logo-size)!important;flex:0 0 var(--pp-lesson-logo-size)!important;object-fit:contain!important;
}
html[data-theme] #student-live-material:is(#student-live-material[data-compact-student-live])>.app-header.pp-student-live-header>.app-header-brand .text-sm{display:none!important;}
html[data-theme] #student-live-material:is(#student-live-material[data-compact-student-live]) .pp-student-live-notes{border-radius:var(--pp-panel-radius,12px)!important;}
html[data-theme] #student-live-material:is(#student-live-material[data-compact-student-live]) .pp-student-live-notes>.pp-student-notes-content{border-radius:var(--pp-control-radius,8px)!important;}
@media(max-width:780px){
 html[data-theme] #student-live-material:is(#student-live-material[data-compact-student-live])>.app-header.pp-student-live-header{padding:10px 12px!important;min-height:0!important;gap:8px!important;}
}

/* Same geometric tokens as the live header; dashboard controls stay intact. */
html[data-theme] #student-public-view:is(#student-public-view) .app-header.student-brand-header{
 gap:10px!important;flex-wrap:wrap!important;
 background:var(--pp-classroom-surface,var(--pp-surface))!important;
 backdrop-filter:var(--pp-classroom-blur,none)!important;-webkit-backdrop-filter:var(--pp-classroom-blur,none)!important;
}
html[data-theme] #student-public-view:is(#student-public-view) .app-header.student-brand-header>.app-header-brand{gap:10px!important;min-height:var(--pp-lesson-logo-size)!important;}
html[data-theme] #student-public-view:is(#student-public-view) .app-header.student-brand-header .pp-student-settings-trigger{
 width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;border-radius:var(--pp-control-radius,8px)!important;
}
@media(max-width:780px){
 html[data-theme] #student-public-view:is(#student-public-view) .app-header.student-brand-header{padding:10px 12px!important;min-height:0!important;gap:8px!important;}
}

/* Homework reuses the compact student lesson shell. Only the content scrolls. */
html[data-theme] #student-live-material#student-live-material[data-compact-student-live][data-mode="homework"]{
 overflow:hidden!important;align-items:stretch!important;box-sizing:border-box!important;
}
html[data-theme] #student-live-material[data-compact-student-live][data-mode="homework"]>.pp-student-live-header{
 width:100%!important;max-width:none!important;margin:0!important;position:relative!important;top:auto!important;
}
html[data-theme] #student-live-material[data-compact-student-live][data-mode="homework"]>.pp-student-live-main{
 box-sizing:border-box!important;flex:1 1 0!important;min-height:0!important;width:100%!important;max-width:none!important;
 padding:0!important;margin:0!important;gap:var(--pp-lesson-inset,12px)!important;overflow:auto!important;overscroll-behavior:contain;
}
html[data-theme] #student-live-material[data-compact-student-live][data-mode="homework"] .pp-homework-content{
 width:100%!important;max-width:none!important;box-sizing:border-box!important;margin:0!important;padding:0!important;overflow:visible!important;
}
html[data-theme] #student-live-material[data-compact-student-live][data-mode="homework"] .pp-homework-content :is(.mb-builder,.mb-preview-workspace,.mb-student-card){
 box-sizing:border-box!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;
}
html[data-theme] #student-live-material[data-compact-student-live][data-mode="homework"] .pp-homework-heading-group{
 display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;
}
html[data-theme] #student-live-material[data-compact-student-live][data-mode="homework"] .pp-homework-heading-actions{
 width:auto;flex-wrap:wrap;gap:6px!important;
}
/* Geometry and button shadows come from the shared lesson toolbar. */
html[data-theme] #student-live-material[data-compact-student-live][data-mode="homework"]>.pp-student-live-header.app-header{
 box-shadow:0 3px 6px #20113016,0 7px 18px #20113024!important;
}
html[data-theme="dark"] #student-live-material[data-compact-student-live][data-mode="homework"]>.pp-student-live-header.app-header{
 box-shadow:0 3px 6px #0005,0 7px 18px #0006!important;
}
@media(max-width:600px){html[data-theme] #student-live-material[data-compact-student-live][data-mode="homework"] .pp-homework-heading-actions{flex:1 1 100%!important;justify-content:flex-start!important;margin:0!important;}}

/* Shared application interaction feedback. Keep each component's normal and
   selected color, geometry, semantic grading, and existing specialized rules.
   Filter-based feedback survives legacy !important backgrounds; the compact
   student header has its own explicit palette for all states. */
html[data-theme]{--pp-control-hover-brightness:.92;--pp-control-active-brightness:.84;--pp-control-focus-ring:#7953a6;}
html[data-theme="dark"]{--pp-control-hover-brightness:1.16;--pp-control-active-brightness:1.28;--pp-control-focus-ring:#bda0e6;}
/* An enabled action remains interactive even when its base color is forced. */
@media(hover:hover){
 html[data-theme] body :is(button,select,input[type="button"],input[type="submit"],input[type="reset"],[role="button"]:not([contenteditable="true"]),[role="combobox"]:not(input),.mb-teacher-hints-toggle:has(input:not(:disabled))):not(:disabled):not([aria-disabled="true"]):not([hidden]):not(.mb-teacher-hints-toggle:has(input:disabled)):where(:not(#student-live-material[data-compact-student-live] .pp-student-live-header :is(:is(#pointerToggle,#drawingToolsToggle),.pp-student-return,.mb-preview-vocabulary-button,.mb-preview-notebook-button,.pp-homework-submit))):hover{filter:brightness(var(--pp-control-hover-brightness))!important;box-shadow:var(--pp-action-hover-shadow,var(--pp-violet-hover-shadow))!important;}
}
html[data-theme] body :is(button,select,input[type="button"],input[type="submit"],input[type="reset"],[role="button"]:not([contenteditable="true"]),[role="combobox"]:not(input),.mb-teacher-hints-toggle:has(input:not(:disabled))):not(:disabled):not([aria-disabled="true"]):not([hidden]):not(.mb-teacher-hints-toggle:has(input:disabled)):where(:not(#student-live-material[data-compact-student-live] .pp-student-live-header :is(:is(#pointerToggle,#drawingToolsToggle),.pp-student-return,.mb-preview-vocabulary-button,.mb-preview-notebook-button,.pp-homework-submit))):active{filter:brightness(var(--pp-control-active-brightness))!important;box-shadow:var(--pp-action-active-shadow,var(--pp-violet-active-shadow))!important;transition:none!important;}
html[data-theme] body :is(button,select,input[type="button"],input[type="submit"],input[type="reset"],[role="button"]:not([contenteditable="true"]),[role="combobox"]:not(input),.mb-teacher-hints-toggle:has(input:not(:disabled))):not(:disabled):not([aria-disabled="true"]):not([hidden]):not(.mb-teacher-hints-toggle:has(input:disabled)):where(:not(#student-live-material[data-compact-student-live] .pp-student-live-header :is(:is(#pointerToggle,#drawingToolsToggle),.pp-student-return,.mb-preview-vocabulary-button,.mb-preview-notebook-button,.pp-homework-submit))):focus-visible{
 outline:2px solid var(--pp-control-focus-ring)!important;outline-offset:2px!important;
}
/* Native selects remain open after pointer release: preserve a focus border. */
html[data-theme] body :is(select,[role="combobox"]:not(input)):not(:disabled):not([aria-disabled="true"]):focus{
 outline:2px solid var(--pp-control-focus-ring)!important;outline-offset:2px!important;
}
html[data-theme] body .mb-teacher-hints-toggle:has(input:focus-visible){outline:2px solid var(--pp-control-focus-ring)!important;outline-offset:2px!important;}
html[data-theme] body :is(button,select,input[type="button"],input[type="submit"],input[type="reset"],[role="button"],[role="combobox"]):is(:disabled,[aria-disabled="true"]),
html[data-theme] body .mb-teacher-hints-toggle:has(input:disabled){cursor:not-allowed!important;}
/* In disabled state, compact teacher tools cannot look like enabled actions.
   Do not dim read-only exercise answers or grading marks across the app. */
html[data-theme] #teacher-app :is(.mb-builder-toolbar,.mb-builder-bottom-actions,.mb-material-control-heading,.mb-preview-tools-row) :is(button,select):is(:disabled,[aria-disabled="true"]){opacity:.5!important;}

/* Flat controls: use color, border and keyboard focus rather than elevation. */
html[data-theme]{
 --pp-violet-hover-bg:#f2ecfa;--pp-violet-active-bg:#e6daf5;--pp-violet-hover-border:#a58acb;--pp-violet-active-border:#7953a6;--pp-violet-state-fg:#4e2a84;
 --pp-violet-hover-shadow:none;
 --pp-violet-active-shadow:none;
 --pp-gold-rest-shadow:none;
 --pp-gold-hover-shadow:none;
 --pp-gold-active-shadow:none;
}
html[data-theme="dark"]{
 --pp-violet-hover-bg:#40364e;--pp-violet-active-bg:#51435f;--pp-violet-hover-border:#a58acb;--pp-violet-active-border:#b89add;--pp-violet-state-fg:#f0edf5;
 --pp-violet-hover-shadow:none;
 --pp-violet-active-shadow:none;
 --pp-gold-rest-shadow:none;
 --pp-gold-hover-shadow:none;
 --pp-gold-active-shadow:none;
}
/* Teacher toolbars and library controls: use the same violet state palette
   instead of the generic brightness fallback. Keep semantic actions separate. */
html[data-theme] #teacher-app :is(#classroom-materials-root :is(.mb-builder-toolbar,.mb-builder-bottom-actions,.mb-material-control-heading,.mb-preview-tools-row,.mb-preview-notes-heading,.mb-notes-format,.mb-format-toolbar,.ml-library-tabs,.ml-library-actions,.ml-menu-wrap,.live-top,.native-detail-tabs,.native-student-list-tabs),:is(.mb-builder-toolbar,.mb-builder-bottom-actions,.mb-material-control-heading,.mb-preview-tools-row,.mb-preview-notes-heading,.mb-notes-format,.mb-format-toolbar,.ml-library-tabs,.ml-library-actions,.ml-menu-wrap,.live-top,.native-detail-tabs,.native-student-list-tabs)) :is(button,select,.mb-teacher-hints-toggle):not(.primary,.primary-btn,.mb-manual-save,.mb-save-add-exercise,.mb-bring-here,.mb-import-action,.ml-import-icon,.mb-builder-focus-brand,.mb-focus-brand,.danger,.danger-btn,.pp-exchange-warning,[data-variant="primary"],[data-variant="danger"]):not(:disabled):not([aria-disabled="true"]):not(.mb-teacher-hints-toggle:has(input:disabled)):is([aria-pressed="true"],[aria-selected="true"],[aria-current="page"],.is-active,.is-following,.mb-teacher-hints-toggle:has(input:checked)){
 background:var(--pp-violet-active-bg)!important;color:var(--pp-violet-state-fg)!important;border-color:var(--pp-violet-active-border)!important;
}
@media(hover:hover){
 html[data-theme] #teacher-app :is(#classroom-materials-root :is(.mb-builder-toolbar,.mb-builder-bottom-actions,.mb-material-control-heading,.mb-preview-tools-row,.mb-preview-notes-heading,.mb-notes-format,.mb-format-toolbar,.ml-library-tabs,.ml-library-actions,.ml-menu-wrap,.live-top,.native-detail-tabs,.native-student-list-tabs),:is(.mb-builder-toolbar,.mb-builder-bottom-actions,.mb-material-control-heading,.mb-preview-tools-row,.mb-preview-notes-heading,.mb-notes-format,.mb-format-toolbar,.ml-library-tabs,.ml-library-actions,.ml-menu-wrap,.live-top,.native-detail-tabs,.native-student-list-tabs)) :is(button,select,.mb-teacher-hints-toggle):not(.primary,.primary-btn,.mb-manual-save,.mb-save-add-exercise,.mb-bring-here,.mb-import-action,.ml-import-icon,.mb-builder-focus-brand,.mb-focus-brand,.danger,.danger-btn,.pp-exchange-warning,[data-variant="primary"],[data-variant="danger"]):not(:disabled):not([aria-disabled="true"]):not(.mb-teacher-hints-toggle:has(input:disabled)):hover{
  filter:none!important;background:var(--pp-violet-hover-bg)!important;border-color:var(--pp-violet-hover-border)!important;box-shadow:var(--pp-violet-hover-shadow)!important;
 }
 html[data-theme] #teacher-app :is(#classroom-materials-root :is(.mb-builder-toolbar,.mb-builder-bottom-actions,.mb-material-control-heading,.mb-preview-tools-row,.mb-preview-notes-heading,.mb-notes-format,.mb-format-toolbar,.ml-library-tabs,.ml-library-actions,.ml-menu-wrap,.live-top,.native-detail-tabs,.native-student-list-tabs),:is(.mb-builder-toolbar,.mb-builder-bottom-actions,.mb-material-control-heading,.mb-preview-tools-row,.mb-preview-notes-heading,.mb-notes-format,.mb-format-toolbar,.ml-library-tabs,.ml-library-actions,.ml-menu-wrap,.live-top,.native-detail-tabs,.native-student-list-tabs)) :is(button,select,.mb-teacher-hints-toggle):not(.primary,.primary-btn,.mb-manual-save,.mb-save-add-exercise,.mb-bring-here,.mb-import-action,.ml-import-icon,.mb-builder-focus-brand,.mb-focus-brand,.danger,.danger-btn,.pp-exchange-warning,[data-variant="primary"],[data-variant="danger"]):not(:disabled):not([aria-disabled="true"]):not(.mb-teacher-hints-toggle:has(input:disabled)):is([aria-pressed="true"],[aria-selected="true"],[aria-current="page"],.is-active,.is-following,.mb-teacher-hints-toggle:has(input:checked)):hover{background:var(--pp-violet-active-bg)!important;border-color:var(--pp-violet-active-border)!important;}
}
html[data-theme] #teacher-app :is(#classroom-materials-root :is(.mb-builder-toolbar,.mb-builder-bottom-actions,.mb-material-control-heading,.mb-preview-tools-row,.mb-preview-notes-heading,.mb-notes-format,.mb-format-toolbar,.ml-library-tabs,.ml-library-actions,.ml-menu-wrap,.live-top,.native-detail-tabs,.native-student-list-tabs),:is(.mb-builder-toolbar,.mb-builder-bottom-actions,.mb-material-control-heading,.mb-preview-tools-row,.mb-preview-notes-heading,.mb-notes-format,.mb-format-toolbar,.ml-library-tabs,.ml-library-actions,.ml-menu-wrap,.live-top,.native-detail-tabs,.native-student-list-tabs)) :is(button,select,.mb-teacher-hints-toggle):not(.primary,.primary-btn,.mb-manual-save,.mb-save-add-exercise,.mb-bring-here,.mb-import-action,.ml-import-icon,.mb-builder-focus-brand,.mb-focus-brand,.danger,.danger-btn,.pp-exchange-warning,[data-variant="primary"],[data-variant="danger"]):not(:disabled):not([aria-disabled="true"]):not(.mb-teacher-hints-toggle:has(input:disabled)):active{
 filter:none!important;background:var(--pp-violet-active-bg)!important;border-color:var(--pp-violet-active-border)!important;box-shadow:var(--pp-violet-active-shadow)!important;
}
html[data-theme] #teacher-app :is(#classroom-materials-root :is(.mb-builder-toolbar,.mb-builder-bottom-actions,.mb-material-control-heading,.mb-preview-tools-row,.mb-preview-notes-heading,.mb-notes-format,.mb-format-toolbar,.ml-library-tabs,.ml-library-actions,.ml-menu-wrap,.live-top,.native-detail-tabs,.native-student-list-tabs),:is(.mb-builder-toolbar,.mb-builder-bottom-actions,.mb-material-control-heading,.mb-preview-tools-row,.mb-preview-notes-heading,.mb-notes-format,.mb-format-toolbar,.ml-library-tabs,.ml-library-actions,.ml-menu-wrap,.live-top,.native-detail-tabs,.native-student-list-tabs)) :is(button,select,.mb-teacher-hints-toggle):not(.primary,.primary-btn,.mb-manual-save,.mb-save-add-exercise,.mb-bring-here,.mb-import-action,.ml-import-icon,.mb-builder-focus-brand,.mb-focus-brand,.danger,.danger-btn,.pp-exchange-warning,[data-variant="primary"],[data-variant="danger"]):not(:disabled):not([aria-disabled="true"]):not(.mb-teacher-hints-toggle:has(input:disabled)):focus-visible{outline:2px solid var(--pp-control-focus-ring)!important;outline-offset:2px!important;}
/* Keep the import gradient border, including hover and pressed states. */
@media(hover:hover){
 html[data-theme] #teacher-app :is(#classroom-materials-root .mb-material-control-heading,#classroom-materials-root .ml-library-actions,.mb-material-control-heading,.ml-library-actions) :is(button.mb-import-action,button.ml-import-icon):not(:disabled):hover{
  filter:none!important;background:linear-gradient(var(--pp-violet-hover-bg),var(--pp-violet-hover-bg)) padding-box,linear-gradient(125deg,#E9A64C,#E783AA 30%,#A18BE8 58%,#66BBD7 82%,#78C9A8) border-box!important;box-shadow:var(--pp-violet-hover-shadow)!important;
 }
}
html[data-theme] #teacher-app :is(#classroom-materials-root .mb-material-control-heading,#classroom-materials-root .ml-library-actions,.mb-material-control-heading,.ml-library-actions) :is(button.mb-import-action,button.ml-import-icon):not(:disabled):active{
 filter:none!important;background:linear-gradient(var(--pp-violet-active-bg),var(--pp-violet-active-bg)) padding-box,linear-gradient(125deg,#E9A64C,#E783AA 30%,#A18BE8 58%,#66BBD7 82%,#78C9A8) border-box!important;box-shadow:var(--pp-violet-active-shadow)!important;
}
html[data-theme] #teacher-app :is(#classroom-materials-root .mb-builder-toolbar,#classroom-materials-root .mb-builder-bottom-actions,.mb-builder-toolbar,.mb-builder-bottom-actions) :is(button.mb-manual-save,button.primary):not(:disabled){box-shadow:var(--pp-gold-rest-shadow)!important;}
@media(hover:hover){html[data-theme] #teacher-app :is(#classroom-materials-root .mb-builder-toolbar,#classroom-materials-root .mb-builder-bottom-actions,.mb-builder-toolbar,.mb-builder-bottom-actions) :is(button.mb-manual-save,button.primary):not(:disabled):hover{filter:none!important;background:#8C5900!important;border-color:#754a00!important;box-shadow:var(--pp-gold-hover-shadow)!important;}}
html[data-theme] #teacher-app :is(#classroom-materials-root .mb-builder-toolbar,#classroom-materials-root .mb-builder-bottom-actions,.mb-builder-toolbar,.mb-builder-bottom-actions) :is(button.mb-manual-save,button.primary):not(:disabled):active{filter:none!important;background:#754a00!important;border-color:#643f00!important;box-shadow:var(--pp-gold-active-shadow)!important;}

/* Free cancellation: show effective zero without destroying the stored tariff. */
html[data-theme] #lesson-modal #edit-price[data-no-charge="true"]:disabled{
 background:#fce8e7!important;border:1px solid #e6aaa8!important;color:#a33b37!important;
 opacity:1!important;cursor:not-allowed!important;-webkit-text-fill-color:#a33b37!important;
}
html[data-theme="dark"] #lesson-modal #edit-price[data-no-charge="true"]:disabled{
 background:#4a3038!important;border-color:#a76970!important;color:#ffb4b1!important;-webkit-text-fill-color:#ffb4b1!important;
}
#lesson-modal #group-price-breakdown.pp-no-charge-breakdown{display:none!important;}

/* Legacy student settings actions follow the same compact control palette. */
html[data-theme] #student-modal .student-settings-footer>button{
 --pp-settings-button-bg:#fff;--pp-settings-button-fg:#1F242D;--pp-settings-button-border:#d9dce3;
 --pp-settings-hover-bg:var(--pp-violet-hover-bg);--pp-settings-hover-border:var(--pp-violet-hover-border);
 --pp-settings-active-bg:var(--pp-violet-active-bg);--pp-settings-active-border:var(--pp-violet-active-border);
 --pp-settings-shadow:none;
 --pp-settings-hover-shadow:var(--pp-violet-hover-shadow);--pp-settings-active-shadow:var(--pp-violet-active-shadow);
 display:inline-flex!important;align-items:center;justify-content:center;box-sizing:border-box!important;
 height:40px!important;min-height:40px!important;padding:8px 14px!important;border-radius:12px!important;
 font-family:inherit!important;font-size:14px!important;font-weight:650!important;line-height:1.2!important;
 background:var(--pp-settings-button-bg)!important;color:var(--pp-settings-button-fg)!important;
 border:1px solid var(--pp-settings-button-border)!important;box-shadow:var(--pp-settings-shadow)!important;
 transition:background-color .15s,border-color .15s,box-shadow .15s;
}
html[data-theme="dark"] #student-modal .student-settings-footer>button{
 --pp-settings-button-bg:#302a3b;--pp-settings-button-fg:#f0edf5;--pp-settings-button-border:#51475f;
 --pp-settings-shadow:none;
}
html[data-theme] #student-modal .student-settings-footer>button.primary-btn{
 --pp-settings-button-bg:#A66B00;--pp-settings-button-fg:#fff;--pp-settings-button-border:#8C5900;
 --pp-settings-hover-bg:#8C5900;--pp-settings-hover-border:#754a00;
 --pp-settings-active-bg:#754a00;--pp-settings-active-border:#643f00;
 --pp-settings-shadow:none;--pp-settings-hover-shadow:var(--pp-gold-hover-shadow);
 --pp-settings-active-shadow:var(--pp-gold-active-shadow);
}
@media(hover:hover){
 html[data-theme] #student-modal .student-settings-footer>button:not(:disabled):hover{
  filter:none!important;background:var(--pp-settings-hover-bg)!important;border-color:var(--pp-settings-hover-border)!important;box-shadow:var(--pp-settings-hover-shadow)!important;
 }
}
html[data-theme] #student-modal .student-settings-footer>button:not(:disabled):active{
 filter:none!important;background:var(--pp-settings-active-bg)!important;border-color:var(--pp-settings-active-border)!important;box-shadow:var(--pp-settings-active-shadow)!important;
}
html[data-theme] #student-modal .student-settings-footer>button:focus-visible{outline:2px solid var(--pp-control-focus-ring)!important;outline-offset:2px!important;}
html[data-theme] #student-modal .student-settings-footer>button:disabled{opacity:.5!important;box-shadow:none!important;cursor:not-allowed!important;}
@media(prefers-reduced-motion:reduce){html[data-theme] #student-modal .student-settings-footer>button{transition:none;}}
/* Desktop navigation matches the brand header surface, rather than the older 65% glass. */
html[data-theme] #teacher-app>.native-layout:not(.pp-mobile-open)>.native-sidebar{
 background:var(--pp-classroom-surface,var(--pp-surface))!important;background-image:none!important;
 backdrop-filter:var(--pp-classroom-blur,none)!important;-webkit-backdrop-filter:var(--pp-classroom-blur,none)!important;opacity:1!important;
}
html[data-theme]:not([data-theme="dark"]) #teacher-app .native-sidebar button[data-native-tab]:not(.is-active){
 color:var(--text-color,#1F242D)!important;
}
html[data-theme] #teacher-app .native-sidebar button[data-native-tab] :is(.native-nav-icon,.native-nav-text,.native-nav-icon svg){color:inherit!important;}

/* Empty material section action shares the regular primary button palette. */
html[data-theme] #teacher-app .mb-authoring .mb-empty .mb-empty-add-exercise.primary{box-shadow:var(--pp-gold-rest-shadow)!important;}
@media(hover:hover){html[data-theme] #teacher-app .mb-authoring .mb-empty .mb-empty-add-exercise.primary:not(:disabled):hover{filter:none!important;background:#8C5900!important;border-color:#754a00!important;box-shadow:var(--pp-gold-hover-shadow)!important;}}
html[data-theme] #teacher-app .mb-authoring .mb-empty .mb-empty-add-exercise.primary:not(:disabled):active{filter:none!important;background:#754a00!important;border-color:#643f00!important;box-shadow:var(--pp-gold-active-shadow)!important;}

/* Bring here is a persistent attention signal until the learner's position matches. */
html[data-theme] #teacher-app .mb-builder.mb-student-preview .mb-preview-controls>button.mb-bring-here{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px;
 height:40px!important;min-height:40px!important;box-sizing:border-box!important;padding:8px 14px!important;
 border-radius:12px!important;font-family:inherit!important;font-size:14px!important;font-weight:650!important;line-height:1.2!important;
 white-space:nowrap;transition:background-color .15s,border-color .15s,box-shadow .15s;
}
html[data-theme] #teacher-app .mb-builder.mb-student-preview .mb-preview-controls>button.mb-bring-here:not(:disabled){
 background:#B4232D!important;color:#fff!important;border:1px solid #981B24!important;
 box-shadow:0 2px 6px #DC354550,0 0 12px #DC354566!important;
 position:relative; isolation:isolate;
}
html[data-theme] #teacher-app .mb-builder.mb-student-preview .mb-preview-controls>button.mb-bring-here:not(:disabled)::after{
 content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:-1;
 box-shadow:0 0 14px 3px #DC354570;animation:pp-bring-here-glow 1.8s ease-in-out infinite;
}
@keyframes pp-bring-here-glow{0%,100%{opacity:.2}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){html[data-theme] #teacher-app .mb-builder.mb-student-preview .mb-preview-controls>button.mb-bring-here:not(:disabled)::after{animation:none;opacity:.6;}}
html[data-theme] #teacher-app .mb-builder.mb-student-preview .mb-preview-controls>button.mb-bring-here:not(:disabled):active::after{animation:none;opacity:0;}
@media(hover:hover){
 html[data-theme] #teacher-app .mb-builder.mb-student-preview .mb-preview-controls>button.mb-bring-here:not(:disabled):hover{animation:none;filter:none!important;background:#981B24!important;border-color:#811923!important;box-shadow:0 3px 8px #DC354566,0 0 16px #DC354580!important;}
}
html[data-theme] #teacher-app .mb-builder.mb-student-preview .mb-preview-controls>button.mb-bring-here:not(:disabled):active{animation:none;filter:none!important;background:#811923!important;box-shadow:inset 0 2px 5px #5C101A66!important;}
html[data-theme] #teacher-app .mb-builder.mb-student-preview .mb-preview-controls>button.mb-bring-here:focus-visible{outline:2px solid #E65D65!important;outline-offset:3px!important;}
html[data-theme] #teacher-app .mb-builder.mb-student-preview .mb-preview-controls>button.mb-bring-here:disabled{animation:none;box-shadow:none!important;opacity:.5!important;cursor:not-allowed!important;}
@media(prefers-reduced-motion:reduce){html[data-theme] #teacher-app .mb-builder.mb-student-preview .mb-preview-controls>button.mb-bring-here{animation:none!important;transition:none!important;}}

/* Dark classroom controls must not inherit the light host surface.
   Keep the same geometry and independent answer-result states in every view. */
html[data-theme="dark"] :is(#teacher-app,#student-live-material,.pp-homework-review) .mb-builder.mb-builder:is(.mb-student-preview,.mb-authoring) :is(.mb-preview-footer,.mb-builder-exercise-navigation)>button.mb-navigation-arrow{
 background:#393245!important;color:#F0EDF5!important;border-color:#51475F!important;
 box-shadow:none!important;
}
@media(hover:hover){
 html[data-theme="dark"] :is(#teacher-app,#student-live-material,.pp-homework-review) .mb-builder.mb-builder:is(.mb-student-preview,.mb-authoring) :is(.mb-preview-footer,.mb-builder-exercise-navigation)>button.mb-navigation-arrow:not(:disabled):hover{background:#45394F!important;border-color:#A58ACB!important;color:#F0EDF5!important;filter:none!important;box-shadow:var(--pp-violet-hover-shadow)!important;}
}
html[data-theme="dark"] :is(#teacher-app,#student-live-material,.pp-homework-review) .mb-builder.mb-builder:is(.mb-student-preview,.mb-authoring) :is(.mb-preview-footer,.mb-builder-exercise-navigation)>button.mb-navigation-arrow:not(:disabled):active{background:#51435F!important;color:#F0EDF5!important;border-color:#B89ADD!important;filter:none!important;box-shadow:var(--pp-violet-active-shadow)!important;}
html[data-theme="dark"] :is(#teacher-app,#student-live-material,.pp-homework-review) .mb-builder.mb-builder:is(.mb-student-preview,.mb-authoring) :is(.mb-preview-footer,.mb-builder-exercise-navigation)>button.mb-navigation-arrow:disabled{background:#302A3B!important;color:#81768F!important;border-color:#51475F!important;opacity:1!important;box-shadow:none!important;}
html[data-theme="dark"] :is(#teacher-app,#student-live-material,.pp-homework-review) .mb-builder.mb-builder .mb-student-body .mb-inline-group button.mb-inline-answer-option:not([aria-pressed="true"]):not([data-result]){
 background:#393245!important;color:#F0EDF5!important;border-color:#655673!important;
}
@media(hover:hover){
 html[data-theme="dark"] :is(#teacher-app,#student-live-material,.pp-homework-review) .mb-builder.mb-builder .mb-student-body .mb-inline-group button.mb-inline-answer-option:not([aria-pressed="true"]):not([data-result]):not(:disabled):hover{background:#45394F!important;border-color:#A58ACB!important;filter:none!important;}
}
html[data-theme="dark"] :is(#teacher-app,#student-live-material,.pp-homework-review) .mb-builder.mb-builder .mb-student-body .mb-inline-group button.mb-inline-answer-option[aria-pressed="true"]:not([data-result]){
 background:#51435F!important;color:#F0EDF5!important;border-color:#B89ADD!important;box-shadow:inset 0 0 0 1px #B89ADD!important;
}
html[data-theme="dark"] :is(#teacher-app,#student-live-material,.pp-homework-review) .mb-builder.mb-builder .mb-student-body .mb-inline-group button.mb-inline-answer-option[data-result="correct"]{background:#203F2B!important;color:#A2E8B6!important;border-color:#55B877!important;box-shadow:inset 0 0 0 1px #55B877!important;}
html[data-theme="dark"] :is(#teacher-app,#student-live-material,.pp-homework-review) .mb-builder.mb-builder .mb-student-body .mb-inline-group button.mb-inline-answer-option[data-result="incorrect"]{background:#4C292E!important;color:#FFB6B6!important;border-color:#D97575!important;box-shadow:inset 0 0 0 1px #D97575!important;}

/* Materials navigation panels share the brand header surface.
   The workspace already contains the library heading: avoid stacking another glass layer.
   Keep the exercise editor, contextual dropdowns and content-behind sticky header opaque. */
html[data-theme] #teacher-app #classroom-materials-root .ml-preview:not(.ml-builder-host) :is(.ml-folders,.ml-workspace),
html[data-theme] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu]))>.native-layout.pp-mobile-open>.native-sidebar,
html[data-theme="dark"] :is(#teacher-app:has(#classroom-materials-root .mb-authoring),#teacher-app:has(#classroom-materials-root .mb-student-preview [data-builder-menu]))>.native-layout.pp-mobile-open>.native-sidebar{
 background:var(--pp-classroom-surface,var(--pp-surface))!important;
 background-image:none!important;
 backdrop-filter:var(--pp-classroom-blur,none)!important;
 -webkit-backdrop-filter:var(--pp-classroom-blur,none)!important;
 opacity:1!important;
}
html[data-theme] #teacher-app #classroom-materials-root .ml-preview:not(.ml-builder-host) :is(.ml-folders,.ml-workspace){
 border-radius:var(--pp-panel-radius,12px)!important;
 border-color:var(--pp-shell-border)!important;
}


/* The teacher shell uses the same primary surface as Materials. Students has
   one enclosing workspace, while Dashboard retains its standalone cards. */
html[data-theme] #teacher-app #teacher-main #tab-students,
html[data-theme] #teacher-app #teacher-main #tab-dashboard :is(#dashboard-cards>*,#dashboard-calendar){
 background:var(--pp-classroom-surface,var(--pp-surface))!important;
 background-image:none!important;
 border:var(--pp-shell-border-width,1px) solid var(--pp-shell-border)!important;
 border-radius:var(--pp-panel-radius,12px)!important;
 backdrop-filter:var(--pp-classroom-blur,none)!important;
 -webkit-backdrop-filter:var(--pp-classroom-blur,none)!important;
 box-shadow:none!important;
}
html[data-theme] #teacher-app #teacher-main #tab-students{
 padding:18px 20px 24px!important;box-sizing:border-box!important;margin:0!important;
}
html[data-theme] #teacher-app #teacher-main #tab-students>.native-page-heading{
 padding:0!important;margin:0 0 14px!important;
}
html[data-theme] #teacher-app #teacher-main #tab-students>.native-page-heading h1,
html[data-theme] #teacher-app #classroom-materials-root .ml-preview .ml-title-row h1{
 font-size:27px!important;font-weight:760!important;line-height:1.2!important;letter-spacing:-.035em!important;
 color:#1f242d!important;
}
html[data-theme="dark"] #teacher-app #teacher-main #tab-students>.native-page-heading h1,
html[data-theme="dark"] #teacher-app #classroom-materials-root .ml-preview .ml-title-row h1{color:#f0edf5!important;}
/* No second glass layer inside the Students workspace. Individual rows/stats
   retain their own readable card surfaces and selected/status styling. */
html[data-theme] #teacher-app #teacher-main #tab-students :is(.native-students-panel,.native-student-detail){
 background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
 border-color:var(--pp-shell-border)!important;
}
@media(max-width:900px){
 html[data-theme] #teacher-app #teacher-main #tab-students{padding:12px!important;}
}

/* Time and tariff occupy one row, aligned with the date/duration grid. */
#lesson-modal .lesson-time-price-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start;}
#lesson-modal .lesson-time-price-row>*{min-width:0;}
#lesson-modal .lesson-time-price-row .lesson-time-fields{display:flex;align-items:center;gap:6px;min-width:0;}
#lesson-modal .lesson-time-price-row .lesson-time-fields select{box-sizing:border-box;min-width:0;max-width:calc((100% - 20px)/2);}
#lesson-modal .lesson-time-price-row #edit-price{box-sizing:border-box;max-width:100%;}
@media(max-width:390px){#lesson-modal .lesson-time-price-row{grid-template-columns:minmax(0,1fr);gap:8px;}}

/* One outer geometry for Dashboard, Students and Materials. The inner
   editor and its overlay navigation retain their own layout contract. */
html[data-theme] #teacher-app>.native-layout>#teacher-main{
 padding:0!important;margin:0!important;min-width:0!important;max-width:none!important;
}
html[data-theme] #teacher-app #teacher-main>:is(#tab-dashboard,#tab-materials){
 margin:0!important;padding:0!important;box-sizing:border-box!important;
}
html[data-theme] #teacher-app #teacher-main>#tab-dashboard{
 background:transparent!important;min-height:0!important;
}
html[data-theme] #teacher-app #tab-materials:not(:has(.ml-builder-host)) #classroom-materials-root{
 margin:0!important;padding:0!important;min-width:0!important;
}
@media(min-width:769px){
 html[data-theme] #teacher-app>.native-layout:not(:has(.mb-authoring,.mb-student-preview)){
  column-gap:var(--pp-section-gap,14px)!important;
  align-items:start!important;
 }
}
html[data-theme] #teacher-app>.native-layout:not(.pp-mobile-open)>.native-sidebar,
html[data-theme][data-pp-teacher-wallpaper] #teacher-app>.native-layout:not(.pp-mobile-open)>.native-sidebar{
 background:var(--pp-classroom-surface,var(--pp-surface))!important;
 border:var(--pp-shell-border-width,1px) solid var(--pp-shell-border)!important;
 border-radius:var(--pp-panel-radius,12px)!important;
 backdrop-filter:var(--pp-classroom-blur,none)!important;-webkit-backdrop-filter:var(--pp-classroom-blur,none)!important;
}
html[data-theme] #teacher-app #dashboard-cards.native-metric-strip{
 align-items:stretch!important;grid-auto-rows:1fr;margin-top:0!important;
}
/* Compact teacher dashboard metrics: make room for the weekly calendar.
   Content may grow at narrow widths or increased text size; never clip labels
   or currency values. Equal grid rows preserve the aligned value baseline. */
html[data-theme] #teacher-app #dashboard-cards.native-metric-strip>button{
 display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:space-between!important;
 gap:2px!important;min-height:56px!important;height:100%!important;padding:6px 12px!important;box-sizing:border-box!important;
}
html[data-theme] #teacher-app #dashboard-cards.native-metric-strip>button>div:first-child{
 display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:6px!important;margin-bottom:0!important;min-width:0;
}
html[data-theme] #teacher-app #dashboard-cards.native-metric-strip>button>div:first-child>span:first-child{
 min-width:0;font-size:11px!important;line-height:1.2!important;overflow-wrap:anywhere;
}
html[data-theme] #teacher-app #dashboard-cards.native-metric-strip>button>div:first-child>span:last-child{
 flex:none;font-size:16px!important;line-height:1!important;
}
html[data-theme] #teacher-app #dashboard-cards.native-metric-strip>button>div:last-child{
 margin-top:auto;font-size:20px!important;line-height:1.1!important;overflow-wrap:anywhere;
}
/* Use the reclaimed vertical space for the actual scrollable calendar,
   without changing the timetable's time scale or mobile layout. */
@media(min-width:901px){
 html[data-theme] #teacher-app #dashboard-calendar .native-calendar-scroll{height:clamp(280px,calc(43vh + 44px),484px)!important;}
}

/* Desktop teacher rail: the existing accessible toggle is an invisible hit
   surface behind the navigation buttons. No separate arrow or bottom slot.
   The student clone keeps its existing toggle; mobile/editor overlays are unchanged. */
@media(min-width:769px){
 html[data-theme] #teacher-app>.native-layout:not(.pp-mobile-open):not(:has(.mb-authoring,.mb-student-preview))>.native-sidebar{
  z-index:2;padding-bottom:24px!important;
 }
 html[data-theme] #teacher-app>.native-layout:not(.pp-mobile-open):not(:has(.mb-authoring,.mb-student-preview))>.native-sidebar>button.classroom-sidebar-toggle{
  position:absolute!important;inset:0!important;
  display:block!important;width:100%!important;height:100%!important;
  min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
  padding:0!important;margin:0!important;transform:none!important;
  border:0!important;border-radius:inherit!important;background:transparent!important;
  box-shadow:none!important;filter:none!important;opacity:1!important;z-index:0;cursor:pointer;
 }
 html[data-theme] #teacher-app>.native-layout:not(.pp-mobile-open):not(:has(.mb-authoring,.mb-student-preview))>.native-sidebar>button.classroom-sidebar-toggle svg{display:none!important;}
 html[data-theme] #teacher-app>.native-layout:not(.pp-mobile-open):not(:has(.mb-authoring,.mb-student-preview))>.native-sidebar>button:not(.classroom-sidebar-toggle){
  position:relative;z-index:1;
 }
 html[data-theme] #teacher-app>.native-layout:not(.pp-mobile-open)>.native-sidebar>button.classroom-sidebar-toggle:focus-visible{
  outline:2px solid var(--pp-control-focus-ring)!important;outline-offset:-3px!important;
 }
}
 
/* Navigation is a button too: reuse the shared neutral-control hover and
   pressed tokens without changing the persistent selected-page styling. */
html[data-theme] #teacher-app>.native-layout>.native-sidebar>button:is([data-native-tab],.classroom-sidebar-toggle,.pp-mobile-profile-entry){
 transition:background-color .12s,color .12s,box-shadow .12s!important;
}
@media(hover:hover){
 html[data-theme] #teacher-app>.native-layout>.native-sidebar>button:is([data-native-tab],.pp-mobile-profile-entry):not(:disabled):not([aria-disabled="true"]):hover{
  filter:none!important;background:var(--pp-violet-hover-bg)!important;color:var(--pp-violet-state-fg)!important;box-shadow:var(--pp-violet-hover-shadow)!important;
 }
 html[data-theme] #teacher-app>.native-layout>.native-sidebar>button[data-native-tab].is-active:not(:disabled):not([aria-disabled="true"]):hover{background:var(--pp-violet-active-bg)!important;}
}
html[data-theme] #teacher-app>.native-layout>.native-sidebar>button:is([data-native-tab],.pp-mobile-profile-entry):not(:disabled):not([aria-disabled="true"]):active{
 transition:none!important;filter:none!important;background:var(--pp-violet-active-bg)!important;color:var(--pp-violet-state-fg)!important;box-shadow:var(--pp-violet-active-shadow)!important;
}
@media(prefers-reduced-motion:reduce){
 html[data-theme] #teacher-app>.native-layout>.native-sidebar>button:is([data-native-tab],.classroom-sidebar-toggle,.pp-mobile-profile-entry){transition:none!important;}
}

/* Shared fallback effects for controls across both roles. Preserve the
   semantic base colour; specialised toolbar/answer rules remain authoritative. */
html[data-theme] body :is(button,input[type="button"],input[type="submit"],[role="button"]):is(.danger,.danger-btn,[data-variant="danger"]){
 --pp-action-hover-shadow:none;
 --pp-action-active-shadow:none;
}
html[data-theme] body :is(button,input[type="button"],input[type="submit"],[role="button"]):not(:disabled):not([aria-disabled="true"]):where(:not(.mb-student-body *)){
 transition:background-color .12s,color .12s,filter .12s,box-shadow .12s;
}
@media(prefers-reduced-motion:reduce){
 html[data-theme] body :is(button,select,input[type="button"],input[type="submit"],[role="button"]){transition:none!important;}
}
/* Platform administrator navigation is hidden unless the server confirms the role. */
#teacher-app .native-sidebar :is([data-platform-admin-sidebar],[data-platform-health-sidebar])[hidden]{display:none!important}
#teacher-app .native-sidebar:has(>[data-platform-admin-sidebar]:not([hidden])) [data-platform-admin-sidebar]{margin-top:auto!important;}
@media(min-width:769px){#teacher-app>.native-layout:not(.pp-mobile-open)>.native-sidebar:has(>[data-platform-admin-sidebar]:not([hidden])){min-height:max(230px,calc(100dvh - 146px))!important;box-sizing:border-box;}}
#teacher-app .native-sidebar [data-platform-admin-sidebar]:not([hidden]){border-top:1px solid var(--pp-shell-border,var(--border-color));}
#teacher-app .native-sidebar [data-platform-admin-sidebar] .native-nav-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* Administration uses the same workspace tokens; no extra layout in other tabs. */
#platform-admin-content,#platform-system-health-content{color:var(--ink,var(--text-color));font-size:14px;min-width:0;}
.pp-admin-heading,.pp-admin-toolbar,.pp-admin-row,.pp-admin-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.pp-admin-heading{justify-content:space-between;margin-bottom:16px;}
.pp-admin-heading h2{margin:0;font-size:23px;font-weight:800;}
.pp-admin-muted{color:var(--muted,#737987);font-size:12px;}
.pp-admin-heading p{margin:3px 0 0;}
.pp-admin-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:10px;margin-bottom:14px;}
.pp-admin-metric,.pp-admin-chart,.pp-admin-table-wrap{background:var(--card,var(--card-bg,#fff));border:1px solid var(--pp-shell-border,var(--border-color,#dedce6));border-radius:var(--pp-panel-radius,14px);padding:12px;}
.pp-admin-metric strong{display:block;font-size:25px;font-weight:800;line-height:1.35;font-variant-numeric:tabular-nums;}
.pp-admin-chart{margin-bottom:14px;}
.pp-admin-chart h3{margin:0 0 8px;font-weight:700;}
.pp-admin-bars{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;}
.pp-admin-bar{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;min-height:80px;text-align:center;}
.pp-admin-bar i{display:block;min-height:2px;max-width:28px;width:70%;border-radius:5px 5px 0 0;background:#9275be;}
.pp-admin-toolbar{margin:0 0 10px;}
.pp-admin-toolbar input{flex:1 1 190px;}
.pp-admin-toolbar :is(input,select),.pp-admin-dialog :is(input,select,textarea){min-height:36px;border:1px solid var(--pp-shell-border,var(--border-color,#dedce6));border-radius:9px;padding:7px 10px;background:var(--card,var(--card-bg,#fff));color:inherit;box-sizing:border-box;min-width:0;}
.pp-admin-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:7px 12px;border:1px solid var(--pp-shell-border,var(--border-color,#dedce6));border-radius:9px;background:var(--card,var(--card-bg,#fff));color:inherit;font-weight:650;cursor:pointer;white-space:nowrap;}
.pp-admin-button.primary{background:#4E2A84;color:#fff;border-color:#4E2A84;}
.pp-admin-button.danger{color:#b73535;}
.pp-admin-button:disabled{opacity:.5;cursor:default;}
.pp-admin-table-wrap{padding:0;min-width:0;}
.pp-admin-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px;text-align:left;}
.pp-admin-table :is(th,td){padding:10px 12px;border-bottom:1px solid var(--pp-shell-border,var(--border-color,#dedce6));vertical-align:middle;white-space:normal;overflow-wrap:anywhere;}
.pp-admin-table th{background:var(--soft,#f4effa);font-weight:700;}
html[data-theme="dark"] #platform-admin-content .pp-admin-table th{background:var(--pp-raised,#393245);color:var(--text-color,#f0edf5);}
.pp-admin-table th:first-child{width:23%;}
.pp-admin-table th:last-child{width:14%;}
.pp-admin-table td .pp-admin-button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;}
.pp-admin-table tbody tr:last-child td{border-bottom:0;}
.pp-admin-name{display:block;font-weight:700;}
.pp-admin-status{display:inline-flex;padding:3px 7px;border-radius:6px;background:var(--soft,#f4effa);font-size:12px;font-weight:650;}
.pp-admin-status[data-status=active]{color:#226c4b;background:#e6f4eb;}
.pp-admin-status[data-status=paused]{color:#80540e;background:#fff2d6;}
.pp-admin-status[data-status=blocked]{color:#a72929;background:#fbe8e8;}
html[data-theme=dark] .pp-admin-status[data-status=active]{color:#85d5a5;background:#233e34;}
html[data-theme=dark] .pp-admin-status[data-status=paused]{color:#f3cd83;background:#49371c;}
html[data-theme=dark] .pp-admin-status[data-status=blocked]{color:#ffa5a5;background:#4b292c;}
.pp-admin-dialog{background:var(--card,var(--card-bg,#fff));color:var(--ink,var(--text-color));border:1px solid var(--pp-shell-border,var(--border-color,#dedce6));border-radius:16px;padding:18px;width:min(510px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;box-sizing:border-box;}
.pp-admin-dialog::backdrop{background:#16122370;}
.pp-admin-dialog h2{font-size:20px;font-weight:750;margin:0;}
.pp-admin-dialog form{display:grid;gap:10px;}
.pp-admin-dialog label{display:grid;gap:4px;font-size:13px;}
.pp-admin-dialog textarea{min-height:70px;resize:vertical;}
.pp-admin-dialog .pp-admin-actions{justify-content:flex-end;}
.pp-admin-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0;}
.pp-admin-detail-grid>div{border-bottom:1px solid var(--pp-shell-border,var(--border-color,#dedce6));padding-bottom:7px;overflow-wrap:anywhere;}
.pp-admin-detail-grid strong{display:block;}
.pp-admin-error{color:#b73535;}
.pp-admin-notice{margin:0 0 12px;padding:10px 12px;border:1px solid var(--pp-shell-border,var(--border-color,#dedce6));border-radius:10px;background:var(--soft,#f4effa);}
#pp-teacher-access-notice{margin:8px 0;padding:10px 12px;border:1px solid #D99B26;border-radius:10px;background:var(--card,var(--card-bg,#fff));font-weight:600;}
@media(max-width:768px){.pp-admin-heading{align-items:flex-start}.pp-admin-table :is(th,td){padding:8px}.pp-admin-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}}

/* Private lesson feedback: no nested buttons; the date and feedback are separate actions. */
#teacher-app .pp-feedback-row .pp-feedback-date{display:flex;align-items:center;gap:6px;min-width:0;}
#teacher-app .pp-feedback-row .pp-feedback-date>button:first-child{min-width:0;min-height:0!important;height:auto!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;background:transparent!important;color:inherit!important;border:0!important;padding:0!important;font:inherit;box-shadow:none!important;}
#teacher-app .pp-feedback-trigger{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 26px;width:26px;height:26px;min-height:0!important;padding:3px!important;border-radius:8px!important;border:1px solid var(--pp-shell-border)!important;background:var(--pp-raised)!important;color:var(--text-color)!important;}
#teacher-app .pp-feedback-trigger[data-saved="true"]{background:var(--pp-violet-active-bg)!important;color:var(--pp-violet-state-fg)!important;border-color:var(--pp-violet-active-border)!important;}
#teacher-app .pp-feedback-trigger:hover:not(:disabled){background:var(--pp-violet-hover-bg)!important;border-color:var(--pp-violet-hover-border)!important;box-shadow:none!important;}
#teacher-app .pp-feedback-trigger:active:not(:disabled){background:var(--pp-violet-active-bg)!important;box-shadow:none!important;}
#teacher-app .pp-feedback-trigger:disabled{opacity:.5;cursor:not-allowed;}
#teacher-app .pp-feedback-trigger:focus-visible,#teacher-app .pp-feedback-date>button:first-child:focus-visible{outline:2px solid var(--pp-control-focus-ring,#7953a6);outline-offset:2px;}
html[data-theme] dialog.pp-lesson-feedback{box-sizing:border-box;width:min(620px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;padding:20px!important;background:var(--pp-modal-surface)!important;color:var(--text-color)!important;border:1px solid var(--pp-shell-border)!important;border-radius:12px!important;}
.pp-lesson-feedback::backdrop{background:#18122388;}
.pp-lesson-feedback h2{margin:0 0 6px;font-size:20px;font-weight:700;}
.pp-lesson-feedback .pp-feedback-meta{font-size:13px;margin:0 0 16px;overflow-wrap:anywhere;}
.pp-lesson-feedback label,.pp-lesson-feedback h3{display:block;font-size:14px;font-weight:650;margin:12px 0 6px;}
.pp-lesson-feedback :is(select,textarea){display:block;width:100%;box-sizing:border-box;border:1px solid var(--pp-shell-border);border-radius:8px;padding:9px 10px;background:var(--pp-modal-input);color:var(--text-color);font:inherit;}
.pp-lesson-feedback textarea{min-height:105px;resize:vertical;}
.pp-lesson-feedback .pp-feedback-notes{max-height:220px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid var(--pp-shell-border);border-radius:8px;background:var(--pp-modal-input);padding:10px;font-size:14px;}
.pp-lesson-feedback .pp-feedback-status{font-size:13px;margin:8px 0;white-space:pre-wrap;}
.pp-lesson-feedback .mb-dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:12px;}
.pp-lesson-feedback .mb-dialog-actions button{min-height:40px;padding:8px 14px;border-radius:12px;}
.pp-lesson-feedback .mb-dialog-actions button.primary{background:#A66B00!important;color:white!important;border-color:#8C5900!important;box-shadow:var(--pp-gold-rest-shadow)!important;}
.pp-lesson-feedback .mb-dialog-actions button.primary:hover:not(:disabled){background:#8C5900!important;box-shadow:var(--pp-gold-hover-shadow)!important;}
.pp-lesson-feedback .mb-dialog-actions button.primary:active:not(:disabled){background:#754a00!important;box-shadow:var(--pp-gold-active-shadow)!important;}
.pp-lesson-feedback .mb-dialog-actions button:not(.primary):hover:not(:disabled){background:var(--pp-violet-hover-bg)!important;box-shadow:none!important;}
.pp-lesson-feedback .mb-dialog-actions button:not(.primary):active:not(:disabled){background:var(--pp-violet-active-bg)!important;box-shadow:none!important;}
.pp-lesson-feedback button:disabled{opacity:.5;cursor:not-allowed;}
@media(max-width:500px){html[data-theme] dialog.pp-lesson-feedback{padding:14px!important;}.pp-lesson-feedback .mb-dialog-actions{justify-content:stretch;}.pp-lesson-feedback .mb-dialog-actions button{flex:1 1 auto;}}

/* Feedback is the primary history-summary action; calendar retains its existing default. */
html[data-theme] #calendar-lesson-summary button.pp-summary-feedback-primary{background:#A66B00!important;color:#fff!important;border-color:#8C5900!important;box-shadow:var(--pp-gold-rest-shadow)!important;}
html[data-theme] #calendar-lesson-summary button.pp-summary-feedback-primary:hover:not(:disabled){background:#8C5900!important;box-shadow:var(--pp-gold-hover-shadow)!important;}
html[data-theme] #calendar-lesson-summary button.pp-summary-feedback-primary:active:not(:disabled){background:#754a00!important;box-shadow:var(--pp-gold-active-shadow)!important;}

/* Inline accordion controls stay flat in both themes; dropdown panels and
   dialogs retain their own elevation. Preserve focus and semantic answer rings. */
html[data-theme] :is(#teacher-app,#student-live-material,.pp-homework-review) .mb-builder :is(.mb-teacher-note-toggle,.mb-teacher-note-add,.mb-teacher-note-heading,.mb-preview-notes-heading){box-shadow:none!important;}

/* Keep the long localized admin label inside the standard nav row. */
#teacher-app .native-sidebar :is([data-platform-admin-sidebar],[data-platform-health-sidebar]){
 min-width:0!important;box-sizing:border-box!important;
}
#teacher-app .native-layout :is(.pp-platform-admin-sidebar,.pp-platform-health-sidebar) .native-nav-text{
 flex:1 1 0%;min-width:0!important;max-width:100%;overflow:hidden!important;
 white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;text-overflow:ellipsis!important;
}
#teacher-app .native-layout.sidebar-collapsed:not(.pp-mobile-open) :is(.pp-platform-admin-sidebar,.pp-platform-health-sidebar) .native-nav-text{display:none!important;}
@media(max-width:850px){
 .pp-admin-table,.pp-admin-table tbody{display:block;}
 .pp-admin-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
 .pp-admin-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:8px;border-bottom:1px solid var(--pp-shell-border,var(--border-color,#dedce6));}
 .pp-admin-table tbody tr:last-child{border-bottom:0;}
 .pp-admin-table tbody td{min-width:0;border-bottom:0;}
 .pp-admin-table td:first-child,.pp-admin-table td[colspan]{grid-column:1/-1;}
 .pp-admin-table td[data-label]::before{content:attr(data-label);display:block;font-size:11px;color:var(--muted,var(--text-secondary,#6b7280));}
}
/* Lesson header hierarchy: a 40px brand mark and quieter 36px tools.
   Builder editing, exercise navigation, modal and form controls retain their sizes. */
html[data-theme] :is(#teacher-app,#student-live-material) .mb-builder.mb-student-preview.mb-builder .mb-preview-controls>:is(button,.mb-preview-timer),
html[data-theme] #teacher-app .mb-builder.mb-student-preview.mb-builder .mb-preview-tools-row :is(.mb-teacher-prompts-button,.mb-teacher-hints-toggle),
html[data-theme] #student-live-material[data-compact-student-live] .pp-student-live-header :is(#pointerToggle,#drawingToolsToggle,.pp-student-return,.mb-preview-vocabulary-button,.mb-preview-notebook-button,.pp-homework-submit,.pp-student-settings-trigger){
 height:36px!important;min-height:36px!important;border-radius:8px!important;font-size:13px!important;font-weight:500!important;
}
html[data-theme] #teacher-app .mb-builder.mb-student-preview .mb-preview-tools-row>.mb-builder-nav-toggle{
 width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;flex:0 0 36px!important;border-radius:8px!important;padding:7px!important;
}
html[data-theme] :is(#teacher-app,#student-live-material) .mb-builder.mb-student-preview .mb-preview-controls>.mb-preview-timer>button{
 height:28px!important;min-height:28px!important;border-radius:6px!important;font-size:12px!important;font-weight:500!important;
}
html[data-theme] #student-live-material[data-compact-student-live] .pp-student-live-header #pointerToolbar{height:36px!important;min-height:36px!important;}
html[data-theme] :is(#teacher-app,#student-live-material) .mb-builder.mb-student-preview.mb-builder .mb-preview-controls>#pointerToolbar{height:auto!important;min-height:36px!important;}
html[data-theme] :is(#teacher-app,#student-live-material) .mb-builder.mb-student-preview .mb-preview-controls #pointerToolbar>.mb-annotation-toggle:is(#pointerToggle,#drawingToolsToggle),
html[data-theme] #student-live-material[data-compact-student-live] .pp-student-live-header #pointerToolbar>.mb-annotation-toggle:is(#pointerToggle,#drawingToolsToggle){
 display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;flex:0 0 36px!important;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;border-radius:8px!important;box-shadow:none!important;
}
html[data-theme] #student-live-material[data-compact-student-live] .pp-student-live-header .pp-student-settings-trigger{width:36px!important;min-width:36px!important;padding:0!important;}

/* System Health: scoped dashboard; shared admin button and surface tokens. */
.pp-health-page{--health-border:var(--pp-shell-border,var(--border-color,#DADCE3));--health-card:var(--card,var(--card-bg,#fff));--health-muted:var(--muted,#6B7280);--health-accent:#4E2A84;--health-track:#E8E5ED;--health-warning:#805500;--health-critical:#A1283A;--health-alert:#FFF5F4;--health-notice:#F4EFFA;--health-soft:#F8F7FA;--health-gold:#D99B26;min-width:0}
.pp-health-dashboard{min-width:0;container-type:inline-size}
html[data-theme="dark"] .pp-health-page{--health-accent:#D2B7F6;--health-track:#51475F;--health-warning:#FFD378;--health-critical:#FF9BAA;--health-alert:#392830;--health-notice:#393245;--health-soft:#393245;--health-muted:#C0B5CC}
.pp-health-page *{box-sizing:border-box}
.pp-health-top{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:12px;margin-bottom:12px}
.pp-health-alerts,.pp-health-fair{border:1px solid var(--health-border);border-radius:var(--pp-panel-radius,12px);background:var(--health-card);padding:12px 14px;min-width:0}
.pp-health-alerts[data-severity=critical]{background:var(--health-alert);border-color:var(--health-critical)}
.pp-health-alerts[data-severity=warning]{background:var(--health-notice)}
.pp-health-alerts h3,.pp-health-fair h3{margin:0 0 6px;font-size:14px}
.pp-health-alerts[data-severity=critical] h3{color:var(--health-critical)}
.pp-health-alert-list{display:flex;gap:5px 14px;flex-wrap:wrap}
.pp-health-alert-list span{font-size:12px;overflow-wrap:anywhere}
.pp-health-alert-list span:not(.pp-admin-muted){font-weight:550}
.pp-health-alert-list span:not(.pp-admin-muted)::before{content:'· ';color:var(--health-critical)}
.pp-health-fair{background:var(--health-notice);position:relative}
.pp-health-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;align-items:start;padding-bottom:24px}
.pp-health-dashboard .pp-health-card{grid-column:span 4;background:var(--health-card);border:1px solid var(--health-border);border-radius:var(--pp-panel-radius,12px);padding:14px;min-width:0;margin:0}
.pp-health-dashboard .pp-health-card.quota{grid-column:1/-1}
.pp-health-dashboard .pp-health-card h3{margin:0 0 9px;font-size:16px;font-weight:700}
.pp-health-card dl,.pp-health-fair dl{margin:0}
.pp-health-card.quota dl{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:10px}
.pp-health-card.quota .pp-health-row{grid-column:span 3;border:1px solid var(--health-border);border-radius:9px;padding:9px 11px;background:var(--health-soft)}
.pp-health-card.quota .pp-health-row:nth-child(n+5){grid-column:span 4}
.pp-health-row{position:relative;min-width:0;padding:6px 0}
.pp-health-card:not(.quota) .pp-health-row+.pp-health-row{border-top:1px solid var(--health-border)}
.pp-health-row dt{font-size:12px;font-weight:650;padding-right:24px;min-height:20px;overflow-wrap:anywhere}
.pp-health-card.quota dt{min-height:22px}
.pp-health-value{display:grid;gap:4px;margin:0;min-width:0;font-variant-numeric:tabular-nums}
.pp-health-number{font-size:24px;font-weight:750;line-height:1.2;overflow-wrap:anywhere;letter-spacing:-.4px}
.pp-health-card:not(.quota) .pp-health-number,.pp-health-fair .pp-health-number{font-size:20px}
.pp-health-line{display:flex;align-items:baseline;justify-content:space-between;gap:6px;flex-wrap:wrap}
.pp-health-limit{font-size:12px;color:var(--health-muted)}
.pp-health-percent{font-weight:700;font-size:12px}
.pp-health-progress{height:7px;width:100%;border-radius:99px;background:var(--health-track);overflow:hidden;margin:4px 0}
.pp-health-progress i{display:block;height:100%;border-radius:99px;background:var(--health-accent)}
.pp-health-progress[data-status=warning] i{background:var(--health-gold)}
.pp-health-progress:is([data-status=critical],[data-status=exceeded]) i{background:var(--health-critical)}
.pp-health-progress[data-status=stale] i{background:var(--health-muted)}
.pp-health-empty-progress{opacity:.55}
.pp-health-status{justify-self:start;display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:650;color:var(--health-muted)}
.pp-health-status:before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;flex:none}
.pp-health-status[data-status=normal]{color:var(--health-accent)}
.pp-health-status[data-status=warning]{color:var(--health-warning)}
.pp-health-status:is([data-status=critical],[data-status=exceeded],[data-status=overdue]){color:var(--health-critical)}
.pp-health-info{position:absolute;top:7px;right:0;z-index:2}
.quota .pp-health-info{top:8px;right:8px}
.pp-health-info summary{list-style:none;border:0;background:transparent;color:var(--health-muted);font-weight:700;font-size:12px;cursor:pointer;width:22px;height:22px;display:grid;place-items:center;border-radius:50%}
.pp-health-info summary::-webkit-details-marker{display:none}
.pp-health-info summary:hover{background:var(--health-track)}
.pp-health-info summary:focus-visible{outline:2px solid var(--health-accent);outline-offset:3px}
.pp-health-tooltip{position:absolute;right:0;top:26px;width:240px;max-width:calc(100vw - 48px);background:var(--health-card);border:1px solid var(--health-border);border-radius:8px;padding:9px 11px;font-size:12px;box-shadow:0 3px 12px #0002;overflow-wrap:anywhere;line-height:1.6}
.pp-health-info:not([open]) .pp-health-tooltip{display:none}
.pp-health-info[open]{z-index:8}
.pp-health-refresh-status:empty{display:none}
.pp-health-refresh-status{margin:0 0 8px}
.pp-health-fair .pp-health-row{padding:0}
.pp-health-fair .pp-health-info{top:0}
.pp-health-fair dt{position:absolute;width:1px;height:1px;min-height:0;padding:0;overflow:hidden;clip-path:inset(50%)}
.pp-health-fair .pp-health-value{gap:4px;padding-right:24px}
.pp-health-card:not(.quota) .pp-health-row dt{min-height:0}
.pp-health-card:not(.quota) .pp-health-value{margin-top:3px}
.pp-health-card:not(.quota) .pp-health-row:first-child{padding-top:0}
.pp-health-card:not(.quota) .pp-health-row:first-child .pp-health-info{top:0}
@container (max-width: 1000px){
  .pp-health-card.quota dl{grid-template-columns:repeat(3,minmax(0,1fr))}
  .pp-health-card.quota .pp-health-row,.pp-health-card.quota .pp-health-row:nth-child(n+5){grid-column:auto}
}
@container (max-width: 760px){
  .pp-health-top{grid-template-columns:1fr}
  .pp-health-dashboard .pp-health-card{grid-column:span 6}
  .pp-health-dashboard .pp-health-card.quota{grid-column:1/-1}
  .pp-health-card.quota dl{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pp-health-dashboard .pp-health-card h3{font-size:14px}
}
@container (max-width: 460px){
  .pp-health-dashboard .pp-health-card{grid-column:1/-1;padding:10px}
  .pp-health-card.quota dl{gap:7px}
  .pp-health-card.quota .pp-health-row{padding:9px}
  .pp-health-number{font-size:20px}
  .pp-health-tooltip{width:180px}
  .pp-health-card.quota .pp-health-row:nth-child(odd) .pp-health-tooltip{left:-8px;right:auto}
  .pp-health-card.quota dt{min-height:42px}
}

/* System Health history (#299): compact, neutral deltas; no new polling. */
.pp-health-history-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px;min-width:0}
.pp-health-history-actions input[hidden]{display:none!important}
.pp-health-history-actions .pp-admin-muted{font-size:12px;overflow-wrap:anywhere}
.pp-health-trend{border-top:1px solid var(--health-border);margin-top:3px;padding-top:5px;min-width:0}
.pp-health-delta{font-size:12px;color:var(--health-muted);cursor:pointer;overflow-wrap:anywhere}
.pp-health-delta:focus-visible{outline:2px solid var(--health-accent);outline-offset:2px}
.pp-health-delta[data-trend=current]{color:var(--health-accent);font-weight:600}
.pp-health-history-body{padding:7px 0;min-width:0;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.pp-health-history-body p{margin:4px 0}
.pp-health-history-controls{display:flex;flex-wrap:wrap;gap:5px;margin:6px 0}
.pp-health-history-controls button{font-size:11px;padding:4px 8px}
.pp-health-history-list{max-height:300px;overflow:auto;min-width:0}
.pp-health-history-point{border-top:1px solid var(--health-border);padding:6px 0}
.pp-health-history-point .pp-health-progress{height:4px}
.pp-health-growth-warning{color:var(--health-warning);font-weight:600}
/* Compact daily history workflow. The download is initiated, not verified on disk. */
.pp-health-history-actions{justify-content:space-between;align-items:center;padding:11px 14px;border:1px solid var(--health-border);border-radius:var(--pp-panel-radius,12px);background:var(--health-card);gap:10px 16px}
.pp-health-history-description{flex:1 1 270px;min-width:0}
.pp-health-history-title{font-size:14px;font-weight:700;margin:0 0 4px}
.pp-health-history-status{font-size:13px;font-weight:600;overflow-wrap:anywhere}
.pp-health-history-status[data-history-state=exported]{color:var(--health-accent)}
.pp-health-history-status[data-history-state=error]{color:var(--health-critical)}
.pp-health-history-description p{margin:4px 0 0}
.pp-health-history-buttons{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.pp-health-history-buttons .pp-admin-button.pp-health-history-save{background:#A66B00;color:#fff;border-color:#8C5900;box-shadow:var(--pp-gold-rest-shadow,none);white-space:normal;text-align:center}
@media(hover:hover){.pp-health-history-buttons .pp-admin-button.pp-health-history-save:hover:not(:disabled){background:#8C5900;border-color:#754a00;box-shadow:var(--pp-gold-hover-shadow,none)}}
.pp-health-history-buttons .pp-admin-button.pp-health-history-save:active:not(:disabled){background:#754a00;border-color:#643f00;box-shadow:var(--pp-gold-active-shadow,none)}
.pp-health-history-more{position:relative}
.pp-health-history-more[hidden]{display:none!important}
.pp-health-history-more summary{display:grid;place-items:center;cursor:pointer;width:36px;height:36px;border:1px solid var(--health-border);border-radius:9px;list-style:none;font-weight:700}
.pp-health-history-more summary::-webkit-details-marker{display:none}
.pp-health-history-more button{position:absolute;right:0;top:calc(100% + 4px);z-index:10;background:var(--health-card);box-shadow:0 3px 12px #0002}
.pp-health-history-more summary:focus-visible,.pp-health-history-save:focus-visible{outline:2px solid var(--health-accent);outline-offset:2px}

/* Compact System Health: one heading action row, then the alert summary. */
.pp-health-top{grid-template-columns:minmax(0,1fr) max-content;gap:10px;align-items:stretch}
.pp-health-top .pp-health-alerts,.pp-health-top .pp-health-fair{padding:6px 12px;display:flex;align-items:center;min-height:36px}
.pp-health-top .pp-health-alerts{gap:8px}
.pp-health-alert-icon{display:inline-grid;place-items:center;flex:0 0 18px;width:18px;height:18px;border:1.5px solid currentColor;border-radius:50%;font-size:12px;line-height:1;font-weight:750;color:var(--health-muted)}
.pp-health-alerts[data-severity=critical] .pp-health-alert-icon{color:var(--health-critical)}
.pp-health-alerts[data-severity=warning] .pp-health-alert-icon{color:var(--health-warning)}
.pp-health-top .pp-health-alert-list{gap:3px 8px;align-items:center;min-width:0}
.pp-health-top .pp-health-alert-list span:first-child::before,.pp-health-top .pp-health-alert-list .pp-health-alert-normal::before{content:none}
.pp-health-top .pp-health-fair{min-width:0}
.pp-health-top .pp-health-fair dl{min-width:0;width:100%}
.pp-health-top .pp-health-fair .pp-health-row{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px}
.pp-health-top .pp-health-fair dt{position:static;width:auto;height:auto;min-height:0;padding:0;overflow:visible;clip-path:none;font-size:12px;font-weight:550}
.pp-health-top .pp-health-fair .pp-health-value{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:0}
.pp-health-top .pp-health-fair .pp-health-number{font-size:14px;white-space:nowrap;letter-spacing:0}
.pp-health-top .pp-health-fair .pp-health-info{position:relative;top:auto;right:auto}
.pp-health-heading{align-items:center;gap:8px 16px}
.pp-health-header-actions{justify-content:flex-end;align-items:center;max-width:100%;min-width:0;margin-left:auto}
.pp-health-header-actions .pp-health-history-actions{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;gap:4px;padding:0;margin:0;border:0;background:transparent;min-width:0;max-width:100%}
.pp-health-header-actions .pp-health-history-buttons{justify-content:flex-end;flex-wrap:wrap;gap:8px}
.pp-health-header-actions .pp-admin-button{min-height:36px;padding:7px 12px;font-size:13px}
.pp-health-header-actions .pp-health-history-more summary{height:36px;width:36px}
.pp-health-header-actions .pp-health-history-status:not([data-history-state=error]){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.pp-health-header-actions .pp-health-history-status[data-history-state=error]{max-width:280px;font-size:12px;text-align:right}
@container (max-width:720px){.pp-health-top{grid-template-columns:minmax(0,1fr)}}
@container (max-width:460px){.pp-health-top .pp-health-fair .pp-health-tooltip{left:auto;right:-12px}}
@media(max-width:600px){
 .pp-health-heading{align-items:flex-start}
 .pp-health-header-actions{margin-left:0;justify-content:flex-start}
 .pp-health-header-actions .pp-health-history-actions{align-items:flex-start}
 .pp-health-header-actions .pp-health-history-buttons{justify-content:flex-start}
 .pp-health-header-actions .pp-health-history-status[data-history-state=error]{text-align:left}
}

/* Information tooltip pointer bridge: no gap-induced flicker, no layout shift. */
.pp-health-tooltip::before{content:'';position:absolute;top:-6px;left:0;right:0;height:6px;background:transparent}

/* Administration: separate account metrics and resource totals. */
#platform-admin-content .pp-admin-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#platform-admin-content .pp-admin-metric-group{min-width:0}
#platform-admin-content .pp-admin-metric-group h3{margin:0 0 6px;font-weight:650;color:var(--text-color,var(--ink))}
#platform-admin-content .pp-admin-metric-group .pp-admin-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
#platform-admin-content .pp-admin-metric strong{overflow-wrap:anywhere}
#platform-admin-content .pp-admin-list-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin:0 0 10px;min-width:0}
#platform-admin-content .pp-admin-directory-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0;min-width:0}
#platform-admin-content .pp-admin-list-bar .pp-admin-toolbar{margin:0 0 0 auto;justify-content:flex-end;min-width:0;max-width:100%;flex:0 1 auto}
#platform-admin-content .pp-admin-list-bar .pp-admin-toolbar input{flex:0 1 240px;width:240px;min-width:min(170px,100%);max-width:280px}
#platform-admin-content .pp-admin-list-bar .pp-admin-toolbar select{max-width:100%}
@media(max-width:600px){#platform-admin-content .pp-admin-list-bar .pp-admin-toolbar{margin-left:0;justify-content:flex-start;width:100%}#platform-admin-content .pp-admin-list-bar .pp-admin-toolbar input{flex:1 1 100%;width:100%;max-width:none;min-width:0}}
html[data-theme] #platform-admin-content .pp-admin-directory-tabs button[aria-pressed="true"]{background:#A66B00!important;color:white!important;border-color:#8C5900!important}
#platform-admin-content .pp-admin-directory-table th:first-child{width:37%}
#platform-admin-content .pp-admin-directory-table th:last-child{width:23%}
@media(max-width:1050px){#platform-admin-content .pp-admin-overview{grid-template-columns:minmax(0,1fr)}}
@media(max-width:450px){#platform-admin-content .pp-admin-metric-group .pp-admin-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media(hover:hover){html[data-theme] #platform-admin-content .pp-admin-directory-tabs button[aria-pressed="true"]:hover{background:#8C5900!important;border-color:#754a00!important}}
html[data-theme] #platform-admin-content .pp-admin-directory-tabs button[aria-pressed="true"]:active{background:#754A00!important;border-color:#643f00!important}

/* Shared content skeleton: themed surfaces, no layout-wide loading overlay. */
.pp-content-skeleton,.pp-startup-skeleton{--pp-skeleton-surface:var(--card-bg,#fff);--pp-skeleton-canvas:var(--bg-color,#f4f5f7);--pp-skeleton-ink:var(--text-color,#1f242d);--pp-skeleton-border:var(--border-color,#e0e3e9);--pp-skeleton-fill:color-mix(in srgb,var(--pp-skeleton-ink) 9%,var(--pp-skeleton-surface))}
html[data-theme="dark"] :is(.pp-content-skeleton,.pp-startup-skeleton){--pp-skeleton-surface:var(--pp-dark-surface,#211C2B);--pp-skeleton-canvas:var(--pp-dark-surface,#211C2B);--pp-skeleton-ink:var(--pp-dark-text,#f4eefa);--pp-skeleton-border:var(--pp-dark-border,#51475f);--pp-skeleton-fill:color-mix(in srgb,var(--pp-skeleton-ink) 12%,var(--pp-skeleton-surface))}
.pp-content-skeleton{box-sizing:border-box;min-width:0;width:100%;padding:0;pointer-events:none}
.pp-skeleton-visual{display:grid;gap:12px;min-width:0}
.pp-skeleton-heading,.pp-skeleton-actions,.pp-skeleton-row{display:flex;align-items:center;gap:12px;min-width:0}
.pp-skeleton-heading{min-height:40px;justify-content:space-between}
.pp-skeleton-bar,.pp-skeleton-icon,.pp-skeleton-cell{background:var(--pp-skeleton-fill);border-radius:var(--pp-control-radius,8px);animation:pp-skeleton-pulse 1.4s ease-in-out infinite}
.pp-skeleton-bar{height:13px;width:50%;min-width:0}
.pp-skeleton-heading>.pp-skeleton-bar:first-child{width:min(38%,230px);height:24px}
.pp-skeleton-heading>.pp-skeleton-bar:last-child{width:min(28%,132px);height:36px}
.pp-skeleton-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr));gap:10px}
.pp-skeleton-card,.pp-skeleton-list,.pp-skeleton-calendar,.pp-skeleton-exercise{border:1px solid var(--pp-skeleton-border);background:var(--pp-skeleton-surface);border-radius:var(--pp-panel-radius,12px);padding:12px;box-sizing:border-box}
.pp-skeleton-card{display:grid;gap:10px;min-height:100px}
.pp-skeleton-card>.pp-skeleton-bar:nth-child(2){height:24px;width:65%}
.pp-skeleton-card>.pp-skeleton-bar:last-child{height:7px;width:90%}
.pp-skeleton-list{display:grid;gap:4px}
.pp-skeleton-row{min-height:42px}
.pp-skeleton-row+.pp-skeleton-row{border-top:1px solid var(--pp-skeleton-border)}
.pp-skeleton-icon{width:26px;height:26px;flex:none}
.pp-skeleton-row>.pp-skeleton-bar:last-child{width:18%;margin-inline-start:auto}
.pp-skeleton-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;min-height:180px}
.pp-skeleton-cell{min-height:64px;opacity:.65}
.pp-skeleton-exercise{display:grid;gap:16px;min-height:180px}
.pp-skeleton-actions>.pp-skeleton-bar{width:132px;height:36px}
[data-pp-content-pending="true"]{min-height:240px}
[data-pp-content-pending="true"]>:not(.pp-content-skeleton-cover){opacity:0!important;pointer-events:none!important}
.pp-content-skeleton-cover{position:absolute;inset:0;z-index:3;pointer-events:auto}
@keyframes pp-skeleton-pulse{50%{opacity:.42}}
@media(prefers-reduced-motion:reduce){.pp-content-skeleton *{animation:none!important}}

/* Session restore uses the same content shapes without a spinning logo. */
.pp-startup-skeleton{position:fixed;inset:0;z-index:2147483647;overflow:auto;background:var(--pp-skeleton-canvas);color:var(--pp-skeleton-ink);box-sizing:border-box;padding:12px}
.pp-startup-frame{width:100%;margin:0 auto;min-width:0}
.pp-startup-header,.pp-startup-rail{background:var(--pp-skeleton-surface);border:1px solid var(--pp-skeleton-border);box-sizing:border-box}
.pp-startup-header{display:flex;align-items:center;justify-content:space-between;min-height:76px;padding:12px 14px;border-radius:26px;margin-bottom:14px;gap:12px}
.pp-startup-brand{display:flex;align-items:center;gap:12px;min-width:0}
.pp-startup-brand img{width:50px;height:50px;flex:none}
.pp-startup-name{font-family:var(--pp-ui-font,system-ui,sans-serif);font-size:24px;font-weight:700}
.pp-startup-profile,.pp-startup-nav-item{background:var(--pp-skeleton-fill);border-radius:var(--pp-control-radius,8px);width:40px;height:40px;flex:none}
.pp-startup-layout{display:grid;grid-template-columns:70px minmax(0,1fr);gap:14px;align-items:start}
.pp-startup-layout.pp-startup-student{grid-template-columns:minmax(0,1fr)}
.pp-startup-rail{border-radius:var(--pp-panel-radius,12px);padding:10px;display:grid;justify-items:center;gap:14px}
.pp-startup-content{min-width:0}
@media(max-width:768px){.pp-startup-skeleton{padding:8px}.pp-startup-header{min-height:60px;padding:10px 12px}.pp-startup-brand img{width:38px;height:38px}.pp-startup-name{font-size:21px}.pp-startup-layout{grid-template-columns:minmax(0,1fr)}.pp-startup-rail{display:none}}

/* One compact comparison period for all System Health history rows. */
.pp-health-quota-heading{display:flex;align-items:center;justify-content:space-between;gap:6px 12px;flex-wrap:wrap;margin-bottom:9px}
.pp-health-dashboard .pp-health-quota-heading h3{margin:0}
.pp-health-period{display:inline-flex;align-items:center;gap:4px;flex:none}
.pp-health-period .pp-admin-button{min-height:28px;padding:4px 10px;font-size:12px;white-space:nowrap}
.pp-health-period .pp-admin-button[aria-pressed="true"]{background:var(--health-notice);color:var(--health-accent);border-color:var(--health-accent)}

/* Read-only shared notes: same visual formatting in live, history and feedback. */
.pp-shared-notes{overflow-wrap:anywhere;min-width:0;}
.pp-shared-notes :is(h1,h2,h3){margin-block:.65em .3em;line-height:1.25;}
.pp-shared-notes h1{font-size:1.4em}.pp-shared-notes h2{font-size:1.2em}.pp-shared-notes h3{font-size:1.05em}
.pp-shared-notes table{border-collapse:collapse;max-width:100%;margin-block:8px;white-space:normal;table-layout:fixed;}
.pp-shared-notes :is(th,td){border:1px solid var(--border-color,var(--line,#9ca3af));padding:5px 8px;overflow-wrap:anywhere;vertical-align:top;}
.pp-shared-notes table[data-table-borders="hidden"] :is(th,td){border-color:transparent;}
.pp-shared-notes blockquote{margin:8px 0;padding-inline-start:10px;border-inline-start:3px solid var(--border-color,#9270be);}
.pp-shared-notes pre{white-space:pre-wrap;overflow-wrap:anywhere;}
.pp-shared-notes [data-callout]{border-inline-start:3px solid #9270be;background:var(--accent-soft);padding:8px;border-radius:6px;margin-block:6px;}
.pp-shared-notes [data-callout="attention"],.pp-shared-notes [data-callout="mistake"]{border-inline-start-color:#C65A60;}
.pp-shared-notes .pp-notes-spoiler{display:inline;cursor:pointer;border-radius:4px;padding-inline:3px;}
.pp-shared-notes .pp-notes-spoiler[aria-pressed="false"],.pp-shared-notes .pp-notes-spoiler[aria-pressed="false"] *{color:transparent!important;text-shadow:none!important;background:#514765!important;box-shadow:none!important;text-decoration:none!important;}
.pp-shared-notes .pp-notes-spoiler:focus-visible{outline:2px solid #D99B26;outline-offset:2px;}
html[data-theme="dark"] .pp-shared-notes span[style*="color: rgb(78, 42, 132)"]:not([style*="background-color"]){color:#C3A8E8!important;}
.pp-shared-notes span[style*="background-color: rgb(243, 223, 171)"]{color:#29242b!important;}
