:root {
  color-scheme: dark;
  --display: Cinzel, Forum, 'Times New Roman', serif; /* Forum covers Cyrillic, which Cinzel lacks */
  --bg: #0a0705;
  --panel: #17110b;
  --panel2: #0f0b07;
  --tile: #0d0906;
  --line: #4a3820;
  --line-strong: #7a6238;
  --accent: #ffd100;
  --gold: var(--accent); /* compatibility for existing components */
  --accent-muted: #c9a14a;
  --gold-dim: var(--accent-muted);
  --text: #eadfc6;
  --muted: #a8987a;
  --warn: #f0b429;
  --danger: #ff8a80;
  --alliance: #2f6fd6;
  --horde: #c0262b;
  --tank: #5b9bf0;
  --heal: #4fc16a;
  --dps: #e0574f;
  --label: 'Crimson Pro', Forum, Georgia, serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-1: 4px; --r-2: 6px; --r-3: 10px;
  --e1: 0 1px 0 #ffffff0a inset, 0 2px 8px #0008;
  --e2: 0 1px 0 #ffffff12 inset, 0 8px 22px #000b;
  --e3: 0 1px 0 #ffffff14 inset, 0 18px 50px #000e, 0 4px 14px #0008;
  --ease: cubic-bezier(.2, .9, .3, 1);
  --dur-1: 120ms; --dur-2: 180ms; --dur-3: 260ms; --dur-4: 400ms;
  --ease-out: var(--ease);
  --ease-in: cubic-bezier(.4, 0, 1, 1);
  --ease-spring: cubic-bezier(.2, 1.2, .3, 1);
  --placeholder: #8aa0b8;
  --line-ui: var(--line-strong);
  --discord-top: #5865f2; --discord-bottom: #4752c4; --discord-hover-bottom: #3f49b8;
  --skel-base: color-mix(in srgb, var(--text) 10%, var(--panel));
  --skel-hi: color-mix(in srgb, var(--text) 18%, var(--panel));

  --page-glow: #2a1c10;
  --input: #070504;
  --surface-hover: #2a1f0d;
  --surface-selected: #1f170c;
  --surface-detail: #100c07;
  --surface-subtle: #0c0906;
  --surface-notification: #100c08;
  --surface-cancelled: #100d0b;
  --surface-event-hover: #23190d;
  --button-top: #a8140c;
  --button-bottom: #7a0c06;
  --button-hover-top: #bd1a11;
  --button-hover-bottom: #8a0f08;
  --button-text: #ffd100;
  --button-border: #c0262b66;
  --on-accent: #1a1000;
  --brand-top: #fff6c4;
  --brand-bottom: #a8740a;
  --medallion-top: #ffe169;
  --medallion-bottom: #c99400;
  --heading-filter: drop-shadow(0 2px 1px #000);
  --warning-bg: #2a2410;
  --warning-line: #9a7a22;
  --danger-bg: #2a1620;
  --danger-line: #b04a5a;
  --success-bg: #10261f;
  --success-line: #2f8f6a;
  --alliance-text: #8ab4ff;
  --horde-text: #ff8a8a;
  --officer-text: #d3dbe8;
  --officer-line: #7f8b9e;
  --discord-text: #aab1ff;
  --discord-hover: #fff;
  --discord-icon: #8a94ff;
  --horde-banner: #4a0e0e;
  --horde-banner-end: #160807;
  --horde-line: #7a1f1f;
  --alliance-banner: #0f2550;
  --alliance-banner-end: #070b16;
  --alliance-line: #23458a;
  --class-ink: 70%;
  --accent-faint: color-mix(in srgb, var(--accent) 6%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-ring: color-mix(in srgb, var(--accent) 28%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent) 40%, transparent);
  --chrome: color-mix(in srgb, var(--bg) 95%, transparent);
  --save-bar: color-mix(in srgb, var(--panel) 95%, transparent);
  --light: radial-gradient(120% 60% at 50% 0, var(--accent-faint), transparent);
}

/* Theme palettes; shared accessibility rules follow below. */
:root:not([data-theme]), :root[data-theme="midnight"], [data-palette="midnight"] {
  color-scheme: dark;
  --bg: #0b1220; --panel: #152236; --panel2: #101b2d; --tile: #101a2b;
  --line: #354b65; --line-strong: #617e9c;
  --accent: #a7d8ff; --accent-muted: #99bad8; --text: #e4edf7; --muted: #a7b9cd;
  --page-glow: #1d3550; --input: #0b1525; --surface-hover: #20354d; --surface-selected: #253e57;
  --surface-detail: #101d30; --surface-subtle: #122036; --surface-notification: #122036;
  --surface-cancelled: #191f2b; --surface-event-hover: #20344b;
  --button-top: #245b89; --button-bottom: #194367; --button-hover-top: #2e6c9d; --button-hover-bottom: #215780;
  --button-text: #ffffff; --button-border: #668bad; --on-accent: #102237;
  --brand-top: #e5f4ff; --brand-bottom: #689ac5; --medallion-top: #b8e1ff; --medallion-bottom: #7aafd6;
  --tank: #6ea8f4; --dps: #f68a82; --class-ink: 70%;
  --placeholder: #8aa0b8; --line-ui: #56708e;
  --warning-bg: #2a2410; --warning-line: #9a7a22;
  --danger-bg: #2a1620; --danger-line: #b04a5a;
  --success-bg: #10261f; --success-line: #2f8f6a;
  --heading-filter: drop-shadow(0 1px 0 #0b122099);
  --discord-top: #5865f2; --discord-bottom: #4752c4; --discord-hover-bottom: #3f49b8;
  --skel-base: #2a4059; --skel-hi: #3e5d80;
}
:root[data-theme="verdant"], [data-palette="verdant"] {
  color-scheme: dark;
  --bg: #091510; --panel: #14291f; --panel2: #102119; --tile: #0f2118;
  --line: #3a5d4b; --line-strong: #6d937f;
  --accent: #c6e4a8; --accent-muted: #a8c592; --text: #e4eddd; --muted: #a9bca9;
  --page-glow: #203c2b; --input: #0b1b13; --surface-hover: #274331; --surface-selected: #294933;
  --surface-detail: #13281c; --surface-subtle: #11251c; --surface-notification: #11251c;
  --surface-cancelled: #1d231a; --surface-event-hover: #24412f;
  --button-top: #3c6345; --button-bottom: #294d33; --button-hover-top: #497652; --button-hover-bottom: #365e3e;
  --button-text: #f1ffe9; --button-border: #7f9e70; --on-accent: #172b1c;
  --brand-top: #f0f9db; --brand-bottom: #809c63; --medallion-top: #d7edbe; --medallion-bottom: #9abd83;
}
:root[data-theme="parchment"], [data-palette="parchment"] {
  color-scheme: light;
  --bg: #f5f0e6; --panel: #fffcf6; --panel2: #f4eddf; --tile: #fffcf6;
  --line: #b6a990; --line-strong: #8b785a;
  --accent: #6e4118; --accent-muted: #755536; --text: #30291f; --muted: #685b49;
  --warn: #785000; --danger: #a52d2b; --heal: #24613b; --tank: #245f9d; --dps: #a5302c;
  --page-glow: #e9ddc7; --input: #fffdf9; --surface-hover: #e9ddc7; --surface-selected: #e5d8be;
  --surface-detail: #f0e7d7; --surface-subtle: #f8f1e5; --surface-notification: #f8f1e5;
  --surface-cancelled: #eee8de; --surface-event-hover: #ede1cb;
  --button-top: #805324; --button-bottom: #60380f; --button-hover-top: #70451a; --button-hover-bottom: #502d0b;
  --button-text: #fffaf0; --button-border: #68421d; --on-accent: #fffaf0;
  --brand-top: #70441b; --brand-bottom: #58320d; --medallion-top: #865b2c; --medallion-bottom: #65411e;
  --heading-filter: none;
  --warning-bg: #f6e9c6; --warning-line: #9e7725; --danger-bg: #fbe8e2; --danger-line: #b66b5f;
  --success-bg: #e3efdf; --success-line: #5f8961;
  --alliance-text: #235c9e; --horde-text: #a52d2b; --officer-text: #44546b; --officer-line: #69788c;
  --discord-text: #414fa2; --discord-hover: #29377e; --discord-icon: #4b56a8;
  --horde-banner: #f4dcd5; --horde-banner-end: #fff3e8; --horde-line: #b97969;
  --alliance-banner: #dae7f3; --alliance-banner-end: #f2f7fc; --alliance-line: #658bb6;
  --class-ink: 25%;
  --e1: 0 1px 0 #fff inset, 0 2px 8px #57402612;
  --e2: 0 1px 0 #fff inset, 0 8px 22px #57402620;
  --e3: 0 1px 0 #fff inset, 0 18px 50px #57402630, 0 4px 14px #57402618;
}
/* The default swatch also appears while another theme is selected. */
[data-palette="warbanner"] { --bg: #0a0705; --panel: #17110b; --accent: #ffd100; }

/* Shared by the app, public editor and standalone guild pages. */
:root { --focus-ring: 2px solid var(--accent); }
:where(a[href], button, summary, input, select, textarea, [tabindex]:not([tabindex="-1"]), .linkish):focus-visible {
  outline: var(--focus-ring); outline-offset: 2px;
}
:where(input:not([type="checkbox"], [type="radio"]), select, textarea):focus-visible {
  outline-offset: 0; border-color: var(--accent); box-shadow: none;
}
:where(summary, .rb-row > summary, .step > summary):focus-visible { outline-offset: -2px; }
:where(.pick, .seg label, .check, .pg-chip, .event-options label):has(input:focus-visible) {
  outline: var(--focus-ring); outline-offset: 2px;
}
