/* 메뉴 drawer (dist/student-menu.js, 2026-11-05): from the right, about two thirds of the screen (264-560 px: 2/3 on
   tablets too, capped only on wide desktops; at least 264 px so every label stays on one line; review 2026-11-05), over
   a dimmed page; the 화면 색 tokens (--t-*) colour it in every colour set, 밤 included. Its rows are 44 px+ targets; the
   status line keeps its height, so a note there moves nothing. Reduced motion: no slide, no fade. */
.student-menu-layer{position:fixed;inset:0;z-index:60}
.student-menu-layer[hidden]{display:none}
.student-menu-scrim{position:absolute;inset:0;background:color-mix(in srgb,var(--t-ink) 42%,transparent);opacity:0;transition:opacity 260ms ease}
:root[data-theme="dark"] .student-menu-scrim{background:color-mix(in srgb,var(--t-bg) 72%,transparent)}
.student-menu{position:absolute;top:0;right:0;bottom:0;box-sizing:border-box;display:flex;flex-direction:column;gap:6px;width:clamp(264px,66.667vw,560px);max-width:100vw;padding:max(14px,env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) max(14px,env(safe-area-inset-bottom,0px)) 16px;overflow-y:auto;overscroll-behavior:contain;border-left:1px solid var(--t-line);border-radius:20px 0 0 20px;background:var(--t-card);color:var(--t-ink);box-shadow:-10px 0 28px color-mix(in srgb,var(--t-ink) 18%,transparent);transform:translateX(105%);transition:transform 260ms cubic-bezier(.2,.8,.2,1);touch-action:pan-y}
.student-menu-layer[data-open="true"] .student-menu-scrim{opacity:1}
.student-menu-layer[data-open="true"] .student-menu{transform:translateX(0)}
.student-menu-head{display:flex;align-items:center;gap:8px;min-height:44px}
.student-menu-title{flex:1 1 auto;margin:0;font-size:20px;line-height:28px;font-weight:800;letter-spacing:-.4px;color:var(--t-ink)}
.student-menu-close{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;margin:0 -6px 0 0;padding:0;border:0;border-radius:12px;background:transparent;color:var(--t-muted);cursor:pointer}
.student-menu-close:hover{background:var(--t-accent-soft);filter:none}
/* ⚙ 설정 · 로그아웃 (2026-11-12): the header's tools, moved here while the drawer is open, right-aligned on the line under the
   title (the one-line note that stood here is gone). Its height is kept even before they arrive, so the list never moves. */
.student-menu-tools{display:flex;justify-content:flex-end;align-items:center;min-height:44px;margin:-4px 0 0}
.student-menu-tools .header-tools{display:flex;margin:0;gap:12px}
.student-menu-tools .header-tool{color:var(--t-muted)}
.student-menu-list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
.student-menu-item{display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;min-height:56px;margin:0;padding:8px 10px 8px 12px;border:1px solid var(--t-line);border-radius:14px;background:var(--t-surface);color:var(--t-ink);font:inherit;text-align:left;cursor:pointer}
.student-menu-item:hover{filter:none}
.student-menu-item-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:10px;background:var(--t-accent-soft);color:var(--t-primary)}
.student-menu-item-label{flex:1 1 auto;min-width:0;font-size:14px;line-height:1.35;font-weight:700;letter-spacing:-.3px;word-break:keep-all;overflow-wrap:anywhere}
.student-menu-status{min-height:20px;margin:6px 2px 0;color:var(--t-primary);font-size:13px;line-height:20px;font-weight:700;word-break:keep-all}
.student-menu-close:focus-visible,.student-menu-item:focus-visible{outline:3px solid var(--t-focus);outline-offset:2px}
/* 프로필 · 스피킹 게임 (2026-11-14): the child's card at the top (round avatar, name, class; a tap opens 프로필), the rows with
   an arrow, the red invite dot on 스피킹 게임, and the profile page (big avatar, 로그인 코드, 12 characters to choose). The
   avatar is the character's own circle in a ring of the 화면 색's line; every size keeps its box, so nothing moves when the
   character or the code arrives. */
