/* Theme tokens apply to the page or a nested profile modal. Fixed calendar/weather colors are preserved below. */
:root,
[data-theme] {
    --theme-hue: 150;
    --theme-saturation: 16%;
    --page: hsl(var(--theme-hue) var(--theme-saturation) 8%);
    --surface: hsl(var(--theme-hue) var(--theme-saturation) 12%);
    --surface-raised: hsl(var(--theme-hue) var(--theme-saturation) 17%);
    --surface-hover: hsl(var(--theme-hue) var(--theme-saturation) 24%);
    --border: hsl(var(--theme-hue) var(--theme-saturation) 34%);
    --text: hsl(var(--theme-hue) 15% 92%);
    --muted: hsl(var(--theme-hue) 14% 73%);
    --accent: hsl(var(--theme-hue) 42% 76%);
    --accent-ink: hsl(var(--theme-hue) 25% 12%);
    color-scheme: dark;
    background: var(--page);
    color: var(--text);
}
body {
    background: radial-gradient(ellipse at top left, var(--surface-hover) 0, transparent 55%), var(--page);
}
a {
    color: var(--accent);
}
select,
dialog {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
input,
textarea {
    color: var(--text);
}
.theme-control {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10;
}
.theme-control > button {
    margin: 0;
    background: var(--surface);
    box-shadow: 0 3px 12px #0005;
}
#theme-dialog {
    width: min(660px, calc(100vw - 32px));
    max-height: 85dvh;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
}
#theme-dialog::backdrop {
    background: #000a;
}
.theme-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.theme-heading h2,
.theme-heading button {
    margin: 0;
}
.theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}
.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px;
    background: var(--surface-raised);
    color: var(--text);
    border: 2px solid transparent;
}
.theme-option[aria-pressed='true'] {
    border-color: var(--accent);
    background: var(--surface-hover);
}
.theme-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex: none;
}
#theme-status {
    min-height: 24px;
    font-size: 13px;
}

[data-theme='evernun'] {
    --theme-hue: 150;
    --theme-saturation: 16%;
}
[data-theme='midnight'] {
    --theme-hue: 220;
    --theme-saturation: 30%;
}
[data-theme='ocean'] {
    --theme-hue: 200;
    --theme-saturation: 35%;
}
[data-theme='lagoon'] {
    --theme-hue: 180;
    --theme-saturation: 32%;
}
[data-theme='forest'] {
    --theme-hue: 135;
    --theme-saturation: 26%;
}
[data-theme='moss'] {
    --theme-hue: 90;
    --theme-saturation: 22%;
}
[data-theme='olive'] {
    --theme-hue: 65;
    --theme-saturation: 22%;
}
[data-theme='amber'] {
    --theme-hue: 40;
    --theme-saturation: 30%;
}
[data-theme='copper'] {
    --theme-hue: 25;
    --theme-saturation: 32%;
}
[data-theme='ember'] {
    --theme-hue: 10;
    --theme-saturation: 30%;
}
[data-theme='crimson'] {
    --theme-hue: 350;
    --theme-saturation: 30%;
}
[data-theme='rose'] {
    --theme-hue: 330;
    --theme-saturation: 25%;
}
[data-theme='orchid'] {
    --theme-hue: 300;
    --theme-saturation: 25%;
}
[data-theme='amethyst'] {
    --theme-hue: 275;
    --theme-saturation: 30%;
}
[data-theme='indigo'] {
    --theme-hue: 245;
    --theme-saturation: 30%;
}
[data-theme='slate'] {
    --theme-hue: 210;
    --theme-saturation: 12%;
}
[data-theme='charcoal'] {
    --theme-hue: 0;
    --theme-saturation: 0%;
}
[data-theme='coffee'] {
    --theme-hue: 30;
    --theme-saturation: 18%;
}
[data-theme='sandstone'] {
    --theme-hue: 48;
    --theme-saturation: 18%;
}
[data-theme='arctic'] {
    --theme-hue: 190;
    --theme-saturation: 15%;
}
.public-profile-card {
    color: var(--text);
}
#public-profile-dialog {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}
