/* css/student-home.css — 학생 홈 «입장 카드 하나 + 오늘 할 일» (js/student-home.js · 2026-11-24 사용자 결정)
 *   ★채운 면은 «입장하기» 하나★ 할 일 줄의 단추는 모두 테두리 단추다(마디아 M04).
 *   ★입장 카드 윗줄 = 딱지·점검 한 줄 + 글·단추 한 줄★ 단추의 위·아래 끝 = 수업 이름 위 ~ 선생님 줄 아래(결정 4 가).
 *   ★좁으면 한 칸으로 쌓는다★ 기준은 화면이 아니라 홈의 폭(컨테이너 질의) — 왼쪽 메뉴가 접히고 펴져도 같은 판정이다.
 *   ★색은 토큰만★ 다크·특수학교 색은 토큰이 갈아 끼운다(css/common.css).
 *   ★글씨는 수업 이름·«입장하기»(44)에 맞춘 한 벌★ 부제 24 · 선생님 줄·점검·새로고침 20 · 딱지 17 · «수업 시작 전» 30 ·
 *     «오늘 할 일» 머리 24(개수 15) · 할 일 줄 제목 20 · 설명·줄 단추 17 · 기한 15 · «다 했어요» 20 · 휴대폰은 같은 비율로 한 단 아래
 *     (2026-11-25 사용자 «키운 글자크기에 맞게 주변글씨들도 전체적으로 크기 잡아줘» — 그 전엔 15~17 이 44 옆에서 작아 보였다). */

/* 폭 제한 없음 — 넓은 모니터(1916)에서 1,120 으로 묶었더니 오른쪽 580px 가 비었다(2026-11-25 사용자 «여백 너무 많아» → 비교 B).
   넓어지면 단추 칸이 함께 커지고(아래 .stu-hero-top) 할 일 줄은 두 칸씩 놓는다(맨 아래 질의). */
.stu-home { container: stuhome / inline-size;
  /* 수업 이름 크기 — 이 화면 범위 토큰(§0-D D1 «그 화면 범위 토큰» 방식 · R335): 특수학교 학생이 찾는 단 하나의 카드라 대제목(24~28)보다 크게 · 좁으면 아래 질의가 바꾼다 */
  --stu-fs-name: 44px; }
.stu-home [hidden] { display: none !important; }   /* 아래 display 규칙이 [hidden] 을 되살리지 않게 */

/* ── ① 입장 카드 ── */
.stu-hero { display: flex; flex-direction: column; gap: 28px; padding: 28px 40px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.stu-hero-top { display: grid; grid-template-columns: minmax(0, 1fr) max(380px, 35%); grid-template-areas: "chip tools" "text btn"; column-gap: 40px; row-gap: 12px; }   /* 단추 칸 = 380 과 카드 안쪽 폭 35% 중 큰 값 — 왼쪽 메뉴를 편 가로 1440 이하 화면은 380 그대로(student_dash_responsive_p3 ⑥) · 메뉴를 접거나 넓은 모니터면 카드와 함께 커진다 */
.stu-hero-chip { grid-area: chip; display: flex; align-items: center; min-height: 44px; }
.stu-hero-text { grid-area: text; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stu-hero-btn { grid-area: btn; display: flex; flex-direction: column; }
.stu-hero-tools { grid-area: tools; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px; }

.stu-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; font-size: var(--text-lg); font-weight: 800; white-space: nowrap; }
.stu-chip.is-live { background: var(--danger-light); color: var(--danger-dark); }
.stu-chip.is-live::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--danger); }   /* 색 + 글자(«수업 중») — 색만으로 말하지 않는다 */
.stu-chip.is-next { background: var(--primary-light); color: var(--primary-dark); }
.stu-chip svg { width: 20px; height: 20px; }

.stu-hero-name { margin: 0; font-size: var(--stu-fs-name); font-weight: 800; line-height: 1.2; color: var(--text); word-break: keep-all; overflow-wrap: anywhere; }   /* 자르지 않는다 — 길면 두 줄 */
.stu-hero-sub { margin: 0; font-size: var(--text-2xl); font-weight: 600; color: var(--text-body); word-break: keep-all; }
.stu-hero-who { margin: 0; font-size: var(--text-xl); color: var(--text-muted); word-break: keep-all; }

