/* Christmas pieces (includes/christmas.php). Everything hangs off tn-xmas-* classes in page content, so nothing shows
   until a page uses them. Colors are the theme's palette; every animation stops for prefers-reduced-motion. */

:root {
	--tn-x-ink: var(--wp--preset--color--contrast, #12302B);
	--tn-x-linen: var(--wp--preset--color--base, #FBF8F3);
	--tn-x-palm: var(--wp--preset--color--accent-1, #24614D);
	--tn-x-pineapple: var(--wp--preset--color--accent-2, #E8B23A);
	--tn-x-sage: var(--wp--preset--color--accent-3, #DFE8E1);
	--tn-x-stone: var(--wp--preset--color--accent-4, #5D6A65);
	--tn-x-sand: var(--wp--preset--color--accent-5, #F2ECE3);
	--tn-x-line: var(--wp--preset--color--accent-6, #E3DCD1);
	--tn-x-clay: var(--wp--preset--color--clay, #A9553A);
	--tn-x-stripe: repeating-linear-gradient(-45deg, var(--tn-x-clay) 0 12px, var(--tn-x-linen) 12px 24px);
}

/* ---- Dark sections (hero, the walking-tree feature, reviews) -------------------------------------------------- */

.tn-xmas-dark :where(h1, h2, h3, h4) { color: inherit; }
.tn-xmas-dark :where(h1, h2, h3) em { color: var(--tn-x-pineapple); }
.tn-xmas-dark .is-style-tn-eyebrow { color: var(--tn-x-pineapple); }
.tn-xmas-dark .has-accent-4-color { color: var(--tn-x-sage) !important; }
.tn-xmas-dark .wp-block-quote cite { color: var(--tn-x-sage); }
.tn-xmas-dark a:where(:not(.wp-element-button)) { color: var(--tn-x-pineapple); }
.tn-xmas-dark a:where(:not(.wp-element-button)):hover { color: var(--tn-x-linen); }
.tn-xmas-dark .wp-block-button:not(.is-style-outline) .wp-element-button { background: var(--tn-x-pineapple); border-color: var(--tn-x-pineapple); color: var(--tn-x-ink); }
.tn-xmas-dark .wp-block-button.is-style-outline .wp-element-button { border-color: var(--tn-x-linen); color: var(--tn-x-linen); }
.tn-xmas-dark .wp-block-button .wp-element-button:hover { background: var(--tn-x-linen); border-color: var(--tn-x-linen); color: var(--tn-x-ink); }

/* ---- Snow and decorations (added by christmas.php inside groups with tn-xmas-hero / -snow / -gift) ------------ */

.tn-xmas-hero, .tn-xmas-snow { position: relative; overflow: hidden; isolation: isolate; }
.tn-xmas-hero > :not(.tn-xmas-decor), .tn-xmas-snow > :not(.tn-xmas-decor), .tn-xmas-gift > :not(.tn-xmas-decor) { position: relative; z-index: 2; }
.tn-xmas-decor { position: absolute !important; inset: 0; margin: 0 !important; max-width: none !important; pointer-events: none; }

.tn-snow {
	--tile: 260px; --speed: 16s;
	position: absolute; left: 0; right: 0; top: calc(-1 * var(--tile)); height: calc(100% + var(--tile));
	background-size: var(--tile) var(--tile); background-repeat: repeat;
	animation: tn-snowfall var(--speed) linear infinite; will-change: transform;
}
.tn-snow--far { z-index: 0; opacity: 0.6;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg fill='%23fff' fill-opacity='.7'%3E%3Ccircle cx='12' cy='20' r='1.2'/%3E%3Ccircle cx='60' cy='8' r='1.6'/%3E%3Ccircle cx='110' cy='40' r='1'/%3E%3Ccircle cx='170' cy='15' r='1.4'/%3E%3Ccircle cx='230' cy='50' r='1.2'/%3E%3Ccircle cx='30' cy='90' r='1.5'/%3E%3Ccircle cx='90' cy='120' r='1'/%3E%3Ccircle cx='150' cy='80' r='1.7'/%3E%3Ccircle cx='210' cy='110' r='1.1'/%3E%3Ccircle cx='250' cy='150' r='1.4'/%3E%3Ccircle cx='20' cy='170' r='1'/%3E%3Ccircle cx='70' cy='200' r='1.6'/%3E%3Ccircle cx='130' cy='160' r='1.2'/%3E%3Ccircle cx='190' cy='190' r='1.5'/%3E%3Ccircle cx='240' cy='230' r='1'/%3E%3Ccircle cx='40' cy='240' r='1.3'/%3E%3Ccircle cx='100' cy='250' r='1.1'/%3E%3Ccircle cx='160' cy='230' r='1.6'/%3E%3Ccircle cx='120' cy='210' r='0.9'/%3E%3Ccircle cx='200' cy='30' r='0.9'/%3E%3C/g%3E%3C/svg%3E"); }
.tn-snow--near { --tile: 420px; --speed: 11s; z-index: 1; opacity: 0.8; /* behind the text, so it stays easy to read */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cg fill='%23fff' fill-opacity='.9'%3E%3Ccircle cx='40' cy='30' r='2.6'/%3E%3Ccircle cx='180' cy='70' r='3.2'/%3E%3Ccircle cx='320' cy='20' r='2.2'/%3E%3Ccircle cx='390' cy='140' r='2.8'/%3E%3Ccircle cx='90' cy='160' r='2'/%3E%3Ccircle cx='250' cy='190' r='3.4'/%3E%3Ccircle cx='20' cy='260' r='2.4'/%3E%3Ccircle cx='150' cy='300' r='2.8'/%3E%3Ccircle cx='300' cy='320' r='2.1'/%3E%3Ccircle cx='380' cy='260' r='2.5'/%3E%3Ccircle cx='60' cy='390' r='3'/%3E%3Ccircle cx='220' cy='400' r='2.3'/%3E%3Ccircle cx='350' cy='410' r='2.7'/%3E%3Ccircle cx='120' cy='230' r='1.8'/%3E%3C/g%3E%3C/svg%3E"); }
.tn-snow--storm { --tile: 200px; --speed: 2.6s; z-index: 3; opacity: 0; transition: opacity 0.8s;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cg fill='%23fff' fill-opacity='.95'%3E%3Ccircle cx='10' cy='15' r='1.8'/%3E%3Ccircle cx='50' cy='40' r='2.2'/%3E%3Ccircle cx='95' cy='10' r='1.6'/%3E%3Ccircle cx='140' cy='35' r='2'/%3E%3Ccircle cx='185' cy='20' r='1.7'/%3E%3Ccircle cx='25' cy='80' r='2'/%3E%3Ccircle cx='70' cy='100' r='1.5'/%3E%3Ccircle cx='120' cy='70' r='2.3'/%3E%3Ccircle cx='165' cy='95' r='1.8'/%3E%3Ccircle cx='195' cy='130' r='2'/%3E%3Ccircle cx='15' cy='140' r='1.6'/%3E%3Ccircle cx='60' cy='160' r='2.1'/%3E%3Ccircle cx='105' cy='135' r='1.7'/%3E%3Ccircle cx='150' cy='170' r='2.2'/%3E%3Ccircle cx='35' cy='195' r='1.5'/%3E%3Ccircle cx='90' cy='185' r='1.9'/%3E%3Ccircle cx='180' cy='190' r='1.6'/%3E%3C/g%3E%3C/svg%3E"); }
.is-blizzard .tn-snow--storm { opacity: 1; }
.is-blizzard .tn-snow--far { --speed: 5s; }
@keyframes tn-snowfall { to { transform: translate3d(0, var(--tile), 0); } }

/* String of lights */
.tn-lights { position: absolute; top: -4px; left: 50%; width: 2000px; height: 84px; max-width: none; transform: translateX(-50%); z-index: 3; overflow: visible; }
.tn-lights__wire { fill: none; stroke: var(--tn-x-palm); stroke-width: 2.5; }
.tn-bulb__cap { fill: var(--tn-x-stone); }
.tn-bulb--pineapple .tn-bulb__glass { fill: var(--tn-x-pineapple); }
.tn-bulb--clay .tn-bulb__glass { fill: var(--tn-x-clay); }
.tn-bulb--sage .tn-bulb__glass { fill: var(--tn-x-sage); }
.tn-bulb--linen .tn-bulb__glass { fill: var(--tn-x-linen); }
.tn-bulb { animation: tn-twinkle 2.6s ease-in-out infinite; }
.tn-bulb:nth-of-type(2n) { animation-duration: 3.3s; animation-delay: -1.2s; }
.tn-bulb:nth-of-type(3n) { animation-duration: 2.1s; animation-delay: -0.5s; }
.tn-bulb:nth-of-type(5n) { animation-duration: 4.1s; animation-delay: -2.2s; }
.tn-bulb:nth-of-type(7n) { animation-delay: -3s; }
@keyframes tn-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* Ornaments hanging from the top of the hero */
.tn-orn { position: absolute; top: 0; z-index: 3; transform-origin: 50% 0; animation: tn-swing 3.8s ease-in-out infinite alternate; filter: drop-shadow(0 8px 10px rgb(0 0 0 / 0.25)); }
.tn-orn svg { display: block; width: 100%; height: auto; overflow: visible; }
.tn-orn__string { stroke: var(--tn-x-sage); stroke-width: 1.3; opacity: 0.55; }
.tn-orn--bauble { left: 2.5%; width: 60px; animation-duration: 4.4s; animation-delay: -1s; }
.tn-orn--pineapple { left: 44%; width: 78px; animation-duration: 3.4s; }
.tn-orn--star { right: 3%; width: 54px; animation-duration: 4s; animation-delay: -2.3s; }
@keyframes tn-swing { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@media (max-width: 781px) {
	.tn-orn--bauble { display: none; }
	.tn-orn--pineapple { left: auto; right: 7%; width: 50px; }
	.tn-orn--star { right: auto; left: 62%; width: 36px; }
}

/* ---- Hero ------------------------------------------------------------------------------------------------------ */

.tn-xmas-hero { padding-top: clamp(7rem, 11vw, 9rem) !important; padding-bottom: clamp(5.5rem, 9vw, 8rem) !important; }
.tn-xmas-hero h1 { margin-top: 0.6rem; }
/* Snowdrift along the bottom edge, in the page's own background color. */
.tn-xmas-hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 34px; z-index: 4; pointer-events: none;
	background:
		radial-gradient(circle at 50% 100%, var(--tn-x-linen) 17px, transparent 17.5px) 0 100% / 48px 20px repeat-x,
		radial-gradient(circle at 50% 100%, var(--tn-x-linen) 30px, transparent 30.5px) 18px 100% / 104px 34px repeat-x;
}

.tn-xmas-countdown {
	display: flex; align-items: center; gap: 0.55rem; width: fit-content; margin: 0;
	padding: 0.4rem 0.95rem 0.4rem 0.75rem; border: 1px solid rgb(232 178 58 / 0.55); border-radius: 999px; background: rgb(232 178 58 / 0.08);
	font-family: var(--wp--preset--font-family--fira-code); font-size: var(--wp--preset--font-size--x-small) !important; font-weight: 500;
	letter-spacing: 0.1em; text-transform: uppercase; color: var(--tn-x-pineapple);
}
.tn-xmas-countdown::before {
	content: ""; flex: none; width: 15px; height: 15px; animation: tn-spin 8s linear infinite;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23E8B23A' d='M10 0l2.4 7.6L20 10l-7.6 2.4L10 20l-2.4-7.6L0 10l7.6-2.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes tn-spin { to { transform: rotate(360deg); } }

.tn-xmas-letitsnow { margin-top: 1rem !important; font-size: var(--wp--preset--font-size--small); color: var(--tn-x-sage); }
.tn-xmas-letitsnow a { color: var(--tn-x-sage) !important; text-decoration-style: dotted; text-underline-offset: 0.25em; }
.tn-xmas-letitsnow a:hover { color: var(--tn-x-pineapple) !important; }

/* A photo on an instant-print frame, with a gift tag */
.tn-xmas-polaroid { position: relative; max-width: 34rem; margin-inline: auto !important; padding: 0.75rem 0.75rem 0; border-radius: 6px;
	background: var(--tn-x-linen); box-shadow: 0 28px 60px rgb(0 0 0 / 0.38); transform: rotate(2.5deg); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1.2); }
.tn-xmas-polaroid:hover { transform: rotate(0deg) scale(1.015); }
.tn-xmas-polaroid img { border-radius: 3px !important; }
.tn-xmas-polaroid figcaption { margin: 0; padding: 0.85rem 0.5rem 1.05rem; text-align: center; color: var(--tn-x-ink);
	font-family: var(--wp--preset--font-family--fraunces); font-style: italic; font-size: 1.05rem; }
.tn-xmas-polaroid figcaption a { color: var(--tn-x-palm) !important; }
.tn-xmas-polaroid::before {
	content: "★ Gift pick"; position: absolute; top: -0.9rem; right: 1.4rem; z-index: 2; padding: 0.4rem 0.85rem 0.4rem 1.3rem;
	background: var(--tn-x-pineapple); color: var(--tn-x-ink); border-radius: 3px; transform: rotate(7deg);
	font-family: var(--wp--preset--font-family--fira-code); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
	clip-path: polygon(0.7rem 0, 100% 0, 100% 100%, 0.7rem 100%, 0 50%); box-shadow: 0 4px 10px rgb(0 0 0 / 0.2);
}

/* ---- Category tiles as a gift guide ---------------------------------------------------------------------------- */

.tn-xmas-tiles .tn-tile:hover img { transform: scale(1.05) rotate(-1deg); }
.tn-xmas-tiles .tn-tile .wp-block-image { position: relative; }
.tn-xmas-tiles .tn-tile .wp-block-image::after { /* a ribbon across each tile's corner, shown on hover */
	content: ""; position: absolute; top: 14px; right: -34px; width: 130px; height: 14px; background: var(--tn-x-stripe);
	transform: rotate(45deg) scaleX(0); transition: transform 0.35s ease; box-shadow: 0 2px 6px rgb(0 0 0 / 0.15);
}
.tn-xmas-tiles .tn-tile:hover .wp-block-image::after, .tn-xmas-tiles .tn-tile:focus-within .wp-block-image::after { transform: rotate(45deg) scaleX(1); }

/* ---- Candy-stripe band ------------------------------------------------------------------------------------------ */

.tn-xmas-band { position: relative; }
.tn-xmas-band::before, .tn-xmas-band::after {
	content: ""; position: absolute; left: 0; right: 0; height: 10px; background: var(--tn-x-stripe); background-size: 33.94px 33.94px;
	animation: tn-stripe 2.5s linear infinite;
}
.tn-xmas-band::before { top: 0; }
.tn-xmas-band::after { bottom: 0; }
@keyframes tn-stripe { to { background-position: 33.94px 0; } }

/* ---- Night-time feature (the walking tree) --------------------------------------------------------------------- */

.tn-xmas-night .wp-block-media-text__content { position: relative; isolation: isolate; }
.tn-xmas-night .wp-block-media-text__content::before { /* stars */
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; animation: tn-twinkle 4s ease-in-out infinite;
	background:
		radial-gradient(1.5px 1.5px at 12% 18%, var(--tn-x-linen), transparent), radial-gradient(1px 1px at 30% 8%, var(--tn-x-linen), transparent),
		radial-gradient(1.5px 1.5px at 55% 14%, var(--tn-x-pineapple), transparent), radial-gradient(1px 1px at 70% 30%, var(--tn-x-linen), transparent),
		radial-gradient(1.5px 1.5px at 88% 52%, var(--tn-x-linen), transparent), radial-gradient(1px 1px at 8% 64%, var(--tn-x-linen), transparent),
		radial-gradient(1.5px 1.5px at 42% 92%, var(--tn-x-pineapple), transparent), radial-gradient(1px 1px at 94% 88%, var(--tn-x-linen), transparent);
}
.tn-xmas-night .wp-block-media-text__content::after { /* crescent moon */
	content: ""; position: absolute; top: 1.6rem; right: 1.8rem; z-index: -1; width: 44px; height: 44px; border-radius: 50%;
	box-shadow: 11px -7px 0 0 var(--tn-x-pineapple); transform: rotate(-12deg); opacity: 0.9;
}
.tn-xmas-steps { list-style: none; padding: 0; counter-reset: tn-step; }
.tn-xmas-steps li { counter-increment: tn-step; position: relative; padding-left: 2.6rem; margin-bottom: 0.85rem; }
.tn-xmas-steps li::before {
	content: counter(tn-step); position: absolute; left: 0; top: 0.1rem; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
	background: var(--tn-x-pineapple); color: var(--tn-x-ink); font-family: var(--wp--preset--font-family--fira-code); font-size: 0.8rem; font-weight: 600;
}

/* ---- Holiday fun: graph-paper "workshop" with the game and the printables ------------------------------------- */

.tn-xmas-workshop {
	background-image: linear-gradient(var(--tn-x-line) 1px, transparent 1px), linear-gradient(90deg, var(--tn-x-line) 1px, transparent 1px);
	background-size: 28px 28px; background-position: -1px -1px;
}
.tn-xmas-panel { background: var(--tn-x-linen); border-radius: var(--wp--custom--radius--medium, 10px); box-shadow: 0 1px 0 var(--tn-x-line), 0 18px 40px rgb(18 48 43 / 0.08); }

.tn-xmas-sheets { align-items: start; }
@media (max-width: 599px) { .tn-xmas-sheets { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .tn-xmas-sheet h3 { font-size: 0.95rem; } }
.tn-xmas-sheet { position: relative; padding: 0.75rem 0.75rem 1rem; background: #fff; border-radius: 4px;
	box-shadow: 0 12px 28px rgb(18 48 43 / 0.12); transform: rotate(-1.5deg); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1.2), box-shadow 0.4s; }
.tn-xmas-sheet:nth-child(even) { transform: rotate(1.5deg); }
.tn-xmas-sheet:hover, .tn-xmas-sheet:focus-within { transform: rotate(0deg) translateY(-6px); box-shadow: 0 22px 40px rgb(18 48 43 / 0.16); }
.tn-xmas-sheet::before { /* tape */
	content: ""; position: absolute; top: -10px; left: 50%; width: 84px; height: 22px; transform: translateX(-50%) rotate(-3deg);
	background: rgb(232 178 58 / 0.55); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}
.tn-xmas-sheet .wp-block-image { margin: 0 0 0.6rem; }
.tn-xmas-sheet img { border: 1px solid var(--tn-x-line); border-radius: 2px !important; }
.tn-xmas-sheet h3 { margin: 0 0 0.6rem; font-size: 1.05rem; }
.tn-xmas-sheet .wp-element-button { padding: 0.55rem 1.1rem; font-size: 0.875rem; }

/* ---- Memory game (block tropical-nerds/memory-game) -------------------------------------------------------- */

.tn-memory { position: relative; max-width: 40rem; margin-inline: auto; }
.tn-memory__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.tn-memory__bar p { margin: 0; }
.tn-memory__status { font-weight: 600; min-height: 1.6em; }
.tn-memory__score { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; color: var(--tn-x-stone);
	font-family: var(--wp--preset--font-family--fira-code); font-size: var(--wp--preset--font-size--x-small); letter-spacing: 0.06em; text-transform: uppercase; }
.tn-memory__score b { color: var(--tn-x-ink); font-weight: 600; }
.tn-memory__restart { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--tn-x-ink); background: none;
	border: 1px solid var(--tn-x-ink); border-radius: 999px; padding: 0.35rem 0.85rem; cursor: pointer; }
.tn-memory__restart:hover { background: var(--tn-x-ink); color: var(--tn-x-linen); }
.tn-memory__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.5rem, 1.6vw, 0.9rem); }
.tn-memory__grid li { margin: 0; }
@media (max-width: 599px) { .tn-memory__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.tn-card { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; perspective: 900px; }
.tn-card:focus-visible { outline: 3px solid var(--tn-x-pineapple); outline-offset: 3px; }
.tn-card__inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(0.3, 0.7, 0.3, 1.25); }
.tn-card:hover:not(.is-up) .tn-card__inner { transform: translateY(-3px) rotate(-2deg); }
.tn-card.is-up .tn-card__inner { transform: rotateY(180deg); }
.tn-card__back, .tn-card__front { position: absolute; inset: 0; overflow: hidden; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tn-card__back {
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='31' fill='none' stroke='%23E8B23A' stroke-opacity='.5' stroke-width='2' stroke-dasharray='2 5' stroke-linecap='round'/%3E%3Cpath fill='%23E8B23A' d='M50 26l5.5 18.5L74 50l-18.5 5.5L50 74l-5.5-18.5L26 50l18.5-5.5z'/%3E%3C/svg%3E") center / 72% no-repeat,
		radial-gradient(rgb(232 178 58 / 0.2) 1.2px, transparent 1.6px) 0 0 / 13px 13px,
		var(--tn-x-palm);
	box-shadow: inset 0 0 0 4px rgb(251 248 243 / 0.14), 0 6px 14px rgb(18 48 43 / 0.18);
}
.tn-card__front { transform: rotateY(180deg); background: var(--tn-x-sand); box-shadow: inset 0 0 0 1px var(--tn-x-line); }
.tn-card__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tn-card.is-matched .tn-card__front { box-shadow: 0 0 0 3px var(--tn-x-pineapple), 0 8px 18px rgb(232 178 58 / 0.35); }
.tn-card.is-matched { cursor: default; animation: tn-pop 0.5s 0.45s ease; }
@keyframes tn-pop { 50% { transform: scale(1.08); } }

.tn-memory__win { position: relative; margin-top: 1.25rem; padding: 1.5rem 1.25rem; border-radius: 10px; text-align: center; background: var(--tn-x-ink); color: var(--tn-x-linen); }
.tn-memory__win p { margin: 0 0 0.6rem; }
.tn-memory__win-title { font-family: var(--wp--preset--font-family--fraunces); font-size: var(--wp--preset--font-size--x-large); line-height: 1.15; }
.tn-memory__pieces { font-size: var(--wp--preset--font-size--small); color: var(--tn-x-sage); }
.tn-memory__pieces a { color: var(--tn-x-pineapple); }
.tn-memory__win .wp-element-button { margin-top: 0.4rem; background: var(--tn-x-pineapple); border-color: var(--tn-x-pineapple); color: var(--tn-x-ink); cursor: pointer; }
.tn-memory__win .wp-element-button:hover { background: var(--tn-x-linen); border-color: var(--tn-x-linen); }
.tn-memory__noscript { margin-top: 1rem; color: var(--tn-x-stone); }

.tn-confetti-layer { position: absolute; inset: -2rem 0 0; overflow: hidden; pointer-events: none; z-index: 5; }
.tn-confetti { position: absolute; top: -16px; width: 9px; height: 13px; border-radius: 2px; animation: tn-confetti var(--d, 2.5s) cubic-bezier(0.3, 0.4, 0.6, 1) forwards; }
.tn-confetti:nth-child(3n) { width: 7px; height: 7px; border-radius: 50%; }
@keyframes tn-confetti { to { transform: translate3d(var(--x, 0), 46rem, 0) rotate(var(--r, 360deg)); opacity: 0.2; } }

/* ---- Newsletter wrapped as a present ---------------------------------------------------------------------- */

.tn-xmas-gift { position: relative; }
.tn-xmas-gift .tn-xmas-decor { border-radius: inherit; overflow: hidden; }
.tn-ribbon { position: absolute; background: var(--tn-x-clay); box-shadow: 0 0 0 1px rgb(18 48 43 / 0.06); }
.tn-ribbon--h { left: 0; right: 0; top: 44px; height: 14px; }
.tn-ribbon--v { top: 0; bottom: 0; left: 58px; width: 14px; }
.tn-bow { position: absolute; top: 8px; left: 1px; width: 128px; height: auto; filter: drop-shadow(0 4px 6px rgb(0 0 0 / 0.15)); transform-origin: 50% 45%; }
.tn-xmas-gift:hover .tn-bow { animation: tn-wiggle 0.7s ease; }
@keyframes tn-wiggle { 25% { transform: rotate(-8deg); } 60% { transform: rotate(6deg); } }
@media (max-width: 599px) {
	.tn-ribbon--h { top: 0; height: 10px; }
	.tn-ribbon--v { display: none; }
	.tn-bow { left: 50%; top: -6px; width: 76px; margin-left: -38px; }
	.tn-xmas-gift { padding-top: 4.5rem !important; }
}

/* ---- Whole page: candy stripe under the announcement bar, snow resting on the footer ------------------------- */

.tn-xmas-page .tn-announcement { position: relative; }
.tn-xmas-page .tn-announcement::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; z-index: 5; background: var(--tn-x-stripe);
	background-size: 33.94px 33.94px; animation: tn-stripe 2.5s linear infinite;
}
.tn-xmas-page .tn-footer { position: relative; }
.tn-xmas-page .tn-footer::before {
	content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 26px; pointer-events: none;
	background:
		radial-gradient(circle at 50% 0, var(--tn-x-linen) 13px, transparent 13.5px) 0 0 / 40px 16px repeat-x,
		radial-gradient(circle at 50% 0, var(--tn-x-linen) 24px, transparent 24.5px) 14px 0 / 92px 26px repeat-x;
}

@media (prefers-reduced-motion: reduce) {
	.tn-snow, .tn-bulb, .tn-orn, .tn-xmas-countdown::before, .tn-xmas-band::before, .tn-xmas-band::after,
	.tn-xmas-night .wp-block-media-text__content::before, .tn-xmas-page .tn-announcement::after, .tn-card.is-matched, .tn-xmas-gift:hover .tn-bow { animation: none !important; }
	.tn-xmas-polaroid, .tn-xmas-sheet, .tn-card__inner, .tn-xmas-tiles .tn-tile .wp-block-image::after { transition: none; }
	.tn-confetti-layer { display: none; }
}
