/* MIHO school interface: shared semantic tokens, no educational-policy changes. */
:root{
 --miho-bg:#07101d;--miho-surface:#101d30;--miho-raised:#17263d;
 --miho-text:#f4f7fc;--miho-muted:#b3c2da;--miho-accent:#8251ef;--miho-accent-hover:#7040d7;
 --miho-success:#67e8ba;--miho-warning:#ffd27a;--miho-error:#ffb2be;--miho-border:#607a9b;--miho-focus:#72dcff;
 --miho-space:16px;--miho-radius:12px;--miho-control:44px;
}
html[data-theme=light]{--miho-bg:#f4f7fd;--miho-surface:#fff;--miho-raised:#edf2fa;--miho-text:#172b49;--miho-muted:#455b78;--miho-border:#a2b3cb;--miho-success:#087552;--miho-warning:#805100;--miho-error:#a11f38;--miho-focus:#135c9e}
body .product-content{font-size:14px;line-height:1.65;color:var(--miho-text)}
body .product-content :is(h1,h2,h3){color:var(--miho-text);text-wrap:balance;overflow-wrap:anywhere}
body .product-content h1{font-size:clamp(26px,3vw,34px)!important;line-height:1.22!important;letter-spacing:-.7px}
body .product-content h2{font-size:20px;line-height:1.4}
body .product-content h3{font-size:16px;line-height:1.45}
body .product-content h1:focus{outline:none}
html body .product-shell .product-content :is(p,small,time){color:var(--miho-muted)}
body .product-content :is(p,label){font-size:14px;line-height:1.65}
body .product-content :is(small,time,.overline,.tt-eyebrow,.tt-muted,.metric-foot,.course-meta,.mh-item-meta,.mh-note){font-size:12px!important;line-height:1.55!important}
body .product-content .miho-caption,body dialog .miho-caption{font-size:12px!important;line-height:1.5!important}
body :is(.product-content,dialog) :is(.muted,.tt-muted,.tt-explanation,.mh-note,.miho-draft-status){color:var(--miho-muted)!important}
body :is(.btn,.tt-button,.category-trigger,.mobile-menu,.top-icon,.theme-switch,.language-current){min-height:var(--miho-control)!important;border-radius:10px;line-height:1.4;font-size:14px!important;touch-action:manipulation}
body :is(.btn,.tt-button){display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;white-space:normal;text-decoration:none;text-align:center}
body :is(.btn.primary,.tt-primary){background:var(--miho-accent)!important;border:1px solid #b394ff!important;color:#fff!important;font-weight:700;box-shadow:none}
body :is(.btn.primary,.tt-primary):hover:not(:disabled){background:var(--miho-accent-hover)!important}
body :is(.btn.secondary,.tt-button:not(.tt-primary)){background:var(--miho-raised);color:var(--miho-text);border:1px solid var(--miho-border)}
body :is(.btn.danger,.btn.destructive,.icon-danger,.tt-danger){background:#481e32!important;color:#ffe7eb!important;border:1px solid #b74c68!important}
body :is(.btn,.tt-button):disabled{opacity:.65;cursor:not-allowed}
body [aria-busy=true]{cursor:progress}
body :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--miho-focus)!important;outline-offset:3px}
body :is(input,textarea,select)::placeholder{color:#a8bad4;opacity:1}
html[data-theme=light] body :is(input,textarea,select)::placeholder{color:#566c89}
body :is(.product-content,dialog) :is(input:not([type=radio]):not([type=checkbox]),select,textarea){border-color:var(--miho-border);border-radius:9px;font-size:14px!important;max-width:100%}
body :is(.product-content,dialog) :is(input[type=radio],input[type=checkbox]){width:20px;min-width:20px;height:20px;flex:none;accent-color:var(--miho-accent)}
body .form-error,body .field-error,body .tt-error{color:var(--miho-error)!important;font-size:14px!important;line-height:1.6}
body :is(.form-error,.tt-error):focus{outline:2px solid var(--miho-error);outline-offset:3px}
body .toast-stack{max-width:min(440px,calc(100vw - 24px));z-index:2147483646}
body dialog{width:min(960px,calc(100vw - 24px));max-height:calc(100dvh - 24px)!important;overscroll-behavior:contain;padding:0;scroll-padding-top:85px}
body dialog .dialog-head{position:sticky;top:0;z-index:8;background:var(--miho-surface);border-bottom:1px solid var(--miho-border);padding:16px 20px}
body dialog .dialog-head h2{font-size:20px!important;line-height:1.4;margin:0}
body dialog .dialog-head [data-close]{display:grid;place-items:center;flex:none;width:44px;height:44px;color:var(--miho-text);background:var(--miho-raised);border:1px solid var(--miho-border);border-radius:9px}
body dialog :is(.work-form,.tt-preview,.tt-wizard){padding:20px;min-width:0}
body dialog .tt-form{padding:0}
body dialog.tt-dialog{padding:0}
body dialog :is(.form-actions,.tt-wizard-footer){position:sticky;bottom:0;z-index:5;background:var(--miho-surface);padding:14px 0 8px;gap:10px;border-top:1px solid var(--miho-border)}
body .miho-context-nav{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 16px;font-size:13px;color:var(--miho-muted)}
body .miho-context-nav a{display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;color:#cfbaff;border:1px solid var(--miho-border);border-radius:9px;text-decoration:none}
body .miho-context-nav span{padding:0 8px}
body .miho-home-action{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:18px 22px;margin:0 0 20px;border:1px solid var(--miho-border);border-left:4px solid var(--miho-accent);border-radius:var(--miho-radius);background:var(--miho-surface)}
body .miho-home-action p{margin:4px 0 0;color:var(--miho-muted);max-width:65ch}
body .miho-home-action h2{font-size:20px;margin:0}
body .miho-save-notice{margin:14px 0;padding:12px 16px;border:1px solid var(--miho-border);border-radius:10px;background:var(--miho-raised);font-size:13px;color:var(--miho-muted)}
body .miho-review-summary{margin:16px 0;padding:16px;border:1px solid var(--miho-border);border-radius:10px;display:grid;gap:7px;background:var(--miho-raised)}
body .miho-review-summary h3,body .miho-review-summary p{margin:0}
body .miho-review-summary label{display:flex;align-items:flex-start;gap:12px}
body .miho-editor-recovery{padding:12px 16px;border:1px solid #8664c5;border-radius:10px;background:var(--miho-raised);margin:12px 20px}
body .miho-editor-recovery p{margin:0 0 10px}
body .miho-busy-label{display:inline-flex;align-items:center;gap:8px}
body .miho-busy-label::before{content:"";width:14px;height:14px;flex:none;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:miho-ui-spin .9s linear infinite}
@keyframes miho-ui-spin{to{transform:rotate(360deg)}}
/* Decorative mini-charts must not imply measurements that do not exist. */
body :is(.metric-viz,.admin-metric-visual){display:none!important}
body .student-home-shell .neon-metrics{height:auto!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
body .student-home-shell .neon-metrics>a{min-height:150px;height:auto!important;display:grid!important;grid-template-columns:52px minmax(0,1fr)!important;grid-template-rows:1fr auto!important;gap:12px;padding:18px!important}
body .neon-metrics .metric-icon{width:48px;height:48px;grid-row:1}
body .neon-metrics .metric-icon .ui-icon{width:27px;height:27px}
body .product-content .neon-metrics .metric-icon svg{display:block}
body .neon-metrics .blue .metric-progress{display:none}
body .neon-metrics .metric-copy{min-width:0}
body .neon-metrics .metric-copy small{display:block;margin-bottom:5px}
body .neon-metrics .metric-copy strong{font-size:27px!important;line-height:1.1}
body .neon-metrics .metric-copy em{font-size:12px!important;line-height:1.5;margin-top:5px}
body .neon-metrics :is(.metric-trend,.metric-foot){display:none!important}
body .neon-metrics .metric-progress{position:static!important;grid-column:1/-1;align-self:end;width:100%;margin:0!important}
body .student-home-shell .neon-course{min-height:280px;height:auto}
body .student-home-shell .neon-course h2{font-size:clamp(22px,2.5vw,30px)!important;line-height:1.35}
body .student-home-shell .neon-home-bottom{grid-template-columns:minmax(0,1.5fr) minmax(250px,1fr) minmax(280px,1fr);height:auto}
body .neon-home-bottom>*{min-width:0}
body .student-home-shell .neon-path{overflow:visible}
body .student-home-shell .neon-path-flow{min-width:0!important;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
body .neon-path-flow>a{min-width:0!important;display:flex;flex-direction:column;flex:none;font-size:14px}
body .neon-path-flow>i{display:none}
body .neon-path-flow p{font-size:13px!important;min-height:0;flex:1}
body .neon-path-flow strong{font-size:14px!important}
body .neon-quick>a{height:auto;min-height:68px;padding:10px;grid-template-columns:40px minmax(0,1fr) 16px}
body .neon-quick>a b{font-size:14px!important}
body .neon-week header{gap:10px}
body .week-chart{height:130px!important}
body .week-chart em{font-size:11px!important;top:-16px}
body .neon-next-task{min-height:100px}
body .neon-next-task :is(b,small){font-size:13px!important}
body .neon-path header>a{font-size:13px!important;height:auto;min-height:44px}
body :is(.admin-ref-metrics,.teacher-ref-metrics){height:auto;gap:16px}
body :is(.admin-ref-metrics,.teacher-ref-metrics)>a{min-height:126px;padding:18px!important;min-width:0;height:auto!important}
body .admin-ref-metrics>a{display:grid;grid-template-columns:48px minmax(0,1fr)!important;gap:12px}
body .admin-ref-metrics>a>span{height:48px;width:48px}
body .admin-ref-metrics>a>div{min-width:0}
body .admin-ref-metrics em{display:block;font-size:12px;line-height:1.6;overflow-wrap:anywhere;white-space:normal!important;color:var(--miho-muted)}
body :is(.teacher-ref-grid,.teacher-ref-metrics,.teacher-ref-bottom,.teacher-current-grid,.teacher-current-main,.teacher-ref-overview,.teacher-ref-classes,.teacher-dashboard-grid,.admin-ref-grid)>*{min-width:0}
body .admin-ref-hero,body .admin-platform-summary{display:none!important}
body .admin-ref-welcome>a{display:none!important}
body .admin-ref-quick a{min-height:70px}
body .admin-hero-next{display:none}
body :is(.filter-tabs,.admin-filter-pills,.nx-activity-tabs,.nx-assignment-tabs,.tt-tabs){flex-wrap:wrap;gap:8px;max-width:100%}
body :is(.filter-tabs,.admin-filter-pills,.nx-activity-tabs,.nx-assignment-tabs,.tt-tabs)>button{min-height:44px;white-space:normal;max-width:100%}
body :is(.tt-filters,.mh-toolbar)>*{min-width:0}
body .tt-filters .tt-search input{border:0!important;background:transparent!important;box-shadow:none!important;min-width:0;padding:8px}
body :is(.nx-assignment-tabs,.nx-activity-tabs,.nx-assignment-filters){display:flex;flex-wrap:wrap}
body :is(.tc-week,.tc-calendar-week){grid-template-columns:repeat(7,minmax(0,1fr))!important;min-width:0}
body :is(.tc-week,.tc-calendar-week)>button{min-width:0!important;padding:8px 2px!important;min-height:48px}
body .teacher-ref-current-body{min-height:0}
body .teacher-ref-current-body>aside:empty{display:none}
body .student-assignment-tabs{display:flex!important;flex-wrap:wrap;gap:8px;min-width:0}
body .student-assignment-tabs button{min-width:0;white-space:normal;min-height:44px}
body .an-tabs{flex-wrap:wrap!important;overflow:visible!important}
body .an-tabs button{min-width:0;min-height:44px;flex:1 1 120px;padding:8px 12px;height:auto}
body .an-layout{grid-template-columns:minmax(0,1fr) 330px}
body :is(.an-layout>main,.an-feature,.an-feature-copy,.an-feature-copy>div,.an-feature-copy>div>div,.an-tools,.an-card-action){min-width:0;max-width:100%}
body .an-feature-copy>div{grid-template-columns:60px minmax(0,1fr)}
body .an-feature-actions{flex-wrap:wrap;overflow:visible!important;min-width:0}
body :is(.an-feature-actions button,.an-feature-actions a,.an-card-action>a){min-height:44px;height:auto;padding:10px 14px;font-size:14px!important;line-height:1.5;white-space:normal}
body .an-feature-actions a.primary{background:var(--miho-accent);color:#fff}
body .an-card-action>a:not(.locked){background:var(--miho-raised);color:var(--miho-text);border-color:var(--miho-border)}
body .an-card-copy h3{white-space:normal;overflow-wrap:anywhere}
body .an-card-copy footer,body .an-card-action{flex-wrap:wrap}
body .an-card-action{gap:10px}
body .tc-calendar{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;max-width:100%}
body .tc-calendar>div{grid-column:1/-1;margin-bottom:8px}
body .tc-calendar>button{min-width:0!important;width:100%;min-height:44px;padding:8px 2px!important}
body .miho-draft-note,body .miho-draft-status{margin:12px 16px;font-size:13px;line-height:1.6;color:var(--miho-muted)}
body .tt-test-list{gap:16px}
body .tt-heading-actions .tt-button{min-width:0}
body .tt-heading-actions{gap:10px}
body .tt-ai-banner{display:none}
body .tt-dialog{--tt-muted:var(--miho-muted);--tt-line:var(--miho-border)}
body .tt-test :is(.tt-meta,.tt-badge){font-size:12px;line-height:1.5}
body .tt-test footer .tt-button{padding:9px 12px;font-size:13px}
body .tt-test :is(.tt-test-top,.tt-meta,footer){gap:12px}
body .tt-question textarea{font-size:15px!important;line-height:1.6}
body .tt-question header{flex-wrap:wrap}
body .tt-options input:not([type=radio]){min-width:0}
body .tt-dialog .tt-generating progress:not([value]){height:12px}
body .tt-steps{display:flex;flex-wrap:wrap;font-size:13px!important;gap:8px 18px}
body .tt-steps [aria-current=step]{color:#dfd2ff;font-weight:800}
body .tt-results-table{overflow:auto;overscroll-behavior:contain}
body .tt-results-table [data-stale]{color:var(--miho-warning)}
body .tt-empty{padding:30px 20px}
body .tt-empty :is(p,small){font-size:14px!important}
body .tt-empty .tt-button{margin:6px}
body .mh-create-mode{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:20px 0}
body .mh-ai-panel{margin:16px 0;padding:16px;border:1px solid var(--miho-border);border-radius:12px}
body .mh-panel>label{margin:16px 0}
body .mh-question{margin:20px 0}
body .mh-item-copy p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
body .mh-empty{padding:28px;text-align:center}
body .mh-empty .btn{margin:6px}
@media(max-width:1200px){
 body .an-layout{grid-template-columns:minmax(0,1fr)}
 body .student-home-shell .neon-home-bottom{grid-template-columns:minmax(0,1fr) minmax(260px,1fr)}
 body .student-home-shell .neon-side{display:grid!important;grid-column:1/-1;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
 body .student-home-shell .neon-course{grid-template-columns:minmax(0,65%) minmax(0,1fr)}
 body .student-home-shell .neon-course>aside{display:none}
 body .student-home-shell .neon-course-copy{position:relative;z-index:3}
 body .product-top .top-profile>span:not(.top-avatar){display:none!important}
}
@media(max-width:1000px){
 body .product-shell .product-top{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:10px!important;padding:12px 16px!important;min-height:76px!important;height:auto!important}
 body .product-top .topbar-primary{display:contents!important}
 body .product-top :is(.header-brand,.home-brand){order:0!important;flex:none;margin:0!important}
 body .product-top :is(.mobile-menu,.top-category){order:1!important;flex:none;margin:0!important}
 body .product-top .top-actions-new{order:2!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;width:auto!important;margin-left:auto!important;flex:1 1 auto}
 body .product-top .global-search{order:3!important;flex:1 1 100%!important;width:100%!important;min-width:0!important;margin:0!important;max-width:none!important}
 body .product-top .language-switcher{position:relative!important;inset:auto!important;display:block!important;flex:none}
 body .product-top .language-current{height:44px!important;min-width:66px;padding:8px!important}
 body .product-top :is(.top-icon,.theme-switch,.top-profile){width:44px!important;height:44px!important;min-width:44px!important;padding:8px!important}
 body .product-top .top-profile{padding:0!important}
 body .product-top .top-profile .top-avatar{width:40px!important;height:40px!important}
 body .product-top :is(.top-streak,.top-profile>svg){display:none!important}
 body .product-top .language-menu{position:absolute!important;top:calc(100% + 8px)!important;right:0!important}
 body .product-top .language-current>span{display:none}
 body .student-home-shell .neon-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body .student-home-shell .neon-home-intro{grid-template-columns:minmax(0,1fr);height:auto;gap:16px}
 body .student-home-shell .neon-today{display:none}
 body .student-home-shell .neon-greeting{padding:0 0 6px}
 body .student-home-shell .neon-home-bottom{display:grid!important;grid-template-columns:minmax(0,1fr)!important}
 body .student-home-shell .neon-side{grid-column:auto}
 body .student-home-shell .neon-quick{display:grid;grid-template-columns:1fr 1fr}
 body .student-home-shell .neon-quick header{grid-column:1/-1}
 body .product-content{padding:20px 16px 96px!important}
}
@media(max-width:600px){
 body .an-feature{grid-template-columns:minmax(0,1fr)!important}
 body .an-feature-copy>div{grid-template-columns:44px minmax(0,1fr);gap:10px}
 body .an-feature-copy>div>i{width:42px;height:42px}
 body .an-feature-actions>*{flex:1 1 120px}
 body .an-card-action{grid-column:1/-1;justify-content:flex-start}
 body .product-top .top-category{width:120px!important;min-width:120px!important}
 body .top-category .category-trigger{padding:8px!important;min-width:120px!important;width:120px!important;gap:6px!important}
 body .top-category .category-trigger>.ui-icon:last-child{display:none!important}
 body .product-content{padding:18px 12px 96px!important}
 body .product-top :is(.header-brand,.home-brand){display:none!important}
 body .product-top .top-actions-new{gap:6px!important}
 body .product-top .category-trigger,body .product-top .miho-category-button{min-width:105px!important;padding:8px 10px!important}
 body .product-top .top-icon,body .product-top .theme-switch{width:40px!important;min-width:40px!important;padding:9px!important}
 body .product-top .language-current{min-width:52px!important}
 body .product-top .language-current .ui-icon{display:none}
 body .miho-restore-assistant{bottom:12px;right:12px;min-height:44px;max-width:calc(100vw - 24px)}
 body .student-home-shell .neon-metrics{gap:12px!important}
 body .student-home-shell .neon-metrics>a{display:flex!important;flex-direction:column!important;align-items:flex-start;gap:10px;min-height:178px;padding:16px!important}
 body .neon-metrics .metric-copy{width:100%;flex:1}
 body .neon-metrics .metric-progress{flex:none;height:7px}
 body .student-home-shell .neon-course{padding-bottom:130px;min-height:0;background:linear-gradient(120deg,#17103b,#24124f)}
 body .student-home-shell .neon-course-copy{padding:20px 18px 28px}
 body .student-home-shell .neon-course-art{height:125px}
 body .student-home-shell .neon-course-art img{width:310px;right:-30px;bottom:-70px;opacity:.6}
 body .student-home-shell .course-meta{display:flex;flex-wrap:wrap;font-size:12px;gap:10px 14px}
 body .student-home-shell .course-meta span{white-space:normal}
 body .student-home-shell .course-prev,body .student-home-shell .course-next{bottom:10px}
 body .student-home-shell .neon-side{grid-template-columns:minmax(0,1fr)}
 body .student-home-shell .neon-path-flow{grid-template-columns:1fr 1fr!important;gap:24px 16px}
 body .student-home-shell .neon-path header{gap:12px;flex-wrap:wrap}
 body .neon-path{min-height:0!important;padding:18px!important}
 body .neon-path-flow>a>span{margin:0 0 10px}
 body .student-home-shell .neon-quick{grid-template-columns:1fr}
 body .neon-quick>a{grid-template-columns:40px minmax(0,1fr) 16px}
 body .admin-ref-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body .admin-ref-metrics>a{display:flex;align-items:flex-start;flex-direction:column;min-height:180px;gap:10px}
 body .admin-ref-metrics strong{font-size:27px!important}
 body .tt-heading-actions{flex-direction:column;align-items:stretch;width:100%}
 body .tt-heading-actions>.tt-button{flex:auto!important;width:100%}
 body .tt-heading-actions>.tt-primary{order:-1}
 body .tt-filters{grid-template-columns:minmax(0,1fr)!important}
 body .tt-sidebar{display:none}
 body .tt-test-top{flex-wrap:wrap}
 body .tt-test-top>.tt-badge{margin-left:0}
 body .tt-question .tt-options label{padding:10px;gap:8px}
 body .tt-wizard-footer{display:grid;grid-template-columns:1fr 1fr}
 body .tt-wizard-footer>.tt-primary{grid-column:1/-1}
 body dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important}
 body dialog :is(.work-form,.tt-preview,.tt-wizard){padding:16px}
 body dialog .dialog-head{padding:12px 16px}
 body .miho-home-action{padding:16px}
 body .miho-home-action>.btn{width:100%}
 body .mh-tabs button{flex:1 1 125px;min-width:0}
 body .mh-toolbar{flex-wrap:wrap}
 body .mh-toolbar>label{flex-basis:100%;width:100%}
 body :is(.admin-filter-pills,.nx-activity-tabs,.nx-assignment-tabs)>button{flex:1 1 120px;min-width:0}
}
@media(prefers-reduced-motion:reduce){body .miho-busy-label::before{animation:none}}

/* Admin tables share one column contract at every viewport width. Keep the
   table scrollable on small screens instead of hiding or overlapping cells. */
body .admin-shell .admin-users-table{min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
body .admin-shell :is(.admin-table-heading,.admin-users-table>article){
 display:grid;grid-template-columns:minmax(220px,1fr) 148px minmax(280px,1.2fr) 184px 112px 148px;
 align-items:center;gap:16px;min-width:1224px;padding:12px 16px;box-sizing:border-box;
}
body .admin-shell .admin-table-heading{height:auto;min-height:48px}
body .admin-shell .admin-users-table>article{min-height:88px}
body .admin-shell :is(.admin-table-heading,.admin-users-table>article)>:nth-child(4){display:block}
body .admin-shell :is(.admin-table-heading,.admin-users-table>article)>*{min-width:0}
body .admin-shell .admin-user-cell{gap:12px}
body .admin-shell .admin-user-cell>.avatar{flex:0 0 36px;width:36px;height:36px}
body .admin-shell .admin-users-table article p{min-width:0;margin:0}
body .admin-shell .admin-users-table article p :is(strong,small){display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.6}
body .admin-shell .admin-role{max-width:100%;white-space:nowrap;justify-self:start;padding:6px 10px}
body .admin-shell .admin-users-table :is(time,.admin-status){white-space:nowrap;overflow-wrap:normal}
body .admin-shell .admin-status{gap:7px}
body .admin-shell .admin-row-actions{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-end;gap:8px;min-height:44px}
body .admin-shell .admin-row-actions button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:10px;box-sizing:border-box}
body .admin-shell .admin-table-heading>:last-child{text-align:right}
body .admin-shell .admin-row-actions>span{white-space:nowrap}
body .admin-shell .admin-period{gap:12px;max-width:100%;min-height:48px;padding:4px 12px}
body .admin-shell .admin-period select{min-width:0;min-height:36px;padding:6px 0;border:0!important;background:transparent!important;box-shadow:none;color:inherit}
@media(max-width:680px){
 body .admin-shell .admin-page-head{align-items:flex-start;gap:16px}
 body .admin-shell .admin-page-head>div{flex:0 0 auto;width:100%}
}

/* Categories are a left-edge drawer for every role, not a floating dropdown. */
body .product-shell .product-top{padding-left:16px!important}
body .product-top :is(.top-category,.mobile-menu){order:-1!important}
body.category-menu-open .product-top .category-trigger{position:static!important;inset:auto!important;transform:none!important;display:inline-flex!important;z-index:auto}
body .category-popover,body .product-shell>.product-sidebar{
 position:fixed!important;inset:0 auto 0 0!important;width:min(288px,calc(100vw - 32px))!important;
 height:100vh!important;height:100dvh!important;max-height:100vh!important;max-height:100dvh!important;
 margin:0!important;box-sizing:border-box;overflow-y:auto!important;overscroll-behavior:contain;
 border:0!important;border-right:1px solid var(--miho-border)!important;border-radius:0!important;z-index:200!important;
}
body .category-popover{padding:0 16px 16px;box-shadow:22px 0 60px rgba(0,0,0,.46)!important}
body .miho-category-backdrop{display:none;position:fixed;inset:0;z-index:199;width:100%;height:100dvh;margin:0;padding:0;border:0;border-radius:0;background:rgba(0,5,15,.58);cursor:pointer}
body:has(.category-popover:not([hidden])) .miho-category-backdrop{display:block}
body .category-drawer-head{height:80px;padding:0;gap:12px}
body .category-drawer-head>button,body .miho-category-close{
 display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 44px;
 width:44px;height:44px;min-width:44px;min-height:44px;padding:0;
 border:1px solid var(--miho-border);border-radius:10px;background:transparent;
 color:var(--miho-text);font-family:inherit;font-size:28px;font-weight:400;line-height:1;cursor:pointer;
}
body .miho-category-close{position:absolute;top:18px;right:12px}
body .product-sidebar>.brand{padding-right:44px}
body .product-sidebar>nav{flex:0 0 auto}
body:has(.category-popover:not([hidden])),body:has(.product-sidebar.open){overflow:hidden}
body:has(.product-sidebar.open) :is(.student-companion,.miho-restore-assistant){visibility:hidden;pointer-events:none}

/* Reserve explicit room for the native select arrow and separate the label. */
body .course-hero>label:has(>[data-course-grade]){display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin:16px 0 0}
body .miho-course select[data-course-grade]{flex:0 1 236px;width:236px;min-width:220px;max-width:100%;min-height:48px;padding:10px 36px 10px 14px;line-height:1.5;box-sizing:border-box}

/* The count and caption form a single centered block inside the donut. */
body .admin-shell .admin-donut-card>div{flex-wrap:wrap;justify-content:center;gap:24px;padding:20px 16px}
body .admin-shell .admin-donut-card>div>span{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;flex:0 0 140px;width:140px;height:140px;isolation:isolate}
body .admin-shell .admin-donut-card>div>span::after{position:absolute;inset:16px;width:auto;height:auto;z-index:0}
body .admin-shell .admin-donut-card>div>span :is(b,small){position:relative;z-index:1;display:block;margin:0;text-align:center;white-space:nowrap;line-height:1.25}
body .admin-shell .admin-donut-card>div>span b{font-size:24px}
body .admin-shell .admin-donut-card>div>span small{font-size:12px}
body .admin-shell .admin-donut-card>div>p{min-width:0;margin:0}