.stu-join, .stu-wait { flex: 1 1 auto; min-height: 104px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-lg); word-break: keep-all; }
.stu-join { gap: 14px; background: var(--primary-fill); color: var(--text-on-primary); font-size: var(--stu-fs-name); font-weight: 800; text-decoration: none; box-shadow: var(--shadow-md); transition: background var(--dur-fast, .15s); }   /* 글씨 = 수업 이름과 같은 크기(넓음 44 · 태블릿 48 · 휴대폰 34) — 30 은 단추에 비해 작았다(2026-11-25 사용자) */
.stu-join:hover { background: var(--primary-fill-hover); color: var(--text-on-primary); }
.stu-join:focus-visible { outline: 3px solid var(--border-focus); outline-offset: 3px; }
.stu-join-arrow { width: .85em; height: .85em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.stu-wait { gap: 12px; background: var(--bg-subtle); border: 2px dashed var(--border-strong); color: var(--text-muted); font-size: var(--text-3xl); font-weight: 700; }   /* 잠긴 자리 — 누르는 것이 아니다(점선 · 회색 · 자물쇠) */
.stu-wait svg { width: 32px; height: 32px; }

.stu-tool { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius); background: none; font: inherit; font-size: var(--text-xl); font-weight: 700; color: var(--primary); cursor: pointer; }   /* 20 = 선생님 줄 단계 — 할 일에서 점검 줄을 뺀 뒤 점검으로 가는 길은 이 단추 하나다(2026-11-25 사용자 «카메라마이크 점검 글씨는요») */
.stu-tool:hover { background: var(--primary-light); }
.stu-tool:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.stu-tool svg { width: 24px; height: 24px; }

/* 선생님 화면 그림 — 높이는 넓은 화면에서 js 가 «첫 화면의 남은 높이»로 맞춘다(_fitPic) · 좁으면 아래 16:9 */
.stu-hero-pic { position: relative; min-height: 220px; padding: 16px; border-radius: var(--radius-lg); background: var(--bg-subtle); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.stu-pic-ph { display: inline-flex; color: var(--text-muted); opacity: .7; }
.stu-pic-ph svg { width: 56px; height: 56px; }
.stu-pic-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); }
/* 무대 감싸개 — 그림 칸 안쪽을 «쓸 수 있는 크기»로 재게 한다(높이가 auto 면 무대가 1280 그대로라 배율이 폭으로만 정해진다).
   배율을 넣은 뒤(--alc-slide-h)는 그 높이로 가운데에 선다(위아래 margin:auto). */
.stu-hero-pic.has-slide .alc-slide-stage-host { position: absolute; inset: 16px; width: auto; margin: auto 0; }   /* 가로 가운데는 감싸개 규칙(justify-content:center) · 세로는 margin:auto — align-items 는 위(flex-start) 그대로 둔다: 무대는 위 끝 기준으로 줄어들어 가운데로 두면 위로 밀려 잘린다 */
.stu-hero-pic.has-slide .alc-slide-stage { border-radius: var(--radius); box-shadow: var(--shadow-md); pointer-events: none; }   /* 그림이다 — 눌러도 아무 일이 없다 */

/* ── 할 일이 수업 뒤로 미뤄졌다는 한 줄 · 체크 표시 ── */
.stu-later { display: flex; align-items: center; gap: 10px; margin: 0; padding: 4px; font-size: var(--text-lg); color: var(--text-muted); word-break: keep-all; }
.stu-check { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--success); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ── ② 오늘 할 일 ── */
.stu-todo { display: flex; flex-direction: column; gap: 12px; }
.stu-todo-h { display: flex; align-items: center; gap: 10px; }
.stu-todo-h h2 { margin: 0; font-size: var(--text-2xl); font-weight: 800; color: var(--text); }
.stu-todo-n { min-width: 32px; height: 32px; padding: 0 11px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--primary-light); color: var(--primary-dark); font-size: var(--text-md); font-weight: 800; font-variant-numeric: tabular-nums; }
.stu-todo-rows, .stu-todo-rows > div, .stu-rows-group { display: flex; flex-direction: column; gap: 8px; }
.stu-todo-rows > div:empty { display: none; }   /* 할 일이 없는 칸은 자리도 없다 */
/* 한 줄 — 맞춤 학습 줄(css/adaptive-rec.css .adrst-nudge)도 목록 안에서는 이 크기로 맞춘다(아래 .stu-todo .adrst-nudge-*) */
.stu-row { display: flex; align-items: center; gap: 16px; padding: 14px 22px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs); }
.stu-row-ic { flex: none; width: 56px; height: 56px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; background: var(--primary-light); color: var(--primary); }
.stu-row-ic svg { width: 28px; height: 28px; }
.stu-row-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; word-break: keep-all; overflow-wrap: anywhere; }   /* 교사가 쓴 긴 제목(띄어쓰기 없는 주소 등)도 줄 안에서 접힌다 */
.stu-row-tx b { font-size: var(--text-xl); font-weight: 800; color: var(--text); text-wrap: balance; }
.stu-row-tx small { font-size: var(--text-lg); color: var(--text-body); }
.stu-row-bt { flex: none; min-height: 56px; padding: 0 26px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; font-size: var(--text-lg); font-weight: 800; white-space: nowrap; }
/* 맞춤 학습 줄을 다른 줄과 같은 테두리로 — 왼쪽 색 막대는 «혼자 있던 줄»을 띄우던 표시라 목록 안에서는 걷는다 */
.stu-todo .adrst-nudge { display: flex; gap: 16px; padding: 14px 22px; border: 1px solid var(--border); }   /* 그 줄의 휴대폰 규칙(640 이하 · 단추 아래 전체 폭)도 목록 안에서는 다른 줄과 같은 꼴로 */
.stu-todo .adrst-nudge-go { width: auto; min-height: 56px; padding: 0 26px; font-size: var(--text-lg); }
.stu-todo .adrst-nudge-ic { width: 56px; height: 56px; } .stu-todo .adrst-nudge-ic svg { width: 28px; height: 28px; }
.stu-todo .adrst-nudge-t span { font-size: var(--text-lg); }
.stu-todo .adrst-nudge-t b { font-size: var(--text-xl); text-wrap: balance; }   /* «1개»만 둘째 줄로 떨어지지 않게(할 일 줄 제목과 같은 규칙) */
.stu-todo .adrst-nudge:hover { border-color: var(--primary); }
.stu-todo-done { display: flex; align-items: center; gap: 14px; margin: 0; padding: 18px 20px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); font-size: var(--text-xl); font-weight: 700; color: var(--text-body); }
/* 오늘 준비 띠(js/student-ready-gate.js 가 홈 맨 위에 꽂는다) — 홈 안에서는 할 일 줄과 같은 단계로 */
.stu-home .srg-ban__txt b { font-size: var(--text-lg); } .stu-home .srg-ban__txt span { font-size: var(--text-md); }
.stu-home .srg-ban__cta { min-height: 48px; padding: 0 22px; font-size: var(--text-lg); }

