/* Only alternative themes override the existing Horde palette. */
html[data-theme=parchment]{color-scheme:light;--theme-text:#29251f;--theme-muted:#665a4b;--theme-gold:#704d16;--theme-border:#b6a78f;--theme-line:#b6a78f88;--theme-page:#eee9df;--theme-header:#f7f3eb;--theme-surface:#faf7f0;--theme-raised:#e3d9c9;--theme-field:#fffdf7;--theme-glow:#b79c7333;--theme-action:#912d34;--theme-action-border:#b45750;--theme-selected:#e2d5c0;--theme-radius:4px}
html[data-theme]:not([data-theme=horde]){--ck-ui-text:var(--theme-text);--ck-ui-muted:var(--theme-muted);--ck-ui-gold:var(--theme-gold);--ck-ui-line:var(--theme-line);--ck-ui-red:var(--theme-action);--ck-ui-radius:var(--theme-radius);--ck-ui-surface:var(--theme-surface);--ck-ui-surface-raised:var(--theme-raised);--ck-ui-field:var(--theme-field);--ck-ui-border:var(--theme-border);--ck-ui-notice:var(--theme-surface);--ck-ui-accent:var(--theme-action-border)}
html[data-theme]:not([data-theme=horde]) body{--bg:var(--theme-page);--surface:var(--theme-surface);--border:var(--theme-border);--text:var(--theme-text);--muted:var(--theme-muted);--red:var(--theme-action);--gold:var(--theme-gold);--ck-paper:var(--theme-text);--ck-soft:var(--theme-muted);--ck-accent:var(--theme-gold);--ck-line:var(--theme-line);--mp-text:var(--theme-text);--mp-muted:var(--theme-muted);--mp-gold:var(--theme-gold);--mp-border:var(--theme-line);--ck-admin-text:var(--theme-text);--ck-admin-muted:var(--theme-muted);--ck-admin-gold:var(--theme-gold);--ck-admin-line:var(--theme-line)}
html[data-theme]:not([data-theme=horde]) .ck-calendar{--cal-gold:var(--theme-gold);--cal-muted:var(--theme-muted);--cal-line:var(--theme-line)}
html[data-theme]:not([data-theme=horde]) body .button:hover{background:var(--theme-action);filter:brightness(1.12)}
html[data-theme]:not([data-theme=horde]) body .button.secondary{background:transparent;color:var(--theme-text);border-color:var(--theme-border)}
/* Actual WoW art, rarity colours and dark item tooltips remain game-specific. */
html[data-theme=parchment] .armory-profile-stage .armory-paper-doll{--ck-ui-text:#f3e8d7;--ck-ui-muted:#c8b5aa;--ck-ui-field:#140f12;--ck-ui-surface-raised:#29191e;color:var(--ck-ui-text);--ck-ui-border:#644048;--ck-ui-gold:#dfb56e;background:radial-gradient(ellipse at 50% 60%,#a130333d,transparent 60%),#191217}
html[data-theme=parchment] .armory-class-priest{--armory-class:#5b5360}
html[data-theme=parchment] .armory-class-paladin{--armory-class:#a33265}
html[data-theme=parchment] .armory-class-mage{--armory-class:#08627e}
html[data-theme=parchment] .armory-class-rogue{--armory-class:#725600}
html[data-theme=parchment] .armory-class-hunter{--armory-class:#3e6727}
html[data-theme=parchment] .armory-class-warrior{--armory-class:#795032}
html[data-theme=parchment] .armory-class-warlock{--armory-class:#6650a3}
html[data-theme=parchment] .ck-admin-verified{color:#42622c}
/* Header toggle and adjacent mode menu. */
.ck-theme-picker{position:relative;display:flex;align-items:center;flex-shrink:0;color:var(--ck-ui-text);font-family:var(--ck-font-ui)}
.ck-mode-toggle,.ck-theme-picker summary{display:flex;align-items:center;justify-content:center;gap:.5rem;min-width:34px;height:34px;list-style:none;cursor:pointer;background:var(--ck-ui-surface);border:1px solid var(--ck-ui-line);border-radius:var(--ck-ui-radius);color:var(--ck-ui-text);font:inherit}
.ck-mode-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.ck-theme-picker summary{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;padding:0 .3rem;min-width:28px}
.ck-theme-picker summary::-webkit-details-marker{display:none}.ck-theme-label{display:none}.ck-mode-system{font-size:.65rem;color:var(--ck-ui-gold)}
html[data-theme=horde] .ck-mode-moon,html[data-theme=parchment] .ck-mode-sun{display:none}
.ck-theme-options{position:absolute;right:0;top:calc(100% + .65rem);z-index:120;width:260px;max-width:calc(100vw - 3rem);padding:1rem;border:1px solid var(--ck-ui-border);border-radius:var(--ck-ui-radius);background:var(--ck-ui-surface);box-shadow:0 12px 35px #0005;color:var(--ck-ui-text)}
.ck-theme-options fieldset{margin:0;padding:0;border:0;min-width:0}.ck-theme-options legend{margin-bottom:.75rem;font-size:.9rem;color:var(--ck-ui-text)}
body[class] .ck-theme-options label{display:flex;align-items:center;gap:.65rem;min-height:44px;padding:.4rem .2rem;font-size:.85rem;color:var(--ck-ui-text);cursor:pointer}
body[class] .ck-theme-options input{width:17px;height:17px;min-height:17px;margin:0;padding:0;flex-shrink:0;accent-color:var(--ck-ui-gold)}
.ck-theme-options p{font-size:.75rem;color:var(--ck-ui-muted);margin:.8rem 0 0}.ck-theme-options .button{margin-top:.75rem}.ck-theme-picker [hidden]{display:none!important}
@media(max-width:760px){.ck-theme-picker{width:100%;flex-wrap:wrap}.ck-mode-toggle{padding:0 .7rem}.ck-theme-label{display:inline}.ck-theme-options{left:0;right:auto}}

.ck-mode-toggle>svg{width:18px;height:18px}.ck-mode-chevron{display:block;flex-shrink:0;transition:transform .15s}.ck-theme-picker details[open] .ck-mode-chevron{transform:rotate(180deg)}
@media(max-width:760px),(any-pointer:coarse){.ck-mode-toggle,.ck-theme-picker summary{min-width:44px;min-height:44px;height:44px}.ck-theme-picker summary{padding:0 .5rem}}
@media(prefers-reduced-motion:reduce){.ck-mode-chevron{transition:none}}

/* Follow-up contrast checks across actual rendered V2 pages. */
html[data-theme=parchment] .armory-class-shaman{--armory-class:#1256a0}
html[data-theme=parchment] .armory-class-druid{--armory-class:#9c4a00}
html[data-theme=parchment] .ck-calendar .cal-day-number{color:var(--theme-text)}
html[data-theme=parchment] .cal-day-outside .cal-day-number{color:var(--theme-muted)}
html[data-theme=parchment] .cal-day-mobile-summary{color:#fff3e5}
html[data-theme=parchment] .raid-overview-warning{color:var(--theme-gold)}
html[data-theme=parchment] .raid-overview-counts>span{color:var(--theme-muted)}

/* Keep the mode menu in the scrolling mobile navigation flow. */
@media(max-width:1100px){
 .ck-theme-picker{width:100%;align-items:flex-start;flex-wrap:nowrap}
 .ck-mode-toggle{padding:0 .7rem;min-width:44px;min-height:44px;height:44px}
 .ck-theme-label{display:inline}
 .ck-theme-picker details[open]{flex:1;min-width:0}
 .ck-theme-picker summary{width:max-content;min-width:44px;min-height:44px;height:44px}
 .ck-theme-options{position:static;left:auto;right:auto;top:auto;width:100%;max-width:none;margin-top:.5rem;box-shadow:none}
}
