/* Higher specificity than the shared, editable :root palette. */
html[data-theme=dark]{color-scheme:dark;--theme-background:#000000;--theme-surface:#000000;--theme-text:#e6eeea;--theme-muted:#aabbb2;--theme-border:#353535;--theme-sidebar:#000000;--theme-sidebar-text:#c7d8ce;--theme-topbar:#000000;--theme-primary:#91d8ac;--theme-primary-hover:#b0ebc6;--theme-on-primary:#10281a;--theme-active:#222222;--theme-active-text:#f0f8f2;--theme-input:#000000;--theme-table-header:#171717;--theme-table-text:#d8efdf;--theme-banner:#000000;--theme-banner-text:#f2f7f3;--theme-success:#9dddaf;--theme-warning:#f1d18a;--theme-danger:#ffaba4;--theme-icon-color:#9dddaf;--bs-secondary-color:#aabbb2;--bs-tertiary-bg:#151515;--bs-border-color:#353535;--bs-emphasis-color:#f2f7f3}
html{color-scheme:light}.theme-toggle{flex-shrink:0}.theme-toggle svg{width:23px;height:23px}.theme-toggle .theme-sun{display:none!important}html[data-theme=dark] .theme-toggle .theme-moon{display:none!important}html[data-theme=dark] .theme-toggle .theme-sun{display:block!important}.login-theme-toggle{position:fixed;right:18px;top:18px;z-index:50;background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:50%;padding:4px}
/* User-selected wallpaper and its visibility setting apply in both modes. */
html[data-theme=dark] body{background:var(--theme-background);color:var(--theme-text)}
html[data-theme=dark] :is(.planning-nav a,.student-tabs,.rental-form,.rental-summary,.view-dialog,.column-order,.rental-calendar-scroll,.rental-week th,.rental-month-heading,.tournament-day-event,.planner-grid tbody th){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
html[data-theme=dark] :is(.btn-light,.btn-outline-secondary){--bs-btn-color:#d3e3d9;--bs-btn-bg:#141414;--bs-btn-border-color:#484848;--bs-btn-hover-color:#f2fff6;--bs-btn-hover-bg:#252525;--bs-btn-hover-border-color:#779a81;--bs-btn-active-color:#fff;--bs-btn-active-bg:#252525}
html[data-theme=dark] :is(.modal-content,.dropdown-menu,.list-group-item,.offcanvas){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
html[data-theme=dark] :is(.dropdown-item,.list-group-item){color:var(--theme-text)}html[data-theme=dark] .dropdown-item:hover{background:var(--theme-active)}
html[data-theme=dark] :is(.tryout-card,.planner-event,.athlete-choice.selected){background:#151515;color:#e4f2e7;border-color:#6e9279}
html[data-theme=dark] :is(.tryout-card:hover,.rental-slot:hover){background:#202020}
html[data-theme=dark] :is(.tryout-card b,.athlete-choice small,.athlete-choice span,.rental-month-day p,.rental-footer,.planner-grid th small){color:var(--theme-muted)}
html[data-theme=dark] :is(.rental-month-day,.rental-month-empty,.rental-week td){background:#000000;border-color:var(--theme-border)}
html[data-theme=dark] :is(.rental-card,.rental-slot,.rental-week th,.rental-week td){border-color:var(--theme-border)}
html[data-theme=dark] .rental-free{background:#102416;color:#d4f3df;border-color:#78a989}html[data-theme=dark] .rental-free:hover{background:#1b3622}
html[data-theme=dark] .tournament-day-event.own{background:#473454;color:#f1dcff;border-color:#bd95d5}
html[data-theme=dark] .tournament-day-event a{color:#f1dcff}
html[data-theme=dark] :is(.table-success,.alert-info){--bs-table-bg:#102416;--bs-table-color:#ddf5e5;--bs-alert-bg:#223b46;--bs-alert-color:#cae6f4;--bs-alert-border-color:#628a9b}
html[data-theme=dark] :is(.appearance-actions,.pwa-install-dialog,.planner-zoom-toolbar){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
html[data-theme=dark] .appearance-field small{color:var(--theme-muted)}
html[data-theme=dark] .sidebar{--theme-sidebar:#1b1e25;--theme-sidebar-text:#e4e6eb;background:#1b1e25;border-right-color:#2d3037}
html[data-theme=dark] .sidebar .nav-link{color:#e4e6eb;border-radius:12px}
html[data-theme=dark] .sidebar .nav-link:hover{background:#252830;color:#fff}
html[data-theme=dark] .sidebar .nav-link.active,html[data-theme=dark] .sidebar .nav-link.active:hover{background:#2c2e35;color:#fff}
html[data-theme=dark] .sidebar .nav-link:not(.active) svg.icon{color:#e4e6eb!important}
html[data-theme=dark] .sidebar :is(.nav-caption,.brand small,.sidebar-footer small){color:#a9adb7}
html[data-theme=dark] .sidebar .sidebar-footer{border-top-color:#353840}
html[data-theme=dark] .planner-type-button{background:#151515;color:#d7eddf;border-color:#739481}html[data-theme=dark] .planner-type-button.is-active{background:#38674a;color:#fff}
html[data-theme=dark] .sidebar:has(#menu-settings:not([hidden])){background:#20232b}
@media(max-width:560px){.topbar-right .theme-toggle{width:28px}.topbar-right .theme-toggle svg{width:21px;height:21px}.topbar-right{gap:0}.topbar-right .season-select{padding-left:3px;padding-right:3px}}
@media print{[data-theme-toggle],.login-theme-toggle{display:none!important}}
/* The timetable retains the clay/green palette; the surrounding portal stays black. */
html[data-theme=dark] .planner-workspace .planner-timetable{--theme-background:#f7f5ef;--theme-surface:#ffffff;--theme-text:#293d2c;--theme-muted:#6d7569;--theme-border:#e4ddd1;--theme-primary:#326b36;--theme-primary-hover:#245128;--theme-on-primary:#ffffff;--theme-active:#a4472d;--theme-active-text:#ffffff;--theme-input:#ffffff;--theme-table-header:#f3e4da;--theme-table-text:#7c3927;color:#293d2c}
html[data-theme=dark] .planner-workspace .planner-grid th,html[data-theme=dark] .planner-workspace .planner-grid td{border-color:#e4ddd1}
html[data-theme=dark] .planner-workspace .planner-timetable .timetable-event{background:#f3e4da;color:#293d2c}
html[data-theme=dark] .planner-workspace .planner-timetable .timetable-event.tryout-event:not(.cancelled){background:#fff5cc;color:#4f411b}
html[data-theme=dark] .planner-workspace .planner-timetable .timetable-event.cancelled{background:#f7f5ef;color:#6d7569}
