/* V23.9.440: prevent wallpaper bleeding through light Halloween content cards.
   The old v401-light and v2 layers intentionally used translucent glass. In the
   actual schedule screenshot this made the text unreadable. The selector
   :not(#__v440_css_guard) adds specificity against old !important v2 layers;
   it matches every normal body and does not change permissions. Keep decorative
   Halloween FRAME sprites, remove only the glass from the reading surfaces. */
html[data-theme="light"] body.season-halloween:not(#__v440_css_guard),
html[data-theme="light"] body[data-season-preset="halloween"]:not(#__v440_css_guard) {
  --card:#fff!important;
  --card2:#fff!important;
  --surface:#fff!important;
  --surface2:#fff!important;
  --text:#172033!important;
  --muted:#475569!important;
  --muted-strong:#334155!important;
}
/* Both the ordinary and Aurora HTML layouts must receive the same opaque
   surfaces, irrespective of the v401/v402 scene or inline UI mode. */
html[data-theme="light"] body.season-halloween:not(#__v440_css_guard) .lab2-main :is(
  .card,.hero-card,.quiet-subject-card,.quiet-subject-row,.admin-home-card,
  .admin-kpi-card,.quiet-kpi,.profile-card,.profile-appearance-card,
  .teacher-subject-card,.grade-subject-card,.teacher-kpi-strip>div,
  .schedule-pair-card,.schedule-countdown-card,.today-schedule-head,
  .today-lesson,.schedule-day-summary,.admin-home-head,.compact-page-head,
  .quiet-hero,.grades-hero,.teacher-hero,.profile-hero,.season-panel,
  .dev-section,.dev-run-card,.dev-parent-tester,.dev-official-schedule-card
),
html[data-theme="light"] body[data-season-preset="halloween"]:not(#__v440_css_guard) .lab2-main :is(
  .card,.hero-card,.quiet-subject-card,.quiet-subject-row,.admin-home-card,
  .admin-kpi-card,.quiet-kpi,.profile-card,.profile-appearance-card,
  .teacher-subject-card,.grade-subject-card,.teacher-kpi-strip>div,
  .schedule-pair-card,.schedule-countdown-card,.today-schedule-head,
  .today-lesson,.schedule-day-summary,.admin-home-head,.compact-page-head,
  .quiet-hero,.grades-hero,.teacher-hero,.profile-hero,.season-panel,
  .dev-section,.dev-run-card,.dev-parent-tester,.dev-official-schedule-card
) {
  background:#fff!important;
  background-image:none!important;
  background-color:#fff!important;
  background-blend-mode:normal!important;
  color:#172033!important;
  border-color:rgba(120,87,61,.23)!important;
  opacity:1!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
/* Explicitly cover ALL schedule cards (including finished and empty cards,
   which previously dimmed the entire element via opacity:0.46 / 0.55). */
html[data-theme="light"] body.season-halloween:not(#__v440_css_guard) .today-schedule-page :is(
  .today-schedule-head,.schedule-countdown-card,.schedule-pair-card,.schedule-day-summary
),
html[data-theme="light"] body[data-season-preset="halloween"]:not(#__v440_css_guard) .today-schedule-page :is(
  .today-schedule-head,.schedule-countdown-card,.schedule-pair-card,.schedule-day-summary
) {
  background:#fff!important;
  background-color:#fff!important;
  background-image:none!important;
  opacity:1!important;
  color:#172033!important;
}
/* Preserve semantic state accents without returning any wallpaper transparency. */
html[data-theme="light"] body.season-halloween:not(#__v440_css_guard) .today-schedule-page .schedule-pair-card.is-current,
html[data-theme="light"] body[data-season-preset="halloween"]:not(#__v440_css_guard) .today-schedule-page .schedule-pair-card.is-current {
  background:#f0fcf3!important;
  background-image:none!important;
  border-color:#86c9a0!important;
  opacity:1!important;
}
html[data-theme="light"] body.season-halloween:not(#__v440_css_guard) .today-schedule-page .schedule-pair-card.is-next,
html[data-theme="light"] body[data-season-preset="halloween"]:not(#__v440_css_guard) .today-schedule-page .schedule-pair-card.is-next {
  background:#fff7ed!important;
  background-image:none!important;
  border-color:#fdba74!important;
  opacity:1!important;
}
html[data-theme="light"] body.season-halloween:not(#__v440_css_guard) .today-schedule-page .schedule-pair-card.is-cancelled,
html[data-theme="light"] body[data-season-preset="halloween"]:not(#__v440_css_guard) .today-schedule-page .schedule-pair-card.is-cancelled {
  background:#fff3f3!important;
  background-image:none!important;
  border-color:#fca5a5!important;
  opacity:1!important;
}
/* Text: no hidden white text/shadow against white. Links stay recognisable. */
html[data-theme="light"] body.season-halloween:not(#__v440_css_guard) .today-schedule-page :is(
  h1,h2,h3,h4,b,strong,p,small,.schedule-pair-subject,.schedule-pair-time,
  .schedule-pair-counterpart,.schedule-pair-room,.schedule-countdown-timer
),
html[data-theme="light"] body[data-season-preset="halloween"]:not(#__v440_css_guard) .today-schedule-page :is(
  h1,h2,h3,h4,b,strong,p,small,.schedule-pair-subject,.schedule-pair-time,
  .schedule-pair-counterpart,.schedule-pair-room,.schedule-countdown-timer
) {color:#172033!important;-webkit-text-fill-color:#172033!important;text-shadow:none!important}
html[data-theme="light"] body.season-halloween:not(#__v440_css_guard) .today-schedule-page .schedule-journal-link,
html[data-theme="light"] body[data-season-preset="halloween"]:not(#__v440_css_guard) .today-schedule-page .schedule-journal-link {
  color:#1d4ed8!important;
  -webkit-text-fill-color:#1d4ed8!important;
  background:transparent!important;
}
/* Do not repaint meaningful status chips, grades, alerts, controls or the frame.
   Preserve the badge colors supplied by V439 and earlier theme code. */
/* The bell time sits OUTSIDE the card in the screenshot. Give it an equally
   readable white label rather than leaving dark text directly on the wallpaper. */
html[data-theme="light"] body.season-halloween:not(#__v440_css_guard) .today-schedule-page .schedule-pair-slot > .schedule-pair-time,
html[data-theme="light"] body[data-season-preset="halloween"]:not(#__v440_css_guard) .today-schedule-page .schedule-pair-slot > .schedule-pair-time {
  justify-self:center!important;
  width:max-content!important;
  padding:5px 11px!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#172033!important;
  -webkit-text-fill-color:#172033!important;
  text-shadow:none!important;
  box-shadow:0 2px 12px rgba(0,0,0,.07)!important;
}
