/* Lesson cards and the day timeline */

.time-label { font-size: 15px; line-height: 1.2; }
.time-range { margin-top: 4px; font-size: 13px; opacity: .92; font-weight: 750; }
.lesson-name {
      font-size: 15px;
      font-weight: 850;
      line-height: 1.18;
      text-align: center;
      margin-bottom: 4px;
    }
.lesson-meta {
      font-size: 13px;
      line-height: 1.28;
      color: #455769;
      text-align: center;
      white-space: pre-line;
    }
.mobile-list { display: none; }
.m-card.physics { border-left: 5px solid var(--physics); }
.m-card.math { border-left: 5px solid var(--accent); }
.m-card.chem { border-left: 5px solid #85b86e; }
.m-card.activity { background: #fbfcfd; }
@media (max-width: 1100px) {
.mobile-list { display: block; }
}
@media (max-width: 620px) {
.mobile-list { margin-left: 14px; margin-right: 14px; }
}
@media print {
.mobile-list { display: none !important; }
.lesson-name { font-size: 10px; }
.lesson-meta { font-size: 8px; }
.time-label { font-size: 10px; }
.time-range { font-size: 8px; }
}
.mobile-list { display: block; }
.schedule-timeline {
      overflow: hidden;
      padding: 6px;
      border: 1px solid #dce8f0;
      border-radius: 24px;
      background: #fff;
      box-shadow: 0 14px 38px rgba(7,31,61,.07);
    }
.subject-icon .lucide { width: 27px; height: 27px; }
@media (max-width: 700px) {
.mobile-list { margin: 0 12px; }
.subject-icon .lucide { width: 21px; height: 21px; }
}
@media (max-width: 480px) {
.schedule-timeline { padding: 5px; border-radius: 20px; }
}
@media print {
.mobile-list { display: none; }
}
.mobile-list { display: block !important; margin: 0; }
.schedule-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 4px 14px;
}
.schedule-title h1 { margin: 0; font-size: 26px; letter-spacing: -.035em; }
.schedule-title span { color: var(--sm-muted); font-size: 13px; font-weight: 750; }
.schedule-timeline { position: relative; padding: 0; background: transparent; border: 0; box-shadow: none; overflow: visible; }
.schedule-timeline::before {
  content: "";
  position: absolute;
  top: 32px;
  bottom: 32px;
  left: 73px;
  width: 2px;
  background: rgba(118,139,171,.24);
}
.timeline-entry { position: relative; display: grid; grid-template-columns: 64px 22px minmax(0,1fr); align-items: start; margin: 0 0 14px; }
.timeline-entry > .schedule-card, .timeline-entry > .activity-stack { grid-column: 3; }
.entry-time {
  position: static;
  grid-column: 1;
  grid-row: 1;
  width: auto;
  margin-top: 25px;
  padding-right: 10px;
  color: #536783;
  font-size: 14px;
  font-weight: 820;
  line-height: 1.42;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.entry-time span { display: block; }
.timeline-dot {
  position: absolute;
  z-index: 2;
  top: 34px;
  left: 68px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--sm-page);
  border-radius: 50%;
  background: var(--tone, #8492aa);
  box-shadow: 0 0 0 2px rgba(92,112,144,.12);
}
.schedule-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 112px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 23px;
  background: var(--sm-card);
  box-shadow: inset 0 1px 0 #fff, inset 7px 0 0 var(--tone, #8a99b0), var(--sm-shadow);
  backdrop-filter: blur(12px) saturate(118%);
}
.schedule-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0 0 auto;
  height: 34px;
  background: rgba(255,255,255,.24);
}
.card-toggle {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-columns: 72px minmax(0,1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 17px 18px 17px 23px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.subject-app-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 17px;
  color: #fff;
  background: var(--tone, #72839d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68), inset 0 -12px 18px rgba(9,22,49,.08), 0 8px 18px color-mix(in srgb, var(--tone, #72839d) 26%, transparent);
}
.subject-app-icon .lucide { width: 34px; height: 34px; stroke-width: 2.15; }
.card-copy { min-width: 0; padding-right: 72px; }
.period-kicker { display: block; margin-bottom: 4px; color: var(--sm-blue); font-size: 12px; line-height: 1; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.card-copy strong { display: block; color: var(--sm-ink); font-size: 20px; line-height: 1.12; letter-spacing: -.02em; }
.teacher-line, .room-line { display: block; margin-top: 4px; color: var(--sm-muted); font-size: 13px; line-height: 1.25; }
.lesson-meta-row { min-height: 25px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 4px; }
.lesson-meta-row .room-line { margin-top: 0; }
.textbook-inline { width: 28px; height: 28px; display: grid; place-items: center; margin-left: 4px; border: 1px solid rgba(84,107,140,.12); border-radius: 9px; color: #aab5c4; background: rgba(245,248,252,.68); }
.textbook-inline .lucide { width: 16px; height: 16px; stroke-width: 2; }
.textbook-inline.active { color: var(--sm-blue); border-color: rgba(22,119,242,.22); background: rgba(232,242,255,.92); }
.room-line { color: #526985; font-weight: 720; }
.card-side { min-width: 24px; display: flex; align-items: center; justify-content: flex-end; }
.card-side .lucide { width: 21px; height: 21px; }
.state-badge {
  position: absolute;
  z-index: 5;
  top: -1px;
  right: 61px;
  min-width: 82px;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 0 0 10px 10px;
  color: #61708a;
  background: rgba(105,124,153,.1);
  font-size: 11px;
  font-weight: 850;
}
.state-badge.current { color: #177b38; background: rgba(52,199,89,.16); }
.state-badge.next { color: #0b67c8; background: rgba(22,119,242,.13); }
.state-badge.cancelled { color: #c5243d; background: rgba(255,84,111,.12); }
.expanded-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 18px 18px 23px;
  padding: 15px 0 0 87px;
  border-top: 1px solid var(--sm-line);
}
.detail-chip, .favorite-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(43,111,208,.16);
  border-radius: 13px;
  color: var(--sm-blue);
  background: rgba(235,244,255,.68);
  font-size: 13px;
  font-weight: 800;
}
.favorite-button.active { color: #7150d9; background: rgba(239,233,255,.82); }
.favorite-button .lucide, .detail-chip .lucide { width: 17px; height: 17px; }
.lesson-tool { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(84,107,140,.12); border-radius: 12px; color: #9aa6b7; background: rgba(245,248,252,.76); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); cursor: pointer; }
.lesson-tool .lucide { width: 19px; height: 19px; stroke-width: 2; }
.favorite-star { position: absolute; z-index: 6; top: 0; right: 0; margin: 0; }
.favorite-star.active { color: #f2a900; border-color: rgba(242,169,0,.24); background: rgba(255,246,216,.92); }
.favorite-star.active .lucide { fill: currentColor; }
.textbook-icon.active { color: var(--sm-blue); border-color: rgba(22,119,242,.22); background: rgba(232,242,255,.92); }
.utility-card { width: min(68%, 430px); min-height: 74px; }
.utility-card .card-toggle { min-height: 74px; grid-template-columns: 50px minmax(0,1fr) auto; padding: 10px 14px 10px 18px; }
.utility-card .subject-app-icon { width: 44px; height: 44px; border-radius: 14px; }
.utility-card .subject-app-icon .lucide { width: 26px; height: 26px; }
.utility-card .card-copy strong { font-size: 18px; }
.cancelled-card .card-copy strong { text-decoration: line-through; text-decoration-thickness: 1px; }
@media (max-width: 760px) {
.schedule-title h1 { font-size: 23px; }
.timeline-entry { grid-template-columns: 52px 18px minmax(0,1fr); }
.schedule-timeline::before { left: 60px; }
.entry-time { width: auto; margin-top: 24px; padding-right: 8px; font-size: 13px; line-height: 1.32; }
.timeline-dot { left: 55px; }
.schedule-card { min-height: 108px; border-radius: 22px; }
.card-toggle { min-height: 108px; grid-template-columns: 58px minmax(0,1fr) auto; gap: 12px; padding: 15px 13px 15px 18px; }
.subject-app-icon { width: 54px; height: 54px; border-radius: 15px; }
.subject-app-icon .lucide { width: 29px; height: 29px; }
.card-copy { padding-right: 64px; }
.card-copy strong { font-size: 17px; }
.period-kicker { font-size: 11px; }
.teacher-line, .room-line { font-size: 12px; }
.card-side { min-width: 24px; }
.expanded-panel { margin: 0 13px 15px 18px; padding: 13px 0 0 70px; }
.state-badge { right: 58px; min-width: 73px; }
.lesson-tool { width: 32px; height: 32px; border-radius: 10px; }
.lesson-tool .lucide { width: 17px; height: 17px; }
.favorite-star { top: 0; right: 0; }
.utility-card { width: min(82%, 360px); min-height: 70px; }
.utility-card .card-toggle { min-height: 70px; }
}
@media (max-width: 430px) {
.timeline-entry { grid-template-columns: 49px 17px minmax(0,1fr); }
.schedule-timeline::before { left: 56px; }
.timeline-dot { left: 51px; }
.card-toggle { grid-template-columns: 52px minmax(0,1fr) auto; gap: 10px; }
.card-copy { padding-right: 60px; }
.subject-app-icon { width: 50px; height: 50px; }
.expanded-panel { padding-left: 62px; }
}

/* A starred lesson is one the pupil treats as important.
   The accent has to be caught on the first scan of the day without shouting:
   a wider tone bar, a barely tinted surface, a slightly deeper shadow.
   No fill, no large badge. */
.schedule-card.is-starred {
  background: var(--sm-card);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 11px 0 0 var(--tone, #8a99b0),
    0 20px 46px rgba(36, 68, 113, .13),
    0 2px 8px rgba(36, 68, 113, .06);
}

.schedule-card.is-starred .card-copy strong { letter-spacing: -.006em; }

/* A test on a dated lesson. It has to be readable while the card is collapsed
   and must not be confused with the subject colour or a personal accent. */
.kicker-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.test-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  border: 1px solid rgba(184, 67, 15, .24);
  border-radius: 999px;
  color: #b8430f;
  background: #fff1e6;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.test-flag .lucide { width: 12px; height: 12px; }
.test-flag[hidden] { display: none; }

.schedule-card.has-test { box-shadow: inset 0 1px 0 #fff, inset 7px 0 0 var(--tone, #8a99b0), 0 0 0 1.5px rgba(184, 67, 15, .3), var(--sm-shadow); }
.schedule-card.is-starred.has-test {
  box-shadow: inset 0 1px 0 #fff, inset 11px 0 0 var(--tone, #8a99b0), 0 0 0 1.5px rgba(184, 67, 15, .3),
    0 20px 46px rgba(36, 68, 113, .13), 0 2px 8px rgba(36, 68, 113, .06);
}

.chip-action { border: 1px solid var(--sm-line); background: #fff; cursor: pointer; font: inherit; font-size: 12.5px; }
.chip-action.on { color: #b8430f; border-color: rgba(184, 67, 15, .28); background: #fff1e6; }

/* The expanded panel: lesson details, the test switch, the personal colour */
.panel-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.panel-row + .panel-row { margin-top: 12px; }

/* The colour picker gets its own block so ten swatches never wrap raggedly. */
.panel-row.colors { display: grid; grid-template-columns: repeat(5, 30px); gap: 9px 10px; justify-content: start; }
.panel-label { grid-column: 1 / -1; font-size: 12.5px; font-weight: 650; color: var(--sm-muted); }

.swatch {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch, #fff);
  box-shadow: inset 0 0 0 1px rgba(11, 29, 58, .08);
  cursor: pointer;
}
.swatch.on { border-color: var(--sm-ink); box-shadow: inset 0 0 0 2px #fff; }
.swatch.reset {
  display: grid;
  place-items: center;
  color: var(--sm-muted);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--sm-line);
}
.swatch.reset .lucide { width: 14px; height: 14px; }

/* The book on a collapsed card is the textbook indicator: lit when there is a
   link to open, dimmed when there is not. A dim one opens the notes editor so
   the link can be added. */
.textbook-inline { cursor: pointer; }
.textbook-inline.active {
  color: var(--sm-blue);
  border-color: rgba(22, 119, 242, .28);
  background: rgba(22, 119, 242, .1);
}
.textbook-inline:not(.active) { opacity: .42; }

.note-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  color: #a06a12;
  background: rgba(242, 169, 0, .14);
}
.note-mark .lucide { width: 14px; height: 14px; }
