/* One structure in both modes. Only palette tokens change with data-theme. */
html[data-theme][data-theme][data-theme],html[data-theme][data-theme][data-theme] body{
 --bg:#0d1011;--bg2:#13191a;--bg3:#171d1f;--bg4:#21292b;
 --text:#f4f2e9;--muted:#bbc4bf;--gold:#e2bd5b;--gold2:#d8b14c;--sand:#e2bd5b;--sand-ink:#29200d;
 --line:#333c3a;--line2:#46504b;--gold-soft:#302a18;
 --ok:#93d7a7;--ok-bg:#173326;--ok-line:#426f51;
 --warn:#f2ce72;--warn-bg:#362d17;--warn-line:#82703c;
 --bad:#ffb2a5;--bad-bg:#3b211f;--bad-line:#9c554a;
 --info:#a8cdef;--info-bg:#1c2e3c;--info-line:#4c718e;
 --neutral-bg:#242b2c;--primary:#dfb64f;--primary-ink:#27200f;
 --shadow:0 16px 44px #0005;--focus:0 0 0 3px #d8b14c60;
}
html[data-theme=light][data-theme][data-theme],html[data-theme=light][data-theme][data-theme] body{
 --bg:#f5f3ed;--bg2:#faf9f5;--bg3:#ffffff;--bg4:#eeece5;
 --text:#292e2b;--muted:#59635c;--gold:#79580e;--gold2:#926713;--sand:#79580e;--sand-ink:#29200d;
 --line:#dedfd5;--line2:#c4c9bd;--gold-soft:#f8efcf;
 --ok:#236641;--ok-bg:#e8f3e9;--ok-line:#90b99b;
 --warn:#79530b;--warn-bg:#fff3cd;--warn-line:#c5a24e;
 --bad:#9e2a23;--bad-bg:#ffebe6;--bad-line:#d7998a;
 --info:#275b91;--info-bg:#eaf2fa;--info-line:#8eaccb;
 --neutral-bg:#eeeee8;--primary:#d9ad40;--primary-ink:#27200f;
 --shadow:0 16px 44px #3930201a;--focus:0 0 0 3px #a8752060;
}
html[data-theme=dark][data-theme][data-theme],html[data-theme=dark][data-theme][data-theme] body,html[data-theme=dark][data-theme][data-theme] :is(input,select,textarea){color-scheme:dark}
html[data-theme=light][data-theme][data-theme],html[data-theme=light][data-theme][data-theme] body,html[data-theme=light][data-theme][data-theme] :is(input,select,textarea){color-scheme:light}
html[data-theme][data-theme][data-theme] body{background:var(--bg)!important;color:var(--text)!important}
html[data-theme][data-theme][data-theme] body :is(.sidebar,.login-card,.modal,.sheet,.ro-panel,.card,.ro-mock-panel){background-color:var(--bg3)!important;color:var(--text)}
html[data-theme][data-theme][data-theme] body :is(input,select,textarea){background-color:var(--bg3)!important;color:var(--text)!important;border-color:var(--line2)!important}
html[data-theme][data-theme][data-theme] body :is(.btn.primary,.login-submit){background:var(--primary)!important;border-color:var(--primary)!important;color:var(--primary-ink)!important}
html[data-theme][data-theme][data-theme] body :is(.btn.danger,.ro-remove-person){background:var(--bad-bg)!important;border-color:var(--bad-line)!important;color:var(--bad)!important}
html[data-theme][data-theme][data-theme] body :is(.theme-control,.theme-control select){color:var(--text)!important;background:var(--bg3)!important}
.theme-control{display:inline-flex;align-items:center;gap:5px;max-width:100%;border:1px solid var(--line2);border-radius:8px;padding:0 8px;font-size:12px;min-height:42px;flex-shrink:0}
.theme-control svg{flex-shrink:0}.theme-control select{width:116px;min-height:40px;padding:6px 24px 6px 3px!important;border:0!important;margin:0!important;font-size:12px!important}
.theme-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.login-card>.theme-control,.reg-hero>.theme-control{margin:12px 0}
html[data-theme][data-theme][data-theme] .nav-ico{width:18px;height:18px;flex-shrink:0;vertical-align:-3px;pointer-events:none}
.ro-action-icon::before{content:'';display:inline-block;width:1em;height:1em;vertical-align:-.12em;margin-right:.4em;background:currentColor;mask:var(--action-icon) center/contain no-repeat;-webkit-mask:var(--action-icon) center/contain no-repeat;pointer-events:none}
html[data-theme][data-theme][data-theme] .home-metric .metric-icon{color:var(--info);display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;background:var(--info-bg);border-radius:8px;margin-bottom:2px}
html[data-theme][data-theme][data-theme] .home-metric[data-tone=warn] .metric-icon{color:var(--warn);background:var(--warn-bg)}
html[data-theme][data-theme][data-theme] .home-metric[data-tone=ok] .metric-icon{color:var(--ok);background:var(--ok-bg)}
html[data-theme][data-theme][data-theme] .home-metric[data-tone=bad] .metric-icon{color:var(--bad);background:var(--bad-bg)}
html[data-theme][data-theme][data-theme] :is(.home-absence-alerts,.home-absence-event){border-color:var(--bad-line)!important}
html[data-theme][data-theme][data-theme] body .home-absence-alerts{background:var(--bad-bg)!important}
html[data-theme][data-theme][data-theme] :is([data-critical-absence],[data-critical-conflicts][data-tone=bad]){background:var(--bad-bg)!important;color:var(--bad)!important;border-color:var(--bad-line)!important}
html[data-theme][data-theme][data-theme] [data-critical-conflicts][data-tone=ok]{background:var(--ok-bg)!important;color:var(--ok)!important;border-color:var(--ok-line)!important}
html[data-theme][data-theme][data-theme] :is(.warn-text,.field-error){color:var(--bad)!important}
html[data-theme][data-theme][data-theme] :is([aria-invalid=true],.invalid){border-color:var(--bad)!important}
html[data-theme][data-theme][data-theme] .ro-schedule-shift.sel{outline:3px solid var(--gold2)!important;outline-offset:-3px;box-shadow:inset 0 0 0 1px var(--bg3)!important}
html[data-theme][data-theme][data-theme] .ro-schedule-shift span::before{content:'';display:inline-block;width:12px;height:12px;vertical-align:-1px;margin-right:4px;background:currentColor;mask:var(--status-icon) center/contain no-repeat;-webkit-mask:var(--status-icon) center/contain no-repeat}
html[data-theme][data-theme][data-theme] .ro-schedule-shift:focus-visible{outline:3px solid var(--info)!important}
html[data-theme][data-theme][data-theme] .design-legend{display:flex;flex-wrap:wrap;gap:12px;margin:8px 0;color:var(--muted);font-size:12px}
.design-legend span{display:inline-flex;align-items:center;gap:4px}
@media(max-width:700px){.theme-control{min-height:40px}.festival-header-actions{flex-wrap:wrap!important;gap:6px!important}.theme-control select{width:112px}.home-metric .metric-icon{width:26px;height:26px}}

