@import url("../typography-tokens.css?v=type2");
/* Diamètre commun aux cercles Réglages et IA, limité aux centres. */
html.teacher-harmonized #teacher-main{--centre-activity-circle-size:64px}
@media(max-width:560px){html.teacher-harmonized #teacher-main{--centre-activity-circle-size:48px}}
/* Typographie uniforme du centre parental. */
html.teacher-harmonized #teacher-dashboard,
html.teacher-harmonized #teacher-dashboard :is(h1,h2,h3,h4,p,span,div,button,a,label,input,select,textarea,table,th,td,summary,strong,b,small){font-family:Nunito,"Segoe UI",Arial,sans-serif!important;letter-spacing:normal}
html.teacher-harmonized #teacher-dashboard :is(h1,h2,h3,h4){font-weight:700}
html.teacher-harmonized #teacher-dashboard :is(button,label,th,summary,strong,b){font-weight:600}
html.teacher-harmonized #teacher-dashboard :is(p,td,input,select,textarea){font-weight:400;line-height:1.5}
html.teacher-harmonized #teacher-dashboard .family-console-context{font-weight:700}
html.teacher-harmonized .mm-student-picker{align-items:center}
html.teacher-harmonized .family-picker-avatar{display:inline-flex;width:52px;height:52px;flex:0 0 52px;border-radius:50%;overflow:hidden;border:2px solid #63cddd;background:#102943}
html.teacher-harmonized .family-picker-avatar img{display:block;width:100%;height:100%;object-fit:cover}
html.teacher-harmonized #teacher-dashboard .family-subtitle{font-size:var(--matheo-type-caption);margin:20px 0 12px}
.family-view-note{color:#526b7b;font-size:var(--matheo-type-caption);margin:8px 0 18px}
.family-progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px}
.family-progress-row{display:flex;align-items:center;gap:14px;min-width:0;min-height:88px}
.family-planet{position:relative;flex:0 0 96px;width:96px;height:96px;box-sizing:border-box;border:0;background:transparent;padding:0;border-radius:50%;cursor:pointer}
.family-planet img{width:100%;height:100%;object-fit:contain}.family-planet.unworked img{opacity:.38;filter:saturate(.55)}
.family-progress-result{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 10px;flex:1;min-width:0}
.family-progress-track{height:12px;border-radius:20px;background:#dce7ed;overflow:hidden;align-self:center}.family-progress-track i{height:100%;display:block;background:linear-gradient(90deg,#246c90,#36b5c8);border-radius:20px}
.family-progress-result small{grid-column:1/-1;color:#526b7b;font-size:var(--matheo-type-caption)}
.family-domain-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.family-domain-card{border:1px solid #b7cbd7;border-radius:16px;background:#f4f9fc;padding:16px;text-align:center;min-width:0}.family-domain-card.unlocked{border-color:#4a9c7d}
.family-domain-visual{position:relative;width:100%;height:130px;border:0;background:transparent;cursor:help}
.family-domain-art{height:100%;max-width:100%;object-fit:contain}.family-domain-card.locked .family-domain-art{opacity:.72;filter:saturate(.85)}
.family-domain-lock{position:absolute;left:0;top:0;width:32px;height:36px;object-fit:contain}
html.teacher-harmonized #teacher-dashboard .family-domain-card h3{font-size:var(--matheo-type-title);margin:14px 0 8px}.family-domain-card p{font-size:var(--matheo-type-body)}.family-domain-won{color:#217154}
.family-notion-tip{display:none;position:absolute;bottom:calc(100% + 5px);left:0;width:max-content;max-width:min(260px,65vw);padding:10px 12px;z-index:10;border:1px solid #b88c43;border-radius:8px;background:#f2cf96;color:#233849;font:400 14px/1.4 Nunito,Arial,sans-serif;box-shadow:0 3px 9px #152d4930;text-align:center;pointer-events:none}
.family-planet:is(:hover,:focus) .family-notion-tip,.family-domain-visual:is(:hover,:focus) .family-notion-tip{display:block}
@media(max-width:950px){.family-domain-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.family-progress-grid{grid-template-columns:1fr}.family-domain-grid{grid-template-columns:1fr}.family-domain-visual{width:150px}.family-progress-row{gap:10px}}
/* Avatar identique au parcours élève. */
html.teacher-harmonized .family-picker-avatar{width:68px;height:68px;flex:0 0 auto;overflow:hidden;border:2px solid #74dcff;border-radius:50%;background:radial-gradient(circle,#285d85,#071a31 72%)}
html.teacher-harmonized .family-picker-avatar img{width:100%;height:100%;object-fit:contain;transform:scale(1.28) translateY(8%)}
@media(max-width:590px){html.teacher-harmonized .family-picker-avatar{width:55px;height:55px}}
/* Hiérarchie parentale : une famille, trois graisses, palette existante. */
html.teacher-harmonized #teacher-dashboard{font-family:Nunito,"Segoe UI",Arial,sans-serif;font-size:var(--matheo-type-body);line-height:1.5}
html.teacher-harmonized #teacher-dashboard :is(h1,h2){font-size:var(--matheo-type-heading)!important;font-weight:700!important;line-height:1.3}
html.teacher-harmonized #teacher-dashboard :is(h3,h4){font-size:var(--matheo-type-title)!important;font-weight:700!important;line-height:1.35}
html.teacher-harmonized #teacher-dashboard :is(button,input,select,textarea,label){font-size:var(--matheo-type-form)!important;line-height:1.4;font-weight:600!important}
html.teacher-harmonized #teacher-dashboard :is(p,td){font-size:var(--matheo-type-body);font-weight:400}
html.teacher-harmonized #teacher-dashboard :is(small,.family-view-note,.mm-caption){font-size:var(--matheo-type-caption)!important;font-weight:400!important;line-height:1.5}
html.teacher-harmonized #teacher-dashboard .family-console-context{font-size:var(--matheo-type-title)!important;font-weight:700!important;background:#102d4c;color:#74dcff;border-color:#74dcff;box-shadow:none}
html.teacher-harmonized .family-domain-card{background:var(--paper);border-color:var(--paper-line);color:var(--ink)}
html.teacher-harmonized .family-domain-card.unlocked{border-color:var(--forest)}
html.teacher-harmonized .family-domain-won{color:var(--forest)}
html.teacher-harmonized :is(.family-view-note,.family-progress-result small){color:var(--ink-soft)}
html.teacher-harmonized .family-progress-track{background:var(--paper-line)}
html.teacher-harmonized .family-progress-track i{background:var(--matheo-result-high)}
html.teacher-harmonized .family-progress-track[aria-valuenow] i{background:var(--family-rate-color,var(--matheo-result-high))}
/* Surfaces parentales claires sans teinte crème. */
html.teacher-harmonized #teacher-dashboard{--paper:#f3f8fc;--paper-line:#cbdce8}
html.teacher-harmonized #teacher-dashboard #mm-content{background:#f3f8fc}
/* Défis : illustration plus discrète, cadenas lisible. */
html.teacher-harmonized .family-domain-visual{height:110px;display:flex;align-items:center;justify-content:center;margin:auto}
html.teacher-harmonized .family-domain-art{height:78px;width:78px;max-width:65%;object-fit:contain}
html.teacher-harmonized .family-domain-lock{width:76px;height:76px;left:-12px;top:-14px;object-fit:contain}
.family-planet-identity{display:flex;flex-direction:column;align-items:center;flex:0 0 110px;width:110px;gap:5px;text-align:center}
html.teacher-harmonized #teacher-dashboard .family-planet-name{font-size:var(--matheo-type-body);font-weight:600;line-height:1.3;color:var(--ink);overflow-wrap:anywhere;max-width:100%}
.family-planet-identity .family-planet{flex:0 0 96px}
@media(max-width:400px){.family-planet-identity{width:90px;flex-basis:90px}}

/* Habillage parental : poste de pilotage limité au bandeau. */
html.teacher-harmonized #teacher-dashboard #teacher-main .t-header{
 margin-left:-6px!important;margin-right:-6px!important;width:calc(100% + 12px)!important;box-sizing:border-box;
 min-height:185px;padding:20px 22px!important;
 background:linear-gradient(90deg,rgba(5,18,38,.78),rgba(5,18,38,.24) 55%,rgba(5,18,38,.68)),url('../../assets/images/teacher-dashboard/matheo-command-bridge.webp') center 42%/cover no-repeat!important;
 border:1px solid #5b9db8!important;box-shadow:inset 0 0 32px #07172b66,0 6px 18px #0002!important;
}
html.teacher-harmonized #teacher-dashboard #mm-content,html.teacher-harmonized #family-profile-panel{
 background:linear-gradient(135deg,#e0edf4,#d0e2ec)!important;border:1px solid #a8c8d9!important;padding:16px!important;
}
html.teacher-harmonized #teacher-dashboard .family-domain-card{background:#edf5fa!important}
html.teacher-harmonized #teacher-dashboard .family-progress-grid{gap:8px 20px}
@media(max-width:760px){html.teacher-harmonized #teacher-dashboard #teacher-main .t-header{margin-left:0!important;margin-right:0!important;width:100%!important;min-height:190px;padding:16px!important;background-position:center!important}}

html.teacher-harmonized #teacher-dashboard #teacher-main .t-header{align-items:flex-end!important}html.teacher-harmonized #teacher-dashboard .teacher-header-actions{align-self:flex-end!important;margin-bottom:0!important}


/* Image + name dropdowns, planets above satellites. */
html.teacher-harmonized #teacher-main .family-astro-stack{display:flex;flex-direction:column;gap:12px;min-width:0;width:min(360px,100%)}
html.teacher-harmonized #teacher-main .family-astro-stack>label{display:block;width:100%;margin:0;min-width:0}
.family-astro-picker{position:relative;width:100%}
html.teacher-harmonized #teacher-main .family-astro-trigger{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:8px 12px;background:#edf5fa;color:#173c58;border:1px solid #83b5ca;border-radius:12px;text-align:left;font-size:var(--matheo-type-action);line-height:1.4}
.family-astro-arrow{margin-left:auto;flex-shrink:0}
html.teacher-harmonized #teacher-main .family-astro-picker img{width:40px;height:40px;object-fit:contain;flex-shrink:0}
html.teacher-harmonized #teacher-main .family-astro-options{position:absolute;top:calc(100% + 5px);left:0;right:0;z-index:200;max-height:310px;overflow-y:auto;padding:5px;background:#edf5fa;border:1px solid #69b3cc;border-radius:12px;box-shadow:0 8px 22px #071a3940}
html.teacher-harmonized #teacher-main .family-astro-options button{display:flex;align-items:center;gap:12px;width:100%;padding:8px;border:0;border-radius:8px;background:transparent;color:#173c58;text-align:left;font-size:var(--matheo-type-action);line-height:1.4}
html.teacher-harmonized #teacher-main .family-astro-options button:is(:hover,:focus-visible),html.teacher-harmonized #teacher-main .family-astro-options button[aria-selected=true]{background:#cbe7f1;outline-offset:-2px}
html.teacher-harmonized #teacher-main .family-astro-picker span{overflow-wrap:anywhere}

html.teacher-harmonized #teacher-main .family-astro-stack>label{flex:0 0 auto!important;height:auto!important;max-width:none!important}

/* Circular controls preview, matching the learner pathway. */
html.teacher-harmonized #teacher-main .teacher-activity-actions{width:100%;max-width:660px}
html.teacher-harmonized #teacher-main .teacher-activity-row{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:12px 0}
html.teacher-harmonized #teacher-main .family-settings-circle,html.teacher-harmonized #teacher-main .family-ai-circle{display:grid;place-items:center;flex:0 0 var(--centre-activity-circle-size);width:var(--centre-activity-circle-size);height:var(--centre-activity-circle-size);min-width:var(--centre-activity-circle-size);min-height:var(--centre-activity-circle-size);padding:7px;border-radius:50%!important;border:2px solid #61cfe9;background:#102e48;box-shadow:0 0 0 4px #76d8e51a;cursor:pointer}
html.teacher-harmonized #teacher-main .family-settings-circle img{width:calc(var(--centre-activity-circle-size) - 6px);height:calc(var(--centre-activity-circle-size) - 6px);max-width:none;object-fit:contain}
html.teacher-harmonized #teacher-main .family-ai-circle{font-size:18px;font-weight:800;color:white}
html.teacher-harmonized #teacher-main .family-ai-circle span{font-weight:800!important}
html.teacher-harmonized #teacher-main .family-ai-circle.is-on{background:#086b8a;border-color:#79e6ff}
html.teacher-harmonized #teacher-main .family-ai-circle.is-off{background:#344f69;border-color:#9bb4c9;color:#fff}
html.teacher-harmonized #teacher-main .family-ai-circle:disabled{opacity:.6;cursor:wait}
html.teacher-harmonized #teacher-main :is(.family-settings-circle,.family-ai-circle):focus-visible{outline:3px solid #137ea3;outline-offset:5px}

html.teacher-harmonized #teacher-main .family-settings-circle{padding:1px}

@font-face{font-family:Orbitron;src:url('../../assets/fonts/orbitron.ttf') format('truetype');font-weight:400 900;font-display:swap}
html.teacher-harmonized #teacher-dashboard,html.teacher-harmonized #teacher-dashboard *,html.teacher-harmonized #teacher-governance-modal *,html.teacher-harmonized .teacher-ai-dialog *{font-family:Nunito,"Segoe UI",Arial,sans-serif!important}
html.teacher-harmonized #teacher-dashboard #teacher-main #mm-content *{font-family:Nunito,"Segoe UI",Arial,sans-serif!important}
html.teacher-harmonized #teacher-dashboard .teacher-command-navigation button{font-weight:800!important}
html.teacher-harmonized .teacher-space-label{padding:10px 16px;border:1px solid #74dcff;border-radius:12px;color:#74dcff;background:#102d4c;font-size:var(--matheo-type-title);font-weight:800;margin:8px 0 0}
html.teacher-harmonized .teacher-brand{display:flex;flex-direction:column;align-items:flex-start}
html.teacher-harmonized .teacher-header-actions{align-self:flex-end}
html.teacher-harmonized .family-domain-card h3{font-size:var(--matheo-type-title)!important;font-weight:800!important}
html.teacher-harmonized .family-domain-art{width:115px;height:130px;max-width:100%}
html.teacher-harmonized .family-domain-lock{width:92px;height:92px;left:-18px;top:-18px}
html.teacher-harmonized .family-domain-visual{height:140px}
html.teacher-harmonized .teacher-signature-identity>img,html.teacher-harmonized .teacher-signature-identity>div:not(.matheo-signature)>h4{display:none}
html.teacher-harmonized .teacher-activity-row>span{font-weight:800}
html.teacher-harmonized .teacher-ai-inline .switch-track{display:none!important}
html.teacher-harmonized .teacher-ai-inline[aria-checked=true]{background:#086b8a!important;border-color:#79e6ff!important}
html.teacher-harmonized .teacher-ai-inline[aria-checked=false]{background:#344f69!important;border-color:#9bb4c9!important}
html.teacher-harmonized .teacher-ai-inline.is-unknown{background:#344f69!important;font-size:var(--matheo-type-body)!important}
html.teacher-harmonized #teacher-main :is(.teacher-ai-inline,.teacher-governance-open.family-settings-circle){width:var(--centre-activity-circle-size);height:var(--centre-activity-circle-size);min-width:var(--centre-activity-circle-size);min-height:var(--centre-activity-circle-size);flex:0 0 var(--centre-activity-circle-size);border-radius:50%!important;padding:1px;display:grid;place-items:center}
html.teacher-harmonized #teacher-main .teacher-governance-open.family-settings-circle img{width:calc(var(--centre-activity-circle-size) - 6px);height:calc(var(--centre-activity-circle-size) - 6px);max-width:none;object-fit:contain}
html.teacher-harmonized #teacher-main .teacher-ai-inline span{font-size:var(--matheo-type-body);font-weight:800!important;text-align:center;color:white}
html.teacher-harmonized .mm-controls .family-astro-stack>label{flex:0 0 auto!important;height:auto!important}

/* The space font belongs only to the avatar name. */
html body #teacher-dashboard #teacher-main #mm-content .matheo-signature-name,html body #teacher-dashboard #teacher-main #family-profile-panel .matheo-signature-name,html body .matheo-signature .matheo-signature-name{font-family:Orbitron,sans-serif!important}

/* Reset the old two-column switch so its label stays inside the circle. */
html.teacher-harmonized #teacher-main .teacher-activity-actions .teacher-ai-inline{grid-template-columns:1fr;grid-template-rows:1fr;gap:0;overflow:visible}
html.teacher-harmonized #teacher-main .teacher-ai-inline .activity-switch-state{grid-column:1;grid-row:1;display:block;position:static;width:auto;text-align:center;color:#fff!important}
.teacher-settings-tooltip-anchor{display:inline-flex;flex:0 0 var(--centre-activity-circle-size);width:var(--centre-activity-circle-size);height:var(--centre-activity-circle-size)}

/* Emphasize chrono field labels, retaining normal input values. */
html.teacher-harmonized #teacher-main .mm-chrono-reference-settings label{font-weight:800!important}
html.teacher-harmonized #teacher-main .mm-chrono-reference-settings :is(input,select,.family-astro-trigger,.family-astro-options button){font-weight:400!important}

/* Navigation harmonisée avec les sphères de l’aperçu. */
html.teacher-harmonized #teacher-main .teacher-command-navigation{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;padding:18px 12px 12px;}
html.teacher-harmonized #teacher-main .teacher-command-navigation button{display:flex!important;flex-direction:column;align-items:center;gap:12px;background:transparent!important;border:0!important;box-shadow:none!important;padding:8px 2px!important;color:#c0d8e8!important;min-width:0;line-height:1.25;font:800 var(--matheo-type-action) Nunito,sans-serif!important;}
.nav-orb{position:relative;display:grid;place-items:center;width:80px;height:80px;box-sizing:border-box;border-radius:50%;border:1px solid #658da2;background:radial-gradient(circle at 32% 23%,#43738d 0%,#133a55 40%,#07182e 78%);box-shadow:inset -9px -12px 18px #020915a0,inset 3px 3px 10px #b1efff25,0 6px 15px #0005;transition:transform .2s,box-shadow .2s;overflow:hidden;}
.nav-orb:after{content:'';position:absolute;inset:7px;border-radius:50%;border-top:1px solid #c1efff44;pointer-events:none;}
.nav-orb img{width:60px;height:60px;object-fit:contain;filter:drop-shadow(0 2px 3px #0007)}
.nav-orb.portrait img{width:90px;height:116px;max-width:none;position:absolute;top:-3px;}
.nav-orb.group img{position:absolute;width:65px;height:84px;top:4px;max-width:none;}
.nav-orb.group img:first-child{left:-9px;transform:rotate(-9deg)}.nav-orb.group img:last-child{right:-9px;transform:rotate(9deg)}
.nav-orb svg{width:44px;height:44px;stroke:#94ddf1;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
html.teacher-harmonized #teacher-main .teacher-command-navigation button[aria-pressed=true]{color:#a7f4ff!important;}
button[aria-pressed=true] .nav-orb{border:3px solid #b8f8ff;box-shadow:0 0 0 5px #49dfff55,0 0 0 9px #49dfff20,0 0 20px 7px #39ddffb0,0 0 40px 12px #22cfff55,inset 0 0 12px #6ceaff55,inset -9px -12px 18px #020915a0;transform:translateY(-3px)}
.teacher-command-navigation button:hover .nav-orb{transform:translateY(-3px)}
.teacher-command-navigation button:focus-visible{outline:2px solid #75e5ff!important;border-radius:15px;}
@media(max-width:650px){html.teacher-harmonized #teacher-main .teacher-command-navigation{grid-template-columns:repeat(3,minmax(0,1fr));}.nav-orb{width:80px;height:80px;}}


html.teacher-harmonized #teacher-main .teacher-command-navigation button[hidden]{display:none!important}

/* Narrow panels: keep full button labels inside their own row. */
@media(max-width:560px){
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-header-actions{display:flex!important;flex-direction:column!important;gap:8px!important;width:100%!important;min-width:0!important;max-width:100%!important;flex:1 1 100%!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-header-actions .teacher-action{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:44px!important;padding:10px 8px!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;font-size:var(--matheo-type-action)!important;line-height:1.4!important;border-radius:12px!important;text-align:center}
}

/* Compact command centre on narrow screens; shared parent / teacher layout. */
@media(max-width:560px){
html.teacher-harmonized #teacher-dashboard{padding:8px!important}
html.teacher-harmonized #teacher-dashboard #teacher-main{min-width:0;width:100%;box-sizing:border-box}
html.teacher-harmonized #teacher-dashboard #teacher-main .t-header{min-height:0!important;padding:12px!important;gap:10px!important;align-items:center!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-brand{align-items:center!important;width:100%;min-width:0}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-command-header-plaque{width:180px!important;max-width:100%!important}
html.teacher-harmonized #teacher-dashboard #teacher-main :is(.family-console-context,.teacher-space-label){height:auto!important;min-height:36px!important;padding:7px 12px!important;margin:0!important;font-size:var(--matheo-type-title)!important;line-height:1.3!important;border-radius:12px!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-header-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);flex-direction:row!important;gap:8px!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-header-actions .teacher-action{height:auto!important;min-height:48px!important;font-size:var(--matheo-type-action)!important;padding:6px!important;line-height:1.25!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-command-navigation{gap:8px 4px!important;padding:8px 0!important;margin:8px 0!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-command-navigation button{gap:6px!important;padding:5px 1px!important;font-size:var(--matheo-type-action)!important;line-height:1.2!important;min-height:88px}
html.teacher-harmonized .nav-orb{width:56px!important;height:56px!important;box-sizing:border-box}
html.teacher-harmonized .nav-orb img{width:44px;height:44px}
html.teacher-harmonized .nav-orb.portrait img{width:66px;height:85px;top:-3px}
html.teacher-harmonized .nav-orb.group img{width:48px;height:62px;top:2px}
html.teacher-harmonized .nav-orb.group img:first-child{left:-4px}html.teacher-harmonized .nav-orb.group img:last-child{right:-4px}
html.teacher-harmonized .nav-orb svg{width:34px;height:34px}
html.teacher-harmonized #teacher-dashboard #teacher-main :is(#mm-content,#family-profile-panel){padding:12px!important;min-width:0;box-sizing:border-box}
html.teacher-harmonized #teacher-main .family-domain-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
html.teacher-harmonized #teacher-main .family-domain-card{min-width:0!important;padding:10px 5px!important}
html.teacher-harmonized #teacher-main .family-domain-visual{height:110px!important}
html.teacher-harmonized #teacher-main .family-domain-art{width:90px!important;height:100px!important}
html.teacher-harmonized #teacher-main .family-domain-card h3{font-size:var(--matheo-type-title)!important;overflow-wrap:anywhere}
html.teacher-harmonized #teacher-main :is(.mm-chrono-reference-settings form,.profile-actions){display:flex;flex-wrap:wrap;gap:10px;min-width:0}
html.teacher-harmonized #teacher-main .mm-chrono-reference-settings label{flex:1 1 100%;min-width:0!important;max-width:100%;width:100%}
html.teacher-harmonized #teacher-main .mm-chrono-reference-settings :is(input,select){box-sizing:border-box;max-width:100%;width:100%;min-width:0}
html.teacher-harmonized #teacher-main .teacher-activity-row{gap:12px!important}
html.teacher-harmonized #teacher-main .profile{padding:12px!important;min-width:0}
html.teacher-harmonized #teacher-main .profile-code code{overflow-wrap:anywhere}
html.teacher-harmonized #teacher-main :is(.table-scroll,.mm-band-table-wrap){max-width:100%;overflow-x:auto}
}

/* Give locks and trophies separate, non-overlapping spaces on small screens. */
@media(max-width:560px){
html.teacher-harmonized #teacher-dashboard #teacher-main .family-domain-visual{box-sizing:border-box;width:100%!important;max-width:100%;height:154px!important;display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:54px 100px;justify-items:center;align-items:center;padding:0!important;margin:0!important}
html.teacher-harmonized #teacher-main .family-domain-lock{position:static!important;grid-column:1;grid-row:1;width:64px!important;height:54px!important;max-width:100%!important;object-fit:contain;transform:none!important;margin:0!important}
html.teacher-harmonized #teacher-main .family-domain-art{position:static!important;grid-column:1;grid-row:2;width:90px!important;height:100px!important;max-width:100%!important;object-fit:contain;margin:0!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .family-domain-card h3{font-size:var(--matheo-type-title)!important;line-height:1.35!important;overflow-wrap:normal!important;word-break:normal!important;margin:8px 0!important}
}
@media(max-width:359px){
html.teacher-harmonized #teacher-main .family-domain-grid{grid-template-columns:minmax(0,1fr)!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .family-domain-visual{height:110px!important;grid-template-columns:60px 100px;grid-template-rows:110px;justify-content:center;gap:12px}
html.teacher-harmonized #teacher-main .family-domain-lock{grid-row:1;grid-column:1}
html.teacher-harmonized #teacher-main .family-domain-art{grid-row:1;grid-column:2}
}

@media(max-width:560px){
html.teacher-harmonized #teacher-main .matheo-signature{padding:10px 12px;gap:8px;border-radius:14px}
html.teacher-harmonized #teacher-main .matheo-signature-ring{box-sizing:border-box;width:56px;height:56px;border-width:2px;box-shadow:0 0 0 3px #ffffff80,0 0 10px #76cad840}
html.teacher-harmonized #teacher-main .matheo-signature-portrait{width:52px;height:52px}
html.teacher-harmonized #teacher-main .matheo-signature-ring .matheo-signature-portrait img{width:calc(var(--portrait-width,126px) * .619)!important;height:calc(var(--portrait-height,158px) * .619)!important;top:calc(var(--portrait-top,-8px) * .619)}
html.teacher-harmonized #teacher-main .matheo-signature-ring:after{font-size:16px;right:-5px}
html.teacher-harmonized #teacher-main .matheo-signature-name{font-size:var(--matheo-type-body)!important;line-height:1.35}
html.teacher-harmonized body :is(.reward-tooltip,.matheo-duration-tooltip){box-sizing:border-box!important;min-width:0!important;width:max-content!important;max-width:min(220px,calc(100vw - 24px))!important;padding:10px 12px!important;font-family:Nunito,Arial,sans-serif!important;font-size:var(--matheo-type-caption)!important;line-height:1.4!important;letter-spacing:normal!important}
}

/* One typography for navigation and action controls. */
html.teacher-harmonized #teacher-dashboard #teacher-main{--centre-control-size:15px}
html.teacher-harmonized #teacher-dashboard #teacher-main :is(.teacher-command-navigation button,.teacher-header-actions .teacher-action,.profile-actions button,.profile-management button,.mm-chrono-reference-settings button,.teacher-activity-actions button){font-family:Nunito,Arial,sans-serif!important;font-size:var(--centre-control-size)!important;font-weight:700!important;line-height:1.3!important}
html.teacher-harmonized #teacher-dashboard #teacher-main :is(.teacher-command-navigation button,.teacher-header-actions .teacher-action,.teacher-activity-actions button) span{font-size:inherit!important;font-weight:inherit!important}
@media(max-width:560px){html.teacher-harmonized #teacher-dashboard #teacher-main{--centre-control-size:14px}}

@media(max-width:560px){
html.teacher-harmonized #teacher-dashboard #teacher-main :is(.family-settings-circle,.family-ai-circle,.teacher-ai-inline,.teacher-governance-open.family-settings-circle){box-sizing:border-box!important;width:var(--centre-activity-circle-size)!important;height:var(--centre-activity-circle-size)!important;min-width:var(--centre-activity-circle-size)!important;min-height:var(--centre-activity-circle-size)!important;flex:0 0 var(--centre-activity-circle-size)!important;padding:1px!important;box-shadow:0 0 0 3px #76d8e51a!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .family-settings-circle img{width:calc(var(--centre-activity-circle-size) - 6px)!important;height:calc(var(--centre-activity-circle-size) - 6px)!important;max-width:none!important}
html.teacher-harmonized #teacher-main .teacher-settings-tooltip-anchor{width:var(--centre-activity-circle-size);height:var(--centre-activity-circle-size);flex-basis:var(--centre-activity-circle-size)}
}

@media(max-width:560px){
html.teacher-harmonized #teacher-dashboard #teacher-main #mm-content>h3{font-family:Nunito,Arial,sans-serif!important;font-size:var(--matheo-type-title)!important;line-height:1.3!important;font-weight:700!important;margin:0 0 14px!important}
html.teacher-harmonized #teacher-dashboard #teacher-main #mm-content .mm-controls{margin:0 0 14px!important;gap:10px!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .t-student:has(.teacher-activity-actions){padding:12px!important;margin:0 0 16px!important;background:#edf5fa!important;border:1px solid #abc9d9!important;border-radius:14px!important;box-shadow:none!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-activity-actions{max-width:100%!important;width:100%!important;margin:0!important;padding:0!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-activity-row{display:grid!important;grid-template-columns:minmax(0,1fr) var(--centre-activity-circle-size)!important;gap:12px!important;align-items:center!important;box-sizing:border-box;min-height:68px;padding:12px 0!important;margin:0!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-activity-row:first-child{padding-top:0!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-activity-row:last-child{padding-bottom:0!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-activity-row>:is(strong,span):not(.teacher-settings-tooltip-anchor){font-family:Nunito,Arial,sans-serif!important;font-size:var(--matheo-type-caption)!important;font-weight:700!important;line-height:1.4!important;color:#173c58!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-activity-row>button,html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-settings-tooltip-anchor{justify-self:end}
html.teacher-harmonized #teacher-dashboard #teacher-main .mm-chrono-reference-settings{margin-top:16px!important;padding:12px!important;background:#edf5fa;border:1px solid #abc9d9;border-radius:14px}
html.teacher-harmonized #teacher-dashboard #teacher-main .mm-chrono-reference-settings h4{font-family:Nunito,Arial,sans-serif!important;font-size:var(--matheo-type-title)!important;font-weight:700!important;line-height:1.3!important;margin:0 0 12px!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .mm-chrono-reference-settings label{font-size:var(--matheo-type-caption)!important;line-height:1.4!important}
}

/* Shared responsive illustration scale; retain usable touch areas. */
@media(max-width:560px){
html.teacher-harmonized #teacher-main .family-planet{flex-basis:64px;width:64px;height:64px}
html.teacher-harmonized #teacher-main .family-astro-picker img{width:32px;height:32px}
html.teacher-harmonized #teacher-main .family-astro-options button{min-height:48px;box-sizing:border-box}
}

/* Keep the four difficulty levels together on narrow panels. */
@media(max-width:560px){
html.teacher-harmonized #teacher-main .mm-progression-line{display:grid!important;grid-template-columns:24px 32px 12px 32px 12px 32px 12px 32px;gap:6px!important;align-items:center;justify-content:center}
html.teacher-harmonized #teacher-main .mm-progression-line>strong{grid-column:1 / -1;text-align:center;font-size:var(--matheo-type-body);margin-bottom:4px}
html.teacher-harmonized #teacher-main .mm-level-step{box-sizing:border-box;min-width:0!important;width:32px;padding:5px 0!important;font-size:var(--matheo-type-body)!important;text-align:center}
html.teacher-harmonized #teacher-main .family-progress-grid:not(:has(.worked)){grid-template-columns:repeat(2,minmax(0,1fr))}
html.teacher-harmonized #teacher-main .family-progress-grid:not(:has(.worked)) .family-progress-row{justify-content:center}
}

/* Common hierarchy and surface treatment across both centres. */
html.teacher-harmonized #teacher-dashboard #teacher-main #mm-content>h3{font-family:Nunito,Arial,sans-serif!important;font-size:var(--matheo-type-title)!important;font-weight:700!important;line-height:1.3!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .family-subtitle{font-size:var(--matheo-type-caption)!important;font-weight:700!important}
html.teacher-harmonized #teacher-dashboard #teacher-main :is(.profile-status strong,.family-view-note strong){font-weight:700!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .family-progress-grid:not(:has(.worked)){grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}
html.teacher-harmonized #teacher-dashboard #teacher-main .family-progress-grid:not(:has(.worked)) .family-progress-row{justify-content:center}
html.teacher-harmonized #teacher-dashboard #teacher-main .t-student:has(.teacher-activity-actions){background:#edf5fa!important;border:1px solid #abc9d9!important;border-radius:14px!important;max-width:850px;box-sizing:border-box}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-activity-actions{max-width:100%!important}
@media(max-width:560px){
html.teacher-harmonized #teacher-dashboard #teacher-main #mm-content>h3{font-size:var(--matheo-type-title)!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .family-progress-grid:not(:has(.worked)){grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Cancel legacy full-row placement inside the spherical navigation and settings. */
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-command-navigation>button{grid-column:auto!important;grid-row:auto!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-activity-row>button{grid-column:2!important;grid-row:1!important;justify-self:end}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-activity-row>.teacher-settings-tooltip-anchor{grid-column:2!important;grid-row:1!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .teacher-activity-row>span:first-child{grid-column:1!important;grid-row:1!important}
html.teacher-harmonized #teacher-dashboard #teacher-main .t-student p{color:#426078}

/* Text enlargement must grow the header controls instead of clipping text. */
html.teacher-harmonized #teacher-dashboard #teacher-main :is(.family-console-context,.teacher-space-label,.teacher-header-actions .teacher-action){height:auto!important;white-space:normal!important;overflow-wrap:break-word;flex-shrink:0}
html.teacher-harmonized #teacher-dashboard #teacher-main #mm-content h2{font-size:var(--matheo-type-heading)!important;line-height:1.3!important}
@media(max-width:560px){html.teacher-harmonized #teacher-dashboard #teacher-main #mm-content h2{font-size:var(--matheo-type-heading)!important}}

/* Secondary panels and progression help follow the same type hierarchy. */
html.teacher-harmonized #mm-progress-dialog{width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:20px;line-height:1.5;background:#edf5fa;border:1px solid #83b5ca}
html.teacher-harmonized #mm-progress-dialog #mm-progress-title{font-family:Nunito,Arial,sans-serif!important;font-size:var(--matheo-type-title)!important;font-weight:700!important;line-height:1.35;margin:0 38px 14px 0;text-align:left}
html.teacher-harmonized #mm-progress-dialog :is(p,dt,dd){font-family:Nunito,Arial,sans-serif!important;font-size:var(--matheo-type-body)!important;line-height:1.5;text-align:left}
html.teacher-harmonized #mm-progress-dialog dl{margin:14px 0}
html.teacher-harmonized #mm-progress-dialog dl>div{margin:0;padding:10px 0;border-bottom:1px solid #cbdce8}
html.teacher-harmonized #mm-progress-dialog dl>div:last-child{border-bottom:0}
html.teacher-harmonized #mm-progress-dialog dd{margin:3px 0 0}
html.teacher-harmonized #mm-progress-dialog .mm-caption{font-size:var(--matheo-type-caption)!important;color:#426078}
html.teacher-harmonized #mm-progress-dialog .mm-progress-close{width:44px;height:44px;font-size:24px;right:4px;top:4px}
html.teacher-harmonized #teacher-main #family-profile-panel #child h2{font-family:Nunito,Arial,sans-serif!important;font-size:var(--matheo-type-heading)!important;line-height:1.35;font-weight:700!important;margin:0}
html.teacher-harmonized #teacher-main #family-profile-panel #child h3{font-family:Nunito,Arial,sans-serif!important;font-size:var(--matheo-type-title)!important;line-height:1.4;font-weight:700!important;margin:20px 0 8px}
html.teacher-harmonized #teacher-main #family-profile-panel #child :is(p,td,th){font-size:var(--matheo-type-body);line-height:1.5}
@media(max-width:560px){html.teacher-harmonized #mm-progress-dialog{padding:16px}html.teacher-harmonized #mm-progress-dialog #mm-progress-title{font-size:var(--matheo-type-title)!important}html.teacher-harmonized #teacher-main #family-profile-panel #child h2{font-size:var(--matheo-type-heading)!important}}

/* Planet access dialog: same hierarchy, contrast and imagery as its parent panel. */
html.teacher-harmonized #teacher-governance-modal .teacher-governance-modal-card{background:#edf5fa!important;color:#173c58!important;max-width:min(700px,calc(100vw - 24px));padding:20px;box-sizing:border-box}
html.teacher-harmonized #teacher-governance-modal :is(h2,h3){font-family:Nunito,Arial,sans-serif!important;font-size:var(--matheo-type-heading)!important;line-height:1.35;font-weight:700!important}
html.teacher-harmonized #teacher-governance-modal :is(.teacher-governance-help,.teacher-governance-autosave){font-size:var(--matheo-type-body)!important;line-height:1.5;color:#426078!important}
html.teacher-harmonized #teacher-governance-modal .adult-settings-notion-thumb{width:40px!important;height:40px!important}
html.teacher-harmonized #teacher-governance-modal .adult-settings-notion-thumb img{width:100%;height:100%;object-fit:contain}
html.teacher-harmonized #teacher-governance-modal .teacher-governance-row{background:#f3f8fc!important}
@media(max-width:560px){html.teacher-harmonized #teacher-governance-modal :is(h2,h3){font-size:var(--matheo-type-heading)!important}html.teacher-harmonized #teacher-governance-modal .teacher-governance-modal-card{padding:16px}html.teacher-harmonized #teacher-governance-modal .adult-settings-notion-thumb{width:32px!important;height:32px!important}}

/* Les infobulles doivent passer devant le centre enseignant (couche O77 : 99999). */
html.teacher-harmonized body:has(#teacher-dashboard.visible) .reward-tooltip{z-index:100000}

