body { background:#e9f2f7; }
#pair-screen { min-height:100dvh; display:grid; place-items:center; padding:24px; }
.pair-card { width:min(420px,100%); padding:40px 36px; background:white; border:1px solid #c5d4df; border-radius:16px; box-shadow:0 12px 40px #16324018; }
.pair-logo { width:56px; height:56px; display:block; margin:0 auto 16px; border-radius:12px; }
.pair-card h1 { margin:0 0 12px; color:#163340; text-align:center; font-size:28px; font-weight:600; }
.pair-hint { margin:0 0 24px; font-size:16px; line-height:1.4; color:var(--muted); text-align:center; }
.appbar .app-logo { width:24px; height:24px; }
.pair-card label { display:block; font-size:16px; font-weight:600; color:#163340; }
.pair-card input { width:100%; min-height:72px; font-size:40px; letter-spacing:.28em; text-align:center; margin:12px 0 20px; padding:12px; border-radius:10px; }
.pair-card button { width:100%; min-height:52px; font-size:18px; border-radius:10px; }
#pair-status { color:#a83232; }
.child-home-layout { display:grid; grid-template-columns:112px minmax(0,1fr); min-height:calc(100dvh - 40px); }
.student-nav { background:white; }
.student-nav .nav-tile { min-height:90px; font-size:13px; }
.assignment-content { min-width:0; display:flex; flex-direction:column; }
#child-activities { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px; padding:40px 40px 24px; align-content:start; flex:1; }
.child-card { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:14px; border:1px solid #c5d4df; background:white; border-radius:16px; padding:16px 14px 18px; min-width:0; min-height:44px; font-size:22px; font-weight:600; text-align:center; color:#163340; box-shadow:0 4px 14px #16324014; }
.child-card:hover,.child-card:focus-visible { background:#e9f2f7; border-color:#4c6373; }
.child-preview { width:100%; display:flex; justify-content:center; align-items:center; height:200px; overflow:hidden; pointer-events:none; background:#f7fafc; border-radius:12px; }
.child-preview .mini-board { border:1px solid #b5c6d1; box-shadow:0 2px 3px #20344020; }
.child-preview .object { pointer-events:none; }
.child-card .activity-date { font-size:14px; color:var(--muted); font-weight:500; }
.assignment-pagination { display:flex; align-items:center; justify-content:space-evenly; padding:20px 20px 30px; gap:16px; }
.assignment-pagination button { border-radius:24px; min-width:110px; min-height:42px; border:1px solid #6b8291; background:transparent; }
#assignments-page { color:#4b6575; font-size:13px; }
#connection-status { font-size:13px; }
#child-stage { flex:1; min-height:0; padding:20px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
#child-board { flex:none; }
#child-board .object { cursor:pointer; }
#child-board .object:focus-visible { outline:5px solid #008eab; }
#child-message { text-align:center; padding:12px; font-size:26px; background:#e9f2f7; }
#child-message:empty { display:none; }
#empty-activities { text-align:center; font-size:20px; padding:40px; }
.child-menu-actions { display:flex; flex-direction:column; gap:12px; min-width:240px; }
.child-menu-actions button { min-height:44px; }
@media(max-width:1000px) {
 #child-activities { gap:22px 18px; padding:28px 20px; }
 .child-card { font-size:20px; padding:14px 12px 16px; }
 .child-preview { height:180px; }
}
@media(max-width:650px) {
 .child-home-layout { grid-template-columns:82px minmax(0,1fr); }
 .student-nav .nav-tile { min-height:80px; font-size:12px; }
 #child-activities { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px; padding:20px 12px; }
 .child-card { padding:12px 10px 14px; font-size:17px; gap:10px; }
 .child-preview { height:120px; }
 .child-card .activity-date { display:none; }
 .assignment-pagination { padding:15px 8px; gap:6px; }
 .assignment-pagination button { min-width:65px; font-size:13px; }
 #child-stage { padding:10px; }
 .window-title { font-size:13px; }
}
.assignment-pagination button { min-height:44px; }
.child-card:focus-visible { outline:3px solid #087caa; outline-offset:3px; }

.object[data-hit-area="symbol"] { pointer-events: none; }
.object[data-hit-area="symbol"] > img { pointer-events: auto; cursor: pointer; }

/* Immersive child play: the board fills the screen, including the safe area. */
#child-player.viewport-immersive {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 100dvh;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  background: var(--stage, #b8cdd8);
}
#child-player.viewport-immersive:not(.viewport-chrome) .player-titlebar,
#child-player.viewport-immersive:not(.viewport-chrome) .player-nav {
  display: none;
}
#child-player.viewport-immersive:not(.viewport-chrome) .play-layout {
  flex: 1;
  min-height: 0;
  height: 100%;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
#child-player.viewport-immersive.viewport-chrome .play-layout {
  flex: 1;
  min-height: 0;
  height: auto;
}
#child-player.viewport-immersive .viewport-controls {
  display: none;
}
#child-player.viewport-immersive.viewport-chrome .viewport-controls,
#child-player.viewport-immersive .viewport-controls:not([hidden]) {
  display: flex;
}
#child-player.viewport-immersive .viewport-controls[hidden] {
  display: none;
}
.child-chrome-hotspot {
  position: absolute;
  top: env(safe-area-inset-top, 0px);
  left: env(safe-area-inset-left, 0px);
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  z-index: 8;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}
@media (display-mode: standalone), (display-mode: fullscreen) {
  html, body { background: var(--stage, #b8cdd8); }
}

#child-now-next {
  position:absolute;
  top:env(safe-area-inset-top,0px);
  left:env(safe-area-inset-left,0px);
  right:env(safe-area-inset-right,0px);
  z-index:6;
  display:grid;
  grid-template-columns:1.3fr 1fr;
  gap:10px;
  padding:8px 12px 8px 56px;
  background:#f7fbfc;
  border-bottom:1px solid #c5d4df;
  box-sizing:border-box;
}
#child-now-next[hidden] { display:none; }
.now-next-card {
  min-height:52px;
  padding:8px 12px;
  border-radius:12px;
  background:white;
  border:1px solid #c5d4df;
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}
.now-next-now { border-color:#005c34; box-shadow:0 0 0 2px #c8ead7; }
.now-next-label { font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:#496170; }
.now-next-name { font-size:18px; font-weight:700; color:#163340; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.now-next-confirm {
  grid-column:1/-1;
  margin:0;
  min-height:32px;
  text-align:center;
  font-size:16px;
  font-weight:600;
  color:#005c34;
  background:#c8ead7;
  border-radius:10px;
  padding:8px;
}
.now-next-confirm[hidden] { display:none; }
#child-board .now-step { box-shadow:0 0 0 4px #005c34; }
@media (prefers-reduced-motion: no-preference) {
  .now-next-confirm:not([hidden]) { animation:fade-in .25s ease; }
  #child-board .now-step { transition: box-shadow .2s ease; }
}
