/* Gamilu Christmas – the Christmas look. Loaded only while a season of the "christmas" set is on. */

body.gamilu-season-on {
	--gx-ice: linear-gradient(155deg, #ffffff 0%, #d6f1ff 22%, #8fd0f2 48%, #f2fbff 62%, #a9dcf5 82%, #ffffff 100%);
	--gx-ice-line: #9fd6f2;
	--gx-glow: 0 0 0 1px rgba(255, 255, 255, 0.7), 0 10px 26px rgba(70, 160, 220, 0.35);
	--gx-paper: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9));
	--gx-pattern: url(pattern-snowflakes.webp);
}

/* Ice frames instead of the black outline and black shadow */
body.gamilu-season-on .gamilu-card,
body.gamilu-season-on .gamilu-lb {
	position: relative;
	border: 4px solid transparent !important;
	background:
		var(--gx-paper) padding-box,
		var(--gx-pattern) center / 220px repeat padding-box,
		var(--gx-ice) border-box !important;
	box-shadow: var(--gx-glow) !important;
}
body.gamilu-season-on .gamilu-wheel {
	border: 4px solid transparent !important;
	background: linear-gradient(var(--gw-cream, #FFF6EC), var(--gw-cream, #FFF6EC)) padding-box, var(--gx-ice) border-box !important;
	box-shadow: var(--gx-glow) !important;
}
body.gamilu-season-on .gamilu-notice {
	border: 3px solid transparent !important;
	background: linear-gradient(#fff, #fff) padding-box, var(--gx-ice) border-box !important;
	box-shadow: var(--gx-glow) !important;
}
body.gamilu-season-on .gamilu-badge.is-earned {
	border: 3px solid transparent !important;
	background: linear-gradient(#fff, #fff) padding-box, var(--gx-ice) border-box !important;
	box-shadow: var(--gx-glow) !important;
}
body.gamilu-season-on .gamilu-lb__step {
	position: relative;
	border-color: var(--gx-ice-line) !important;
	box-shadow: 0 6px 16px rgba(70, 160, 220, 0.25) !important;
}

/* Card: snow resting on the top edge and a candy cane progress bar */
body.gamilu-season-on .gamilu-card { padding-top: 30px; }
/* Snow that hugs the rounded corners: two corner pieces and a middle that repeats without stretching */
body.gamilu-season-on .gamilu-card::before,
body.gamilu-season-on .gamilu-card::after {
	content: "";
	position: absolute;
	top: -28px;
	height: 50px;
	pointer-events: none;
	z-index: 2;
}
body.gamilu-season-on .gamilu-card::before { display: block !important; left: 29px; right: 29px; background: url(cap.svg) 0 0 / 240px 50px round !important; }
body.gamilu-season-on .gamilu-card::after { display: block !important; width: auto !important; left: -11px; right: -11px; background: url(corner-l.svg) left top / 40px 50px no-repeat, url(corner-r.svg) right top / 40px 50px no-repeat !important; transform: none !important; }
body.gamilu-season-on .gamilu-bar { border-color: var(--gx-ice-line); }
body.gamilu-season-on .gamilu-bar span {
	background: repeating-linear-gradient(-45deg, var(--gs-c1, #D62828) 0 8px, #fff 8px 16px);
}
body.gamilu-season-on .gamilu-card__level { background: var(--gs-c3, #2FA35B); color: #fff; }

/* Badge gallery: a little cap of snow on every earned badge */
body.gamilu-season-on .gamilu-badge { position: relative; }
body.gamilu-season-on .gamilu-badge.is-earned::before,
body.gamilu-season-on .gamilu-badge.is-earned::after {
	content: "";
	position: absolute;
	top: -21.7px;
	height: 38.9px;
	pointer-events: none;
	z-index: 1;
}
body.gamilu-season-on .gamilu-badge.is-earned::before { display: block !important; left: 22.7px; right: 22.7px; background: url(cap.svg) 0 0 / 187px 38.9px round; }
body.gamilu-season-on .gamilu-badge.is-earned::after { left: -8.4px; right: -8.4px; background: url(corner-l.svg) left top / 31.1px 38.9px no-repeat, url(corner-r.svg) right top / 31.1px 38.9px no-repeat; }

/* Achievement notice: snow along the top */
body.gamilu-season-on .gamilu-notice { padding-top: 30px; }
body.gamilu-season-on .gamilu-notice::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 30px;
	background: url(snow-notice.svg) center top / 100% 100% no-repeat;
	pointer-events: none;
}

/* Leaderboards (if installed): a soft cloud of snow on the board and a cap on the winner's step */
body.gamilu-season-on .gamilu-lb::before,
body.gamilu-season-on .gamilu-lb::after {
	content: "";
	position: absolute;
	top: -28px;
	height: 50px;
	pointer-events: none;
	z-index: 2;
}
body.gamilu-season-on .gamilu-lb::before { display: block !important; left: 29px; right: 29px; background: url(cap.svg) 0 0 / 240px 50px round !important; }
body.gamilu-season-on .gamilu-lb::after { display: block !important; width: auto !important; left: -11px; right: -11px; background: url(corner-l.svg) left top / 40px 50px no-repeat, url(corner-r.svg) right top / 40px 50px no-repeat !important; transform: none !important; }
body.gamilu-season-on .gamilu-lb__head { margin-top: 10px; }
body.gamilu-season-on .gamilu-lb__step--1::before,
body.gamilu-season-on .gamilu-lb__step--1::after {
	content: "";
	position: absolute;
	top: -20.7px;
	height: 38.9px;
	pointer-events: none;
	z-index: 1;
}
body.gamilu-season-on .gamilu-lb__step--1::before { display: block !important; left: 23.7px; right: 23.7px; background: url(cap.svg) 0 0 / 187px 38.9px round; }
body.gamilu-season-on .gamilu-lb__step--1::after { left: -7.4px; right: -7.4px; background: url(corner-l.svg) left top / 31.1px 38.9px no-repeat, url(corner-r.svg) right top / 31.1px 38.9px no-repeat; }

/* Prize wheel (if installed): snow on the wheel's frame, inline and in the pop-up */
body.gamilu-season-on .gamilu-wheel { padding-top: 46px; }
body.gamilu-season-on .gamilu-wheel::before,
body.gamilu-season-on .gamilu-wheel::after {
	content: "";
	position: absolute;
	top: -39px;
	height: 72px;
	pointer-events: none;
	z-index: 3;
}
body.gamilu-season-on .gamilu-wheel::before { display: block !important; left: 44px; right: 44px; background: url(cap.svg) 0 0 / 346px 72px round !important; }
body.gamilu-season-on .gamilu-wheel::after { display: block !important; width: auto !important; left: -14px; right: -14px; background: url(corner-l.svg) left top / 58px 72px no-repeat, url(corner-r.svg) right top / 58px 72px no-repeat !important; transform: none !important; }

/* Gamilu Bar (if installed): ice line, icicles hanging from the bar and a candy cane track */
body.gamilu-season-on .gamilu-topbar { --gb-line: var(--gx-ice-line); }
body.gamilu-season-on .gamilu-topbar--top::after,
body.gamilu-season-on .gamilu-topbar--bottom::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 16px;
	background: url(icicles.svg) center top / 260px 100% repeat-x;
	pointer-events: none;
}
body.gamilu-season-on .gamilu-topbar--top::after { top: 100%; margin-top: 3px; }
body.gamilu-season-on .gamilu-topbar--bottom::after { bottom: 100%; margin-bottom: 3px; transform: scaleY(-1); }
body.gamilu-season-on .gamilu-topbar__track { border-color: var(--gx-ice-line); }
body.gamilu-season-on .gamilu-topbar__track > span { background: repeating-linear-gradient(-45deg, var(--gs-c1, #D62828) 0 6px, #fff 6px 12px); }
body.gamilu-season-on .gamilu-topbar__level { background: var(--gs-c3, #2FA35B); color: #fff; }

/* Room for the snow: the pieces never touch each other or the text above */
body.gamilu-season-on .gamilu-card,
body.gamilu-season-on .gamilu-lb,
body.gamilu-season-on .gamilu-wheel { margin-top: 48px !important; margin-bottom: 40px !important; }
body.gamilu-season-on .gamilu-badges { margin-top: 32px; margin-bottom: 40px; }
body.gamilu-season-on .gamilu-badges__grid { gap: 30px 14px; padding-top: 14px; }

/* Room under the snow on earned badges */
body.gamilu-season-on .gamilu-badge.is-earned { padding-top: 22px; }

/* Characters peeking from behind the bottom right of each box (snowman, penguin or elf, a new mix on every visit).
   They are cut exactly at the box's edge (so they look like they come from behind it, whatever the page background), and the box's size and place never change. Hidden on small screens. */
body.gamilu-season-on .gx-peek {
	position: absolute;
	z-index: 1;
	bottom: 0;
	background: no-repeat center bottom / contain;
	pointer-events: none;
	animation: gx-peek-in .7s cubic-bezier(.2, 1.4, .4, 1) .3s both;
}
body.gamilu-season-on .gx-peek--snowman { width: 76px; height: 152px; right: -62px; bottom: 28px; clip-path: inset(0 0 0 18px); background-image: url(peek-snowman.svg); }
body.gamilu-season-on .gx-peek--penguin { width: 116px; height: 132px; right: -84px; clip-path: inset(0 0 0 36px); background-image: url(peek-penguin.svg); }
body.gamilu-season-on .gx-peek--elf { width: 106px; height: 150px; right: -78px; bottom: -2px; clip-path: inset(0 0 0 32px); background-image: url(peek-elf.webp); }
/* The picture slides inside its cut box, so it comes out from behind the box edge (the cut never moves). */
@keyframes gx-peek-in { from { background-position: -70px 100%; opacity: 0; } 30% { opacity: 1; } to { background-position: 50% 100%; opacity: 1; } }
@media (max-width: 700px) { body.gamilu-season-on .gx-peek { display: none; } }
@media (prefers-reduced-motion: reduce) { body.gamilu-season-on .gx-peek { animation: none; } }
