/* Part 3: Home (student notebook page, staff week timetable).
   Loaded in order by index.html; a later file wins over an earlier one. */
.week-dots { display: inline-flex; gap: 3px; }
.week-dots i { width: 10px; height: 10px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); }
.week-dots i.on { background: var(--chart); border-color: var(--chart); }

/* home: the first page after logging in, in the lesson area (top bar and lesson menu stay) */
.home-panel { display: none; position: relative; }
body.home-open .stage > :not(.home-panel) { display: none !important; }
body.home-open .home-panel { display: block; overflow-y: auto; min-height: 0; flex: 1; }
.home-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; justify-content: flex-end; }
.home-head button { margin-left: auto; }
.home-hello { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.home-hello h2 { margin: 0; font-size: 22px; }
.home-start { border-color: var(--accent) !important; }
.home-start .go { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--accent); }

/* cards stack in columns: no gaps under short cards */
.home-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; display: grid; gap: 10px; }
.home-card h3 { margin: 0; font-size: 13px; color: var(--muted); }
.home-card p { margin: 0; }
.home-card > button.small { justify-self: start; }
.home-lesson, .home-student {
  display: grid;
  gap: 3px;
  justify-items: start;
  justify-content: stretch;
  text-align: left;
  width: 100%;
  min-height: 0;
  padding: 12px 14px;
  white-space: normal;
  background: var(--panel-2);
  border-radius: var(--r-ctl);
}
.home-lesson .t, .home-student .t { font-weight: 600; font-size: 15px; }
.home-continue .home-lesson { border-color: var(--line) !important; }
.home-continue .home-lesson .t { font-size: 18px; }
.home-week { display: flex; gap: 6px; }
.home-week .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.home-week .dot.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.home-week .dot.future { opacity: 0.4; }
.home-camp { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.home-rank { font-size: 14px; }

/* practice plan (#26) */
.home-plan { margin-bottom: 16px; border-color: var(--accent); }

/* ---------- Home (#39): student notebook page, staff week timetable ---------- */
.home-head #homeClose { background: var(--panel-2); border-color: var(--line); color: var(--text); font-weight: 600; }
.home-page { display: grid; grid-template-columns: minmax(0, 680px) 300px; gap: 56px; padding: 6px 24px 30px 36px; align-items: start; padding-top: 20px; }
.home-page.staff { display: grid; grid-template-columns: 1fr; gap: 26px; padding: 0 8px 30px; }
.home-main { display: grid; gap: 30px; }
.home-date { font-size: 38px; letter-spacing: -0.02em; margin: 2px 0; font-weight: 700; }
.home-page .lead { margin: 0; color: var(--muted); font-size: 15px; }
.home-class { font-size: 18px; margin: 0; }
.home-class b { color: var(--accent-text); }
.home-note { margin: 20px 0 6px; padding: 2px 0 2px 16px; border-left: 3px solid var(--accent); font-size: 19px; line-height: 1.4; }
.home-note cite { display: block; font-style: normal; font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.rule-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--text); padding-bottom: 7px; margin-top: 22px; }
.rule-head h2 { font-size: 20px; margin: 0; }
.rule-head span { color: var(--muted); font-size: 14px; }
.home-plan .plan-item.work { display: grid; grid-template-columns: 24px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.home-continue, .home-next { display: grid; gap: 8px; }
.home-continue .rule-head, .home-next .rule-head { margin-top: 0; }
.home-page .home-lesson { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 0; }
.home-page .home-lesson:hover:not(:disabled) { background: none; }
.home-page .home-lesson .t { font-size: 16px; }
.home-page .home-lesson .go { color: var(--accent-text); font-weight: 700; }
.home-side { display: grid; gap: 26px; padding-top: 10px; }
.home-side .side-sec, .home-side .home-card { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 0; }
.home-side h3, .home-side .home-card h3 { font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 0 0 10px; }
.home-side .big { font-size: 22px; }
.home-week .dot.today { border-color: var(--accent); }
.week-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.week-head .legend { margin-left: auto; display: flex; gap: 14px; font-size: 13.5px; color: var(--muted); }
.legend .k { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.week-grid { display: grid; border-top: 2px solid var(--text); min-height: 200px; }
.week-grid .day { padding: 10px 10px 14px; border-right: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.week-grid .day:last-child { border-right: 0; }
.week-grid .day.today { background: var(--panel); box-shadow: inset 0 3px 0 var(--accent); }
.week-grid .day.past { opacity: 0.62; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; }
.slot { display: grid; justify-items: start; gap: 1px; text-align: left; width: 100%; min-height: 0; padding: 7px 9px; white-space: normal; background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 6px; justify-content: stretch; }
.slot.ok { border-left-color: var(--perfect); }
.slot.part { border-left-color: var(--good); }
.slot.help { border-left-color: var(--miss); }
.slot .time { font-size: 12.5px; color: var(--muted); }
.slot .line { font-size: 13px; color: var(--muted); }
.teacher-week { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 2px solid var(--text); }
.teacher-week .tw { display: grid; gap: 4px; padding: 12px 14px; border-right: 1px solid var(--line); }
.teacher-week .plan-bar span { background: var(--perfect); }
.home-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.home-attention { display: grid; gap: 0; align-content: start; }
.home-attention .rule-head { margin-top: 0; margin-bottom: 4px; }
.home-attention .home-student { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 0; }
.home-attention > button.small { justify-self: start; margin-top: 10px; }
.home-lower-side { display: grid; gap: 22px; align-content: start; }
.home-lower-side .home-card { background: none; border: 0; border-top: 2px solid var(--text); border-radius: 0; padding: 8px 0 0; }
.home-lower-side .home-card h3 { font-size: 20px; text-transform: none; letter-spacing: 0; color: var(--text); }
@media (max-width: 1000px) { .home-page { grid-template-columns: 1fr; gap: 28px; } .home-lower { grid-template-columns: 1fr; } .week-grid { grid-template-columns: 1fr !important; } }
.home-panel .home-head { position: absolute; top: 4px; right: 8px; z-index: 2; }
.home-page.staff .week-head { padding-right: 170px; }
.work-locked { opacity: 0.55; }
.home-lesson .hc-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-ctl); margin-bottom: 6px; display: block; }
