/* V23.9.439: readable light Halloween card surfaces (legacy + Aurora).
   No changes in dark mode or other seasons. Loaded last after v435. */
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] {
  --card:rgba(255,255,255,.97)!important;
  --card2:rgba(255,255,255,.985)!important;
  --surface:rgba(255,255,255,.97)!important;
  --surface2:rgba(255,255,255,.985)!important;
  --text:#182334!important;
  --muted:#475569!important;
  --muted-strong:#334155!important;
  --table-head:rgba(255,255,255,.90)!important;
  --input-bg:rgba(255,255,255,.98)!important;
  --entry-bg:rgba(255,255,255,.96)!important;
  color:#182334!important;
}
/* The backdrop remains visible outside cards; inside them readability wins.
   Do not target form controls, cells, icons, grade chips or alerts. */
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] :is(
 .card,.admin-home-card,.admin-kpi-card,.quiet-subject-card,.quiet-kpi,
 .teacher-subject-card,.grade-subject-card,.teacher-kpi-strip>div,
 .quiet-hero,.grades-hero,.teacher-hero,.profile-hero,.compact-page-head,
 .admin-home-head,.dev-section,.dev-run-card,.dev-parent-tester,
 .dev-mobile-launch-card,.dev-official-schedule-card,.dev-schedule-course,
 .developer-chat-sidebar,.developer-chat-panel,.season-panel,
 .today-lesson,.today-schedule-head,.schedule-pair-card,.schedule-countdown-card
){
  background:rgba(255,255,255,.975)!important;
  border-color:rgba(131,92,59,.19)!important;
  box-shadow:0 12px 32px rgba(67,43,28,.10)!important;
  color:#182334!important;
}
/* Make ordinary content dark; preserve colored badges and interactive controls. */
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] :is(
 .admin-home-card,.admin-kpi-card,.quiet-subject-card,.quiet-kpi,
 .teacher-subject-card,.grade-subject-card,.teacher-kpi-strip>div,
 .quiet-hero,.grades-hero,.teacher-hero,.profile-hero,
 .today-schedule-head,.today-lesson,.schedule-countdown-card
) :is(h1,h2,h3,h4,p,small){color:#243247!important;-webkit-text-fill-color:#243247!important;text-shadow:none!important}
/* Today schedule: nearly opaque white even if ui-v2 or legacy sets dark gradients. */
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] :is(
 .today-schedule-page .today-schedule-head,
 .today-schedule-page .schedule-countdown-card,
 .today-schedule-page .schedule-pair-card,
 .today-lesson
){
  background:rgba(255,255,255,.993)!important;
  color:#182334!important;
  border-color:rgba(119,89,64,.20)!important;
}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page .schedule-pair-card.is-current{
  background:linear-gradient(135deg,rgba(238,252,242,.993),rgba(255,255,255,.993))!important;
  border-color:rgba(22,163,74,.30)!important;
}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page .schedule-pair-card.is-next{
  background:linear-gradient(135deg,rgba(255,247,237,.993),rgba(255,255,255,.993))!important;
  border-color:rgba(194,65,12,.29)!important;
}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page .schedule-pair-card.is-cancelled{
  background:linear-gradient(135deg,rgba(255,242,242,.993),rgba(255,255,255,.993))!important;
  border-color:rgba(185,28,28,.32)!important;
}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page .schedule-pair-card:is(.is-empty,.is-done){
  opacity:.88!important;
}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page :is(
  .today-schedule-head h1,.today-schedule-head p,
  .schedule-countdown-timer,.schedule-countdown-timer strong,
  .schedule-countdown-timer span,.schedule-countdown-timer small,
  .schedule-countdown-main h2,.schedule-countdown-meta,
  .schedule-day-summary,.schedule-day-summary b,.schedule-day-summary span,
  .schedule-pair-card-head b,.schedule-pair-subject,.schedule-journal-link,
  .schedule-pair-counterpart,.schedule-pair-room,
  .schedule-pair-room strong,.schedule-pair-room span,.schedule-pair-time
){color:#182334!important;-webkit-text-fill-color:#182334!important;text-shadow:none!important}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page .schedule-pair-card-head span{
  background:rgba(241,245,249,.98)!important;
  color:#334155!important;-webkit-text-fill-color:#334155!important;
}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page .schedule-pair-card.is-current .schedule-pair-card-head span{
  background:#dcfce7!important;color:#166534!important;-webkit-text-fill-color:#166534!important;
}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page .schedule-pair-card.is-next .schedule-pair-card-head span{
  background:#ffedd5!important;color:#9a3412!important;-webkit-text-fill-color:#9a3412!important;
}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page .schedule-pair-card.is-cancelled :is(.schedule-pair-subject,.schedule-pair-card-head span){
  color:#991b1b!important;-webkit-text-fill-color:#991b1b!important;
}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page :is(
 .schedule-pair-counterpart.is-group span,.schedule-group-journal-chip
){background:#eff6ff!important;color:#1e40af!important;-webkit-text-fill-color:#1e40af!important;border-color:rgba(37,99,235,.35)!important}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page .schedule-pair-room svg{
  fill:#475569!important;
}
html[data-theme="light"] body.season-halloween[data-season-preset="halloween"] .today-schedule-page .schedule-pair-card :is(.schedule-demo-label,.schedule-remote-label,.schedule-pair-card em){
  color:#9a3412!important;-webkit-text-fill-color:#9a3412!important;
}