/* Semantic states */
html[data-theme][data-theme][data-theme] body :is(.tag.ok,.ro-badge.ok,.ro-mock-pill.ok,.ro211-badge.ok,.ro-availability.ok,.ro-score.good,.ro-score.great,.ro203-status.full,.ro-schedule-shift.full,.plan-role-option.full,.presence-state.present,.presence-state.is-present,.sys-ok.ok,.toast[data-kind=success]){--status-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%3Cpath%20d%3D%22m7%2012%203%203%207-7%22%2F%3E%3C%2Fsvg%3E");background:var(--ok-bg)!important;color:var(--ok)!important;border-color:var(--ok-line)!important}
html[data-theme][data-theme][data-theme] body :is(.tag.ok,.ro-badge.ok,.ro-mock-pill.ok,.ro211-badge.ok,.ro-availability.ok,.ro203-status.full,.presence-state.present,.presence-state.is-present,.sys-ok.ok)::before{content:"";display:inline-block;width:13px;height:13px;flex-shrink:0;margin-right:5px;vertical-align:-2px;background:currentColor;mask:var(--status-icon) center/contain no-repeat;-webkit-mask:var(--status-icon) center/contain no-repeat}
html[data-theme][data-theme][data-theme] body :is(.tag.warn,.ro-badge.warn,.ro-mock-pill.warn,.ro211-badge.warn,.ro-score.check,.ro203-status.open,.ro-schedule-shift.open,.ro-schedule-shift.partial,.ro-schedule-shift.over,.toast[data-kind=warn]){--status-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m12%203%2010%2018H2L12%203Z%20M12%209v5m0%203v1%22%2F%3E%3C%2Fsvg%3E");background:var(--warn-bg)!important;color:var(--warn)!important;border-color:var(--warn-line)!important}
html[data-theme][data-theme][data-theme] body :is(.tag.warn,.ro-badge.warn,.ro-mock-pill.warn,.ro211-badge.warn,.ro203-status.open)::before{content:"";display:inline-block;width:13px;height:13px;flex-shrink:0;margin-right:5px;vertical-align:-2px;background:currentColor;mask:var(--status-icon) center/contain no-repeat;-webkit-mask:var(--status-icon) center/contain no-repeat}
html[data-theme][data-theme][data-theme] body :is(.tag.bad,.ro-badge.bad,.ro-mock-pill.bad,.ro211-badge.error,.ro-availability.bad,.ro-score.blocked,.sys-ok.bad,.phase-issue.error,.toast[data-kind=error]){--status-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%3Cpath%20d%3D%22m8%208%208%208m-8%200%208-8%22%2F%3E%3C%2Fsvg%3E");background:var(--bad-bg)!important;color:var(--bad)!important;border-color:var(--bad-line)!important}
html[data-theme][data-theme][data-theme] body :is(.tag.bad,.ro-badge.bad,.ro-mock-pill.bad,.ro211-badge.error,.ro-availability.bad,.sys-ok.bad)::before{content:"";display:inline-block;width:13px;height:13px;flex-shrink:0;margin-right:5px;vertical-align:-2px;background:currentColor;mask:var(--status-icon) center/contain no-repeat;-webkit-mask:var(--status-icon) center/contain no-repeat}
html[data-theme][data-theme][data-theme] body :is(.tag.info,.ro-badge.info,.ro-mock-pill.info,.ro211-badge.unknown,.phase-issue.info,.toast[data-kind=info]){--status-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%3Cpath%20d%3D%22M12%2011v6m0-10v1%22%2F%3E%3C%2Fsvg%3E");background:var(--info-bg)!important;color:var(--info)!important;border-color:var(--info-line)!important}
html[data-theme][data-theme][data-theme] body :is(.tag.info,.ro-badge.info,.ro-mock-pill.info,.ro211-badge.unknown)::before{content:"";display:inline-block;width:13px;height:13px;flex-shrink:0;margin-right:5px;vertical-align:-2px;background:currentColor;mask:var(--status-icon) center/contain no-repeat;-webkit-mask:var(--status-icon) center/contain no-repeat}
html[data-theme][data-theme][data-theme] .ro-availability>i{display:none}html[data-theme][data-theme][data-theme] .toast{border:1px solid var(--line2);border-left-width:4px}

/* Shared tokens outrank legacy per-view palettes without changing their layout. */
html[data-theme] body{--ro-bg:var(--bg);--ro-bg-2:var(--bg2);--ro-surface:var(--bg3);--ro-surface-2:var(--bg3);--ro-surface-3:var(--bg4);--ro-surface-hover:var(--bg4);--ro-text:var(--text);--ro-text-2:var(--text);--ro-muted:var(--muted);--ro-muted-2:var(--muted);--ro-gold:var(--gold);--ro-gold-bright:var(--gold);--ro-gold-soft:var(--gold-soft);--ro-green:var(--ok);--ro-red:var(--bad);--ro-red-soft:var(--bad-bg);--ro-forest:var(--ok-bg);--ro-forest-2:var(--ok-bg);--sp-bg:var(--bg);--sp-panel:var(--bg3);--sp-text:var(--text);--sp-muted:var(--muted)}
html[data-theme][data-theme] body .ro-icon-choice{background:var(--bg3)!important;color:var(--text)!important;border-color:var(--line2)!important}
html[data-theme][data-theme] body .ro-icon-choice.on{background:var(--gold-soft)!important;border-color:var(--gold2)!important}
html[data-theme][data-theme] body .festival-context-nav .nav-ico{display:inline-block}

html.theme-switching *,html.theme-switching *::before,html.theme-switching *::after{transition:none!important}

/* The same status meanings also apply to the public boards and conflict details. */
html[data-theme][data-theme][data-theme] body :is(.board-card.full,.ov-slot.full,.ro-conflict-stat.clear){background:var(--ok-bg)!important;border-color:var(--ok-line)!important}
html[data-theme][data-theme][data-theme] body :is(.board-card.open,.ov-slot.gap){background:var(--warn-bg)!important;border-color:var(--warn-line)!important}
html[data-theme][data-theme][data-theme] body :is(.board-card.open,.ov-slot.gap) .empty{color:var(--warn)!important}
html[data-theme][data-theme][data-theme] body :is(.ro-conflict-stat.alert,.ro17-conflict-item.hard){background:var(--bad-bg)!important;border-color:var(--bad-line)!important}
html[data-theme][data-theme][data-theme] body :is(.ro-conflict-stat.alert .ro-conflict-stat-icon,.ro17-conflict-item.hard .ro-conflict-icon){color:var(--bad)!important}
html[data-theme][data-theme][data-theme] body .ro-conflict-stat.clear .ro-conflict-stat-icon{color:var(--ok)!important}
html[data-theme][data-theme][data-theme] body .ro17-conflict-item.selected{outline:2px solid var(--gold2)!important;outline-offset:-2px}
html[data-theme][data-theme][data-theme] body .warn-text{color:var(--warn)!important}
html[data-theme][data-theme][data-theme] body :is(.field-error,.warn-text[role=alert]){color:var(--bad)!important}