.student-menu-page{display:flex;flex-direction:column;gap:6px;min-width:0}
.student-menu-page[hidden]{display:none}
.student-avatar{display:inline-grid;place-items:center;flex:0 0 auto;box-sizing:border-box;width:48px;height:48px;border-radius:50%;overflow:hidden;background:var(--t-card);box-shadow:0 0 0 2px var(--t-line)}
.student-avatar>svg{display:block;width:100%;height:100%}
.student-avatar.is-small{width:52px;height:52px}
.student-avatar.is-big{width:112px;height:112px;box-shadow:0 0 0 3px var(--t-primary)}
.student-avatar.is-pick{width:52px;height:52px}
.student-menu-who{display:flex;align-items:center;gap:12px;box-sizing:border-box;width:100%;min-height:72px;margin:0 0 6px;padding:10px 12px;border:1px solid var(--t-line);border-radius:18px;background:var(--t-accent-soft);color:var(--t-ink);font:inherit;text-align:left;cursor:pointer}
.student-menu-who:hover{filter:none}
.student-menu-who-text{display:flex;flex:1 1 auto;flex-direction:column;gap:2px;min-width:0}
.student-menu-who-arrow{margin-left:auto}
.student-menu-who-text strong{font-size:17px;line-height:24px;font-weight:800;letter-spacing:-.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.student-menu-who-text span{min-height:18px;color:var(--t-muted);font-size:13px;line-height:18px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.student-menu-item-icon{position:relative}
.student-menu-item-arrow{flex:0 0 auto;color:var(--t-muted)}
.student-menu-dot{position:absolute;top:-3px;right:-3px;width:10px;height:10px;border-radius:50%;background:var(--t-error);box-shadow:0 0 0 2px var(--t-surface)}
.student-menu-dot[hidden]{display:none}
.student-menu-back{display:inline-flex;align-items:center;gap:2px;flex:0 0 auto;min-height:44px;margin:0 0 0 -8px;padding:0 10px 0 4px;border:0;border-radius:12px;background:transparent;color:var(--t-primary);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.student-menu-back:hover{background:var(--t-accent-soft);filter:none}
.student-menu-title.is-page{text-align:center;font-size:18px}
.student-profile-card{display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px 12px 12px;border:1px solid var(--t-line);border-radius:20px;background:var(--t-surface);text-align:center}
.student-profile-card .student-avatar{margin-bottom:6px}
.student-profile-name{margin:0;min-height:26px;font-size:19px;line-height:26px;font-weight:800;letter-spacing:-.4px;word-break:keep-all}
.student-profile-class{margin:0;min-height:20px;color:var(--t-muted);font-size:14px;line-height:20px;font-weight:600}
.student-profile-code{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;column-gap:8px;box-sizing:border-box;max-width:100%;margin:8px 0 0;padding:6px 12px;border-radius:12px;background:var(--t-bg);font-size:13px;line-height:20px;color:var(--t-muted);font-weight:700}
.student-profile-code[hidden]{display:none}
.student-profile-code[data-empty="true"]{visibility:hidden}
/* 로그인 코드 (2026-11-14): the child's short sign-in code at the page's normal size; a long one wraps, never overflows. */
.student-profile-code b{min-width:0;max-width:100%;color:var(--t-ink);font-size:15px;line-height:20px;letter-spacing:.04em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;font-family:var(--font-en),Arial,sans-serif}
.student-profile-state{min-height:20px;margin:2px 0 0;color:var(--t-error);font-size:13px;line-height:20px;font-weight:700}
.student-profile-retry{min-height:32px;margin-left:4px;padding:2px 10px;border:1px solid var(--t-line);border-radius:999px;background:var(--t-card);color:var(--t-primary);font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.student-profile-pick-title{margin:10px 2px 2px;font-size:15px;line-height:22px;font-weight:800;color:var(--t-ink)}
.student-character-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:6px;margin:0;padding:0;list-style:none}
.student-character{display:flex;flex-direction:column;align-items:center;gap:4px;box-sizing:border-box;width:100%;min-height:88px;margin:0;padding:6px 2px;border:2px solid transparent;border-radius:16px;background:var(--t-surface);color:var(--t-ink);font:inherit;cursor:pointer;transition:transform 120ms ease}
.student-character:hover{filter:none}
.student-character:active{transform:scale(.96)}
.student-character[aria-pressed="true"]{border-color:var(--t-primary);background:var(--t-accent-soft)}
.student-character[aria-pressed="true"] .student-avatar{box-shadow:0 0 0 3px var(--t-primary)}
.student-character-name{font-size:12px;line-height:16px;font-weight:700;white-space:nowrap}
.student-menu-who:focus-visible,.student-menu-back:focus-visible,.student-character:focus-visible,.student-profile-retry:focus-visible{outline:3px solid var(--t-focus);outline-offset:2px}
@media(prefers-reduced-motion:reduce){.student-menu,.student-menu-scrim{transition:none}}
@media(prefers-reduced-motion:reduce){.student-character{transition:none}.student-character:active{transform:none}}