/* ── 넓은 홈(1,200 이상 · 넓은 모니터) — 할 일 줄을 두 칸씩: 폭을 다 쓰면 한 줄이 너무 길어 제목과 단추가 멀어진다(2026-11-25 비교 B).
   칸 상자는 풀어(contents) 어느 칸의 줄이든 같은 격자에 놓는다 — 줄 순서는 그대로다. */
@container stuhome (min-width: 1200px) {
  .stu-todo-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .stu-todo-rows > div, .stu-rows-group { display: contents; }
}

/* ── 좁은 홈(태블릿 세로 · 휴대폰) — 한 칸으로 쌓는다: 딱지 → 수업 이름 → 단추 → 점검 → 그림 ── */
@container stuhome (max-width: 859px) {
  .stu-hero { padding: 32px; gap: 24px; }
  .stu-hero-top { grid-template-columns: minmax(0, 1fr); grid-template-areas: "chip" "text" "btn" "tools"; row-gap: 16px; }
  .stu-hero-tools { margin-top: -8px; }
  .stu-hero { --stu-fs-name: 48px; }   /* ★.stu-home 이 아니라 카드에 건다★ — 컨테이너 질의는 그 컨테이너(.stu-home) 자신을 못 바꿔 44 그대로였다(2026-11-25 실측) */
  .stu-join, .stu-wait { flex: none; min-height: 120px; }
  .stu-hero-pic { aspect-ratio: 16 / 9; min-height: 0; padding: 12px; }
  .stu-hero-pic.has-slide .alc-slide-stage-host { inset: 12px; }
}
@container stuhome (max-width: 519px) {
  .stu-hero { padding: 20px; gap: 16px; }
  .stu-hero-top { row-gap: 14px; }
  .stu-chip { height: 36px; padding: 0 14px; }
  .stu-hero { --stu-fs-name: 34px; }
  .stu-hero-sub { font-size: var(--text-xl); } .stu-hero-who { font-size: var(--text-lg); }
  .stu-join, .stu-wait { min-height: 80px; }
  .stu-wait { font-size: var(--text-2xl); }
  .stu-tool { font-size: var(--text-lg); } .stu-tool svg { width: 20px; height: 20px; }   /* 20 이면 «점검»·«새로고침»이 두 줄로 갈라졌다(390·320 실측) */
  .stu-hero-pic { border-radius: var(--radius); }
  /* 줄은 단추를 오른쪽에 둔 채 줄인다(목업 판 3) · 맞춤 학습 기한은 제목 아래로 */
  .stu-row { gap: 12px; padding: 10px 12px; min-height: 64px; }
  .stu-row-ic { width: 44px; height: 44px; } .stu-row-ic svg { width: 24px; height: 24px; }
  .stu-row-tx b { font-size: var(--text-lg); }
  .stu-row-tx small { font-size: var(--text-md); }
  .stu-row-bt { min-height: 48px; padding: 0 14px; }
  .stu-todo .adrst-nudge { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ic t go" "ic dd go"; column-gap: 12px; row-gap: 4px; padding: 10px 12px; }
  .stu-todo .adrst-nudge-ic { grid-area: ic; width: 44px; height: 44px; align-self: center; } .stu-todo .adrst-nudge-ic svg { width: 24px; height: 24px; }
  .stu-todo .adrst-nudge-t { grid-area: t; } .stu-todo .adrst-nudge-t b { font-size: var(--text-lg); } .stu-todo .adrst-nudge-t span { font-size: var(--text-md); }
  .stu-todo .adrst-nudge-dd { grid-area: dd; justify-self: start; padding: 2px 10px; font-size: var(--text-md); }
  .stu-todo .adrst-nudge-go { grid-area: go; width: auto; min-height: 48px; padding: 0 14px; align-self: center; }
}
@media (prefers-reduced-motion: reduce) { .stu-join { transition: none; } }
