/* 학생 홈: 아이들이 가장 많이 누르는 '이어 보기'를 제일 크게, 아래 목록은 강의실에 들어가지 않고 바로 시작하는 배정 목록으로.
   (styles.css · diagram-playground.css 뒤에 읽혀서 같은 이름의 규칙을 덮는다) */
.home-dashboard-shell{gap:26px}
.home-dashboard-shell .home-dashboard-hero{min-height:0;grid-template-columns:minmax(0,1fr) minmax(240px,.5fr);gap:20px;padding:22px 28px}
.home-dashboard-shell .home-dashboard-kicker{margin-bottom:8px}
.home-dashboard-shell .home-dashboard-hero h1{font-size:clamp(26px,3vw,38px);line-height:1.2}
.home-dashboard-shell .home-dashboard-hero-copy>p:last-child{margin-top:8px;font-size:16px}
.home-dashboard-shell .home-dashboard-notice{align-self:center;padding:16px 18px}
.home-dashboard-shell.is-free-viewing .home-dashboard-hero{grid-template-columns:minmax(0,1fr);padding:22px 24px}

/* 이어 보기: 홈의 중심 */
.home-dashboard-shell .home-dashboard-widgets{grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:stretch}
.home-dashboard-shell .home-dashboard-widgets .home-dashboard-continue.is-focus{grid-column:auto;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);min-height:290px;padding:0;overflow:hidden;border:1px solid var(--studio-line);border-radius:10px;background:#fff;color:var(--studio-ink)}
.is-focus .home-dashboard-continue-visual{position:relative;inset:auto;display:block;width:100%;min-height:220px;padding:0;border:0;border-radius:0;background:#1f2a24;overflow:hidden;cursor:pointer}
.is-focus .home-dashboard-continue-visual::after{content:none}
.is-focus .home-dashboard-continue-visual img{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:1;filter:none;transition:transform .35s ease}
.is-focus .home-dashboard-continue-visual:hover img{transform:scale(1.03)}
.home-focus-play{position:absolute;left:50%;top:50%;display:grid;place-items:center;width:76px;height:76px;margin:-38px 0 0 -38px;padding-left:5px;border-radius:50%;background:#fffffff0;box-shadow:0 10px 28px #0005;color:var(--studio-green);font-size:30px;transition:transform .15s ease}
.is-focus .home-dashboard-continue-visual:hover .home-focus-play{transform:scale(1.1)}
.is-focus .home-dashboard-continue-visual:focus-visible{outline:4px solid #ffb338;outline-offset:-4px}
.is-focus .home-dashboard-continue-content{justify-content:center;padding:28px 30px}
.is-focus .home-dashboard-continue-badge{border:0;border-radius:999px;background:#e9f1e5;color:var(--studio-green);font-size:12px;backdrop-filter:none}
.is-focus .home-dashboard-continue-content>small{margin-top:16px;color:var(--studio-muted);font-size:14px}
.is-focus .home-dashboard-continue-content>strong{margin-top:6px;color:var(--studio-ink);font-size:clamp(22px,2.3vw,30px);line-height:1.3;-webkit-line-clamp:3}
.is-focus .home-dashboard-progress{display:block;margin-top:18px;height:10px}
.is-focus .home-dashboard-continue-content>p{margin:8px 0 22px;color:var(--studio-muted);font-size:14px}
.is-focus .home-dashboard-continue-button{min-height:60px;margin-top:auto;border-radius:12px;background:var(--studio-green);color:#fff;font-size:20px}
.is-focus .home-dashboard-continue-button:hover:not(:disabled){background:#243c2f;color:#fff;transform:translateY(-1px)}
.is-focus.is-empty .home-dashboard-continue-visual{background:#e9ecef}
.home-focus-stats{display:grid;grid-template-rows:1fr 1fr;gap:16px}
.home-focus-stats .home-dashboard-widget{display:flex;flex-direction:column;justify-content:center;min-height:0;padding:20px 22px}
.home-focus-stats .home-dashboard-widget-copy small{font-size:13px}
.home-focus-stats .home-dashboard-widget-copy strong{font-size:32px;line-height:1.15}
.home-focus-stats .home-dashboard-widget-copy p{margin-top:4px;font-size:13px}
.home-focus-stats .home-dashboard-widget-progress{margin-top:12px}

/* 배정된 학습 목록 */
.home-todo-list{display:grid;gap:24px}
.home-todo-group>header{display:flex;align-items:baseline;gap:10px;margin:0 0 10px}
.home-todo-group h3{margin:0;font-size:18px;color:var(--studio-ink)}
.home-todo-group>header span{font-size:13px;font-weight:700;color:var(--studio-muted)}
.home-todo-rows{display:grid;gap:8px}
.home-todo-row{display:grid;grid-template-columns:104px minmax(0,1fr) auto auto;align-items:center;gap:16px;padding:10px 16px 10px 10px;border:1px solid var(--studio-line);border-radius:10px;background:#fff}
.home-todo-row[hidden]{display:none}
.home-todo-row.is-click{cursor:pointer}
.home-todo-row.is-click:hover{border-color:#9aac8d;background:#fbfcf9}
.home-todo-row.is-late{border-color:#efc4b9;background:#fffaf8}
.home-todo-thumb{display:block;aspect-ratio:16/9;overflow:hidden;border-radius:6px;background:#e6e9e2}
.home-todo-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.home-todo-copy{min-width:0}
.home-todo-copy small{display:flex;align-items:center;gap:8px;min-width:0;font-size:13px;color:var(--studio-muted)}
.home-todo-copy small b{flex:0 0 auto;padding:2px 9px;border-radius:999px;background:#e9ecef;font-size:12px;color:#4a5058}
.home-todo-copy small b[data-kind="과제"]{background:#ffefc7;color:#80590d}
.home-todo-copy small b[data-kind="영상"]{background:#e2eee4;color:#256a41}
.home-todo-copy strong{display:block;margin-top:3px;font-size:17px;line-height:1.4;overflow-wrap:anywhere;color:var(--studio-ink)}
.home-todo-copy p{margin:4px 0 0;font-size:13px;color:var(--studio-muted)}
.home-todo-bar{display:block;max-width:260px;height:6px;margin-top:7px}
.home-todo-due{display:grid;justify-items:end;gap:3px;text-align:right}
.home-todo-due b{padding:4px 12px;border-radius:999px;background:#ffefc7;font-size:13px;color:#80590d;white-space:nowrap}
.home-todo-row.is-late .home-todo-due b{background:#f9dfd8;color:#9c3a2a}
.home-todo-row.is-done .home-todo-due b{background:#dcefdc;color:#256a41}
.home-todo-row.is-soft .home-todo-due b{background:#eef0f3;color:#4a5058}
.home-todo-due span{font-size:12px;color:var(--studio-muted)}
.home-todo-btn{min-width:88px;min-height:38px;padding:0 16px;border:1px solid var(--studio-line);border-radius:9px;background:#fff;color:var(--studio-ink);font:inherit;font-size:14px;font-weight:700;cursor:pointer;white-space:nowrap}
.home-todo-btn:hover:not(:disabled){border-color:#9aac8d;background:#f4f7f0}
.home-todo-btn.is-primary{border-color:var(--studio-green);background:var(--studio-green);color:#fff}
.home-todo-btn.is-primary:hover:not(:disabled){background:#243c2f}
.home-todo-btn:disabled{opacity:.5;cursor:default}
.home-todo-btn:focus-visible,.home-todo-more:focus-visible,.home-todo-rooms button:focus-visible,.cs-home-actions button:focus-visible{outline:3px solid #ffb338;outline-offset:2px}
.home-todo-more{justify-self:start;margin-top:6px;padding:6px 2px;border:0;background:transparent;font:inherit;font-size:14px;font-weight:700;color:var(--studio-green);cursor:pointer}
.home-todo-rooms{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding-top:4px}
.home-todo-rooms span{margin-right:4px;font-size:13px;font-weight:700;color:var(--studio-muted)}
.home-todo-rooms button{min-height:32px;padding:0 14px;border:1px solid var(--studio-line);border-radius:999px;background:#fff;font:inherit;font-size:13px;font-weight:700;color:var(--studio-green);cursor:pointer}
.home-todo-rooms button:hover{background:#f4f7f0;border-color:#9aac8d}
.home-todo-empty{display:flex;align-items:center;gap:14px;padding:22px;border:1px dashed var(--studio-line);border-radius:10px;background:#fff}
.home-todo-empty>span{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:#e2eee4;color:#256a41;font-size:18px;font-weight:800}
.home-todo-empty p{margin:2px 0 0;font-size:14px;color:var(--studio-muted)}

/* 내 강의실 카드: 입장은 작은 보조 버튼, 다음 강의는 바로 */
.cs-home-course{align-items:center;grid-template-columns:140px minmax(0,1fr) auto}
.cs-home-actions{display:grid;gap:6px;min-width:128px}
.cs-home-course .cs-home-actions button{width:auto;min-height:38px;padding:0 14px;border:1px solid var(--studio-line);border-radius:9px;background:#fff;color:var(--studio-green);font-size:14px;font-weight:700;cursor:pointer}
.cs-home-course .cs-home-actions button:hover{background:#f4f7f0;border-color:#9aac8d}
.cs-home-course .cs-home-actions .cs-home-next{border-color:var(--studio-green);background:var(--studio-green);color:#fff}
.cs-home-course .cs-home-actions .cs-home-next:hover{background:#243c2f}
.cs-home-actions [hidden]{display:none}

@media(max-width:1400px){.cs-home-course{grid-template-columns:120px minmax(0,1fr)}.cs-home-course>img{max-width:none}.cs-home-actions{grid-column:1/-1;grid-auto-flow:column;grid-auto-columns:max-content;justify-content:start}}
@media(max-width:1000px){
  .home-dashboard-shell .home-dashboard-widgets{grid-template-columns:minmax(0,1fr)}
  .home-focus-stats{grid-template-columns:1fr 1fr;grid-template-rows:auto}
}
@media(max-width:760px){
  .home-dashboard-shell .home-dashboard-hero{grid-template-columns:minmax(0,1fr);padding:20px}
  .home-dashboard-shell .home-dashboard-widgets .home-dashboard-continue.is-focus{grid-template-columns:minmax(0,1fr);min-height:0}
  .is-focus .home-dashboard-continue-visual{min-height:0;aspect-ratio:16/9}
  .is-focus .home-dashboard-continue-content{padding:20px}
  .home-focus-stats{grid-template-columns:minmax(0,1fr)}
  .home-todo-row{grid-template-columns:72px minmax(0,1fr);gap:10px 12px}
  .home-todo-due{grid-column:2;grid-auto-flow:column;justify-content:start;justify-items:start;gap:10px;text-align:left}
  .home-todo-btn{grid-column:2;justify-self:start}
}
