/* ThePuppetMasteeer — "Lights out" (app/Views/creators/thepuppetmasteeer.php).
   A black-light room: near black, UV purple and the cyan of his horns and
   tears, everything outlined in neon tubes that flicker now and then.
   Chakra Petch for the titles, Permanent Marker for the hand-lettered kicks
   (his Twitch panels are hand-lettered), Nunito for reading. Glows are
   box- and text-shadows that never animate; flickers are opacity only. No
   live blur; loops pause off screen (site.js) and stop for reduced motion
   and lite mode (docs/MOTION.md, the mobile-performance rules). */

@font-face { font-family: 'Chakra Petch'; src: url('/assets/fonts/chakra-petch-700-latin.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Chakra Petch'; src: url('/assets/fonts/chakra-petch-600-latin.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Permanent Marker'; src: url('/assets/fonts/PermanentMarker.woff2') format('woff2'); font-weight: 400; font-display: swap; }

body.cp-theme-thepuppetmasteeer {
  --ppm-ink: #05010d; --ppm-night: #0a0418; --ppm-panel: #110824; --ppm-panel2: #1a0d33;
  --ppm-uv: #a855f7; --ppm-uv-l: #d8b4fe; --ppm-violet: #7c3aed; --ppm-cyan: #22d3ee; --ppm-cyan-l: #a5f3fc; --ppm-pink: #e879f9;
  --ppm-line: rgba(168, 85, 247, .35);
  --ppm-tx: #f3ecff; --ppm-tx2: #cfc2ec; --ppm-tx3: #9384b5;
  --ppm-head: 'Chakra Petch', system-ui, sans-serif;
  --ppm-hand: 'Permanent Marker', 'Caveat', cursive;
  --ppm-body: 'Nunito', system-ui, sans-serif;
  --scroll-acc: #a855f7;
  background: var(--ppm-ink);
}
html:has(> body.cp-theme-thepuppetmasteeer) { --scroll-acc: #a855f7; }

.ppm { position: relative; overflow-x: clip; padding: 0 0 40px; color: var(--ppm-tx); font-family: var(--ppm-body); font-weight: 600; background:
  radial-gradient(ellipse 60% 40% at 50% 0%, rgba(124, 58, 237, .28), transparent 70%),
  linear-gradient(180deg, #0c0420 0%, var(--ppm-ink) 40%, #04010a 100%); }
.ppm img { display: block; max-width: 100%; }
.ppm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the black light: UV haze and glowing dust (one fixed layer) ---- */
.ppm-uv { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ppm-haze { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; opacity: .5; animation: ppm-haze 18s ease-in-out infinite alternate; }
.ppm-haze.is-1 { left: -30vmax; top: 10vh; background: radial-gradient(circle, rgba(124, 58, 237, .22), transparent 65%); }
.ppm-haze.is-2 { right: -32vmax; top: 45vh; background: radial-gradient(circle, rgba(34, 211, 238, .12), transparent 65%); animation-duration: 23s; }
@keyframes ppm-haze { to { transform: translate3d(8vmax, -6vh, 0); opacity: .8; } }
.ppm-uv b { position: absolute; left: var(--x); top: var(--y); width: var(--z); height: var(--z); border-radius: 50%; background: #e9d5ff; box-shadow: 0 0 6px 2px rgba(168, 85, 247, .8); opacity: 0; animation: ppm-dust var(--d) ease-in-out infinite; animation-delay: var(--t); }
.ppm-uv b.is-cyan { background: #cffafe; box-shadow: 0 0 6px 2px rgba(34, 211, 238, .8); }
@keyframes ppm-dust {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  20% { opacity: .9; }
  60% { opacity: .5; }
  100% { opacity: 0; transform: translate3d(24px, -90px, 0); }
}

/* ---- neon tubes: a glowing edge, and now and then a flicker ---- */
.ppm-tube { position: relative; border: 1.5px solid rgba(216, 180, 254, .75); box-shadow: 0 0 0 1px rgba(168, 85, 247, .35), 0 0 22px rgba(168, 85, 247, .45), inset 0 0 18px rgba(168, 85, 247, .18); }
.ppm-tube::after { content: ""; position: absolute; inset: -1.5px; z-index: 3; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 1.5px rgba(34, 211, 238, .9), 0 0 26px rgba(34, 211, 238, .45); opacity: 0; animation: ppm-tube-flicker 9s steps(1) infinite; }
.ppm-sec:nth-of-type(2n) .ppm-tube::after { animation-delay: -3.5s; animation-duration: 11s; }
.ppm-sec:nth-of-type(3n) .ppm-tube::after { animation-delay: -6s; animation-duration: 13s; }
@keyframes ppm-tube-flicker {
  0%, 61%, 100% { opacity: 0; }
  62% { opacity: 1; } 63% { opacity: .2; } 64% { opacity: 1; } 66% { opacity: 0; } 67% { opacity: .8; }
  68%, 88% { opacity: 1; }
  89% { opacity: .1; } 90% { opacity: .9; } 92% { opacity: 0; }
}

/* ---- type ---- */
.ppm-kick { margin: 0 0 8px; font-family: var(--ppm-hand); font-weight: 400; font-size: 20px; letter-spacing: .02em; color: var(--ppm-cyan-l); text-shadow: 0 0 10px rgba(34, 211, 238, .7); }
.ppm-title { margin: 0; text-transform: uppercase; font-family: var(--ppm-head); font-weight: 700; font-size: clamp(30px, 3.8vw, 50px); line-height: 1.05; letter-spacing: .04em; color: #fff;
  text-shadow: 0 0 2px #fff, 0 0 10px var(--ppm-uv), 0 0 24px var(--ppm-uv), 0 0 46px rgba(124, 58, 237, .8); }
.ppm-title em { font-style: normal; color: #ecfeff; text-shadow: 0 0 2px #fff, 0 0 10px var(--ppm-cyan), 0 0 24px var(--ppm-cyan), 0 0 46px rgba(34, 211, 238, .7); animation: ppm-sign 7s steps(1) infinite; }
.ppm-sec:nth-of-type(2n) .ppm-title em { animation-delay: -2.5s; animation-duration: 9s; }
@keyframes ppm-sign {
  0%, 70%, 100% { opacity: 1; }
  71% { opacity: .25; } 72% { opacity: 1; } 74% { opacity: .4; } 75% { opacity: 1; } 86% { opacity: .55; } 87% { opacity: 1; }
}
.ppm-text { margin: 12px 0 0; font-size: 17px; font-weight: 600; line-height: 1.7; color: var(--ppm-tx2); }
.ppm-text a { color: var(--ppm-cyan-l); border-bottom: 1px solid currentColor; }
.ppm-emote { width: 150px; height: auto; margin: 0 0 6px; filter: drop-shadow(0 0 14px rgba(168, 85, 247, .55)); transform: rotate(-3deg); }

/* ---- panels ---- */
.ppm-panel { border-radius: 22px; background:
  radial-gradient(ellipse 80% 60% at 100% 0%, rgba(124, 58, 237, .16), transparent 70%),
  linear-gradient(160deg, var(--ppm-panel2), var(--ppm-panel) 60%, var(--ppm-night)); }
.ppm-panel:not(.ppm-tube) { border: 1.5px solid var(--ppm-line); }

/* ---- hero: his logo, powering on in the middle ---- */
.ppm-hero { position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; gap: 6px; min-height: min(100vh, 900px); margin: 0 auto; padding: 110px 24px 40px; text-align: center; }
.ppm-hero-back { position: absolute; inset: 0; z-index: -1; overflow: hidden; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%); }
.ppm-hero-back img { width: 100%; height: 100%; object-fit: cover; opacity: .22; }
.ppm-logo { position: relative; width: min(900px, 94vw); aspect-ratio: 1800 / 817; }
.ppm-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.ppm-logo img.is-on { opacity: 1; }
/* The black frames, lights off: only a faint UV edge shows them in the dark. */
.ppm-logo img:nth-of-type(-n+2) { filter: drop-shadow(0 0 1px rgba(216, 180, 254, .7)) drop-shadow(0 0 8px rgba(168, 85, 247, .55)); }
/* The light the neon throws on the wall: shown once it is lit. */
.ppm-logo-glow { position: absolute; inset: -10% 0; border-radius: 50%; background: radial-gradient(ellipse 50% 45% at 50% 50%, rgba(168, 85, 247, .38), rgba(34, 211, 238, .12) 50%, transparent 72%); opacity: 0; transition: opacity .3s; }
.ppm-logo.is-lit .ppm-logo-glow, .ppm-logo:not([data-ppm-ready]) .ppm-logo-glow { opacity: 1; animation: ppm-hum 5s ease-in-out infinite; }
@keyframes ppm-hum { 0%, 100% { transform: scale(.97); } 50% { transform: scale(1.03); } }
.ppm-name { margin: 0; font-family: var(--ppm-head); font-weight: 700; font-size: clamp(40px, 7vw, 96px); text-transform: uppercase; color: #fff; text-shadow: 0 0 10px var(--ppm-uv), 0 0 30px var(--ppm-uv); }
.ppm-hero-copy { display: grid; justify-items: center; max-width: 720px; }
.ppm-hero-kick { margin-top: 4px; font-size: 24px; }
.ppm-summary { max-width: 620px; margin: 6px 0 0; font-size: clamp(17px, 1.6vw, 20px); font-weight: 700; line-height: 1.55; color: var(--ppm-tx2); }
.ppm-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.ppm-tags li { padding: 5px 14px; border-radius: 40px; border: 1px solid rgba(168, 85, 247, .7); background: rgba(124, 58, 237, .14); color: var(--ppm-tx); font-family: var(--ppm-head); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 0 10px rgba(168, 85, 247, .3); }
.ppm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.ppm-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border: 1.5px solid rgba(34, 211, 238, .75); border-radius: 12px; background: rgba(5, 1, 13, .6); color: var(--ppm-cyan-l); font-family: var(--ppm-head); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; box-shadow: 0 0 12px rgba(34, 211, 238, .3), inset 0 0 10px rgba(34, 211, 238, .15); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), background-color .18s, color .18s, box-shadow .18s, border-color .18s; }
.ppm-btn:hover { transform: translateY(-3px); background: var(--ppm-cyan); color: #04121a; border-color: #cffafe; box-shadow: 0 0 6px #cffafe, 0 0 26px rgba(34, 211, 238, .8); }
.ppm-btn.is-hot { border-color: #e9d5ff; background: linear-gradient(180deg, #9333ea, #6d28d9); color: #fff; box-shadow: 0 0 8px rgba(233, 213, 255, .7), 0 0 26px rgba(168, 85, 247, .7); }
.ppm-btn.is-hot:hover { background: linear-gradient(180deg, #c084fc, #9333ea); box-shadow: 0 0 10px #f3e8ff, 0 0 34px rgba(192, 132, 252, .9); }
.ppm-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.ppm-socials a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--ppm-line); color: var(--ppm-uv-l); background: rgba(5, 1, 13, .5); transition: color .15s, border-color .15s, background-color .15s, box-shadow .2s, transform .18s cubic-bezier(.3, 1.6, .5, 1); }
.ppm-socials a:hover { background: var(--ppm-uv); border-color: #f3e8ff; color: #fff; box-shadow: 0 0 6px #f3e8ff, 0 0 24px rgba(168, 85, 247, .9); transform: translateY(-3px) scale(1.06); }
.ppm-socials svg { width: 19px; height: 19px; fill: currentColor; }

/* ---- his four banners in turn, the last one the neon sign ---- */
.ppm-band { z-index: 1; overflow: hidden; max-width: 1240px; width: calc(100% - 64px); aspect-ratio: 4462 / 1512; margin: 10px auto 20px; border-radius: 20px; background: #000; }
.ppm-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ppm-band .is-2, .ppm-band .is-3, .ppm-band .is-4 { opacity: 0; animation: ppm-variant 16s linear infinite; }
.ppm-band .is-3 { animation-name: ppm-variant-3; }
.ppm-band .is-neon { animation-name: ppm-variant-neon; }
/* 0–16%: variant 1; then 2, then 3; from 48% the neon one stutters on and
   buzzes until the loop fades back to the start. */
@keyframes ppm-variant { 0%, 14% { opacity: 0; } 18%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ppm-variant-3 { 0%, 30% { opacity: 0; } 34%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ppm-variant-neon {
  0%, 47% { opacity: 0; }
  48% { opacity: 1; } 48.6% { opacity: .1; } 49.2% { opacity: 1; } 49.8% { opacity: 0; } 50.6% { opacity: .9; } 51.2% { opacity: .3; } 52% { opacity: 1; }
  68% { opacity: 1; } 68.4% { opacity: .35; } 68.8% { opacity: 1; } 69.4% { opacity: .6; } 69.8% { opacity: 1; }
  82% { opacity: 1; } 82.3% { opacity: .2; } 82.9% { opacity: 1; }
  94% { opacity: 1; } 100% { opacity: 0; }
}
/* The buzz of the sign on the glass: a purple-cyan wash that only flickers
   while the neon one is up. */
.ppm-band-buzz { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(168, 85, 247, .25), transparent 70%), linear-gradient(90deg, rgba(34, 211, 238, .12), transparent 30%, transparent 70%, rgba(232, 121, 249, .12)); mix-blend-mode: screen; opacity: 0; animation: ppm-buzz 16s linear infinite; }
@keyframes ppm-buzz {
  0%, 51% { opacity: 0; }
  52% { opacity: 1; } 60% { opacity: .7; } 61% { opacity: 1; } 68.4% { opacity: .2; } 68.8% { opacity: 1; } 76% { opacity: .75; } 77% { opacity: 1; } 82.3% { opacity: 0; } 82.9% { opacity: 1; }
  94% { opacity: 1; } 100% { opacity: 0; }
}

/* ---- sections ---- */
.ppm-sec { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 36px 32px 20px; }
.ppm-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ppm-more { flex: none; padding: 7px 16px; border-radius: 10px; border: 1.5px solid var(--ppm-line); font-family: var(--ppm-head); font-weight: 700; font-size: 13px; letter-spacing: .08em; color: var(--ppm-cyan-l); transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s; }
.ppm-more:hover { background: var(--ppm-cyan); border-color: #cffafe; color: #04121a; box-shadow: 0 0 18px rgba(34, 211, 238, .7); }
.ppm .ppm-row-h { margin: 24px 0 10px; font-family: var(--ppm-head); font-weight: 600; font-size: 18px; letter-spacing: .14em; text-transform: uppercase; color: var(--ppm-uv-l); }
.ppm .ppm-row-h::before { content: "▸ "; color: var(--ppm-cyan); }

/* About */
.ppm-about-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 36px; align-items: center; padding: 36px; }
.ppm-about-art img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 0 0 1.5px rgba(34, 211, 238, .55), 0 0 30px rgba(124, 58, 237, .45); transform: rotate(-1.5deg); }
.ppm-about-copy .ppm-title { margin-bottom: 4px; }
.ppm-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.ppm-links a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 10px; border: 1.5px solid var(--ppm-line); font-weight: 800; font-size: 14px; transition: border-color .15s, background-color .15s, color .15s, box-shadow .2s, transform .18s cubic-bezier(.3, 1.6, .5, 1); }
.ppm-links a:hover { background: var(--ppm-uv); border-color: #f3e8ff; color: #fff; box-shadow: 0 0 6px #f3e8ff, 0 0 22px rgba(168, 85, 247, .85); transform: translateY(-2px); }
.ppm-links svg { width: 16px; height: 16px; fill: currentColor; }
.ppm-discord, .ppm-business { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 15px; color: var(--ppm-tx2); }
.ppm-discord svg { width: 18px; height: 18px; fill: var(--ppm-uv-l); }
.ppm-business a { color: var(--ppm-cyan-l); border-bottom: 1px solid currentColor; }

/* Specs */
.ppm-specs-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 30px; align-items: center; padding: 34px 36px; }
.ppm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 20px 0 0; }
.ppm-facts div { padding: 10px 14px; border-radius: 12px; background: rgba(5, 1, 13, .6); border: 1px solid var(--ppm-line); border-left: 3px solid var(--ppm-cyan); }
.ppm-facts dt { display: flex; gap: 8px; font-family: var(--ppm-head); font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ppm-uv-l); }
.ppm-facts dt span { color: var(--ppm-cyan); }
.ppm-facts dd { margin: 3px 0 0; font-size: 16px; font-weight: 800; color: var(--ppm-tx); }
/* His PNGtuber: idle, and talking while you hover or tap him. */
.ppm-tuber { position: relative; justify-self: center; width: 100%; max-width: 340px; padding: 0; border: 0; background: none; cursor: pointer; }
.ppm-tuber::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: 0; height: 26px; border-radius: 50%; background: radial-gradient(ellipse, rgba(168, 85, 247, .6), transparent 70%); }
.ppm-tuber img { position: relative; width: 100%; height: auto; filter: drop-shadow(0 0 14px rgba(124, 58, 237, .45)); }
.ppm-tuber .is-talk { position: absolute; left: 0; top: 0; opacity: 0; }
.ppm-tuber.is-talking .is-talk { opacity: 1; }
.ppm-tuber.is-talking .is-idle { opacity: 0; }
.ppm-tuber-bubble { position: absolute; right: -4%; top: 2%; max-width: 200px; padding: 8px 14px; border-radius: 14px; background: #f3ecff; color: #1a0d33; font-family: var(--ppm-hand); font-size: 16px; line-height: 1.25; box-shadow: 0 0 18px rgba(168, 85, 247, .6); transform: rotate(4deg); }
.ppm-tuber-bubble::after { content: ""; position: absolute; left: 22px; bottom: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #f3ecff; }
.ppm-tuber:focus-visible { outline: 2px solid var(--ppm-cyan); outline-offset: 6px; border-radius: 18px; }

/* Videos */
.ppm-rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(280px, 30%, 400px); gap: 18px; overflow-x: auto; padding: 8px 8px 18px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.ppm-rail.is-tall { grid-auto-columns: clamp(190px, 18%, 230px); }
.ppm-rail::-webkit-scrollbar { height: 8px; }
.ppm-rail::-webkit-scrollbar-thumb { background: linear-gradient(90deg, var(--ppm-uv), var(--ppm-cyan)); border-radius: 10px; }
.ppm-rail::-webkit-scrollbar-track { background: var(--ppm-panel); border-radius: 10px; }
.ppm-card { scroll-snap-align: start; margin: 0; }
.ppm-card-thumb { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 14px; border: 1.5px solid var(--ppm-line); background: var(--ppm-panel); transition: border-color .18s, transform .22s cubic-bezier(.3, 1.6, .5, 1), box-shadow .18s; }
.ppm-card.is-tall .ppm-card-thumb { aspect-ratio: 9 / 16; }
.ppm-card-thumb > a, .ppm-card-thumb img, .ppm-card-thumb iframe { display: block; width: 100%; height: 100%; }
.ppm-card-thumb img { object-fit: cover; }
.ppm-card:hover .ppm-card-thumb { border-color: var(--ppm-cyan); transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(34, 211, 238, .5), 0 0 26px rgba(34, 211, 238, .45); }
.ppm-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; border: 2px solid #e9d5ff; background: rgba(5, 1, 13, .7); box-shadow: 0 0 14px rgba(168, 85, 247, .8), inset 0 0 10px rgba(168, 85, 247, .5); transition: transform .22s cubic-bezier(.3, 1.6, .5, 1), background-color .18s; }
.ppm-play svg { width: 26px; height: 26px; margin-left: 3px; fill: #f3e8ff; }
.ppm-card:hover .ppm-play { transform: scale(1.14); background: var(--ppm-uv); }
.ppm-chip { position: absolute; left: 10px; top: 10px; padding: 2px 10px; border-radius: 8px; background: rgba(5, 1, 13, .85); color: var(--ppm-cyan-l); font-family: var(--ppm-head); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ppm .ppm-card-title { margin: 10px 2px 0; font-family: var(--ppm-body); font-weight: 700; font-size: 15px; line-height: 1.4; letter-spacing: 0; text-transform: none; color: var(--ppm-tx); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ppm-empty, .ppm-follow { max-width: 620px; padding: 20px 24px; }
.ppm-follow { display: flex; align-items: center; gap: 12px; }
.ppm-follow svg { width: 22px; height: 22px; fill: var(--ppm-uv-l); }
.ppm-follow .ppm-more { margin-left: auto; }

/* ---- wake him up (creators/thepuppetmasteeer.js) ---- */
.ppm-wake { overflow: hidden; max-width: 1000px; margin: 0 auto; aspect-ratio: 1600 / 1131; border-radius: 22px; background: #000; cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.ppm-wake:focus-visible { outline: 2px solid var(--ppm-cyan); outline-offset: 6px; }
.ppm-wake-tired { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 70%; transition: opacity .4s ease; }
/* The shake grows in three steps as you keep moving. */
.ppm-wake.is-shake-1 .ppm-wake-tired { animation: ppm-shake-1 .9s ease-in-out infinite; }
.ppm-wake.is-shake-2 .ppm-wake-tired { animation: ppm-shake-2 .5s ease-in-out infinite; }
.ppm-wake.is-shake-3 .ppm-wake-tired { animation: ppm-shake-3 .22s linear infinite; }
@keyframes ppm-shake-1 { 0%, 100% { transform: rotate(0) translateX(0); } 25% { transform: rotate(-.5deg) translateX(-3px); } 75% { transform: rotate(.5deg) translateX(3px); } }
@keyframes ppm-shake-2 { 0%, 100% { transform: rotate(0) translateX(0) scale(1.01); } 25% { transform: rotate(-1.2deg) translateX(-7px) scale(1.01); } 75% { transform: rotate(1.2deg) translateX(7px) scale(1.01); } }
@keyframes ppm-shake-3 { 0%, 100% { transform: translate(0, 0) rotate(0) scale(1.02); } 20% { transform: translate(-10px, 3px) rotate(-2deg) scale(1.02); } 40% { transform: translate(9px, -4px) rotate(1.8deg) scale(1.02); } 60% { transform: translate(-7px, -2px) rotate(-1.4deg) scale(1.02); } 80% { transform: translate(8px, 4px) rotate(2deg) scale(1.02); } }
/* Awake: he pops out, shining, rays turning behind him and sparkles all round. */
.ppm-wake-rays { position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; margin: -80% 0 0 -80%; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(253, 230, 138, .2) 0 6deg, rgba(168, 85, 247, .1) 6deg 18deg); -webkit-mask-image: radial-gradient(circle, #000 15%, transparent 62%); mask-image: radial-gradient(circle, #000 15%, transparent 62%); opacity: 0; transform: scale(.3); transition: opacity .5s ease, transform .7s cubic-bezier(.3, 1.4, .5, 1); }
.ppm-wake-shine { position: absolute; left: 50%; top: 50%; width: 62%; height: auto; margin: -31% 0 0 -31%; opacity: 0; transform: scale(.2) rotate(-25deg); transition: opacity .25s ease, transform .6s cubic-bezier(.3, 1.7, .5, 1);
  /* The drawing stops square at the bottom and right: fade the cut into the light. */
  -webkit-mask-image: radial-gradient(circle at 48% 40%, #000 54%, transparent 71%); mask-image: radial-gradient(circle at 48% 40%, #000 54%, transparent 71%); }
.ppm-wake.is-awake .ppm-wake-tired { opacity: .25; animation: none; }
.ppm-wake.is-awake .ppm-wake-rays { opacity: 1; transform: scale(1); animation: ppm-turn 18s linear infinite; }
.ppm-wake.is-awake .ppm-wake-shine { opacity: 1; transform: scale(1) rotate(0); animation: ppm-gleam 2.8s ease-in-out .6s infinite; }
@keyframes ppm-turn { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes ppm-gleam { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.04) rotate(2deg); } }
.ppm-wake-sparks { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.ppm-wake-sparks i { position: absolute; left: 0; top: 0; font-style: normal; font-size: var(--z, 20px); line-height: 1; color: var(--c, #fde68a); text-shadow: 0 0 8px currentColor; animation: ppm-spark var(--d, 1.4s) ease-out forwards; }
@keyframes ppm-spark { 0% { opacity: 0; transform: translate(var(--x0), var(--y0)) scale(.2) rotate(0); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(var(--x0) + var(--dx)), calc(var(--y0) + var(--dy))) scale(1.1) rotate(var(--r)); } }
.ppm-wake-bar { position: absolute; z-index: 3; left: 50%; bottom: 16px; width: min(46%, 280px); height: 8px; border-radius: 10px; background: rgba(5, 1, 13, .75); box-shadow: 0 0 0 1px rgba(216, 180, 254, .5), 0 0 12px rgba(168, 85, 247, .5); transform: translateX(-50%); overflow: hidden; transition: opacity .5s; }
.ppm-wake-bar i { position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(90deg, var(--ppm-uv), var(--ppm-cyan), #fde68a); transform-origin: left; transform: scaleX(0); transition: transform .2s ease; }
.ppm-wake-note { position: absolute; z-index: 3; left: 16px; top: 14px; padding: 4px 14px; border-radius: 10px; background: rgba(5, 1, 13, .85); color: var(--ppm-cyan-l); font-family: var(--ppm-hand); font-size: 18px; box-shadow: 0 0 12px rgba(34, 211, 238, .35); }
.ppm-wake.is-awake .ppm-wake-note { color: #fde68a; box-shadow: 0 0 14px rgba(253, 230, 138, .5); }
.ppm-wake.is-awake .ppm-wake-bar { opacity: 0; }
.ppm-wake-again { position: absolute; z-index: 3; right: 16px; bottom: 14px; padding: 8px 16px; font-size: 12px; }
.ppm-wake-again[hidden] { display: none; }

/* ---- gallery ---- */
.ppm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ppm-gallery a { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 16px; border: 1.5px solid var(--ppm-line); background: var(--ppm-panel); transition: border-color .18s, transform .22s cubic-bezier(.3, 1.6, .5, 1), box-shadow .18s; }
.ppm-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.ppm-gallery a:hover { border-color: #e9d5ff; transform: translateY(-5px); box-shadow: 0 0 0 1px rgba(168, 85, 247, .6), 0 0 30px rgba(168, 85, 247, .6); }
.ppm-gallery a:hover img { transform: scale(1.05); }

/* ---- the viewer (creators/thepuppetmasteeer.js) ---- */
.ppm-zoom { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: clamp(14px, 4vmin, 44px); background: radial-gradient(ellipse at 50% 50%, rgba(46, 16, 101, .93), rgba(4, 1, 10, .97) 70%); opacity: 0; transition: opacity .22s ease; }
.ppm-zoom[hidden] { display: none; }
.ppm-zoom.is-open { opacity: 1; }
.ppm-zoom-win { position: relative; max-width: min(92vw, 1100px); padding: 6px; border-radius: 20px; background: linear-gradient(160deg, var(--ppm-cyan), var(--ppm-uv)); box-shadow: 0 0 40px rgba(168, 85, 247, .6); transform: scale(.94); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.ppm-zoom.is-open .ppm-zoom-win { transform: none; }
.ppm-zoom-img { display: block; max-width: min(88vw, 1080px); max-height: calc(86vh - 20px); width: auto; height: auto; margin: 0 auto; border-radius: 15px; background: #000; }
.ppm-zoom-x, .ppm-zoom-nav { display: grid; place-items: center; border: 1.5px solid var(--ppm-cyan); background: var(--ppm-night); color: var(--ppm-cyan-l); font-family: var(--ppm-head); font-weight: 700; cursor: pointer; transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), background-color .15s, color .15s; }
.ppm-zoom-x { position: absolute; top: -16px; right: -16px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; font-size: 22px; line-height: 1; }
.ppm-zoom-x:hover, .ppm-zoom-nav:hover { background: var(--ppm-cyan); color: #04121a; transform: scale(1.1); }
.ppm-zoom-nav { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; font-size: 22px; }
.ppm-zoom-nav.is-prev { left: 18px; }
.ppm-zoom-nav.is-next { right: 18px; }
.ppm-zoom-nav[hidden] { display: none; }
@media (max-width: 700px) { .ppm-zoom-nav { top: auto; bottom: 18px; margin-top: 0; } }
@media (prefers-reduced-motion: reduce) { .ppm-zoom, .ppm-zoom-win { transition: none; } }

/* ---- rules ---- */
.ppm-rules-card { padding: 30px 34px; }
.ppm-rules-head { display: flex; align-items: center; gap: 18px; }
.ppm-rules-head .ppm-emote { width: 170px; margin: 0; }
.ppm-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: ppm-rule; }
.ppm-rules li { position: relative; padding-left: 46px; counter-increment: ppm-rule; }
.ppm-rules li::before { content: counter(ppm-rule); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--ppm-cyan); color: var(--ppm-cyan-l); font-family: var(--ppm-head); font-weight: 700; box-shadow: 0 0 10px rgba(34, 211, 238, .4); }
.ppm-rules b { display: block; font-family: var(--ppm-head); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--ppm-tx); }
.ppm-rules span { display: block; margin-top: 2px; font-size: 15px; line-height: 1.5; color: var(--ppm-tx2); }
.ppm .ppm-rules-end { margin: 20px 0 0; font-family: var(--ppm-hand); font-size: 19px; color: var(--ppm-uv-l); }

/* ---- shop ---- */
.ppm-support { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.ppm-support .ppm-emote { flex: none; width: 170px; margin: 0; }
.ppm-support .ppm-text { max-width: 640px; }
.ppm-soon { display: flex; align-items: center; gap: 26px; max-width: 760px; padding: 22px 28px; }
.ppm-soon .ppm-text { margin: 0; }
.ppm-soon-sign { flex: none; padding: 8px 14px; border: 2px solid #f0abfc; border-radius: 10px; font-family: var(--ppm-head); font-weight: 700; font-size: 22px; letter-spacing: .14em; color: #fdf4ff; text-shadow: 0 0 6px var(--ppm-pink), 0 0 16px var(--ppm-pink); box-shadow: 0 0 10px rgba(232, 121, 249, .6), inset 0 0 10px rgba(232, 121, 249, .4); }
.ppm-soon-sign i { font-style: normal; font-family: var(--ppm-hand); letter-spacing: .02em; color: #cffafe; text-shadow: 0 0 6px var(--ppm-cyan), 0 0 16px var(--ppm-cyan); animation: ppm-sign 6s steps(1) infinite; }

/* ---- join ---- */
.ppm-join { margin-top: 20px; }
.ppm-join-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 36px; align-items: center; padding: 36px 34px; }
.ppm-join .ppm-title { margin: 6px 0 6px; }
/* His twerk emote on the top-left corner, half off the card. */
.ppm-join-twerk { position: absolute; left: -46px; top: -70px; z-index: 4; width: 150px; height: auto; transform: rotate(-10deg); filter: drop-shadow(0 0 14px rgba(168, 85, 247, .55)); pointer-events: none; }
.ppm-join-card { overflow: visible; }
.ppm-join .ppm-join-copy > .ppm-kick { padding-left: 96px; }
.ppm-join .ppm-actions { justify-content: flex-start; }
.ppm-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ppm-nums li { padding: 16px; border-radius: 14px; border: 1px solid var(--ppm-line); background: rgba(5, 1, 13, .55); }
.ppm-nums b { display: block; font-family: var(--ppm-head); font-weight: 700; font-size: 30px; line-height: 1; color: #fff; text-shadow: 0 0 8px var(--ppm-uv), 0 0 20px var(--ppm-uv); }
.ppm-nums span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--ppm-tx3); }

/* ---- end: credits (a div: the site's footer styles would pull a <footer> left) ---- */
.ppm-end { position: relative; z-index: 1; max-width: 1240px; margin: 40px auto 0; padding: 30px 32px 10px; text-align: center; }
.ppm-credits-head { display: grid; justify-items: center; }
.ppm-credits-head .ppm-emote { width: 190px; }
.ppm-credits-head .ppm-text { max-width: 560px; margin-top: 4px; }
.ppm-credits { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 980px; margin: 18px auto 0; padding: 0; list-style: none; }
.ppm-credits li { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 7px 14px; border-radius: 10px; border: 1px solid var(--ppm-line); background: rgba(5, 1, 13, .6); text-align: left; }
.ppm-credits span { font-family: var(--ppm-head); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ppm-tx3); }
.ppm-credits a, .ppm-credits b { font-size: 15px; font-weight: 800; color: var(--ppm-cyan-l); }
.ppm-credits a:hover { color: #fff; text-shadow: 0 0 10px var(--ppm-cyan); }
/* The closing call to action: a neon sign with his picture hanging off the top. */
.ppm-cta { position: relative; display: grid; justify-items: center; max-width: 760px; margin: 70px auto 0; padding: 70px 30px 34px; background:
  radial-gradient(ellipse 70% 60% at 50% 0%, rgba(168, 85, 247, .3), transparent 70%),
  radial-gradient(ellipse 60% 50% at 50% 100%, rgba(34, 211, 238, .12), transparent 70%),
  linear-gradient(160deg, var(--ppm-panel2), var(--ppm-panel) 60%, var(--ppm-night)); }
.ppm-cta-av { position: absolute; left: 50%; top: -54px; width: 108px; height: 108px; margin-left: -54px; border-radius: 50%; object-fit: cover; border: 2px solid #e9d5ff; box-shadow: 0 0 0 4px var(--ppm-ink), 0 0 0 5.5px rgba(34, 211, 238, .8), 0 0 30px rgba(168, 85, 247, .8); }
.ppm-cta .ppm-title { font-size: clamp(34px, 5vw, 60px); }
.ppm-cta .ppm-text { max-width: 520px; }
.ppm-cta .ppm-btn svg { width: 17px; height: 17px; fill: currentColor; }
.ppm .ppm-end-line { margin: 30px 0 0; font-family: var(--ppm-head); font-weight: 700; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: .14em; text-transform: uppercase; color: #fff; text-shadow: 0 0 2px #fff, 0 0 12px var(--ppm-uv), 0 0 30px var(--ppm-uv); animation: ppm-sign 8s steps(1) infinite; }
/* His signature, the last sign on the page: off (black, a faint UV edge),
   then the flat colour stutters on, then the neon catches and buzzes, and it
   all dies back down before the loop starts again. */
.ppm-sig { position: relative; width: min(820px, 92%); aspect-ratio: 1800 / 467; margin: 14px auto 0; }
.ppm-sig img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ppm-sig .is-black { filter: drop-shadow(0 0 1px rgba(216, 180, 254, .7)) drop-shadow(0 0 8px rgba(168, 85, 247, .55)); }
.ppm-sig .is-colour { opacity: 0; animation: ppm-sig-colour 14s linear infinite; }
.ppm-sig .is-neon { opacity: 0; animation: ppm-sig-neon 14s linear infinite; }
.ppm-sig-glow { position: absolute; inset: -30% -4%; border-radius: 50%; background: radial-gradient(ellipse 50% 45% at 50% 50%, rgba(168, 85, 247, .4), rgba(34, 211, 238, .14) 50%, transparent 72%); opacity: 0; animation: ppm-sig-glow 14s linear infinite; }
@keyframes ppm-sig-colour {
  0%, 8% { opacity: 0; }
  8.5% { opacity: .8; } 9% { opacity: 0; } 10% { opacity: .5; } 10.5% { opacity: 0; } 12% { opacity: 1; }
  88% { opacity: 1; } 89% { opacity: .2; } 89.5% { opacity: .9; } 91% { opacity: 0; } 100% { opacity: 0; }
}
@keyframes ppm-sig-neon {
  0%, 17% { opacity: 0; }
  17.5% { opacity: 1; } 18% { opacity: .1; } 18.6% { opacity: 1; } 19.2% { opacity: 0; } 20% { opacity: .9; } 20.6% { opacity: .3; } 21.4% { opacity: 1; }
  44% { opacity: 1; } 44.4% { opacity: .3; } 44.8% { opacity: 1; } 45.4% { opacity: .6; } 45.8% { opacity: 1; }
  66% { opacity: 1; } 66.3% { opacity: .15; } 66.9% { opacity: 1; }
  84% { opacity: 1; } 84.4% { opacity: .2; } 85% { opacity: 1; } 85.6% { opacity: 0; } 86.2% { opacity: .7; } 87% { opacity: 0; } 100% { opacity: 0; }
}
@keyframes ppm-sig-glow {
  0%, 21% { opacity: 0; } 22% { opacity: 1; }
  44.4% { opacity: .4; } 44.8% { opacity: 1; } 66.3% { opacity: .2; } 66.9% { opacity: 1; }
  84% { opacity: 1; } 87% { opacity: 0; } 100% { opacity: 0; }
}

/* The menu bar, in his colours. */
body.cp-theme-thepuppetmasteeer .cpnav-in { background: rgba(10, 4, 24, .95); border-color: var(--ppm-line); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 0 22px -6px rgba(168, 85, 247, .55); }
body.cp-theme-thepuppetmasteeer .cpnav-who { color: var(--ppm-tx); border-left-color: var(--ppm-line); font-family: var(--ppm-head); font-weight: 700; letter-spacing: .06em; }
body.cp-theme-thepuppetmasteeer .cpnav-av { border-color: var(--ppm-cyan); }
body.cp-theme-thepuppetmasteeer .cpnav-links a { color: var(--ppm-tx2); font-family: var(--ppm-head); font-weight: 700; letter-spacing: .06em; }
body.cp-theme-thepuppetmasteeer .cpnav-links a:hover { color: #fff; background: rgba(168, 85, 247, .25); }
body.cp-theme-thepuppetmasteeer .cpnav-links a[aria-current="true"] { background: var(--ppm-uv); color: #fff; box-shadow: 0 0 14px rgba(168, 85, 247, .7); }
body.cp-theme-thepuppetmasteeer :is(.cpnav-burger, .cpnav-account) { background: var(--ppm-panel2); color: var(--ppm-tx); }
body.cp-theme-thepuppetmasteeer .cpnav-burger span { background: var(--ppm-cyan); }
body.cp-theme-thepuppetmasteeer .cpnav-cart { background: var(--ppm-violet); color: #fff; box-shadow: 0 0 14px rgba(168, 85, 247, .6); font-family: var(--ppm-head); font-weight: 700; }
body.cp-theme-thepuppetmasteeer .cpnav-cart:hover { background: var(--ppm-uv); }
/* The video player, in his colours. */
body.cp-theme-thepuppetmasteeer .cp-player { background: radial-gradient(ellipse at 50% 50%, rgba(46, 16, 101, .93), rgba(4, 1, 10, .97) 70%); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.cp-theme-thepuppetmasteeer .cp-player-frame { border: 2px solid #e9d5ff; border-radius: 16px; box-shadow: 0 0 0 1px var(--ppm-uv), 0 0 40px rgba(168, 85, 247, .6); }
body.cp-theme-thepuppetmasteeer .cp-player-caption { font-family: var(--ppm-head); font-weight: 700; letter-spacing: .04em; color: var(--ppm-cyan-l); }
body.cp-theme-thepuppetmasteeer .cp-player-close { background: var(--ppm-uv); color: #fff; border: 0; }

/* ---- small screens ---- */
@media (max-width: 900px) {
  .ppm-hero { padding: 150px 16px 26px; min-height: 0; }
  .ppm-hero-kick { font-size: 20px; }
  .ppm-sec { padding: 26px 18px 16px; }
  .ppm-band { width: calc(100% - 32px); }
  .ppm-about-card, .ppm-specs-card { grid-template-columns: 1fr; gap: 24px; padding: 26px 20px; }
  .ppm-about-art { max-width: 300px; margin: 0 auto; }
  .ppm-tuber { max-width: 260px; }
  .ppm-emote { width: 120px; }
  .ppm-rail { grid-auto-columns: 86%; }
  .ppm-rail.is-tall { grid-auto-columns: 58%; }
  .ppm-wake { aspect-ratio: 4 / 3.4; }
  .ppm-wake-shine { width: 74%; margin: -37% 0 0 -37%; }
  .ppm-rules-card { padding: 24px 18px; }
  .ppm-rules { grid-template-columns: 1fr; }
  .ppm-join-card { grid-template-columns: 1fr; gap: 24px; padding: 26px 20px; }
  .ppm-join-twerk { left: -10px; top: -62px; width: 110px; }
  .ppm-join-card { padding-top: 46px; }
  .ppm-join .ppm-join-copy > .ppm-kick { padding-left: 86px; }
  .ppm-sec-head { flex-wrap: wrap; }
  .ppm-uv b:nth-of-type(n+10) { display: none; }
}
@media (max-width: 560px) {
  .ppm-facts { grid-template-columns: 1fr; }
  .ppm-gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ppm-support, .ppm-soon, .ppm-rules-head { flex-direction: column; text-align: center; }
  .ppm-support .ppm-emote, .ppm-rules-head .ppm-emote { width: 140px; }
  .ppm-wake-note { right: 12px; left: 12px; text-align: center; font-size: 16px; }
}

/* ---- calmer when asked ---- */
@media (prefers-reduced-motion: reduce) {
  .ppm-uv b, .ppm-haze { display: none; }
  .ppm-tube::after, .ppm-title em, .ppm-soon-sign i, .ppm .ppm-end-line, .ppm-logo-glow, .ppm-band-buzz, .ppm-sig img, .ppm-sig-glow { animation: none !important; }
  /* His signature holds still, lit. */
  .ppm-sig .is-neon, .ppm-sig-glow { opacity: 1; }
  /* The banner holds still on its neon one. */
  .ppm-band img { animation: none !important; }
  .ppm-band .is-neon { opacity: 1; }
  .ppm-wake-tired, .ppm-wake-rays, .ppm-wake-shine { animation: none !important; transition: none; }
}
.perf-lite .ppm-uv b, .perf-lite .ppm-haze { display: none; }
.perf-lite .ppm-tube::after, .perf-lite .ppm-logo-glow, .perf-lite .ppm-band-buzz { animation: none; }
