/* Compact work surfaces, exclusively scoped to catalogue and exercises. */
#app .mc-catalogue-host{display:block!important;gap:0!important;min-width:0;max-width:100%;background:#fff}
#app .mc-catalogue{display:flex;flex-direction:column;gap:7px;min-width:0;max-width:100%;color:#17263e;font-size:13px;background:#fff}
#app .mc-catalogue *{box-sizing:border-box;min-width:0}
#app .mc-catalogue [hidden]{display:none!important}
#app .mc-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
#app .mc-top h1{font-size:clamp(19px,5vw,26px);line-height:1.2;margin:0;font-weight:800}
#app .mc-search{display:flex;gap:7px;align-items:center;border:1px solid #dce1e7;border-radius:9px;padding:0 7px;color:#526477;background:#fff}
#app .mc-search>svg{flex:none;width:18px;height:18px}
#app .mc-search input{flex:1;width:0;min-height:40px;border:0;padding:4px 0;background:transparent;font-size:14px;box-shadow:none;color:#17263e;outline-offset:2px}
#app .mc-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
#app .mc-filters.mc-extra{grid-template-columns:1fr 1fr auto}
#app .mc-filters select{width:100%;height:36px;min-height:36px;padding:3px 3px;border:1px solid #dce1e7;background:#fff;border-radius:7px;font-size:12px;color:#17263e;text-overflow:ellipsis}
#app .mc-btn,#app .mc-catalogue .mc-icon,#app .mc-catalogue .mc-add-btn{display:inline-flex!important;align-items:center;justify-content:center;gap:4px;flex:none;width:auto;min-height:34px;height:34px;padding:4px 7px;border:1px solid #dce1e7;border-radius:7px;box-shadow:none;background:#fff;color:#26384e;white-space:nowrap;font-size:12px;font-weight:650;cursor:pointer;margin:0;line-height:1.1}
#app .mc-catalogue .mc-icon{width:34px;min-width:34px;padding:5px;border-color:transparent}
#app .mc-catalogue .mc-icon svg{width:19px;height:19px;flex:none}
#app .mc-catalogue .mc-add-btn{background:#c60835;color:#fff;border-color:#c60835;width:38px;height:38px}
#app .mc-menu{position:relative;flex:none;margin:0;padding:0;overflow:visible}
#app .mc-menu summary{list-style:none;cursor:pointer}#app .mc-menu summary::-webkit-details-marker{display:none}
#app .mc-menu-panel{position:absolute;z-index:35;top:100%;right:0;min-width:180px;max-width:min(240px,80vw);background:#fff;border:1px solid #dce1e7;box-shadow:0 6px 22px #17263e20;padding:5px;border-radius:9px;display:flex;flex-direction:column;gap:2px}
#app .mc-menu-panel button{display:flex!important;justify-content:flex-start;align-items:center;gap:6px;min-height:39px;height:auto;width:100%;max-width:100%;padding:7px 9px;white-space:normal;text-align:left;border:0;box-shadow:none;background:white;color:#17263e;font-size:13px;border-radius:5px}
#app .mc-menu-detail{display:block;white-space:normal;overflow-wrap:anywhere;font-size:11px;line-height:1.4;padding:6px;color:#526477;border-bottom:1px solid #e5e9ee}
#app .mc-row .mc-menu-panel{top:auto;bottom:100%;max-height:min(240px,40vh);overflow:auto}
#app .mc-bar{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;border-bottom:1px solid #e5e9ee;padding:0 0 4px;min-height:36px}
#app .mc-count{font-size:12px;white-space:nowrap;margin-right:auto}
#app .mc-select{display:flex;align-items:center;gap:3px;white-space:nowrap;font-size:12px;cursor:pointer}
#app .mc-select input,#app .mc-row-check{appearance:auto;accent-color:#19794b;width:17px;min-width:17px;height:17px;min-height:17px;margin:0;padding:0;flex:none}
#app .mc-sel-count{font-size:11px;color:#526477;white-space:nowrap}
#app .mc-sel-count:empty{display:none}
#app .mc-catalogue .mc-approve{color:#17613b;background:#eaf6ee;border-color:#bedfc9}
#app .mc-catalogue button:disabled{opacity:.48;cursor:default}
#app .mc-list{display:flex;flex-direction:column;gap:0;min-width:0;overflow:visible}
#app .mc-row{display:grid;grid-template-columns:22px minmax(0,1fr);grid-template-rows:auto auto;column-gap:5px;align-items:center;min-height:59px;padding:4px 0;border-bottom:1px solid #e5e9ee;background:#fff;margin:0;min-width:0;overflow:visible}
#app .mc-row>input{grid-column:1;grid-row:1/3;align-self:center;justify-self:center}
#app .mc-line,#app .mc-bottom{grid-column:2;display:flex;align-items:center;gap:5px;min-width:0}
#app .mc-line{grid-row:1}#app .mc-bottom{grid-row:2}
#app .mc-title{font-size:13px;line-height:1.25;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:720;cursor:pointer}
#app .mc-status{font-size:10px;line-height:1.2;padding:3px 6px;border-radius:6px;flex:none;white-space:nowrap;font-weight:750}
#app .mc-published{color:#18643f;background:#e5f4eb}#app .mc-draft{color:#895a17;background:#fff4de}
#app .mc-meta{font-size:11px;color:#627182;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2}
#app .mc-row-actions{display:flex;align-items:center;gap:0;flex:none;margin-left:auto;white-space:nowrap}
#app .mc-row-actions [data-mb="quick-one"]{color:#17613b;background:#eaf6ee}
#app .mc-pager{display:flex;align-items:center;justify-content:center;gap:10px;font-size:13px;padding:1px 0 4px}
#app .mc-empty{padding:12px;color:#64748b;text-align:center;margin:0}
#app .mc-catalogue .mb-quick-status{font-size:11px;margin:0;line-height:1.2}
@media(min-width:700px){#app .mc-row{grid-template-columns:26px minmax(0,1fr) minmax(220px,1fr);grid-template-rows:auto;min-height:50px;gap:8px}#app .mc-row>input{grid-row:1}#app .mc-line{grid-column:2;grid-row:1}#app .mc-bottom{grid-column:3;grid-row:1}#app .mc-title{font-size:14px}#app .mc-meta{font-size:12px}}
@media(max-width:350px){#app .mc-row-actions .mc-icon{width:30px;min-width:30px;padding:4px}#app .mc-bar{gap:3px}#app .mc-select span{font-size:11px}#app .mc-sel-count{display:none}#app .mc-filters select{font-size:11px}}
@media print{#app .mc-print .mc-top,#app .mc-print .mc-search,#app .mc-print .mc-filters,#app .mc-print .mc-bar,#app .mc-print .mc-pager,#app .mc-print .mc-row-actions,#app .mc-print .mc-row-check{display:none!important}#app .mc-print .mc-row.mc-print-item{display:grid!important;break-inside:avoid}#app .mc-print .mc-row:not(.mc-print-item){display:none!important}#app .mc-print .mc-title,#app .mc-print .mc-meta{white-space:normal;overflow:visible}}
/* Work space: the footer stays in the flex shell, not over the question. */
#mbi-root .mbi-shell[data-page="play"] .mbi-header{background:#fff!important;color:#17263e;border-bottom:1px solid #e5e9ee;gap:9px;min-height:45px;padding:4px 12px;padding-top:max(4px,env(safe-area-inset-top))}
#mbi-root .mbi-shell[data-page="play"] .mbi-close{background:transparent;color:#17263e;width:38px;height:38px;min-height:38px;border:0}
#mbi-root .mbi-shell[data-page="play"] .mbi-logo{color:#c60835;border:0;padding:4px}
#mbi-root .mbi-shell[data-page="play"] .mbi-header strong{font-size:15px}
#mbi-root .mbi-shell[data-page="play"] .mbi-header small{display:none}
#mbi-root .mbi-shell[data-page="play"] .mbi-main{padding:8px 12px!important;gap:8px!important;min-width:0;overflow-x:hidden}
#mbi-root .mbi-shell[data-page="play"] .mbi-exercise-head h2{font-size:clamp(17px,4.5vw,23px);line-height:1.25;margin:2px 0}
#mbi-root .mbi-shell[data-page="play"] .mbi-progress{height:5px}
#mbi-root .mbi-shell[data-page="play"] .mbi-situation,#mbi-root .mbi-shell[data-page="play"] .mbi-question{padding:8px 9px!important;gap:7px;border-radius:8px;margin:0;box-shadow:none}
#mbi-root .mbi-shell[data-page="play"] .mbi-situation p{font-size:13px;line-height:1.4;margin:3px 0}
#mbi-root .mbi-shell[data-page="play"] .mbi-question h2{font-size:16px;line-height:1.35}
#mbi-root .mbi-shell[data-page="play"] .mbi-choice{min-height:44px;padding:7px 9px!important;gap:9px;border-radius:8px}
#mbi-root .mbi-shell[data-page="play"] .mbi-footer{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:5px;padding:6px 8px max(6px,env(safe-area-inset-bottom));box-shadow:none;border-top:1px solid #e5e9ee;flex:none}
#mbi-root .mbi-footer .mbi-button{width:auto!important;flex:0 1 auto!important;min-width:0;min-height:40px;height:auto;border-radius:7px;padding:6px 10px!important;white-space:normal;font-size:13px;line-height:1.15}
#mbi-root .mbi-shell[data-page="play"] .mbi-footer .mc-back{width:37px!important;flex:0 0 37px!important;padding:4px!important}
#mbi-root .mbi-shell[data-page="play"] .mbi-footer .mc-verify{background:#197f44!important;border-color:#197f44!important;color:white!important}
#mbi-root .mbi-shell[data-page="play"] .mbi-footer .mbi-primary{background:#fff!important;border:1px solid #526477!important;color:#17263e!important}
#mbi-root .mbi-shell[data-page="play"] .mbi-footer .mbi-primary[data-i-act="submit"],#mbi-root .mbi-shell[data-page="play"] .mbi-footer .mbi-primary[data-i-act="fact-next"]{border-color:#197f44!important;color:#17613b!important}
#mbi-root .mc-hint-panel:not([open]){display:none!important}
#mbi-root .mc-hint-panel[open]{padding:7px 9px;background:#edf5ff;border:1px solid #d6e5f5;border-radius:8px}
#mbi-root .mbi-shell[data-page="play"] .mbi-notice{padding:7px 9px}
#mbi-root .mbi-shell[data-page="play"] .mbi-feedback{padding:7px 9px;border-radius:8px}
#mbi-root .mbi-main>.mbi-button,#mbi-root .mbi-ai .mbi-button{align-self:flex-start;width:auto!important;max-width:100%;min-height:40px;padding:7px 12px}
#mbi-root [data-facture] .fact-feedback{padding:5px 7px;margin:0}#mbi-root [data-facture] .fact-top h2{margin:2px 0 4px}
@media(max-width:360px){#mbi-root .mbi-shell[data-page="play"] .mbi-main{padding:6px 8px!important;gap:6px!important}#mbi-root .mbi-footer .mbi-button{font-size:12px;padding:5px 7px!important}}
@media(max-height:620px){#mbi-root .mbi-shell[data-page="play"] .mbi-header{min-height:38px}#mbi-root .mbi-shell[data-page="play"] .mbi-main{gap:5px!important;padding-top:5px!important}#mbi-root .mbi-shell[data-page="play"] .mbi-footer .mbi-button{min-height:36px}}
@media(max-height:620px) and (max-width:480px){
 #mbi-root .mbi-shell[data-facture] .mbi-header{padding:2px 8px;min-height:36px}
 #mbi-root .mbi-shell[data-facture] .mbi-close{height:32px;min-height:32px}
 #mbi-root .mbi-shell[data-facture] .mbi-facture{gap:4px}
 #mbi-root .mbi-shell[data-facture] .fact-top h2{font-size:16px;margin:1px 0 3px}
 #mbi-root .mbi-shell[data-facture] .fact-steps{margin-bottom:3px;gap:3px}
 #mbi-root .mbi-shell[data-facture] .fact-steps span{padding:3px 1px}
 #mbi-root .mbi-shell[data-facture] .fact-instruction{font-size:11px;line-height:1.25;margin:0}
 #mbi-root .mbi-shell[data-facture] .fact-doc-head{padding:3px 6px}
 #mbi-root .mbi-shell[data-facture] .fact-party,#mbi-root .mbi-shell[data-facture] .fact-givens{font-size:10px;padding:2px 6px}
 #mbi-root .mbi-shell[data-facture] .fact-table:not(.fact-journal) th,#mbi-root .mbi-shell[data-facture] .fact-table:not(.fact-journal) td{padding:1px 4px}
 #mbi-root .mbi-shell[data-facture] .fact-table:not(.fact-journal) input.fact-input{height:24px;min-height:24px;line-height:1.1;padding:1px 3px}
}
