/* The power-ups' marks on the photo: the Bomb's blast and burn mark, the Radar's rings, dish and beacon, the Compass and
   its cone, the Searchlight's night. Drawn by js/bonuses.js into the photo's marks layer, in % of the photo (they zoom
   with it); a size in px stays the same on screen at any zoom through --zoom (js/zoom.js) and --k (the app's tablet zoom,
   1 on the website).
   One file for the app (before app/app.css) and the website (owner, 2026-12-01: the same game in both;
   docs/FEATURE_WEBSITE_POWERUPS.md). Moved word for word from app/app.css "Bonuses". The buttons, the pop-ups and the
   tutorial stay with each page: they follow its own look.
   iPhones: read docs/ARCHITECTURE.md "SPEED RULES" before changing anything here (nothing big in % of the photo, no
   filter or mask over it). */
/* Bomb: the blast, then the burn mark ("already tried here"). Pieces of one Higgsfield picture (owner, 2026-10-21;
   tools/mascot/bomb-blast.py -> assets/ui/bn-boom-*.webp), placed by bonuses.js boom() in % of the bomb's circle
   (.bn-boom = the circle): the fireball fills it, the shockwave ring stops on its edge, rocks and sparks fly past it,
   smoke clears on the burn mark. About 1 s. Each piece: a square box --w wide (% of the circle) at the centre, moved
   with translate (in % of its own size), turned with rotate, sized with scale */
