.mg-tools,.mg-expand,.mg-more{display:none}
@media(max-width:760px){
 .mg-host{min-width:0!important;max-width:100%!important}
 .mg-host:not(.mg-table-host)::before{display:none!important}
 .mg-host.mg-table-host{overflow-x:auto!important;overscroll-behavior-x:contain}
 .mg-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 10px;min-width:0;color:var(--ui-ink,var(--text));font-size:12px}
 .mg-view-button{min-height:44px;padding:8px 12px;border:1px solid var(--ui-line,var(--border));border-radius:10px;background:var(--ui-surface,var(--surface));color:var(--ui-ink,var(--text));font-family:inherit;font-size:12px;font-weight:600;line-height:1.4;touch-action:manipulation;white-space:nowrap}
 .mg-tools [hidden]{display:none!important}
 .mg-more{display:block;width:100%;min-height:46px;padding:10px 14px;margin:4px 0 16px;border:1px solid var(--ui-line,var(--border));border-radius:12px;background:var(--ui-surface,var(--surface));color:var(--ui-accent,var(--blue));font:inherit;font-size:13px;font-weight:600}
 .mg-more[hidden],.mg-more.mg-in-table-mode{display:none!important}
 .mg-view-button[aria-pressed=true]{border-color:var(--ui-accent,var(--blue));background:var(--blue-bg);color:var(--blue)}
 .mg-select-all{display:flex;gap:7px;align-items:center;min-height:44px;margin-left:auto;white-space:nowrap}
 .mg-select-all input{width:20px;height:20px;accent-color:var(--ui-accent,var(--blue))}
 table.mg-cards{display:block!important;min-width:0!important;width:100%!important;max-width:100%!important;table-layout:auto!important;border:0!important;border-spacing:0!important;background:transparent!important}
 table.mg-cards>colgroup,table.mg-cards>thead{display:none!important}
 table.mg-cards>tbody,table.mg-cards>tfoot{display:block;width:100%;min-width:0}
 table.mg-cards>tbody>tr,table.mg-cards>tfoot>tr{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;width:100%!important;min-width:0!important;margin:0 0 10px;padding:14px;border:1px solid var(--ui-line,var(--border));border-radius:14px;background:var(--ui-surface,var(--surface));color:var(--ui-ink,var(--text));height:auto!important}
 table.mg-cards tr[hidden],table.mg-cards tr[style*="display: none"],table.mg-cards tr[style*="display:none"]{display:none!important}
 table.mg-cards>tbody>tr[data-mg-page-hidden]{display:none!important}
 table.mg-cards>tbody>tr>td,table.mg-cards>tfoot>tr>td{position:static!important;display:block;float:none!important;min-width:0!important;max-width:100%!important;width:auto!important;height:auto!important;padding:0!important;border:0!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.5!important;font-size:14px!important;text-align:left!important;vertical-align:top!important;overflow-wrap:anywhere;box-shadow:none!important;background:transparent!important;transform:none!important}
 table.mg-cards>tbody>tr>td:before{content:attr(data-mg-label);display:block;margin:0 0 3px;color:var(--ui-muted,var(--text2));font-size:11px;font-weight:400;line-height:1.5}
 table.mg-cards>tbody>tr>.mg-primary-cell{order:-10;grid-column:1/-1;padding-right:48px!important;min-height:30px;font-size:15px!important;font-weight:650}
 table.mg-cards>tbody>tr>.mg-summary-cell{order:0}
 table.mg-cards>tbody>tr>.mg-primary-cell:before,table.mg-cards>tbody>tr>.mg-selection-cell:before,table.mg-cards>tbody>tr>.mg-group-cell:before{display:none}
 table.mg-cards>tbody>tr.mg-has-selection>.mg-primary-cell{padding-left:30px!important}
 table.mg-cards>tbody>tr>.mg-selection-cell{position:absolute!important;top:15px;left:13px;width:24px!important;min-height:24px;z-index:1}
 table.mg-cards .mg-selection-cell input[type=checkbox]{width:20px;height:20px;accent-color:var(--ui-accent,var(--blue))}
 table.mg-cards>tbody>tr>.mg-detail-cell{display:none;order:1}
 table.mg-cards>tbody>tr.mg-expanded>.mg-detail-cell{display:block;grid-column:1/-1;padding-top:10px!important;border-top:1px solid var(--ui-line,var(--border))!important}
 table.mg-cards>tbody>tr.mg-group-row{display:block;padding:10px 12px;background:var(--ui-bg,var(--bg));border:0;border-radius:8px;color:var(--ui-muted,var(--text2))}
 table.mg-cards>tbody>tr.mg-group-row>.mg-group-cell{color:inherit!important}
 table.mg-cards .mg-expand{position:absolute;display:block;right:5px;top:5px;width:44px;min-width:44px;height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--ui-muted,var(--text2));touch-action:manipulation}
 table.mg-cards .mg-expand:after{content:'⌄';font:500 24px/1 system-ui}
 table.mg-cards .mg-expanded .mg-expand:after{content:'⌃'}
 table.mg-cards td :where(input:not([type=checkbox]):not([type=radio]),select,textarea){max-width:100%!important;min-width:0!important;min-height:44px;font-size:16px!important}
 table.mg-cards td :where(.btn-ghost,.btn-primary,.btn-danger,button:not(.mg-expand)){min-height:44px;max-width:100%;white-space:normal;touch-action:manipulation}
 table.mg-cards td>div{max-width:100%;min-width:0;flex-wrap:wrap}
 table.mg-cards td :where(a,span,div){overflow-wrap:anywhere}
 table.mg-cards td>:where(a,span,div):not([contenteditable]){white-space:normal!important;overflow:visible!important;text-overflow:clip!important;max-height:none!important;min-width:0!important;max-width:100%!important}
 table.mg-cards td>input:not([type=checkbox]):not([type=radio]),table.mg-cards td>select,table.mg-cards td>textarea{width:100%!important}
 table.mg-cards select,table.mg-cards option{visibility:visible}
 table.mg-cards.mg-headers-open>thead{display:block!important;margin-bottom:10px;padding:12px;border:1px solid var(--ui-line,var(--border));border-radius:12px;background:var(--ui-surface,var(--surface))}
 table.mg-cards.mg-headers-open>thead>tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 table.mg-cards.mg-headers-open>thead>tr>th,table.mg-cards.mg-headers-open>thead>tr>td{display:none}
 table.mg-cards.mg-headers-open>thead>tr>.mg-header-control{position:static!important;display:block;min-width:0!important;width:auto!important;min-height:44px;height:auto;white-space:normal;padding:8px;border:1px solid var(--ui-line,var(--border));border-radius:8px;background:var(--ui-bg,var(--bg));font-size:13px}
 table.mg-cards .mg-header-control :where(input,select,button){max-width:100%;min-width:0;min-height:44px;font-size:16px}
 .mg-managed.mg-table-mode{min-width:max(var(--mg-table-min,720px),100%)!important;width:max-content;table-layout:auto!important}
 .mg-managed.mg-table-mode :where(th,td){white-space:nowrap;word-break:normal;min-width:70px}
}
@media print{.mg-tools,.mg-expand{display:none!important}}
