/* =========================================================================
   GeeKPress Forest — palettes.css
   Palette engine variants. The DEFAULT palette is MIRKWOOD and lives in
   style.css :root — it is never redefined here (user rule: don't touch
   the default). Each variant re-binds the --lml-* role tokens + rgba
   triplets on body.lml-palette-{slug}; everything else (geekui vars,
   skins, widgets) flows through the tokens.

   Variants:
     mirkwood   — default (gold on deep forest green) — :root
     darkwood   — the same forest at midnight: deeper grounds, denser shadow
     sunwood    — daylight clearing: parchment + deep-green ink + antique gold
     autumnwood — ember forest: copper & rust over warm browns
     frostwood  — frozen pine: silver-mint & ice over blue-green darks
   ========================================================================= */

/* ───────────────────────── DARKWOOD — midnight forest ────────────────── */
body.lml-palette-darkwood {
	--lml-bg: #050807;
	--lml-bg-2: #070b09;
	--lml-surface: #040b0a;
	--lml-surface-2: #081210;
	--lml-surface-3: #11201a;
	--lml-deep: #030504;
	--lml-card: #050e0c;
	--lml-card-2: #0a1713;
	--lml-card-alt: #071210;
	--lml-line: #2e2d1a;
	--lml-line-2: #45401f;
	--lml-line-strong: #7a672e;
	--lml-line-mid: #3e3a24;
	--lml-text: #e8e1cc;
	--lml-text-dim: #aaa68c;
	--lml-text-mute: #6e6a4e;
	/* gold family unchanged — Mirkwood's signature stays */
	--lml-shadow: 0 16px 38px rgba(0, 0, 0, 0.62), 0 0 20px rgba(var(--lml-lime-rgb), 0.10);
	--lml-glow: rgba(212, 167, 46, 0.42);
	--lml-bg-rgb: 5, 8, 7;
	--lml-surface-rgb: 4, 11, 10;
	--lml-deep-rgb: 3, 5, 4;
}