.bn-scorch, .bn-boom { position: absolute; transform: translate(-50%, -50%); }
.bn-scorch { background: url("/assets/ui/bn-boom-burn.webp") center / 100% 100% no-repeat; opacity: 0.94; }
/* Just thrown: it shows under the smoke once the fire is gone (the fading yellow fire over it looked olive green) */
.bn-scorch.fresh { animation: bnScorch 0.9s ease-out backwards; }
@keyframes bnScorch { 0%, 55% { opacity: 0; } 72% { opacity: 0.94; } }
.bn-boom { z-index: 2; pointer-events: none; }
.bn-boom > * {
  position: absolute; left: 50%; top: 50%; width: var(--w); aspect-ratio: 1; margin: calc(var(--w) / -2) 0 0 calc(var(--w) / -2);
  object-fit: contain; opacity: 0; animation: var(--t, 0.6s) ease-out var(--d, 0s) both;
}
.bm-flash { animation-name: bmFlash; animation-duration: 0.24s; rotate: var(--r0); }
@keyframes bmFlash { 0% { opacity: 1; scale: 0.3; } 40% { opacity: 1; } 100% { opacity: 0; scale: 1.15; } }
/* The fire stays full, then goes quickly into the smoke under it (a slow fade looked muddy over the photo) */
.bm-fire { animation-name: bmFire; animation-duration: 0.58s; animation-timing-function: linear; }
@keyframes bmFire {
  0% { opacity: 1; scale: 0.15; rotate: var(--r0); animation-timing-function: cubic-bezier(0.25, 0.8, 0.4, 1); }
  30% { scale: 0.8; animation-timing-function: ease-out; }
  45% { scale: 1; animation-timing-function: linear; }
  72% { opacity: 1; scale: 1.03; animation-timing-function: ease-in; }
  100% { opacity: 0; scale: 1.07; rotate: var(--r1); }
}
/* The shockwave: drawn here (sharp at any size), its bright line ends exactly on the bomb's edge */
.bm-ring {
  border-radius: 50%; animation-name: bmRing; animation-duration: 0.3s; animation-timing-function: cubic-bezier(0.1, 0.8, 0.3, 1);
  background: radial-gradient(closest-side, rgba(255, 190, 80, 0) 74%, rgba(255, 190, 80, 0.5) 88%, #fffbe8 95%, #fff 96.5%, rgba(255, 140, 40, 0.75) 98.5%, rgba(255, 120, 30, 0) 100%);
}
@keyframes bmRing { 0% { opacity: 1; scale: 0.25; } 50% { opacity: 1; } 100% { opacity: 0; scale: 1; } }
.bm-rock { animation-name: bmFly; animation-timing-function: cubic-bezier(0.15, 0.7, 0.35, 1); }
@keyframes bmFly { 0% { opacity: 1; translate: var(--x0) var(--y0); rotate: 0deg; scale: 1; } 65% { opacity: 1; } 100% { opacity: 0; translate: var(--x) var(--y); rotate: var(--rot); scale: 0.8; } }
.bm-spark { animation-name: bmSpark; animation-timing-function: cubic-bezier(0.2, 0.8, 0.4, 1); rotate: var(--rot); }
@keyframes bmSpark { 0% { opacity: 1; translate: var(--x0) var(--y0); scale: 1; } 60% { opacity: 1; } 100% { opacity: 0; translate: var(--x) var(--y); scale: 0.5; } }
.bm-smoke { animation-name: bmSmoke; }
.bm-smoke.flip { transform: scaleX(-1); }
@keyframes bmSmoke {
  0% { opacity: 0; translate: var(--x0) var(--y0); scale: 0.75; }
  15% { opacity: 0.95; }
  45% { opacity: 0.95; }
  100% { opacity: 0; translate: var(--x) var(--y); scale: 1.25; }
}
.bn-shake { animation: bnShake 0.5s ease-out; }
@keyframes bnShake { 12% { transform: translate(-8px, 4px); } 26% { transform: translate(7px, -5px); } 42% { transform: translate(-5px, -3px); } 58% { transform: translate(4px, 3px); } 78% { transform: translate(-2px, 1px); } }
/* Radar ("sonar" in the code): green rings going out across the photo, drawn on one board-sized canvas (bonuses.js
   ripples(); never elements sized on the zoomed photo: iPhones ran out of memory, 2026-10-23), and the dish + beacon */
.bn-rings { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* The Radar on the spot (owner, 2026-10-21; js/bonuses.js radar()): a radar dish seen from above turning while it
   scans, then the rotating beacon with the answer (the owner's picture, its mirror turning inside), both centred on the
   spot, the same size on screen at any zoom. The dish is a sheet of 24 angles (6 x 4) the code steps through */
.bn-radar { position: absolute; width: 0; height: 0; pointer-events: none; scale: calc(var(--k, 1) / var(--zoom, 1)); }
.bn-radar { --c: 90, 150, 255; }
.bn-radar.hot { --c: 255, 60, 40; }
.bn-radar.warm { --c: 255, 170, 40; }
.bn-radar.gone { opacity: 0; transition: opacity 0.35s; }
.br-dish, .br-beacon {
  position: absolute; left: 0; top: 0; background-repeat: no-repeat; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.55));
}
.br-dish { width: 36px; height: 36px; margin: -18px 0 0 -18px; background-image: url('/assets/ui/bn-radar-dish.webp'); background-size: 600% 400%; }
/* The beacon and its turning mirror drawn over it (bonuses.js beaconMirror) */
.br-beacon { width: 20px; height: 20px; margin: -10px 0 0 -10px; }   /* half size (owner, 2026-10-21: hides less of the photo; was 40) */
.br-beacon > span { position: absolute; inset: 0; }
.bb-pic, .bb-hi { background: center / contain no-repeat; }
.bb-hi { mix-blend-mode: screen; filter: brightness(0.55) contrast(6); }   /* only the brightest edges and reflections */
.bb-shade { clip-path: polygon(17% 6%, 83% 6%, 88% 15%, 92% 72%, 8% 72%, 12% 15%); }   /* the glass: shadow / beam side */
.br-beacon > .bb-back, .br-beacon > .bb-front { inset: auto; top: 38%; border-radius: 50%; transform: translate(-50%, -50%); }
/* the mirror's back: pure black, irregular (wide top, the bulb socket notch, uneven sides) */
.bb-back { height: 52%; background: #000; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='0.9'/%3E%3C/filter%3E%3Cpath filter='url(%23b)' fill='black' d='M9,21 C11,11 25,8 36,10 C41,11 41,25 50,27 C59,25 60,11 64,9 C75,7 89,11 91,22 C94,36 92,51 90,63 C87,79 72,87 59,90 C56,95 46,95 42,91 C29,88 14,81 10,67 C6,53 7,35 9,21 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='0.9'/%3E%3C/filter%3E%3Cpath filter='url(%23b)' fill='black' d='M9,21 C11,11 25,8 36,10 C41,11 41,25 50,27 C59,25 60,11 64,9 C75,7 89,11 91,22 C94,36 92,51 90,63 C87,79 72,87 59,90 C56,95 46,95 42,91 C29,88 14,81 10,67 C6,53 7,35 9,21 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.bb-front { height: 56%; background: radial-gradient(closest-side, #fff 0 50%, rgba(255, 250, 240, 0.95) 66%, rgba(var(--c), 0.7) 86%, rgba(var(--c), 0)); }
/* Compass: a short cone toward the sniper, only its edges (the photo isn't darkened) + the compass.
   Just placed (owner, 2026-10-23), about 2 s: it drops in (0.3 s, dust ring), the needle spins, hunts and locks at 1.4 s
   (gold glint on its tip, the compass bumps; sound.js "compass", a buzz), the edges trace out from it (1.35 s) and a gold
   light sweeps once through the cone (1.45 s) then fades. Coming back to the photo: all of it still. */
/* The cone: a small square box (2 x the cone's length) centred on the compass, in % of the photo (bonuses.js drawSlice) */
.bn-cone { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
/* The edges (owner, 2026-10-23: the white lines with a black outline looked "made in Paint"): two gold blades, wide at
   the compass and sharp at the end, polished (light middle, amber sides) with a thin dark border so they show on light and
   dark photos, and an arrowhead at each end (a dotted arc joining the tips was removed by the owner the same day). Same
   thickness on screen at any zoom (--u); each arm starts at the compass and turns to its angle (0 = right, clockwise) */
.bn-cone { --u: calc(var(--k, 1) / var(--zoom, 1)); }
.cn-arm { position: absolute; left: 50%; top: 50%; width: 50%; height: 0; transform-origin: 0 50%; rotate: var(--a1); }
.cn-arm.two { rotate: var(--a2); }
.cn-blade, .cn-head { position: absolute; top: 0; background: #2a1604; }
.cn-blade { left: 0; right: calc(7px * var(--u)); height: calc(7px * var(--u)); translate: 0 -50%; clip-path: polygon(0 0, 100% 40%, 100% 60%, 0 100%); }
.cn-blade::before, .cn-head::before { content: ''; position: absolute; background: linear-gradient(#b8700e, #ffe28c 50%, #c27a12); }
.cn-blade::before { inset: calc(1.4px * var(--u)) calc(1px * var(--u)) calc(1.4px * var(--u)) 0; clip-path: polygon(0 0, 100% 36%, 100% 64%, 0 100%); }
.cn-head { right: calc(-2px * var(--u)); width: calc(11px * var(--u)); height: calc(12px * var(--u)); translate: 0 -50%; clip-path: polygon(0 0, 100% 50%, 0 100%, 22% 50%); }
.cn-head::before { inset: calc(1.6px * var(--u)) calc(2.6px * var(--u)) calc(1.6px * var(--u)) calc(1.2px * var(--u)); clip-path: polygon(0 0, 100% 50%, 0 100%, 24% 50%); }
.bn-cone.fresh .cn-arm { animation: cnTrace 0.32s ease-out 1.35s backwards; }
@keyframes cnTrace { from { scale: 0 1; } }
.bn-cone.fresh .cn-head { animation: cnPop 0.25s cubic-bezier(0.3, 1.6, 0.5, 1) 1.62s backwards; }
@keyframes cnPop { from { opacity: 0; scale: 0.2; } }/* The gold sweep: a light filling the cone from one edge to the other, its leading edge bright, then fading (removed
   when done). --s is registered so it can move (phones without @property: it simply shows, then fades) */
@property --s { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.cn-sweep {
  position: absolute; inset: 0; border-radius: 50%; opacity: 0;
  background: conic-gradient(from calc(var(--a1) + 90deg), rgba(255, 200, 80, 0.35) 0deg, #fff3c0 var(--s), transparent var(--s));
  -webkit-mask: radial-gradient(closest-side, #000 65%, transparent 100%); mask: radial-gradient(closest-side, #000 65%, transparent 100%);
  animation: cnSweep 0.75s ease-in-out 1.45s;
}
@keyframes cnSweep { 0% { --s: 0deg; opacity: 1; } 65% { --s: var(--w); opacity: 1; } 100% { --s: var(--w); opacity: 0; } }
/* The compass (owner, 2026-10-23: glossy gold like the bottom bar's Compass icon, "version B"; Higgsfield,
   tools/mascot/compass-v3.py; the brass one before it: compass-real.py): 36 px wide, its needle (70 % of it) turning
   around its gold cap (--to, any angle). Files 384 px = 3.3x a 13" iPad. */
.bn-compass { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; scale: calc(var(--k, 1) / var(--zoom, 1)); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.bn-compass .cp-body { display: block; width: 100%; height: 100%; pointer-events: none; }
.bn-compass .cp-needle { position: absolute; left: 50%; top: 50%; height: 70%; width: auto; max-width: none; translate: -50% -50%; transform: rotate(var(--to)); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5)); pointer-events: none; }
/* Drops in twice its size and lands with a bounce, a ring of dust around it */
.bn-compass.fresh { animation: cpDrop 0.36s linear backwards; }
@keyframes cpDrop {
  0% { opacity: 0.2; transform: scale(2.2); animation-timing-function: ease-in; }
  55% { opacity: 1; transform: scale(1); animation-timing-function: ease-out; }
  75% { transform: scale(0.88); animation-timing-function: ease-in-out; }
  100% { transform: scale(1); }
}
.cp-dust { position: absolute; inset: -5px; border-radius: 50%; border: 3px solid rgba(232, 214, 170, 0.75); opacity: 0; animation: cpDust 0.45s ease-out 0.2s; }
@keyframes cpDust { 0% { opacity: 0.9; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.8); } }
/* The needle: 2.5 fast turns, then it hunts back and forth and locks */
.bn-compass.fresh .cp-needle { animation: bnNeedle 1.1s linear 0.3s backwards; }
@keyframes bnNeedle {
  0% { transform: rotate(calc(var(--to) - 900deg)); animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1); }
  38% { transform: rotate(calc(var(--to) - 50deg)); animation-timing-function: ease-in-out; }
  56% { transform: rotate(calc(var(--to) + 32deg)); animation-timing-function: ease-in-out; }
  70% { transform: rotate(calc(var(--to) - 14deg)); animation-timing-function: ease-in-out; }
  82% { transform: rotate(calc(var(--to) + 5deg)); animation-timing-function: ease-in-out; }
  91% { transform: rotate(calc(var(--to) - 2deg)); animation-timing-function: ease-out; }
  100% { transform: rotate(var(--to)); }
}
/* Locked: the compass bumps and a gold glint flashes on the needle's tip (turned with it) */
.bn-compass.fresh .cp-body { animation: cpBump 0.25s ease-out 1.4s; }
@keyframes cpBump { 40% { transform: scale(1.1); } }
.cp-tip { position: absolute; inset: 0; transform: rotate(var(--to)); pointer-events: none; }
.cp-tip i {
  position: absolute; left: 50%; top: 17%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, #fff 0 25%, #ffd76a 50%, rgba(255, 200, 80, 0) 100%); animation: cpGlint 0.5s ease-out 1.4s;
}
@keyframes cpGlint { 0% { opacity: 0; transform: scale(0.3); } 30% { opacity: 1; transform: scale(1.7); } 100% { opacity: 0; transform: scale(0.8); } }
/* Searchlight: night over the photo, the lit circle (soft edge) and a thin light rim once the beam has locked */
/* (js/bonuses.js drawLight: --x --y = the circle's centre, --rx --ry = its radius, in % of the photo) */
.bn-night { position: absolute; inset: 0; overflow: hidden;
  background: radial-gradient(var(--rx) var(--ry) at var(--x) var(--y), transparent 90%, rgba(4, 8, 22, 0.78) 100%); }
.bn-night .rim { position: absolute; transform: translate(-50%, -50%); border-radius: 50%;
  border: calc(2px / var(--zoom, 1)) solid rgba(255, 244, 200, 0.55); }
.bn-night.fresh { animation: bnNightIn 0.5s ease-out; }
.bn-night.fresh .rim { opacity: 0; transition: opacity 0.4s; }
.bn-night.fresh.locked .rim { opacity: 1; }
@keyframes bnNightIn { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .bn-night.fresh .dark, .bn-scorch.fresh, .bn-radar *, .bn-cone.fresh *, .bn-compass.fresh, .bn-compass.fresh * { animation: none; }
}
