/* Management controls are explicitly marked in the compiled classroom components. */
[data-admin-only]{display:none!important}
.classroom-timer-badge{position:fixed;left:16px;bottom:16px;z-index:3500;background:#fff9df;color:#594819;border:2px solid #e8d591;border-radius:14px;padding:12px 16px;font-size:20px;font-weight:700;box-shadow:0 3px 12px #0002;cursor:pointer}
.classroom-timer-badge[hidden]{display:none}
.classroom-timer-modal .modal-body>div:first-child>div{font-size:clamp(32px,7vw,90px)!important}
.classroom-timer-modal .modal-body>div{max-width:100%;box-sizing:border-box;flex-wrap:wrap}
.classroom-rollcall-modal .modal-body>div:nth-child(2)>div>div{font-size:clamp(24px,5vw,64px)!important;overflow-wrap:anywhere}
.classroom-admin-link{display:none!important}

.classroom-title-hidden{display:none!important}
.classroom-class-select{appearance:auto;position:relative;z-index:2;min-height:32px;max-width:min(42vw,420px);border:0;background:transparent;color:#263d38;font-size:26px;font-weight:900;line-height:1.2;padding:4px 28px 4px 0;outline:none;cursor:pointer}
.classroom-class-select:focus{box-shadow:0 2px 0 #69a790}
.classroom-logout-link{display:inline-flex;align-items:center;justify-content:center;min-height:28px;margin-left:2px;padding:5px 10px;border:1px solid rgba(71,121,105,.28);border-radius:999px;background:rgba(255,255,255,.36);color:#55786e;font-size:12px;font-weight:700;line-height:1;box-shadow:none;opacity:.68;cursor:pointer;transition:opacity .15s ease,background .15s ease,color .15s ease,border-color .15s ease}
.classroom-logout-link:hover,.classroom-logout-link:focus-visible{opacity:1;background:rgba(255,255,255,.72);color:#31594e;border-color:rgba(71,121,105,.45);outline:none}
.classroom-logout-link:disabled{opacity:.45;cursor:wait}
.classroom-slogan-inline{display:inline-flex;align-items:center;max-width:min(46vw,520px);min-height:0;margin-left:12px;padding:0;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#565656;font-size:15px;font-weight:700;line-height:1.35;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.classroom-slogan-inline *{border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;margin:0!important;min-height:0!important}

.classroom-class-switch-visible{display:inline-flex!important}
.bubble_classList.classroom-class-switch-restored{display:flex!important;align-items:center!important;gap:10px!important;height:auto!important;min-height:38px!important;margin-top:10px!important;overflow:visible!important}
.bubble_classList.classroom-class-switch-restored>div{display:flex!important;align-items:center!important;gap:10px!important;height:auto!important;width:auto!important;overflow:visible!important}
.student-name-input[readonly]{cursor:default;outline:none}
header{padding-bottom:18px!important}
header .classList[data-admin-only]{display:none!important}
.layout{grid-template-columns:minmax(0,1fr) 360px!important}
.layout>*{min-width:0}
.search-container>div:first-child{flex-wrap:wrap}
.myclass-pet-strip{grid-template-columns:minmax(0,1fr);gap:8px;box-sizing:border-box;text-align:center}
.myclass-pet-image{width:min(126px,100%);height:126px;justify-self:center}
.myclass-pet-title{flex-wrap:wrap;justify-content:center;font-size:13px;gap:3px 8px}
.myclass-pet-title span{white-space:normal;overflow:visible;text-overflow:clip}
.myclass-pet-title strong{white-space:nowrap}
.myclass-pet-state{min-height:32px;font-size:12px;line-height:1.5}
.student-card .control-btn{min-height:30px;font-size:12px}
.student-card .student-controls{position:relative;z-index:5000}
.student-card .student-controls .control-btn{position:relative;z-index:5001}
/* Student controls remain above their cards for touch recovery, so every
   application modal must establish a higher page-level stacking context. */
.modal{z-index:10000!important}
.modal .modal-content{position:relative;z-index:10001}
@media(min-width:701px){
  .wrap{width:100%!important;max-width:1840px!important;margin:0 auto!important;padding:14px 44px 0!important;box-sizing:border-box}
  .hero{width:100%!important;box-sizing:border-box}
  .layout{display:grid!important;grid-template-columns:minmax(0,1fr) 360px!important;gap:18px!important;align-items:start!important;width:100%!important;margin:22px auto 0!important;box-sizing:border-box}
  .layout main,.tab-content{min-width:0!important;width:100%!important;box-sizing:border-box}
  .tabs{width:100%!important;box-sizing:border-box}
  .tab-content{padding:20px!important;overflow:visible!important}
  .search-container{width:100%!important;box-sizing:border-box;margin-bottom:18px!important}
  .search-container>div:first-child{display:flex!important;flex-wrap:wrap!important;gap:12px!important;align-items:center!important}
  .student-list,.classroom-student-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(218px,1fr))!important;gap:24px 18px!important;align-items:stretch!important;width:100%!important;box-sizing:border-box;padding:0!important}
  .student-card{width:auto!important;min-width:0!important;max-width:none!important;margin:0!important;box-sizing:border-box;min-height:182px!important;padding:14px!important}
  .student-card .controls{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;width:100%!important}
  .student-card .control-btn,.student-card button{min-width:0!important;box-sizing:border-box}
  .side{width:360px!important;box-sizing:border-box}
}
@media(max-width:1100px){.layout{grid-template-columns:minmax(0,1fr)!important}.side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}
@media(max-width:700px){
  html,body,#app{width:100%;max-width:100%;min-width:0;overflow-x:hidden}
  body{min-height:100svh;padding-bottom:calc(132px + env(safe-area-inset-bottom,0px))}
  .wrap{width:100%!important;max-width:100%!important;margin:0!important;padding:8px 12px 0!important;box-sizing:border-box;overflow-x:hidden}
  header{position:relative!important;top:auto!important;padding:0!important}
  .hero{width:100%!important;max-width:100%!important;margin:0!important;padding:14px!important;border-radius:20px!important;box-sizing:border-box}
  .brand{flex-wrap:wrap;gap:12px}
  .brand>div:first-child{flex-shrink:0}
  .brand .title{font-size:19px;white-space:normal}.classroom-class-select{max-width:calc(100vw - 168px);min-height:38px;font-size:20px;flex:1 1 auto;min-width:0;border:1px solid rgba(71,121,105,.18);border-radius:999px;background:rgba(255,255,255,.22);padding-left:10px}.classroom-logout-link{flex:0 0 auto;margin-left:0;padding:5px 8px;font-size:12px;opacity:.62}
  .brand>.sun{width:42px;height:42px;flex:0 0 42px}
  .brand>div[style*="margin-left"]{margin-left:0!important}
  .classroom-admin-link,.classroom-display-controls,.classroom-slogan-inline,.brand>.sun{display:none!important}
  #cardSizeSlider{width:72px!important}
  .header-controls{flex-wrap:wrap;gap:8px;max-width:100%}
  .layout{width:100%!important;max-width:100%!important;margin-top:12px!important;box-sizing:border-box}
  .tabs,.tab-content{width:100%!important;max-width:100%!important;box-sizing:border-box}
  .tab-content{padding:12px!important;overflow-x:hidden}
  .student-list,.classroom-student-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;padding-right:0!important;gap:12px!important}
  .student-card{min-width:0!important;width:auto!important;margin:0!important;padding:12px!important;min-height:auto!important}
  .student-card>div:first-child{position:static!important;display:flex!important;justify-content:flex-end;gap:6px;margin-bottom:8px}
  .student-card>div:nth-child(2){display:grid!important;grid-template-columns:auto auto minmax(0,1fr)!important;align-items:center!important;gap:8px!important;width:100%!important}
  .student-avatar{width:38px!important;height:38px!important;min-width:38px!important;font-size:18px!important}
  .myclass-student-number{white-space:nowrap!important;min-width:66px!important;justify-content:center!important}
  .student-name-input{min-width:0!important;width:100%!important;max-width:100%!important;box-sizing:border-box;font-size:14px!important;text-align:left!important}
  .student-card .student-controls{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;width:100%!important}
  .student-card .control-btn{min-width:0!important;width:100%!important;box-sizing:border-box;white-space:nowrap!important}
  .myclass-pet-image{height:100px;width:100px}
  .myclass-pet-strip{padding:7px!important}
  .side{grid-template-columns:minmax(0,1fr);width:100%;max-width:100%;box-sizing:border-box}
  .modal-content{max-width:calc(100vw - 24px)!important;box-sizing:border-box}
  .search-container{position:fixed!important;top:86px!important;right:12px!important;bottom:auto!important;left:auto!important;z-index:4048;width:min(328px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;max-height:calc(100svh - 118px - env(safe-area-inset-bottom,0px))!important;box-sizing:border-box;overflow:auto;padding:14px!important;border:2px solid var(--line,#efe7da);border-radius:18px;background:var(--paper,#fff);box-shadow:0 8px 0 var(--shadow,#efe4cf),0 16px 32px #0002;opacity:0;pointer-events:none;transform:translateX(calc(100% + 24px));transition:transform .22s ease,opacity .22s ease}
  html.classroom-mobile-tools-open .search-container{opacity:1;pointer-events:auto;transform:translateX(0)}
  .search-container>div:first-child{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important;align-items:stretch!important}
  .search-container .form-control,.search-container select,.search-container input{width:100%!important;max-width:100%!important;box-sizing:border-box}
  .search-container button{width:100%!important;min-width:0!important;box-sizing:border-box;justify-content:center}
  .search-container>div:first-child>*:last-child:nth-child(odd){grid-column:1/-1}
  .classroom-mobile-tools-toggle{display:inline-flex;position:fixed;right:12px;bottom:calc(18px + env(safe-area-inset-bottom,0px));z-index:4052;align-items:center;justify-content:center;min-width:56px;min-height:56px;padding:0 12px;border:2px solid var(--line,#efe7da);border-radius:18px;background:#e9f8ed;color:#064f46;font-size:15px;font-weight:900;box-shadow:0 6px 0 var(--shadow,#efe4cf);transform:none;cursor:pointer}
  .classroom-mobile-tools-toggle[aria-expanded="true"]{background:#69a790;color:#fff;box-shadow:0 6px 0 #568a77}
  .classroom-mobile-tools-backdrop{position:fixed;inset:0;z-index:4047;display:none;pointer-events:none;background:rgba(58,58,58,.18)}
  html.classroom-mobile-tools-open .classroom-mobile-tools-backdrop{display:block;pointer-events:auto}
  html.classroom-mobile-tools-open .brand .classroom-class-select,html.classroom-mobile-tools-open .brand .classroom-logout-link{position:relative;z-index:4053;pointer-events:auto}
  .myclass-group-toolbar.classroom-mobile-panel-toolbar,.myclass-pet-toolbar.classroom-mobile-panel-toolbar{position:static!important;left:auto!important;right:auto!important;bottom:auto!important;z-index:auto!important;display:flex!important;width:100%;max-width:100%;margin:10px 0 0!important;box-sizing:border-box;justify-content:center;flex-wrap:wrap;box-shadow:0 4px 0 var(--shadow,#efe4cf)}
  .myclass-group-toolbar.classroom-mobile-panel-toolbar button,.myclass-pet-toolbar.classroom-mobile-panel-toolbar button{width:100%;min-height:44px}
  .classroom-timer-badge{left:12px;right:12px;bottom:calc(126px + env(safe-area-inset-bottom,0px));box-sizing:border-box;text-align:center}
}
@media(max-width:360px){
  .student-list,.classroom-student-grid{grid-template-columns:minmax(0,1fr)!important}
}









/* myclass-click-recovery: keep per-student actions usable even when multi-select mode is stuck on. */
body.multi-select-mode .student-controls,
body.multi-select-mode .student-controls * {
  pointer-events: auto !important;
}
body.multi-select-mode .student-controls {
  opacity: 1 !important;
}
/* The multi-select checkbox is rendered as a transparent full-card layer.
   Keep it inert during normal browsing so it cannot swallow point buttons;
   only enable it while the page is explicitly in multi-select mode. */
.student-card .select {
  pointer-events: none !important;
}
body.multi-select-mode .student-card .select {
  pointer-events: auto !important;
  z-index: 30 !important;
}
body.multi-select-mode .student-card .multi-select-checkbox {
  display: block !important;
  pointer-events: auto !important;
  z-index: 40 !important;
}
.control-btn,
.student-controls button,
.student-controls [role="button"] {
  pointer-events: auto !important;
}
