/*
 * PKMN World Holiday Fun (1999 Edition)
 * Every rule is scoped by a pkmnh- class or a body.pkmnh-f-* feature class,
 * so turning a feature off in Settings removes its styling entirely.
 */

:root {
	--pkmnh-red: #d1121b;
	--pkmnh-green: #0b6b2f;
	--pkmnh-gold: #ffd400;
	--pkmnh-font: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", "Marker Felt", cursive, sans-serif;
	--pkmnh-mono: "Courier New", Courier, monospace;
	--pkmnh-sans: Tahoma, "MS Sans Serif", Geneva, Verdana, sans-serif;
	--pkmnh-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cg stroke-linecap='round' fill='none'%3E%3Cpath d='M14 3v22M3 14h22M6 6l16 16M22 6L6 22' stroke='%23123' stroke-width='4.5'/%3E%3Cpath d='M14 3v22M3 14h22M6 6l16 16M22 6L6 22' stroke='%23fff' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E");
}

.pkmnh-ticker *,
.pkmnh-lights *,
.pkmnh-win * { box-sizing: border-box; }

[hidden].pkmnh-modal { display: none !important; }

/* ------------------------------------------------------------------ */
/* Marquee                                                            */
/* ------------------------------------------------------------------ */

.pkmnh-ticker {
	position: relative;
	z-index: 9000;
	display: flex;
	align-items: stretch;
	background: var(--pkmnh-green);
	color: #fff;
	font: 700 14px/1.1 var(--pkmnh-font);
	overflow: hidden;
	padding-bottom: 5px;
}
.pkmnh-ticker::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 5px;
	background: repeating-linear-gradient(135deg, var(--pkmnh-red) 0 10px, #fff 10px 20px);
}
.pkmnh-ticker__tag {
	flex: none;
	display: flex;
	align-items: center;
	padding: 0 12px;
	background: var(--pkmnh-red);
	color: var(--pkmnh-gold);
	font-weight: 900;
	letter-spacing: .06em;
	text-shadow: 1px 1px 0 #000;
	animation: pkmnh-blink 1s steps(1, end) 6; /* blinks six times, then settles (kind to eyes) */
}
.pkmnh-ticker__view {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	padding: 9px 0;
}
.pkmnh-ticker__track {
	display: inline-block;
	white-space: nowrap;
	will-change: transform;
	animation: pkmnh-marquee var(--pkmnh-dur, 60s) linear infinite;
}
.pkmnh-ticker__view:hover .pkmnh-ticker__track,
.pkmnh-ticker__view:focus-within .pkmnh-ticker__track { animation-play-state: paused; }
.pkmnh-seq { display: inline-block; }
.pkmnh-msg { margin: 0 18px; text-shadow: 1px 1px 0 rgba(0, 0, 0, .55); }
.pkmnh-msg:nth-of-type(4n + 2) { color: var(--pkmnh-gold); }
.pkmnh-msg:nth-of-type(4n + 3) { color: #a8ffb4; }
.pkmnh-msg:nth-of-type(4n)     { color: #ffc2c2; }
.pkmnh-sep { color: var(--pkmnh-gold); text-shadow: 0 0 6px var(--pkmnh-gold); }

.pkmnh-ticker__clock {
	flex: none;
	display: flex;
	align-items: center;
	padding: 0 12px;
	background: #000;
	color: #39ff14;
	font: 700 13px/1 var(--pkmnh-mono);
	text-shadow: 0 0 6px #39ff14;
	border-left: 2px solid #fff;
	white-space: nowrap;
}
.pkmnh-ticker__clock:empty { display: none; }

@keyframes pkmnh-marquee { to { transform: translateX(-50%); } }
@keyframes pkmnh-blink { 0%, 49% { visibility: visible; } 50%, 100% { visibility: hidden; } }

@media (max-width: 640px) {
	.pkmnh-ticker { font-size: 13px; }
	.pkmnh-ticker__clock { display: none; }
}

/* ------------------------------------------------------------------ */
/* Twinkling lights                                                   */
/* ------------------------------------------------------------------ */

.pkmnh-lights {
	position: relative;
	z-index: 8999;
	display: flex;
	justify-content: center;
	height: 36px;
	overflow: hidden;
	pointer-events: none;
}
.pkmnh-lights i {
	position: relative;
	flex: none;
	width: 42px;
	height: 10px;
	color: #ff3b3b;
	border-bottom: 2px solid #14301c;
	border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.pkmnh-lights i:nth-child(4n + 2) { color: #35d85a; }
.pkmnh-lights i:nth-child(4n + 3) { color: #3fa9ff; }
.pkmnh-lights i:nth-child(4n)     { color: #ffd400; }
.pkmnh-lights i::before { /* the bulb */
	content: "";
	position: absolute;
	left: -6px;
	top: 3px;
	width: 12px;
	height: 19px;
	border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
	background: currentColor;
	box-shadow: 0 0 10px 3px currentColor, inset -2px -3px 4px rgba(0, 0, 0, .28), inset 2px 2px 3px rgba(255, 255, 255, .65);
	animation: pkmnh-twinkle 1.6s ease-in-out infinite;
}
.pkmnh-lights i::after { /* the socket */
	content: "";
	position: absolute;
	left: -3px;
	top: -2px;
	width: 6px;
	height: 7px;
	background: #14301c;
	border-radius: 1px;
}
.pkmnh-lights i:nth-child(odd)::before { animation-delay: -.8s; }
.pkmnh-lights i:nth-child(3n)::before  { animation-delay: -.4s; }
.pkmnh-lights i:nth-child(5n)::before  { animation-delay: -1.2s; }
@keyframes pkmnh-twinkle {
	0%, 100% { opacity: 1; filter: brightness(1.15); }
	50%      { opacity: .4; filter: brightness(.7); }
}
body.pkmnh-off-lights .pkmnh-lights { display: none; }

/* ------------------------------------------------------------------ */
/* WordArt title + Santa hat                                          */
/* ------------------------------------------------------------------ */

body.pkmnh-f-wordart .wp-block-site-title a {
	font-family: var(--pkmnh-font);
	font-weight: 900;
	background: linear-gradient(90deg, #ff2d2d, #ffd400, #2dd36f, #2d9bff, #b02dff, #ff2d2d);
	background-size: 300% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	-webkit-text-stroke: 1px rgba(20, 20, 40, .85);
	filter: drop-shadow(2px 2px 0 rgba(20, 20, 40, .35));
	animation: pkmnh-rainbow 6s linear infinite;
}
body.pkmnh-f-wordart .wp-block-site-title a {
	display: inline-block;
	transform: rotate(-1.5deg) skewX(-4deg);
	letter-spacing: .02em;
}
@keyframes pkmnh-rainbow { to { background-position: 300% 0; } }

body.pkmnh-f-hat .wp-block-site-logo > a,
body.pkmnh-f-hat a.custom-logo-link { position: relative; }
body.pkmnh-f-hat .wp-block-site-logo > a::after,
body.pkmnh-f-hat a.custom-logo-link::after {
	content: "";
	position: absolute;
	left: -10%;
	top: -24%;
	width: 58%;
	aspect-ratio: 1;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M6 48C8 22 26 8 46 11C57 13 60 21 57 27C55 33 56 41 58 48Z' fill='%23d1121b' stroke='%23700a10' stroke-width='2' stroke-linejoin='round'/%3E%3Crect x='2' y='43' width='60' height='13' rx='6.5' fill='%23fff' stroke='%23aab6cc' stroke-width='2'/%3E%3Ccircle cx='57' cy='27' r='7' fill='%23fff' stroke='%23aab6cc' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
	transform: rotate(-16deg);
	pointer-events: none;
	z-index: 2;
}

/* ------------------------------------------------------------------ */
/* Rainbow dividers, sparkly headings, wavy links                     */
/* ------------------------------------------------------------------ */

body.pkmnh-f-rainbow hr,
body.pkmnh-f-rainbow .wp-block-separator {
	border: 0 !important;
	height: 6px;
	background: repeating-linear-gradient(90deg, #d1121b 0 18px, #fff 18px 36px, #0b6b2f 36px 54px, #fff 54px 72px);
	background-size: 72px 6px;
	opacity: 1;
	animation: pkmnh-stripe 1.2s linear infinite;
}
@keyframes pkmnh-stripe { to { background-position: 72px 0; } }

body.pkmnh-f-rainbow main h1::before,
body.pkmnh-f-rainbow main h1::after {
	content: "\2605";
	display: inline-block;
	margin: 0 .35em;
	color: var(--pkmnh-gold);
	-webkit-text-stroke: 1px #8a6d00;
	animation: pkmnh-blink 1s steps(1, end) 6;
}
body.pkmnh-f-rainbow main a:hover,
body.pkmnh-f-rainbow nav a:hover {
	text-decoration-line: underline;
	text-decoration-style: wavy;
	text-decoration-color: var(--pkmnh-red);
	text-underline-offset: 4px;
}

/* ------------------------------------------------------------------ */
/* Chunky 3D buttons                                                  */
/* ------------------------------------------------------------------ */

body.pkmnh-f-bevel .wp-element-button,
body.pkmnh-f-bevel .wp-block-button__link,
body.pkmnh-f-bevel .wc-block-components-button,
body.pkmnh-f-bevel .add_to_cart_button,
body.pkmnh-f-bevel .single_add_to_cart_button,
body.pkmnh-f-bevel a.button,
body.pkmnh-f-bevel button.button {
	border-style: solid;
	border-width: 3px;
	border-color: rgba(255, 255, 255, .85) rgba(0, 0, 0, .4) rgba(0, 0, 0, .4) rgba(255, 255, 255, .85);
	border-radius: 2px;
	box-shadow: 1px 1px 0 rgba(0, 0, 0, .55);
	font-family: var(--pkmnh-font);
	font-weight: 700;
}
body.pkmnh-f-bevel .wp-element-button:hover,
body.pkmnh-f-bevel .wp-block-button__link:hover,
body.pkmnh-f-bevel .wc-block-components-button:hover,
body.pkmnh-f-bevel .add_to_cart_button:hover,
body.pkmnh-f-bevel .single_add_to_cart_button:hover,
body.pkmnh-f-bevel a.button:hover,
body.pkmnh-f-bevel button.button:hover {
	animation: pkmnh-wiggle .45s ease-in-out 1;
}
body.pkmnh-f-bevel .wp-element-button:active,
body.pkmnh-f-bevel .wp-block-button__link:active,
body.pkmnh-f-bevel .wc-block-components-button:active,
body.pkmnh-f-bevel .add_to_cart_button:active,
body.pkmnh-f-bevel .single_add_to_cart_button:active,
body.pkmnh-f-bevel a.button:active,
body.pkmnh-f-bevel button.button:active {
	border-color: rgba(0, 0, 0, .4) rgba(255, 255, 255, .85) rgba(255, 255, 255, .85) rgba(0, 0, 0, .4);
	box-shadow: none;
}
@keyframes pkmnh-wiggle {
	0%, 100% { transform: rotate(0); }
	25% { transform: rotate(-2.5deg); }
	75% { transform: rotate(2.5deg); }
}

/* ------------------------------------------------------------------ */
/* Cursor, tiled background                                           */
/* ------------------------------------------------------------------ */

body.pkmnh-f-cursor { cursor: var(--pkmnh-cursor) 14 14, auto; }
body.pkmnh-f-cursor a,
body.pkmnh-f-cursor button,
body.pkmnh-f-cursor summary,
body.pkmnh-f-cursor label,
body.pkmnh-f-cursor select,
body.pkmnh-f-cursor [role="button"],
body.pkmnh-f-cursor .wp-element-button { cursor: var(--pkmnh-cursor) 14 14, pointer; }

body.pkmnh-f-tiled {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cg fill='%23bcd9ef'%3E%3Crect x='10' y='6' width='2' height='6'/%3E%3Crect x='8' y='8' width='6' height='2'/%3E%3Crect x='34' y='28' width='2' height='6'/%3E%3Crect x='32' y='30' width='6' height='2'/%3E%3Crect x='30' y='8' width='2' height='2'/%3E%3Crect x='12' y='34' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E") !important;
	background-size: 48px 48px;
}

/* ------------------------------------------------------------------ */
/* Product starbursts                                                 */
/* ------------------------------------------------------------------ */

.pkmnh-has-burst { position: relative; }
.pkmnh-burst {
	position: absolute;
	z-index: 3;
	top: 6px;
	right: 6px;
	width: 68px;
	height: 68px;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font: 900 11px/1.05 var(--pkmnh-font);
	text-transform: uppercase;
	color: var(--pkmnh-gold);
	text-shadow: 1px 1px 0 #000;
	background: var(--pkmnh-red);
	clip-path: polygon(100% 50%, 88.64% 60.35%, 93.3% 75%, 78.28% 78.28%, 75% 93.3%, 60.35% 88.64%, 50% 100%, 39.65% 88.64%, 25% 93.3%, 21.72% 78.28%, 6.7% 75%, 11.36% 60.35%, 0% 50%, 11.36% 39.65%, 6.7% 25%, 21.72% 21.72%, 25% 6.7%, 39.65% 11.36%, 50% 0%, 60.35% 11.36%, 75% 6.7%, 78.28% 21.72%, 93.3% 25%, 88.64% 39.65%);
	transform: rotate(12deg);
	animation: pkmnh-wobble 2.4s ease-in-out infinite;
	pointer-events: none;
}
@keyframes pkmnh-wobble {
	0%, 100% { transform: rotate(8deg) scale(1); }
	50%      { transform: rotate(18deg) scale(1.08); }
}

/* ------------------------------------------------------------------ */
/* Canvas snow, sparkle trail, sleigh, gift rain                      */
/* ------------------------------------------------------------------ */

.pkmnh-snow {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 99980;
}
.pkmnh-spark {
	position: fixed;
	z-index: 99985;
	pointer-events: none;
	font-family: Arial, sans-serif;
	line-height: 1;
	text-shadow: 0 0 3px rgba(0, 0, 0, .6), 0 0 1px #000;
	transform: translate(-50%, -50%);
	animation: pkmnh-fall 1s ease-in forwards;
}
@keyframes pkmnh-fall {
	0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
	100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + 40px)) rotate(180deg) scale(.4); }
}

.pkmnh-sleigh {
	position: fixed;
	left: 0;
	top: 20vh;
	z-index: 99970;
	display: none;
	pointer-events: none;
}
.pkmnh-sleigh svg { display: block; width: 150px; height: auto; animation: pkmnh-bob 1.1s ease-in-out infinite; }
.pkmnh-sleigh__say {
	position: absolute;
	bottom: 100%;
	left: 0;
	white-space: nowrap;
	font: 900 14px/1 var(--pkmnh-font);
	color: var(--pkmnh-gold);
	text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
@keyframes pkmnh-bob { 50% { transform: translateY(-8px); } }

.pkmnh-gift {
	position: fixed;
	top: -50px;
	z-index: 99975;
	pointer-events: none;
	animation: pkmnh-drop var(--t, 4s) linear var(--d, 0s) forwards;
}
@keyframes pkmnh-drop { to { transform: translateY(calc(100vh + 80px)) rotate(var(--r, 200deg)); } }

/* ------------------------------------------------------------------ */
/* Windows-95 style windows: popup, panel, toast                      */
/* ------------------------------------------------------------------ */

.pkmnh-win {
	background: #c0c0c0;
	color: #000;
	font: 12px/1.4 var(--pkmnh-sans);
	border: 2px solid;
	border-color: #fff #404040 #404040 #fff;
	box-shadow: 1px 1px 0 #000, inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080, 4px 6px 0 rgba(0, 0, 0, .25);
	text-align: left;
}
.pkmnh-win__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 2px;
	padding: 3px 4px;
	background: linear-gradient(90deg, #000080, #1084d0);
	color: #fff;
	font-weight: 700;
	cursor: move;
	user-select: none;
	touch-action: none;
}
.pkmnh-win__ctl { display: inline-flex; gap: 2px; }
.pkmnh-win__btn,
.pkmnh-btn {
	font: inherit;
	color: #000;
	background: #c0c0c0;
	border: 2px solid;
	border-color: #fff #404040 #404040 #fff;
	border-radius: 0;
	box-shadow: 1px 1px 0 #000;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
}
.pkmnh-win__btn { width: 18px; height: 16px; padding: 0; line-height: 1; font-weight: 700; font-size: 12px; }
.pkmnh-btn { min-width: 76px; padding: 4px 12px; }
.pkmnh-win__btn:active,
.pkmnh-btn:active { border-color: #404040 #fff #fff #404040; box-shadow: none; }
.pkmnh-win__btn:focus-visible,
.pkmnh-btn:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }

.pkmnh-modal {
	position: fixed;
	inset: 0;
	z-index: 99995;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	padding: 16px;
}
.pkmnh-modal .pkmnh-win {
	pointer-events: auto;
	width: min(100%, 380px);
	animation: pkmnh-pop .35s steps(5, end) 1;
}
@keyframes pkmnh-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pkmnh-win__body { display: flex; gap: 14px; padding: 14px 14px 8px; align-items: flex-start; }
.pkmnh-win__icon { flex: none; line-height: 0; }
.pkmnh-win__text p { margin: 0 0 .7em; }
.pkmnh-win__buttons { display: flex; justify-content: center; gap: 8px; padding: 6px 12px 12px; }

.pkmnh-panel {
	position: fixed;
	right: 14px;
	bottom: 14px;
	width: 236px;
	z-index: 99990;
}
.pkmnh-panel.is-min { width: auto; }
.pkmnh-panel.is-min .pkmnh-panel__body { display: none; }
.pkmnh-panel__body { display: grid; gap: 8px; padding: 8px; }
.pkmnh-panel__row { display: flex; gap: 6px; }
.pkmnh-panel__row .pkmnh-btn:first-child { flex: 1; }
.pkmnh-panel__fx { margin: 0; padding: 4px 8px 6px; border: 2px groove #fff; min-width: 0; }
.pkmnh-panel__fx legend { padding: 0 4px; }
.pkmnh-panel__fx label { display: flex; align-items: center; gap: 6px; padding: 2px 0; cursor: pointer; }
.pkmnh-panel__fx input { margin: 0; }
.pkmnh-lcd {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 5px 7px;
	background: #000;
	color: #39ff14;
	font: 12px/1.2 var(--pkmnh-mono);
	text-shadow: 0 0 4px #39ff14;
	border: 2px solid;
	border-color: #808080 #fff #fff #808080;
	overflow: hidden;
}
.pkmnh-lcd__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkmnh-eq { display: inline-flex; flex: none; align-items: flex-end; gap: 2px; height: 14px; }
.pkmnh-eq i { width: 3px; height: 3px; background: #39ff14; }
.pkmnh-panel.is-playing .pkmnh-eq i { animation: pkmnh-eq .6s ease-in-out infinite alternate; }
.pkmnh-eq i:nth-child(2) { animation-delay: -.2s; }
.pkmnh-eq i:nth-child(3) { animation-delay: -.4s; }
.pkmnh-eq i:nth-child(4) { animation-delay: -.1s; }
@keyframes pkmnh-eq { to { height: 14px; } }

.pkmnh-toast {
	position: fixed;
	left: 50%;
	top: 18%;
	z-index: 99996;
	width: min(92vw, 340px);
	transform: translateX(-50%);
	animation: pkmnh-pop .35s steps(5, end) 1;
}

@media (max-width: 600px) {
	.pkmnh-panel { right: 8px; bottom: 8px; }
}

/* ------------------------------------------------------------------ */
/* Accessibility & print                                              */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.pkmnh-ticker__track { animation: none; white-space: normal; display: block; padding: 0 12px; }
	.pkmnh-seq--dup { display: none; }
	.pkmnh-ticker__tag,
	.pkmnh-lights i::before,
	body.pkmnh-f-wordart .wp-block-site-title a,
	body.pkmnh-f-rainbow hr,
	body.pkmnh-f-rainbow .wp-block-separator,
	body.pkmnh-f-rainbow main h1::before,
	body.pkmnh-f-rainbow main h1::after,
	.pkmnh-burst,
	.pkmnh-modal .pkmnh-win,
	.pkmnh-toast,
	body.pkmnh-f-bevel .wp-element-button:hover,
	body.pkmnh-f-bevel .wp-block-button__link:hover,
	body.pkmnh-f-bevel .wc-block-components-button:hover,
	body.pkmnh-f-bevel .add_to_cart_button:hover { animation: none !important; }
	.pkmnh-ticker__view { overflow: visible; }
}

@media print {
	.pkmnh-ticker, .pkmnh-lights, .pkmnh-snow, .pkmnh-sleigh, .pkmnh-panel,
	.pkmnh-modal, .pkmnh-spark, .pkmnh-gift, .pkmnh-toast, .pkmnh-burst { display: none !important; }
}
