/* Scroll performance (loaded last). Keeps the look, swaps expensive effects for cheap ones.
   The river is sticky, so everything inside it is repainted while the page scrolls — keep it light. */

/* 1. no live blur behind big surfaces (the most expensive effect on iOS Safari) */
.sheet .card { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 255, 255, .97); }
.studio-bar, .round, .world-count, .music-btn[aria-pressed="true"] { backdrop-filter: none; -webkit-backdrop-filter: none; }
.studio-bar { background: rgba(255, 255, 255, .98); }
.round { background: rgba(255, 255, 255, .2); }

/* 2. the river gets its own compositing layer; nothing inside it leaks repaints to the page */
.scene { transform: translateZ(0); contain: layout paint; }
.water, .sky { contain: layout paint; }

/* 3. drifting krathongs: no per-item drop-shadow filter, no animations inside their SVGs */
.drifter { filter: none; will-change: transform; }
.drifter .kflame, .drifter .ember, .drifter .twinkle, .drifter .flutter, .drifter .flame { animation: none !important; }
.drifter .ksparkles { display: none; }

/* 4. far-bank lightsticks: blink with opacity only (no animated glow) */
.crowd i { box-shadow: none; }
.scene.cheer .crowd i { box-shadow: none; }

/* 5. lanterns: cheaper glow */
.lantern { box-shadow: 0 0 8px 2px rgba(255, 170, 80, .35); will-change: transform, opacity; }

/* phones and touch screens: fewer moving parts */
@media (max-width: 760px), (hover: none) {
  .stars span:nth-child(3n), .stars span:nth-child(3n + 1) { display: none; }
  .crowd i:nth-child(2n) { display: none; }
  .lantern:nth-child(n + 5) { display: none; }
  .lantern { box-shadow: none; }
  .moon { box-shadow: 0 0 30px 8px rgba(255, 233, 168, .3); }
  .moon-glow { display: none; }
  .waves.w2 { display: none; }
  .glow, .reflect { will-change: auto; }
  .fest, .result, .modal { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .fest-card, .ck, .tcard { animation: none; }
}
