/* The same paper and handwriting family used by the Prepbox app. */
@font-face { font-family: 'Patrick Hand'; src: url('/fonts/PatrickHand-Regular.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Kalam; src: url('/fonts/Kalam-Regular.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Kalam; src: url('/fonts/Kalam-Bold.ttf') format('truetype'); font-style: normal; font-weight: 700; font-display: swap; }
/* Page chrome, for the classroom's OWN page only (body.crv-page). Everything below is scoped to the
   room's .crv- classes, so this file can be dropped into a page that is not the classroom — the
   first-run game, the student app's sign-in screen — to bring the room to life without taking the
   page over. Before it was scoped, loading it anywhere else restyled that page's body. */
body.crv-page { margin: 0; min-height: 100%; height: 100%; }
html:has(> body.crv-page) { margin: 0; min-height: 100%; height: 100%; }
body.crv-page { display: flex; flex-direction: column; background: #F2EFE7; color: #2B2A28; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.crv-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 24px; background: rgba(255,255,255,.95); border-bottom: 1px solid #DEE5E1; }
.crv-bar h1 { display: flex; align-items: center; gap: 20px; margin: 0; }
.crv-wordmark { font-family: 'Patrick Hand', cursive; font-size: 32px; font-weight: 400; letter-spacing: -.7px; color: #173F86; }
.crv-room-title { font-size: 15px; font-weight: 550; border-left: 1px solid #D9E0DB; padding-left: 20px; }
.crv-live { font-size: 12px; font-weight: 650; color: #647471; padding: 5px 9px; border-radius: 999px; background: #F1F4F2; }
.crv-live--on { color: #367260; background: #E8F4ED; }
.crv-sub { flex: 1 1 180px; color: #62716E; font-size: 12px; line-height: 1.5; }
.crv-as { display: flex; align-items: center; gap: 8px; font-weight: 550; font-size: 13px; color: #53645D; }
.crv-as select { font: inherit; color: #253C43; padding: 9px 28px 9px 12px; border: 1px solid #D5DFDA; border-radius: 10px; background: #F7F9F6; min-width: 160px; }
.crv-btn { font: inherit; font-size: 13px; font-weight: 650; padding: 9px 14px; border: 1px solid #D5DFDA; border-radius: 10px; color: #253C43; background: #FFFFFF; cursor: pointer; }
.crv-btn:hover { background: #EAF2FC; border-color: #A9C7E5; }
.crv-btn--flyover { color: #FFF; background: #2563C9; border-color: #2563C9; box-shadow: 0 2px 6px rgba(37,99,201,.16); }
.crv-btn--flyover:hover:not(:disabled) { color: #FFF; background: #1C4FA4; border-color: #1C4FA4; }
.crv-btn--flyover:disabled { color: #FFF; background: #2563C9; border-color: #2563C9; }
.crv-flyover-controls { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.crv-motion { display: flex; align-items: center; gap: 7px; min-height: 36px; color: #53645D; font-size: 12px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.crv-motion input { appearance: none; -webkit-appearance: none; position: relative; margin: 0; width: 32px; height: 20px; border: 0; border-radius: 999px; background: #A8B5AF; cursor: pointer; }
.crv-motion input::before { content: ''; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 50%; background: #FFF; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.crv-motion input:checked { background: #2563C9; }
.crv-motion input:checked::before { transform: translateX(12px); }
.crv-motion input:focus-visible { outline: 3px solid #4098F9; outline-offset: 3px; }
.crv-motion input:disabled { opacity: .55; cursor: default; }
.crv-btn:disabled, .crv-as select:disabled { opacity: .55; cursor: default; }
.crv-flying .crv-body { overflow: hidden; }
.crv-flight-scene { pointer-events: none; }
.crv-flight-scene .crv-person, .crv-flight-scene .crv-bob { animation-play-state: paused; }
.crv-flight-layer { pointer-events: none; filter: drop-shadow(0 10px 8px rgba(37,99,201,.2)); }
.crv-flight-status { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 18px;
  border-radius: 999px; background: #FDFBF5; color: #2563C9; box-shadow: 0 4px 24px rgba(42,47,58,.16);
  font: 600 14px -apple-system,BlinkMacSystemFont,sans-serif; pointer-events: none; }
.crv-btn:focus-visible, .crv-as select:focus-visible { outline: 3px solid #4098F9; outline-offset: 3px; }
.crv-close { padding: 9px 12px; }
.crv-body { flex: 1; overflow: auto; padding: 20px 24px 24px; display: flex; justify-content: center; align-items: flex-start; }
.crv-room { font-family: 'Patrick Hand', cursive; display: block; width: 100%; max-width: calc((100vh - 120px) * 1180 / 820); height: auto; border-radius: 20px; background: #F1E7D7; box-shadow: 0 10px 30px rgba(62,53,39,.08); }
.crv-split { display: flex; flex-direction: column; gap: 24px; width: 100%; align-items: center; }
.crv-split figure { margin: 0; width: 100%; display: flex; flex-direction: column; align-items: center; }
.crv-split figure .crv-room { max-width: calc((100vh - 140px) * 1180 / 820); }
.crv-split figure .crv-room--crop { max-width: 700px; border: 1px solid #D2DCD2; }
.crv-split figcaption { font-size: 13px; font-weight: 600; margin: 4px 0 12px; color: #53635B; text-align: center; line-height: 1.5; }
.crv-msg { font-size: 18px; margin-top: 60px; max-width: 560px; text-align: center; line-height: 1.5; }
.crv-hand { font-family: Kalam, cursive; font-size: 16px; fill: #2B2A28; }
.crv-hand--bold { font-weight: 700; font-size: 18px; }
.crv-eyebrow { font-size: 13px; letter-spacing: 1.1px; font-weight: 400; fill: #625D55; }
.crv-display-title { font-size: 36px; letter-spacing: -.3px; font-weight: 400; fill: #2B2A28; }
.crv-display-detail { font-family: Kalam, cursive; font-size: 16px; font-weight: 400; fill: #625D55; }
.crv-note-title { font-family: Kalam, cursive; font-size: 15px; font-weight: 700; fill: #625D55; }
.crv-note-name { font-family: Kalam, cursive; font-size: 16px; font-weight: 400; fill: #2B2A28; }
.crv-cubby { font-size: 12px; font-weight: 400; fill: #514D45; }
.crv-cubby-duration { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 9px; font-weight: 600; fill: #635C4C; }
.crv-section { font-family: Kalam, cursive; font-size: 16px; font-weight: 700; fill: #625D55; }
.crv-section--uni { fill: #776BA1; }
.crv-section-line { font-family: Kalam, cursive; font-size: 13px; font-weight: 400; fill: #8A80A8; }
.crv-table-title { font-size: 14px; fill: #65756C; }
.crv-empty { font-size: 24px; fill: #64786B; }
.crv-brand-caption { font-family: Kalam, cursive; font-size: 13px; fill: #736F63; }
.crv-run { font-family: 'Patrick Hand', cursive; font-weight: 400; fill: #AF491D; }
.crv-name > .crv-sketch-shape { fill: #FFFEFA; stroke: #625D55; stroke-width: 1.5; }
.crv-name > .crv-sketch-echo { stroke-opacity: .3; }
.crv-name text { font-family: Kalam, cursive; font-size: 13px; font-weight: 700; fill: #2B2A28; }
.crv-name--you > .crv-sketch-shape { fill: #E1ECFD; stroke: #7CAAD2; }
.crv-name--friend > .crv-sketch-shape { fill: #FCEEF1; stroke: #BD959F; }
.crv-name--tutor > .crv-sketch-shape { fill: #E1ECFD; stroke: #7799BC; }
.crv-clickable { cursor: pointer; }
.crv-clickable:hover, .crv-clickable:focus { outline: none; filter: drop-shadow(0 0 5px rgba(37,99,201,.65)); }
.crv-student-selected { filter: drop-shadow(0 0 5px rgba(37,99,201,.8)); }
.crv-student-selected .crv-name > .crv-sketch-shape { fill: #E1ECFD; stroke: #2563C9; stroke-width: 2.5; }
.crv-friend-hint { display: block; color: #255F55; font-weight: 600; }
.crv-friend-hint[hidden] { display: none; }
.crv-friend-avatar { cursor: grab; user-select: none; }
@media (any-pointer: coarse) and (not (any-pointer: fine)) { .crv-friend-hint { display: none; } }
.crv-friend-avatar.crv-friend-source, .crv-friend-avatar.crv-friend-target {
  cursor: grabbing;
  filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 6px #0F766E);
}
.crv-friend-line {
  position: fixed;
  z-index: 2;
  height: 3px;
  background: #0F766E;
  border-radius: 3px;
  box-shadow: 0 0 0 1px #fff;
  pointer-events: none;
  transform-origin: left center;
}
@media (max-width: 700px) { .crv-bar { padding: 12px; gap: 10px; } .crv-sub { order: 5; flex-basis: 100%; } .crv-as { margin-left: auto; } .crv-body { padding: 10px 8px 16px; } .crv-room { min-width: 660px; } .crv-body { justify-content: flex-start; } .crv-split { align-items: flex-start; } }

/* the room is alive (the iPad's hallLife): everyone bobs on their own beat; stickers move */
@keyframes crv-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes crv-wave { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(14deg); } }
@keyframes crv-spin { to { transform: rotate(360deg); } }
@keyframes crv-dots { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes crv-scribble { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(2px, 1px); } 50% { transform: translate(-1px, 2px); } 75% { transform: translate(1px, -1px); } }
@keyframes crv-ink { 0% { stroke-dashoffset: 10; } 60%, 100% { stroke-dashoffset: 0; } }
@keyframes crv-cheer { 0% { transform: translateY(8px) scale(0.4); opacity: 0; } 20% { transform: translateY(0) scale(1.15); opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-14px) scale(1); opacity: 0; } }
@keyframes crv-flicker { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
/* Both loop boundaries are outside the window; the bird rests offscreen between passes. */
@keyframes crv-cloud-drift { from { transform: translate(-54px, 0); } to { transform: translate(338px, 0); } }
@keyframes crv-bird-flight {
  0% { transform: translate(-34px, 112px) rotate(-4deg); }
  10% { transform: translate(80px, 100px) rotate(-6deg); }
  20% { transform: translate(198px, 110px) rotate(5deg); }
  30%, 100% { transform: translate(328px, 87px) rotate(-4deg); }
}
@keyframes crv-bird-flap {
  0%, 100% { transform: rotate(-10deg) scaleY(1); }
  50% { transform: rotate(20deg) scaleY(.25); }
}
.crv-window-cloud { animation: crv-cloud-drift 72s linear infinite; }
.crv-window-bird { animation: crv-bird-flight 36s linear infinite; }
.crv-bird-wing { animation: crv-bird-flap .9s ease-in-out infinite; }
.crv-window-cloud, .crv-window-bird, .crv-bird-wing { transform-box: view-box; transform-origin: 0 0; }

.crv-person, .crv-bob { animation: crv-bob 2.6s ease-in-out infinite; }
.crv-person.crv-still { animation: none; }
.crv-wave { transform-box: fill-box; transform-origin: 50% 100%; animation: crv-wave 0.9s ease-in-out infinite; }
.crv-spin { transform-box: fill-box; transform-origin: center; animation: crv-spin 2.4s linear infinite; }
.crv-dots circle { animation: crv-dots 1.2s ease-in-out infinite; }
.crv-dots circle:nth-child(2) { animation-delay: 0.2s; }
.crv-dots circle:nth-child(3) { animation-delay: 0.4s; }
.crv-scribble { animation: crv-scribble 0.5s steps(4) infinite; }
.crv-ink { stroke-dasharray: 10; animation: crv-ink 1.8s linear infinite; }
.crv-cheer { transform-box: fill-box; transform-origin: center; animation: crv-cheer 1.8s ease-out forwards; }
.crv-fire { transform-box: fill-box; transform-origin: 50% 100%; animation: crv-flicker 0.9s ease-in-out infinite; }
.crv-fire.crv-fire-static { animation: none; }

/* Wave at the table, walk to the doorway, then disappear. Timestamp-based delays survive live redraws. */
@keyframes crv-goodbye {
  0%, 29% { transform: translate(0, 0); opacity: 1; }
  90% { transform: translate(var(--leave-x), var(--leave-y)); opacity: 1; }
  100% { transform: translate(var(--leave-x), var(--leave-y)); opacity: 0; }
}
.crv-goodbye { animation: crv-goodbye 4.8s ease-in-out both; pointer-events: none; }
.crv-goodbye-hand { transform-box: fill-box; transform-origin: 10% 100%; animation: crv-wave 0.45s ease-in-out infinite; }

/* Coming in (Min 2026-10-10): walk in from the doorway, take the chair, say hi; a classmate says hi back. */
@keyframes crv-arrive {
  0% { transform: translate(var(--from-x), var(--from-y)); opacity: 0; }
  6% { opacity: 1; }
  40% { opacity: 1; }
  46%, 100% { transform: translate(0, 0); opacity: 0; }
}
@keyframes crv-arrive-seat { 0%, 40% { opacity: 0; } 46%, 100% { opacity: 1; } }
@keyframes crv-hello { 0%, 48% { opacity: 0; transform: scale(.5); } 54% { opacity: 1; transform: scale(1.08); } 58%, 92% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes crv-hello-back { 0%, 60% { opacity: 0; transform: scale(.5); } 66% { opacity: 1; transform: scale(1.08); } 70%, 94% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes crv-byeback { 0%, 4% { opacity: 0; transform: scale(.5); } 9% { opacity: 1; transform: scale(1.08); } 12%, 40% { opacity: 1; transform: scale(1); } 48%, 100% { opacity: 0; } }
.crv-arrive { animation: crv-arrive 5.6s ease-in-out both; pointer-events: none; }
.crv-arrive-seat { animation: crv-arrive-seat 5.6s linear both; }
.crv-say { transform-box: fill-box; transform-origin: 50% 100%; opacity: 0; }
.crv-say-text { font-family: Kalam, cursive; font-weight: 700; fill: #2B2A28; }
.crv-hello { animation: crv-hello 5.6s ease-out both; }
.crv-hello--back { animation-name: crv-hello-back; }
.crv-byeback { animation: crv-byeback 4.8s ease-out both; }
@keyframes crv-lobby-say { 0% { opacity: 0; transform: scale(.5); } 8% { opacity: 1; transform: scale(1.08); } 12%, 100% { opacity: 1; transform: scale(1); } }
.crv-say--lobby { animation: crv-lobby-say 6s ease-out both; }

/* The break corner: steam curls up, mugs lift for a sip, the coffee machine drips, two on the couch chat. */
@keyframes crv-steam { 0% { transform: translateY(2px); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-7px); opacity: 0; } }
@keyframes crv-sip { 0%, 78%, 100% { transform: translate(0, 0) rotate(0deg); } 84%, 92% { transform: translate(-5px, -9px) rotate(-18deg); } }
@keyframes crv-drip { 0%, 40% { transform: translateY(0); opacity: 0; } 45% { opacity: 1; } 80% { transform: translateY(9px); opacity: 1; } 85%, 100% { transform: translateY(9px); opacity: 0; } }
@keyframes crv-lounge-chat { 0%, 100% { opacity: 0; } 15%, 55% { opacity: 1; } 65% { opacity: 0; } }
.crv-steam { animation: crv-steam 2.4s ease-out infinite; }
.crv-sip { transform-box: fill-box; transform-origin: 30% 100%; animation: crv-sip 5.2s ease-in-out infinite; }
.crv-drip { animation: crv-drip 1.6s ease-in infinite; }
.crv-lounge-chat { animation: crv-lounge-chat 6s ease-in-out infinite; }
.crv-person.crv-person--break { animation-duration: 3.4s; }
.crv-section--lounge { fill: #9A6447; }

/* Uni leans into the same notebook as the student; phases stay steady across socket redraws. */
@keyframes crv-uni-pop { 0% { transform: translateY(5px) scale(0.35); opacity: 0; } 65% { transform: translateY(-1px) scale(1.08); opacity: 1; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes crv-uni-nod { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.2px); } }
@keyframes crv-uni-pencil { 0%, 100% { transform: rotate(-5deg) translate(0, 0); } 50% { transform: rotate(4deg) translate(-1px, 0.5px); } }
@keyframes crv-uni-ink { 0%, 15% { stroke-dashoffset: 16; } 85%, 100% { stroke-dashoffset: 0; } }
.crv-uni-work { pointer-events: none; }
.crv-uni-pop { transform-box: fill-box; transform-origin: 35% 100%; animation: crv-uni-pop 400ms ease-out both; }
.crv-person.crv-person--uni-work, .crv-uni-nod { animation: crv-uni-nod 2.2s ease-in-out infinite; }
.crv-uni-pencil { transform-box: fill-box; transform-origin: 20% 80%; animation: crv-uni-pencil 1.1s ease-in-out infinite; }
.crv-uni-ink path { stroke-dasharray: 16; animation: crv-uni-ink 1.1s linear infinite; animation-delay: inherit; }

/* Halloween's trim (room-scene.js halloweenBack): a bat crosses the back and climbs, its wings beat, a candle
   breathes in each pumpkin, and the spider swings on its thread. All decoration — stilled below, where the trim
   simply holds its first frame: the bat parks where it set off, the candles stay lit, the spider hangs. */
@keyframes crv-bat-fly {
  0% { transform: translate(var(--bat-from), 0); }
  50% { transform: translate(calc((var(--bat-from) + var(--bat-to)) / 2), var(--bat-rise)); }
  100% { transform: translate(var(--bat-to), 0); }
}
@keyframes crv-bat-flap { 0%, 100% { transform: scaleY(.72); } 50% { transform: scaleY(1.12); } }
@keyframes crv-candle { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }
@keyframes crv-spider-swing { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(4px); } }
.crv-spooky-bat { animation: crv-bat-fly 15s ease-in-out infinite alternate; }
.crv-spooky-flap { transform-box: fill-box; transform-origin: center; animation: crv-bat-flap .76s ease-in-out infinite; }
.crv-spooky-candle { animation: crv-candle 1.1s ease-in-out infinite; }
.crv-spooky-spider { animation: crv-spider-swing 4.8s ease-in-out infinite; }
.crv-spooky-bat, .crv-spooky-spider { transform-box: view-box; }

/* The monsters wandering the floor: out to the far end and back, turning on the spot rather than moonwalking
   home, with their legs out of step. Stilled below, each parked at the end it set off from. */
@keyframes crv-monster-walk {
  0% { transform: translateX(var(--mon-from)) scaleX(1); }
  49.9% { transform: translateX(var(--mon-to)) scaleX(1); }
  50% { transform: translateX(var(--mon-to)) scaleX(-1); }
  100% { transform: translateX(var(--mon-from)) scaleX(-1); }
}
@keyframes crv-monster-step { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes crv-monster-float { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-5px); } }
.crv-monster { transform-box: fill-box; transform-origin: 50% 100%; animation: crv-monster-walk 96s ease-in-out infinite; }
.crv-monster-leg { transform-box: fill-box; transform-origin: 50% 50%; animation: crv-monster-step 1.8s ease-in-out infinite; }
.crv-monster-leg--back { animation-direction: reverse; }
.crv-monster-float { transform-box: fill-box; transform-origin: 50% 100%; animation: crv-monster-float 5.2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .crv-person, .crv-person.crv-person--uni-work, .crv-bob, .crv-wave, .crv-spin, .crv-dots circle, .crv-scribble, .crv-ink, .crv-fire, .crv-cheer, .crv-goodbye, .crv-goodbye-hand, .crv-uni-pop, .crv-uni-nod, .crv-arrive, .crv-arrive-seat, .crv-steam, .crv-sip, .crv-drip, .crv-lounge-chat, .crv-uni-pencil, .crv-uni-ink path { animation: none; }
  .crv-window-cloud, .crv-window-bird, .crv-bird-wing { animation: none; }
  .crv-say { animation: none; opacity: 1; }
  .crv-window-bird { display: none; }
  /* Halloween's trim holds its first frame: the bat parks where it set off, the candles stay lit, the spider hangs */
  .crv-spooky-bat, .crv-spooky-flap, .crv-spooky-candle, .crv-spooky-spider { animation: none; }
  .crv-spooky-bat { transform: translate(var(--bat-from), 0); }
  .crv-monster, .crv-monster-leg, .crv-monster-float { animation: none; }
  .crv-monster { transform: translateX(var(--mon-from)); }
}

/* Ziggy, the teaching assistant (ziggy.js): bobs while walking, its speech is a little bigger than name tags. */
.ziggy-walking .ziggy-bob { animation: crv-bob 0.5s ease-in-out infinite; }
.ziggy-say { font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .ziggy-walking .ziggy-bob { animation: none; } }

/* Streak power-up (Min 2026-10-29: "no animation? create them"), timed as the iPad plays it (classVibes.tsx). Each
   is started at -elapsed by room-scene.js, so a redraw picks it up mid-way. 1.2 s in all. */
@keyframes crv-fire-power { 0% { transform: scale(1); } 12.5% { transform: scale(0.42); animation-timing-function: ease-out; } 26.7% { transform: scale(1.6); } 40% { transform: scale(0.9); } 52% { transform: scale(1.06); } 64% { transform: scale(0.98); } 100% { transform: scale(1); } }
.crv-fire-power { transform-box: view-box; animation: crv-fire-power 1.2s ease-in both; }
@keyframes crv-power-ring { 0% { opacity: 0; transform: scale(0.25); } 8% { opacity: 0.85; } 100% { opacity: 0; transform: scale(1.9); } }
.crv-power-ring { transform-box: view-box; opacity: 0; animation: crv-power-ring 0.54s ease-out both; }
/* the strobe: the look being left on the even flips (0, 200, 340, 445 ms), the new colour from 490 ms on */
@keyframes crv-strobe-old { 0% { opacity: 1; } 9.17% { opacity: 0; } 16.67% { opacity: 1; } 22.92% { opacity: 0; } 28.33% { opacity: 1; } 32.92% { opacity: 0; } 37.08% { opacity: 1; } 40.83% { opacity: 0; } 100% { opacity: 0; } }
@keyframes crv-strobe-new { 0% { opacity: 0; } 9.17% { opacity: 1; } 16.67% { opacity: 0; } 22.92% { opacity: 1; } 28.33% { opacity: 0; } 32.92% { opacity: 1; } 37.08% { opacity: 0; } 40.83% { opacity: 1; } 100% { opacity: 1; } }
.crv-strobe-old { animation: crv-strobe-old 1.2s step-end both; }
.crv-strobe-new { animation: crv-strobe-new 1.2s step-end both; }
/* the updraft: spikes rake over, back, over (90 ms a pose); rising flames sway about the head */
@keyframes crv-whip-0 { 0% { opacity: 1; } 25% { opacity: 0; } 100% { opacity: 0; } }
@keyframes crv-whip-1 { 0% { opacity: 0; } 25% { opacity: 1; } 50% { opacity: 0; } 75% { opacity: 1; } 100% { opacity: 1; } }
@keyframes crv-whip-2 { 0% { opacity: 0; } 50% { opacity: 1; } 75% { opacity: 0; } 100% { opacity: 0; } }
.crv-whip-0 { animation: crv-whip-0 0.36s step-end infinite; }
.crv-whip-1 { opacity: 0; animation: crv-whip-1 0.36s step-end infinite; }
.crv-whip-2 { opacity: 0; animation: crv-whip-2 0.36s step-end infinite; }
@keyframes crv-sway { 0% { transform: rotate(0deg); } 25% { transform: rotate(7deg); } 50% { transform: rotate(-6deg); } 75% { transform: rotate(7deg); } 100% { transform: rotate(0deg); } }
.crv-sway { transform-box: view-box; transform-origin: 50px 44px; animation: crv-sway 0.36s step-end infinite; }
/* a tablemate powered up: up 9 with a tilt in 150 ms, stare, spring back down */
@keyframes crv-startle { 0% { transform: translateY(0) rotate(0deg); } 12.5% { transform: translateY(var(--lift)) rotate(-4deg); animation-timing-function: linear; } 62% { transform: translateY(var(--lift)) rotate(-4deg); animation-timing-function: ease-in; } 76% { transform: translateY(1.5px) rotate(0.5deg); } 88% { transform: translateY(-1px) rotate(0deg); } 100% { transform: translateY(0) rotate(0deg); } }
.crv-startle { transform-box: view-box; animation: crv-startle 1.2s cubic-bezier(0.34, 1.8, 0.64, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .crv-fire-power, .crv-power-ring, .crv-strobe-old, .crv-strobe-new, .crv-whip-0, .crv-whip-1, .crv-whip-2, .crv-sway, .crv-startle { animation: none; }
  .crv-strobe-old, .crv-power-ring, .crv-whip-1, .crv-whip-2 { opacity: 0; }
}

/* A private, brief bump: keep the earned flame lit while a few sparks bounce away. */
@keyframes crv-flame-bump { 0%,100% { transform:translateX(0) rotate(0) scale(1) } 20% { transform:translateX(-4px) rotate(-8deg) scale(.92) } 45% { transform:translateX(4px) rotate(6deg) scale(.97) } 70% { transform:translateX(-2px) rotate(-3deg) scale(1) } }
@keyframes crv-flame-spark { 0% { transform:translate(0,0);opacity:1 } 40% { transform:translate(calc(var(--spark-x)*.6),-18px);opacity:1 } 100% { transform:translate(var(--spark-x),var(--spark-y));opacity:0 } }
.crv-flame-bump { animation:crv-flame-bump 650ms ease-out both; }
.crv-flame-spark { animation:crv-flame-spark 650ms ease-out both;pointer-events:none; }
@media(prefers-reduced-motion:reduce) { .crv-flame-bump { animation:none; } .crv-flame-spark { display:none; } }
/* Silver at 25 (Min 2026-11-16): electricity runs INSIDE the flame — nothing leaves the silhouette.
   Four frames of arcs step at 85ms (a 340ms round), and under them a 1.15s beat: a charge climbing from
   the base and the whole flame flashing white-hot. Each seat's fire is phased off its own key, so a table
   of silver students crackles out of step instead of as one. */
@keyframes crv-arc-0 { 0% { opacity: 1; } 25% { opacity: 0; } 100% { opacity: 0; } }
@keyframes crv-arc-1 { 0% { opacity: 0; } 25% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }
@keyframes crv-arc-2 { 0% { opacity: 0; } 50% { opacity: 1; } 75% { opacity: 0; } 100% { opacity: 0; } }
@keyframes crv-arc-3 { 0% { opacity: 0; } 75% { opacity: 1; } 100% { opacity: 1; } }
.crv-arc { opacity: 0; pointer-events: none; }
.crv-arc-0 { animation: crv-arc-0 340ms step-end infinite; }
.crv-arc-1 { animation: crv-arc-1 340ms step-end infinite; }
.crv-arc-2 { animation: crv-arc-2 340ms step-end infinite; }
.crv-arc-3 { animation: crv-arc-3 340ms step-end infinite; }
.crv-arc.crv-arc-static { animation: none; opacity: 1; }
@keyframes crv-arc-pulse { 0% { opacity: 0; } 4% { opacity: 0.9; } 10% { opacity: 0.55; } 30%, 100% { opacity: 0; } }
.crv-arc-pulse { opacity: 0; pointer-events: none; animation: crv-arc-pulse 1150ms ease-out infinite; }
/* the charge climbs the flame and thins out as the flame narrows, so it stays inside the shape */
@keyframes crv-arc-charge {
  0% { opacity: 0; transform: translateY(0) scale(1); }
  8% { opacity: 0.34; }
  40% { opacity: 0.2; }
  60%, 100% { opacity: 0; transform: translateY(-17px) scale(0.38); }
}
.crv-arc-charge { opacity: 0; pointer-events: none; transform-box: view-box; transform-origin: 12px 25px;
  animation: crv-arc-charge 1150ms ease-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .crv-arc { animation: none; }
  .crv-arc-0 { opacity: 1; }
  .crv-arc-pulse, .crv-arc-charge { animation: none; opacity: 0; }
}

/* Rainbow at 35 (Min 2026-11-07): little stars wink on and off around the head. */
@keyframes crv-twinkle { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 18% { opacity: 1; transform: scale(1.15) rotate(20deg); } 36% { opacity: 1; transform: scale(0.9) rotate(45deg); } 52% { opacity: 0; transform: scale(0.3) rotate(70deg); } }
.crv-twinkle { transform-box: view-box; opacity: 0; animation: crv-twinkle 1.6s ease-in-out infinite; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .crv-twinkle { animation: none; opacity: 0.9; } }
