:root[data-theme=dark]{color-scheme:dark;--bg:#111111;--panel:var(--bg);--panel2:#242424;--text:#eeeeee;--muted:#a3a3a3;--line:#333333;--accent:#dedede;--theme-ink:#111111;--theme-control:#1b1b1b}
:root[data-theme=light]{color-scheme:only light;--bg:#ffffff;--panel:var(--bg);--panel2:#f1f1f1;--text:#202020;--muted:#686868;--line:#dedede;--accent:#454545;--theme-ink:#ffffff;--theme-control:#f5f5f5}
:root[data-theme]{--accent-soft:color-mix(in srgb,var(--accent) 16%,var(--bg))}
html,body{background:var(--bg);color:var(--text)}
.nav-item.active,.brand-symbol{color:var(--accent)}
button.primary,:root[data-theme=light] button.primary{background:var(--accent);color:var(--theme-ink)}
button.primary:hover,:root[data-theme=light] .primary:hover{background:color-mix(in srgb,var(--accent) 85%,var(--bg))}
.sidebar-note{background:var(--bg);border-color:var(--line)}
.version-calendar .timeline-date.today,:root[data-theme=light] .version-calendar .timeline-date.today{background:var(--accent-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--accent) 50%,transparent),inset 0 -3px var(--accent)}
.timeline-date.today strong,:root[data-theme=light] .timeline-date.today strong{background:var(--accent);color:var(--theme-ink);box-shadow:none}
.calendar-guide.today-guide,.version-calendar .timeline-column.today,:root[data-theme=light] .calendar-guide.today-guide,:root[data-theme=light] .version-calendar .timeline-column.today{background:color-mix(in srgb,var(--accent) 5%,transparent);border-left-color:color-mix(in srgb,var(--accent) 55%,transparent);border-right-color:color-mix(in srgb,var(--accent) 30%,transparent);box-shadow:none}
.theme-controls{position:relative}
.theme-custom-options{padding:14px;position:absolute;top:calc(100% + 8px);right:0;width:260px;z-index:80;background:var(--bg);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px #0002}
.theme-custom-options[hidden]{display:none}
.theme-custom-options p{font-size:11px;color:var(--muted);margin:0 0 10px}
.theme-color-options{display:flex;gap:8px;align-items:center;margin-bottom:12px}
.theme-color-options button{width:28px;height:28px;border-radius:50%;background:var(--swatch);border:3px solid var(--bg);outline:1px solid var(--line);padding:0}
.theme-color-options button[aria-pressed=true]{outline:2px solid var(--text)}
.theme-custom-options label{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--text)}
#theme-custom-color{width:48px;height:32px;padding:2px;border:1px solid var(--line);background:var(--bg);border-radius:6px}
@media(min-width:701px){.theme-custom-options::before{content:"";position:absolute;left:0;right:0;top:-10px;height:10px}.theme-controls:not(:focus-within):not(:hover) .theme-custom-options{display:none}}
@media(max-width:700px){.topbar-right>.theme-controls{display:none}#mobile-theme-slot .theme-controls{width:100%}#mobile-theme-slot .theme-custom-options{position:static;width:100%;margin-top:16px;padding:12px 0 0;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none}}

#mobile-theme-slot .theme-picker{display:flex;width:100%}#mobile-theme-slot .theme-picker button{flex:1}
