/* Classroom top bar (js/classroom.js › topBar): one row, about 72 px, at the top of the Classroom. Groups: Points ·
   Classroom · Game · Utility, thin dividers between them. Only +1 (green) and −1 (red) are strongly coloured; the rest is calm.
   Narrower bars hide the labels first (icons stay), then Sound / Float / Full screen move into More ⋯. */
.board{padding-bottom:24px}
.cbar{position:sticky;top:0;z-index:16;container-type:inline-size;display:flex;align-items:center;gap:6px;min-height:72px;padding:4px max(12px,env(safe-area-inset-right,0px)) 4px 12px;
  background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--line)}
.cb-g{display:flex;align-items:center;gap:4px;flex:none}
.cb-util{margin-left:auto}
.cb-sep{width:1px;align-self:stretch;margin:10px 4px;background:var(--line);flex:none}
.cb-usep{display:none}
.cb-b{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:56px;min-height:64px;padding:4px 10px;border:0;border-radius:14px;
  background:none;color:var(--ink);font:700 .78rem/1.1 var(--f-ui);cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;white-space:nowrap}
.cb-b:hover{background:var(--surface-2)}
.cb-b[aria-pressed="true"],.cb-b[aria-expanded="true"]{background:var(--mode-soft);color:var(--mode-ink)}
.cb-b:focus-visible,.cb-pop button:focus-visible{outline:3px solid var(--mode);outline-offset:1px}
.cb-i{display:grid;place-items:center;width:34px;height:34px}
.cb-pic{width:34px;height:34px;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(0,0,0,.18))}
.cb-emo{font-size:28px;line-height:1}
.cb-lu{display:grid;place-items:center;color:var(--muted)}
.cb-car{font-size:.7em;opacity:.7}
/* the two strong buttons */
.cb-b.cb-plus{background:#16a34a;color:#fff;min-width:84px;box-shadow:inset 0 -4px 0 rgba(0,0,0,.2)}
.cb-b.cb-plus:hover{background:#15803d}
.cb-b.cb-minus{background:#dc2626;color:#fff;min-width:84px;box-shadow:inset 0 -4px 0 rgba(0,0,0,.2)}
.cb-b.cb-minus:hover{background:#b91c1c}
.cb-big{font:900 34px/1 var(--f-ui);color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.18)}
.cb-b[data-act="cSoundTog"][aria-pressed="true"]{background:none;color:var(--ink)}
.cb-b[data-act="cSoundTog"][aria-pressed="true"]:hover{background:var(--surface-2)}
.cb-b:active{transform:translateY(1px)}
.cb-att.some .cb-t{color:var(--warn-ink,#9a6700)}
/* Random: tap = pick; ▾ = the options */
.cb-wrap{position:relative;display:flex}
.cb-split .cb-b:first-child{border-radius:14px 0 0 14px;padding-right:6px}
.cb-caret{min-width:48px;padding:0;border-radius:0 14px 14px 0;font-size:.9rem;color:var(--muted)}
.cb-pop{position:absolute;top:calc(100% + 6px);left:0;z-index:40;min-width:240px;display:flex;flex-direction:column;padding:6px;border-radius:16px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--sh-3)}
.cb-pop[hidden]{display:none}
.cb-pop.cb-right{left:auto;right:0}
.cb-pop button{display:flex;align-items:center;gap:10px;min-height:48px;padding:6px 12px;border:0;border-radius:10px;background:none;color:var(--ink);font:600 .95rem var(--f-ui);text-align:left;cursor:pointer;white-space:nowrap}
.cb-pop button:hover{background:var(--surface-2)}
.cb-pop button[disabled]{color:var(--muted);cursor:default;background:none}
.cb-pop button[aria-checked="true"]{background:var(--mode-soft);color:var(--mode-ink);font-weight:800}
.cb-pop .pbadge{margin-left:auto}
.cb-mi{width:28px;text-align:center;font-size:1.3rem;flex:none}
.cb-mu{display:none;flex-direction:column;border-bottom:1px solid var(--line);margin-bottom:4px;padding-bottom:4px}
@container (max-width:1360px){ .cb-t{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap} .cb-b{min-width:56px;padding:4px 8px} .cb-b.cb-plus,.cb-b.cb-minus{min-width:64px} }
@container (max-width:960px){ .cb-util>.cb-b{display:none} .cb-mu{display:flex} .cb-sep{margin:10px 2px} }
@container (max-width:740px){ .cbar{flex-wrap:wrap} }
@media (max-width:640px){ .cbar{flex-wrap:wrap;row-gap:2px} .cb-util{margin-left:0} .cb-b{min-width:50px;min-height:56px;padding:2px 6px} .cb-caret{min-width:44px} .cb-sep{display:none} }

/* the board under it: the look (Classic cards, Turbo Race, …). It uses the whole page column beside the left bar
   (no 1440 px cap), and on a big screen (a class TV) the cards grow so they are readable from the back of the room */
.board-in{padding-top:12px;max-width:none}
@media (min-width:1400px){
  .board-in .tiles{grid-template-columns:repeat(auto-fill,minmax(clamp(180px,10.5vw,280px),1fr))}
  .board-in .ctile{min-height:clamp(210px,13vw,300px)}
  .board-in .cav{width:clamp(110px,6.8vw,150px)}
  .board-in .cname{font-size:clamp(1.5rem,1.5vw,2rem)}
}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.room-timer{bottom:calc(16px + env(safe-area-inset-bottom,0px))}
@media (min-width:761px){body[data-mode="classroom"] .toasts{bottom:24px}}
/* absent students (Attendance): dimmed on the cards, hidden on the Race */
.ctile.absent{opacity:.5;filter:grayscale(.6)}
.ct-away{position:absolute;left:50%;top:8px;transform:translateX(-50%);z-index:2;font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;padding:2px 8px;border-radius:999px;background:var(--surface-2);color:var(--muted)}
/* Attendance window */
.att-top{align-items:center;gap:8px;margin:6px 0 10px}
.att-top .grow{flex:1}
.att-list{list-style:none;margin:0 0 14px;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px;max-height:min(56vh,560px);overflow:auto}
.att-li{display:flex;align-items:center;gap:4px;border-radius:14px;background:var(--surface-2)}
.att-row{flex:1;min-width:0;display:flex;align-items:center;gap:10px;min-height:56px;padding:6px 10px;border:0;background:none;color:var(--ink);font:700 1rem var(--f-ui);text-align:left;cursor:pointer;border-radius:14px}
.att-box{width:30px;height:30px;flex:none;border-radius:9px;display:grid;place-items:center;background:#16a34a;color:#fff;font-weight:900}
.att-li.off .att-box{background:var(--surface);box-shadow:inset 0 0 0 2px var(--line)}
.att-li.off .att-name{color:var(--muted);text-decoration:line-through}
.att-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.att-st{font-size:.75rem;font-weight:700;color:var(--muted)}
.att-del{width:44px;height:44px;flex:none;color:var(--muted)}
@media (max-width:899px){ .cbar{top:var(--appbar-h,56px)} }
