/* The Boo Badge and Professor Boo: the Confetti Badge's shape (dim, hero in
   the middle, glowing round badge in the corner with a seconds pill) in the
   You've Been Boo'ed palette. Loads site-wide, so the colors are literal. */
.rt-bb-dim { position: fixed; inset: 0; z-index: 9700; background: rgba(27, 20, 48, 0.78); opacity: 0; transition: opacity 0.35s; }
.rt-bb-dim.is-on { opacity: 1; }
.rt-bb-hero { position: fixed; left: 50%; top: 50%; z-index: 9701; transform: translate(-50%, -50%) scale(0.6); opacity: 0; display: grid; justify-items: center; gap: 0.6rem; text-align: center; transition: transform 0.5s cubic-bezier(0.22, 1.2, 0.36, 1), opacity 0.35s; }
.rt-bb-hero.is-on { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.rt-bb-hero b { color: #fff; font-size: 1.6rem; line-height: 1.15; letter-spacing: 0.06em; text-transform: uppercase; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45); }
.rt-bb-hero b span { display: block; white-space: nowrap; }
.rt-bb-hero b .rt-bb-t2 { color: #ffb066; }
.rt-bb-hero > span { color: #fff6e9; font-size: 0.95rem; }
.rt-bb-hero > span > span { display: block; max-width: 34ch; margin: 0 auto 0.35rem; }
.rt-bb-hero .rt-bb-note { color: #fff; font-weight: 800; font-size: 1.05rem; }

/* The badge button: Professor Boo in his cap, orange glow, glints. */
.rt-bb-btn { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; overflow: visible; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; background: radial-gradient(circle at 40% 35%, #7a3fae, #3a1a5c 72%); color: #fff; font-size: 1.5rem; cursor: pointer; box-shadow: 0 0 0 4px rgba(255, 176, 102, 0.9), 0 0 22px 6px rgba(242, 107, 29, 0.55), 0 8px 24px rgba(0, 0, 0, 0.35); transition: transform 0.15s; animation: rt-bb-glow 1.6s ease-in-out infinite alternate; }
.rt-bb-btn--big { width: 120px; height: 120px; font-size: 3.2rem; }
@media (hover: hover) { .rt-bb-btn:hover { transform: scale(1.08); } }
.rt-bb-btn i { display: inline-block; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)); }
@keyframes rt-bb-glow {
  from { box-shadow: 0 0 0 4px rgba(255, 176, 102, 0.9), 0 0 18px 4px rgba(242, 107, 29, 0.45), 0 8px 24px rgba(0, 0, 0, 0.35); }
  to { box-shadow: 0 0 0 5px #ffb066, 0 0 34px 12px rgba(242, 107, 29, 0.7), 0 8px 24px rgba(0, 0, 0, 0.35); }
}
/* The professor's cap: board and crown, scaled with the button. */
.rt-bb-cap { position: absolute; top: 9%; left: 50%; width: 46%; height: 12%; margin-left: -29%; background: #1b1430; transform: skewX(-20deg) rotate(-8deg); border-radius: 2px; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); pointer-events: none; }
.rt-bb-cap::after { content: ""; position: absolute; left: 30%; top: 90%; width: 40%; height: 70%; background: #1b1430; border-radius: 0 0 6px 6px; }
.rt-bb-glint { position: absolute; width: 10px; height: 10px; pointer-events: none; background: #ffe3b3; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 4px #ffb066); animation: rt-bb-twinkle 1.5s ease-in-out infinite; opacity: 0; }
.rt-bb-glint:nth-of-type(1) { top: -6px; right: -2px; }
.rt-bb-glint:nth-of-type(2) { bottom: -4px; left: -6px; width: 8px; height: 8px; animation-delay: 0.5s; }
.rt-bb-glint:nth-of-type(3) { top: 40%; left: -9px; width: 7px; height: 7px; animation-delay: 1s; }
.rt-bb-glint:nth-of-type(4) { top: -8px; left: 35%; width: 6px; height: 6px; animation-delay: 0.25s; }
.rt-bb-btn--big .rt-bb-glint { width: 18px; height: 18px; }
@keyframes rt-bb-twinkle { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0); } 50% { opacity: 1; transform: scale(1.25) rotate(45deg); } }

/* The corner: bubble above, badge and seconds below. */
.rt-bb-corner { position: fixed; right: 1rem; bottom: 5.2rem; z-index: 9600; display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; transition: opacity 0.6s; pointer-events: none; }
.rt-bb-corner > * { pointer-events: auto; }
.rt-bb-row { display: flex; align-items: center; gap: 0.6rem; }
.rt-bb-corner:not(.is-still) .rt-bb-btn { animation: rt-bb-glow 1.6s ease-in-out infinite alternate, rt-bb-float 3.2s ease-in-out infinite; }
.rt-bb-corner.is-poke .rt-bb-btn { animation: rt-bb-hop 0.5s ease-out; }
.rt-bb-time { min-width: 2.4em; padding: 0.3em 0.6em; border-radius: 999px; background: #fff; color: #5b2a86; font-weight: 800; font-size: 0.9rem; font-variant-numeric: tabular-nums; text-align: center; box-shadow: 0 0 12px rgba(255, 176, 102, 0.8), 0 4px 12px rgba(0, 0, 0, 0.2); }
.rt-bb-say { max-width: min(72vw, 300px); padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: #fff6e9; color: #241a3a; font: 700 0.9rem/1.35 system-ui, sans-serif; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(255, 176, 102, 0.6); opacity: 0; transform: translateY(6px) scale(0.96); transition: opacity 0.25s ease, transform 0.25s ease; }
.rt-bb-say.is-on { opacity: 1; transform: none; }
@keyframes rt-bb-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-7px) rotate(3deg); } }
@keyframes rt-bb-hop { 0% { transform: translateY(0); } 40% { transform: translateY(-14px) scale(1.08); } 100% { transform: translateY(0); } }
@media (max-width: 720px) { .rt-bb-corner { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .rt-bb-btn, .rt-bb-glint, .rt-bb-corner .rt-bb-btn { animation: none; } }