/* ───────────────────────── SUNWOOD — daylight clearing ───────────────── */
body.lml-palette-sunwood {
	--lml-bg: #f1ecdb;
	--lml-bg-2: #e9e3cf;
	--lml-surface: #faf6e8;
	--lml-surface-2: #f1ead6;
	--lml-surface-3: #e4dcc4;
	--lml-deep: #e0d9c2;
	--lml-card: #f7f2e2;
	--lml-card-2: #ece5d0;
	--lml-card-alt: #efe8d4;
	--lml-line: #d8d0b4;
	--lml-line-2: #c4b890;
	--lml-line-strong: #a8924e;
	--lml-line-mid: #cabf9e;
	--lml-text: #211c0c;
	--lml-text-dim: #54513a;
	--lml-text-mute: #84805e;
	--lml-lime: #8a6c1a;
	--lml-lime-2: #6b5210;
	--lml-lime-deep: #c09a32;
	--lml-cream: #5a4a1e;
	--lml-cream-bright: #463a14;
	--lml-cream-dim: #7a6f4a;
	--lml-hot: #a55a2e;
	--lml-hot-2: #8a4a22;
	--lml-danger: #b8492a;
	--lml-tone-good: #8a6f2c;
	--lml-tone-great: #4c7d3c;
	--lml-ink-on-gold: #fdf8e8;
	--lml-btn-hi: #c89e34;
	--lml-btn-lo: #8a6c1a;
	--lml-beam: radial-gradient(60% 100% at 50% 0%, rgba(138, 108, 26, 0.10), transparent 70%);
	--lml-glow: rgba(138, 108, 26, 0.22);
	--lml-shadow: 0 10px 24px rgba(64, 72, 48, 0.18), 0 0 14px rgba(138, 108, 26, 0.08);
	--lml-bg-rgb: 241, 236, 219;
	--lml-surface-rgb: 250, 246, 232;
	--lml-deep-rgb: 224, 217, 194;
	--lml-lime-rgb: 138, 108, 26;
	--lml-lime2-rgb: 107, 82, 16;
	--lml-cream-rgb: 90, 74, 30;
	--lml-hot-rgb: 165, 90, 46;
}
/* daylight: page chrome glassy bits need the light ground too */
body.lml-palette-sunwood .lml-header { background: rgba(241, 236, 219, 0.88); }
body.lml-palette-sunwood ::selection { background: rgba(138, 108, 26, 0.25); color: #211c0c; }

/* ───────────────────────── AUTUMNWOOD — ember forest ─────────────────── */
body.lml-palette-autumnwood {
	--lml-bg: #100c08;
	--lml-bg-2: #150f0a;
	--lml-surface: #130b07;
	--lml-surface-2: #1d130c;
	--lml-surface-3: #2c1f14;
	--lml-deep: #0a0705;
	--lml-card: #170e09;
	--lml-card-2: #221610;
	--lml-card-alt: #1a110b;
	--lml-line: #43321c;
	--lml-line-2: #5e4526;
	--lml-line-strong: #93642e;
	--lml-line-mid: #4e3c22;
	--lml-text: #f0e2d0;
	--lml-text-dim: #c0ab94;
	--lml-text-mute: #8a7a62;
	--lml-lime: #d47a2e;
	--lml-lime-2: #ecc296;
	--lml-lime-deep: #97551d;
	--lml-cream: #f0d8c4;
	--lml-cream-bright: #ffe9d6;
	--lml-cream-dim: #cdb29c;
	--lml-hot: #cf4a3a;
	--lml-hot-2: #e28866;
	--lml-danger: #e0563f;
	--lml-tone-good: #e8a96b;
	--lml-tone-great: #cf9a52;
	--lml-ink-on-gold: #241106;
	--lml-btn-hi: #e79a55;
	--lml-btn-lo: #b3641e;
	--lml-beam: radial-gradient(60% 100% at 50% 0%, rgba(236, 194, 150, 0.14), transparent 70%);
	--lml-glow: rgba(212, 122, 46, 0.35);
	--lml-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 18px rgba(212, 122, 46, 0.10);
	--lml-bg-rgb: 16, 12, 8;
	--lml-surface-rgb: 19, 11, 7;
	--lml-deep-rgb: 10, 7, 5;
	--lml-lime-rgb: 212, 122, 46;
	--lml-lime2-rgb: 236, 194, 150;
	--lml-cream-rgb: 240, 216, 196;
	--lml-hot-rgb: 207, 74, 58;
}

/* ───────────────────────── FROSTWOOD — frozen pine ───────────────────── */
body.lml-palette-frostwood {
	--lml-bg: #070d0e;
	--lml-bg-2: #0a1213;
	--lml-surface: #061113;
	--lml-surface-2: #0c1b1e;
	--lml-surface-3: #16282b;
	--lml-deep: #040809;
	--lml-card: #081416;
	--lml-card-2: #0e1f22;
	--lml-card-alt: #0a181a;
	--lml-line: #243832;
	--lml-line-2: #38524a;
	--lml-line-strong: #5e8a7a;
	--lml-line-mid: #2e463e;
	--lml-text: #dde8e4;
	--lml-text-dim: #a5b8b1;
	--lml-text-mute: #6e8079;
	--lml-lime: #7fd4c0;
	--lml-lime-2: #d2efe5;
	--lml-lime-deep: #4f8f7e;
	--lml-cream: #e2f0ea;
	--lml-cream-bright: #f2fffa;
	--lml-cream-dim: #b9cdc5;
	--lml-hot: #5fa8d4;
	--lml-hot-2: #8ec8e8;
	--lml-danger: #e06a5e;
	--lml-tone-good: #8ec8a8;
	--lml-tone-great: #6bcfb2;
	--lml-ink-on-gold: #06201a;
	--lml-btn-hi: #9be0cd;
	--lml-btn-lo: #4f8f7e;
	--lml-beam: radial-gradient(60% 100% at 50% 0%, rgba(210, 239, 229, 0.12), transparent 70%);
	--lml-glow: rgba(127, 212, 192, 0.32);
	--lml-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 18px rgba(127, 212, 192, 0.10);
	--lml-bg-rgb: 7, 13, 14;
	--lml-surface-rgb: 6, 17, 19;
	--lml-deep-rgb: 4, 8, 9;
	--lml-lime-rgb: 127, 212, 192;
	--lml-lime2-rgb: 210, 239, 229;
	--lml-cream-rgb: 226, 240, 234;
	--lml-hot-rgb: 95, 168, 212;
}

/* =========================================================================
   PALETTE SWITCHER POPOVER (header, admin-enabled)
   ========================================================================= */
.lml-palette-pop {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 80;
	min-width: 230px;
	padding: 14px;
	background: linear-gradient(180deg, var(--lml-surface) 0%, var(--lml-bg-2) 100%);
	border: 1px solid rgba(var(--lml-lime-rgb), 0.3);
	border-radius: 10px;
	box-shadow: var(--lml-shadow);
}
.lml-palette-pop__title {
	margin: 0 0 10px;
	font-family: var(--lml-font-mono);
	font-size: 10.5px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--lml-lime);
}
.lml-palette-pop__grid { display: grid; gap: 6px; }
.lml-swatch {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border: 1px solid var(--lml-line);
	border-radius: 8px;
	background: transparent;
	color: var(--lml-text-dim);
	font-family: var(--lml-font-base);
	font-size: 13px;
	cursor: pointer;
	text-align: left;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.lml-swatch:hover { border-color: var(--lml-lime); color: var(--lml-text); }
.lml-swatch.is-active {
	border-color: var(--lml-lime);
	color: var(--lml-lime-2);
	background: rgba(var(--lml-lime-rgb), 0.08);
}
.lml-swatch__dot {
	width: 22px;
	height: 22px;
	flex: none;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.18);
}
.lml-swatch__dot--mirkwood   { background: linear-gradient(135deg, #d4a72e 0 50%, #081311 50% 100%); }
.lml-swatch__dot--darkwood   { background: linear-gradient(135deg, #d4a72e 0 50%, #040b0a 50% 100%); }
.lml-swatch__dot--sunwood    { background: linear-gradient(135deg, #8a6c1a 0 50%, #f1ecdb 50% 100%); }
.lml-swatch__dot--autumnwood { background: linear-gradient(135deg, #d47a2e 0 50%, #130b07 50% 100%); }
.lml-swatch__dot--frostwood  { background: linear-gradient(135deg, #7fd4c0 0 50%, #061113 50% 100%); }

/* the toggle sits in the header tools row */
.lml-palette-wrap { position: relative; display: inline-flex; }

/* =========================================================================
   PER-PALETTE COMPONENT FIXES
   ========================================================================= */

/* — SUNWOOD daylight repairs — */
/* hero: a much stronger ivory veil so the dark ink stays readable over
   bright backdrops, plus a light halo behind the masthead text */
body.lml-palette-sunwood #geekui-root-movie .geekui-title-header::after,
body.lml-palette-sunwood #geekui-root-tv .geekui-title-header::after,
body.lml-palette-sunwood #geekui-root-episode .geekui-title-header::after {
	background: linear-gradient(180deg,
		rgba(241, 236, 219, 0.58) 0%,
		rgba(241, 236, 219, 0.68) 32%,
		rgba(241, 236, 219, 0.80) 58%,
		rgba(241, 236, 219, 0.93) 80%,
		var(--geekui-bg) 97%);
}
body.lml-palette-sunwood #geekui-root-movie .geekui-title-header-content,
body.lml-palette-sunwood #geekui-root-tv .geekui-title-header-content,
body.lml-palette-sunwood #geekui-root-episode .geekui-title-header-content {
	text-shadow: 0 1px 14px rgba(255, 255, 248, 0.7);
}
/* hex score badges go DAYLIGHT too: warm parchment plate, antique-gold
   rim (SVG stays), dark gold ink */
body.lml-palette-sunwood #geekui-root-movie,
body.lml-palette-sunwood #geekui-root-tv,
body.lml-palette-sunwood #geekui-root-episode {
	--lml-hex-1: #f5efdc;
	--lml-hex-2: #ebe2c7;
	--lml-hex-3: #ded3b2;
	--lml-hex-ink: #54513a;
	--lml-hex-num: #6b5210;
}
body.lml-palette-sunwood #geekui-root-movie .geekui-rating-statistic > div,
body.lml-palette-sunwood #geekui-root-tv .geekui-rating-statistic > div,
body.lml-palette-sunwood #geekui-root-episode .geekui-rating-statistic > div {
	filter: drop-shadow(0 0 10px rgba(138, 108, 26, 0.22)) drop-shadow(0 6px 10px rgba(64, 72, 48, 0.25));
}
body.lml-palette-sunwood #geekui-root-movie .geekui-rating-statistic-rating,
body.lml-palette-sunwood #geekui-root-tv .geekui-rating-statistic-rating,
body.lml-palette-sunwood #geekui-root-episode .geekui-rating-statistic-rating,
body.lml-palette-sunwood #geekui-root-movie .geekui-rating-statistic-critic,
body.lml-palette-sunwood #geekui-root-tv .geekui-rating-statistic-critic,
body.lml-palette-sunwood #geekui-root-episode .geekui-rating-statistic-critic {
	text-shadow: 0 1px 0 rgba(255, 255, 248, 0.6);
}
/* homepage widget bands: the dark 45% veil turns to mud on parchment */
body.lml-palette-sunwood .gpg-home-widget { background: rgba(250, 246, 232, 0.74); }
body.lml-palette-sunwood .gpg-news-card,
body.lml-palette-sunwood .gpg-author-stat,
body.lml-palette-sunwood .gpg-author-review-card,
body.lml-palette-sunwood .gpg-author-rule { background: rgba(255, 255, 255, 0.5) !important; }

/* — variant hexagon plate tints (badge follows the forest's hue) — */
body.lml-palette-darkwood #geekui-root-movie,
body.lml-palette-darkwood #geekui-root-tv,
body.lml-palette-darkwood #geekui-root-episode {
	--lml-hex-1: #11241c;
	--lml-hex-2: #091511;
	--lml-hex-3: #040b0a;
}
body.lml-palette-autumnwood #geekui-root-movie,
body.lml-palette-autumnwood #geekui-root-tv,
body.lml-palette-autumnwood #geekui-root-episode {
	--lml-hex-1: #2a190e;
	--lml-hex-2: #1c1009;
	--lml-hex-3: #130b07;
}
body.lml-palette-frostwood #geekui-root-movie,
body.lml-palette-frostwood #geekui-root-tv,
body.lml-palette-frostwood #geekui-root-episode {
	--lml-hex-1: #13282b;
	--lml-hex-2: #0c1b1e;
	--lml-hex-3: #061113;
}

/* — SUNWOOD: author hero is a PHOTO band — keep its ink light locally
   (the dark veil stays; re-bind the tokens only inside the band) — */
body.lml-palette-sunwood .gpg-author-hero.has-bg {
	--lml-text: #f2ead3;
	--lml-text-dim: #ded6c0;
	--lml-cream: #f2ead3;
	--lml-lime: #e3c06a;
	--lml-lime-2: #f0d894;
}
