/* =============================================================================
   GETAWAYS in-run callouts (M3, Anton-approved design look_m3/callouts). js/callouts.js writes the cards.
   DOM + CSS only: transform/opacity animations (compositor), static paint otherwise. Zero WebGL draw calls.
   Font: Exo 2 Black Italic, SIL OFL 1.1 (LICENSES/OFL-Exo2.txt), subset to Basic Latin + · ’ … × as WOFF
   (assets/fonts/exo2-blackitalic-callouts.woff, from tools/art/fonts/Exo2-BlackItalic.ttf by pyftsubset).
   ========================================================================== */
@font-face { font-family: "Exo2Callout"; src: url("../assets/fonts/exo2-blackitalic-callouts.woff") format("woff"); font-weight: 900; font-style: italic; font-display: block; }

/* The layer covers the play view; cards are positioned on a band line inside it.
   Band: centre at 25% of the play view below the top safe area (211 px on a 390x844 with no inset), cards <= 140 px
   tall and <= 300 px wide: under the HUD (coins / cash / tricks / progress), above the road horizon, nowhere near the
   runner, the Warden or the red dot. Drone mode (the drone hovers in the normal band): 17.3% (146 px on 844), one line.
   The card column stops short of the boost dial column (see --co-r) so no card ever sits on the dial. */
.co-layer {
  --view: calc(100% - var(--sat, 0px) - var(--sab, 0px));
  /* under a notch the HUD drops by the inset; the band drops by 0.4 x the inset more so 2-line tier-4 cards clear the speed bar */
  --band-y: calc(var(--sat, 0px) * 1.4 + var(--view) * .25); --band-dm: calc(var(--sat, 0px) + var(--view) * .173);
  /* card column: from 12 px to the boost-dial column (dial 50 px + 12 px margin + 4 px gap), so no card, badge or
     danger plate ever sits on the dial (it overlaps the band rows, more so under a notch). Mirrored for a left-hand HUD. */
  --maxw: 300px; --co-l: 12px; --co-r: 66px;
  --ink: #14121F;
  position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden;
  font-family: "Exo2Callout", "Exo 2", var(--font, "Arial Black"), sans-serif; font-weight: 900; font-style: italic;
  text-transform: uppercase; contain: layout style;
}
.co { position: absolute; left: var(--co-l); right: var(--co-r); top: calc(var(--band-y) - 70px); height: 140px; display: flex; align-items: center; justify-content: center; }
/* a 2-line headline with a 2-line sub-line (long trick names on tier 4) grows downward so it keeps clear of the HUD */
.co.tall { top: calc(var(--band-y) - 58px); }
/* drone band: high up beside the speed bar, so its column also stops short of the speed bar (92 px + 12 + 4) */
.co.dm { top: calc(var(--band-dm) - 70px); --maxw: 250px; --co-r: 108px; }
#app.lefty .co-layer { --co-l: 66px; --co-r: 12px; }
#app.lefty .co.dm { --co-l: 108px; --co-r: 12px; }
.co-body { position: relative; display: flex; flex-direction: column; align-items: center; max-width: min(var(--maxw), calc(100% - 36px));
  transform-origin: 50% 60%; will-change: transform, opacity; opacity: 0; }

/* ---------- headline: fill span + ::before outline layer (works on iOS + Android without paint-order) */
.co-hw { position: relative; display: block; }
.co-h, .co-ho { display: block; text-align: center; white-space: pre; line-height: .92; letter-spacing: .005em; font-size: var(--fs, 34px); padding: 0 .1em; }
.co-h { position: relative; color: var(--fill, #fff6ea); }
/* outline layer: a sibling under the fill (a child would join the fill's background-clip:text) */
.co-ho { position: absolute; inset: 0; color: var(--ink); -webkit-text-stroke: var(--sw, 7px) var(--ink);
  text-shadow: var(--slab-x, 3px) var(--slab-y, 4px) 0 var(--slab, #14121F), calc(var(--slab-x, 3px) * 1.6) calc(var(--slab-y, 4px) * 1.6) 0 var(--slab, #14121F); }
.co-s { display: block; margin-top: 6px; font-size: var(--ss, 15px); letter-spacing: .09em; color: var(--sub, #fff6ea); white-space: nowrap; text-align: center; line-height: 1.15;
  text-shadow: 0 2px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 -1px 0 var(--ink), 2px 2px 0 var(--ink); }
.co-s .lx, .co-badge small { text-transform: none; font-style: inherit; }
.co-s b { color: var(--pts, #F4EEF8); font-weight: 900; }
.co-badge { position: absolute; left: -18px; top: -24px; padding: 3px 9px 2px 7px; font-size: 22px; color: var(--ink); background: var(--hc, #F4EEF8);
  transform: rotate(-9deg) skewX(-10deg); box-shadow: 3px 3px 0 var(--ink); border: 2px solid var(--ink); }
.co-badge small { font-size: 13px; }
/* crew name tag (Anton 2026-11-19): the crewmate who is talking, signed at the bottom right in their colour (below the card,
   away from the HUD: a tag on top would touch the speed bar / progress bar under a notch). Never on danger cards. */
/* 1.4x since 2026-11-19 16:44 (Anton: "make the crew name tags bigger"): 13 -> 18 px type, padding, drop, diamond, keyline;
   the overhang right is 6 px (was 14) so the bigger tag stays clear of the boost dial at 390 / 360 wide */
.co-tag { position: absolute; right: -6px; bottom: -27px; padding: 3px 10px 1px 8px; font-size: 18px; letter-spacing: .1em; color: var(--ink);
  background: var(--hc, #F4EEF8); transform: rotate(5deg) skewX(-10deg); box-shadow: 3px 3px 0 var(--ink); border: 2.5px solid var(--ink); line-height: 1.1; }
.co-tag::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 7px 2px 0; background: var(--ink); transform: rotate(45deg); }

/* ---------- tiers (size + outline weight). Headline is fitted to --maxw by JS (canvas measureText). */
.t1 { --fs: 27px; --sw: 6px; --slab-x: 2px; --slab-y: 3px; --ss: 13px; }
.t2 { --fs: 36px; --sw: 7px; --slab-x: 3px; --slab-y: 4px; --ss: 14px; }
.t3 { --fs: 46px; --sw: 8px; --slab-x: 3px; --slab-y: 5px; --ss: 15px; }
.t4 { --fs: 58px; --sw: 9px; --slab-x: 4px; --slab-y: 6px; --ss: 16px; }

/* ---------- colour roles. Hero vars set per run (hc-*: the title already owns .h-dash etc.): DASH #FF732E, VEGA #109C80 / light #5FD8BC, GHOST #FF5CC8 (UI v2 tokens; UI-bright
   versions of the m3d costume colours #D6834B / #55A693 / #CC7DB3). */
.hc-dash  { --hc: #FF732E; --hc-lt: #FFCFB0; --hc-dk: #6B2300; }
.hc-vega  { --hc: #109C80; --hc-lt: #5FD8BC; --hc-dk: #003D32; }
.hc-ghost { --hc: #FF5CC8; --hc-lt: #FFA6E0; --hc-dk: #5C0A46; }

.c-neutral { --fill: #fff6ea; --slab: var(--hc-dk); --sub: var(--hc-lt); }
.c-hero    { --fill: #fff6ea; --slab: var(--hc-dk); --sub: var(--hc); --pts: #F4EEF8; }
.c-hero.t2 .co-h, .c-hero.t3 .co-h, .c-hero.t4 .co-h {
  color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(176deg, #fffaf2 0%, var(--hc-lt) 38%, var(--hc) 62%, var(--hc) 100%); }
.c-crew    { --fill: #fff6ea; --slab: var(--hc-dk); --sub: var(--hc-lt); --pts: #F4EEF8; }
.c-crew.t2 .co-h, .c-crew.t3 .co-h, .c-crew.t4 .co-h {
  color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(176deg, #fffaf2 0%, var(--hc-lt) 30%, var(--hc) 56%, var(--hc) 100%); }
.c-gold    { --slab: #7a3a00; --sub: #ffe9a8; --hc: #ffc93c; }
.c-gold .co-h { color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(176deg, #fffbe0 0%, #ffe680 34%, #ffc21f 60%, #ff9a12 100%); }
.c-part    { --fill: #e9fbff; --slab: #004a66; --sub: #8fe8ff; --hc: #38cdff; }
.c-warn    { --fill: #F4EEF8; --slab: #2F2A52; --sub: #A69CC0; }   /* neutral: amber is the drone's tracking light only */
.c-danger  { --fill: #ffffff; --ink: #2a0309; --slab: #5a0612; --sub: #ffe2e6; --hc: #ff3b4e; }
/* danger backplate: a skewed Warden-red bar behind the text. Static paint, scales with the card. */
.c-danger .co-body::before { content: ""; position: absolute; left: -18px; right: -18px; top: 8%; bottom: 4%; z-index: -2;
  background: linear-gradient(180deg, #ff4d5e, #d9142c); clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
  box-shadow: none; }
.c-danger.t1 .co-body::before { display: none; }
.c-danger .co-s { color: #fff3e6; width: fit-content; margin: 6px auto 0; padding: 3px 10px 2px; border-radius: 6px; background: rgba(24, 2, 8, .86); }
/* dark plate under the danger sub-line: pink-on-red was lost on the red bar + vignette. Neutral cream, not keyed to a drone colour. */

/* GHOST voice: cooler, wider-tracked, lighter outline, no slab extrusion */
.v-ghost .co-h, .v-ghost .co-ho { letter-spacing: .06em; }
.v-ghost .co-ho { text-shadow: 0 3px 0 var(--slab); }
/* VEGA voice: scorecard rule under the headline */
.v-vega .co-s { border-top: 3px solid var(--hc); padding-top: 4px; }

/* ---------- burst (tier 3: speed streaks, tier 4: starburst + shock ring). One div each, transform/opacity only. */
.co-fx { position: absolute; left: 50%; top: 50%; pointer-events: none; opacity: 0; z-index: -3; will-change: transform, opacity; }
.co-streaks { width: 380px; height: 150px; margin: -75px 0 0 -190px;
  background: repeating-linear-gradient(180deg, transparent 0 9px, var(--hc, #fff) 9px 11px, transparent 11px 19px, rgba(255,246,234,.85) 19px 20px, transparent 20px 27px);
  -webkit-mask-image: radial-gradient(ellipse 50% 46% at 50% 50%, transparent 30%, #000 56%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 46% at 50% 50%, transparent 30%, #000 56%, transparent 100%); transform: skewY(-6deg); }
.co-burst { width: 440px; height: 440px; margin: -220px 0 0 -220px; border-radius: 50%;
  background: repeating-conic-gradient(from 4deg, var(--hc, #fff) 0 4deg, transparent 4deg 14deg, rgba(255,246,234,.9) 14deg 15.5deg, transparent 15.5deg 24deg);
  -webkit-mask-image: radial-gradient(circle, transparent 20%, #000 34%, #000 44%, transparent 70%);
          mask-image: radial-gradient(circle, transparent 20%, #000 34%, #000 44%, transparent 70%); }
.co-ring { width: 200px; height: 200px; margin: -100px 0 0 -100px; border-radius: 50%; border: 6px solid var(--hc, #fff); box-shadow: 0 0 0 3px var(--ink) inset, 0 0 0 3px var(--ink); }

/* ---------- animation. Durations come from the tier; JS sets --life. */
.co.play .co-body { animation: var(--in-anim, co-punch) var(--in, 220ms) cubic-bezier(.2,.9,.25,1) forwards, co-out var(--out, 170ms) ease-in forwards var(--hold, 1000ms); }
.co.play.shake { animation: var(--shake-anim, co-shake3) var(--shake-d, 200ms) linear var(--shake-at, 80ms) both; }
.co.play .co-s { animation: co-sub 200ms cubic-bezier(.2,.9,.25,1) both var(--sub-at, 70ms); }
.co.play .co-streaks { animation: co-streaks 520ms ease-out forwards; }
.co.play .co-burst { animation: co-burst 640ms cubic-bezier(.15,.8,.3,1) forwards; }
.co.play .co-ring { animation: co-ring 460ms cubic-bezier(.1,.7,.3,1) forwards 40ms; }
.co.play .co-badge { animation: co-badge 260ms cubic-bezier(.3,1.6,.4,1) both 60ms; }
.co.play .co-tag { animation: co-tag 240ms cubic-bezier(.3,1.6,.4,1) both 30ms; }

/* tier punch-ins: big -> undershoot -> overshoot -> settle on a -4deg lean (italic already leans the glyphs) */
@keyframes co-punch1 { 0% { opacity: 0; transform: scale(1.55) rotate(-8deg); } 45% { opacity: 1; transform: scale(.95) rotate(-3deg); } 100% { opacity: 1; transform: scale(1) rotate(-3deg); } }
@keyframes co-punch  { 0% { opacity: 0; transform: scale(2.0) rotate(-12deg); } 38% { opacity: 1; transform: scale(.9) rotate(-2deg); } 70% { transform: scale(1.07) rotate(-4.5deg); } 100% { opacity: 1; transform: scale(1) rotate(-4deg); } }
@keyframes co-punch4 { 0% { opacity: 0; transform: scale(2.7) rotate(-16deg); } 34% { opacity: 1; transform: scale(.86) rotate(-1deg); } 64% { transform: scale(1.11) rotate(-5.5deg); } 84% { transform: scale(.98) rotate(-4deg); } 100% { opacity: 1; transform: scale(1) rotate(-4deg); } }
/* VEGA: a precise snap, almost no overshoot, near-level */
@keyframes co-snap   { 0% { opacity: 0; transform: translateX(-46px) scale(1.35) rotate(0deg); } 55% { opacity: 1; transform: translateX(3px) scale(1.02) rotate(-2deg); } 100% { opacity: 1; transform: translateX(0) scale(1) rotate(-2deg); } }
/* GHOST: glides in from the right and settles, no bounce */
@keyframes co-glide  { 0% { opacity: 0; transform: translateX(44px) skewX(-16deg) scale(1.04); } 100% { opacity: 1; transform: translateX(0) skewX(0) scale(1) rotate(-2deg); } }
/* danger: hard snap, held level, the shake does the work */
@keyframes co-alarm  { 0% { opacity: 0; transform: scale(1.45) rotate(3deg); } 50% { opacity: 1; transform: scale(.97) rotate(-1deg); } 100% { opacity: 1; transform: scale(1) rotate(-2deg); } }

@keyframes co-out { to { opacity: 0; transform: translateY(-20px) scale(1.06) rotate(-4deg); } }
@keyframes co-sub { 0% { opacity: 0; transform: translateX(26px); } 100% { opacity: 1; transform: none; } }
@keyframes co-badge { 0% { opacity: 0; transform: rotate(-30deg) skewX(-10deg) scale(2.2); } 100% { opacity: 1; transform: rotate(-9deg) skewX(-10deg) scale(1); } }
@keyframes co-tag { 0% { opacity: 0; transform: translateY(8px) rotate(14deg) skewX(-10deg) scale(1.6); } 100% { opacity: 1; transform: rotate(5deg) skewX(-10deg) scale(1); } }
@keyframes co-shake3 { 0%,100% { transform: none; } 20% { transform: translate(-5px, 2px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, 0); } }
@keyframes co-shake4 { 0%,100% { transform: none; } 12% { transform: translate(-9px, 3px); } 24% { transform: translate(8px, -4px); } 36% { transform: translate(-7px, 2px); } 50% { transform: translate(5px, -2px); } 66% { transform: translate(-3px, 1px); } 82% { transform: translate(2px, 0); } }
@keyframes co-streaks { 0% { opacity: 0; transform: skewY(-6deg) scaleX(.3); } 25% { opacity: .9; } 100% { opacity: 0; transform: skewY(-6deg) scaleX(1.25); } }
@keyframes co-burst { 0% { opacity: 0; transform: scale(.35) rotate(0deg); } 20% { opacity: .95; } 100% { opacity: 0; transform: scale(1.15) rotate(14deg); } }
@keyframes co-ring { 0% { opacity: .95; transform: scale(.3); } 100% { opacity: 0; transform: scale(2.1); } }

/* ---------- reduced motion (OS setting or the game's REDUCE CAMERA MOTION, which adds .co-calm on the layer):
   no scale > 1.03, no rotation change, no shake, no burst/ring/streaks; same reading time. */
@media (prefers-reduced-motion: reduce) {
  .co.play .co-body { animation: co-calm-in 140ms ease-out forwards, co-calm-out 160ms ease-in forwards var(--hold, 1000ms) !important; }
  .co.play.shake, .co.play .co-s, .co.play .co-badge, .co.play .co-tag { animation: none !important; opacity: 1; }
  .co-fx { display: none !important; }
}
.co-calm .co.play .co-body { animation: co-calm-in 140ms ease-out forwards, co-calm-out 160ms ease-in forwards var(--hold, 1000ms) !important; }
.co-calm .co.play.shake, .co-calm .co.play .co-s, .co-calm .co.play .co-badge, .co-calm .co.play .co-tag { animation: none !important; opacity: 1; }
.co-calm .co-fx { display: none !important; }
@keyframes co-calm-in { 0% { opacity: 0; transform: scale(1.03) rotate(-3deg); } 100% { opacity: 1; transform: scale(1) rotate(-3deg); } }
@keyframes co-calm-out { to { opacity: 0; transform: scale(1) rotate(-3deg); } }

/* ---------- fail results screen: a crewmate's encouragement line (Anton: keep trying to make the getaway, never a roast) */
.res-crew { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 2px; font-family: "Exo2Callout", "Exo 2", sans-serif;
  font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .05em; font-size: 15px; color: var(--hc-lt, #fff6ea); }
.res-crew.hidden { display: none; }
.res-crew b { padding: 2px 7px 1px 6px; font-size: 12px; letter-spacing: .1em; color: #14121F; background: var(--hc); border: 2px solid #14121F;
  transform: rotate(-4deg) skewX(-10deg); box-shadow: 2px 2px 0 #14121F; }

/* drone-band cards sit in the clear band beside the drone (Callouts.avoid moves them): no big punch-in or drift-out, so the card
   never grows or lifts over the drone / its ring. The scale animation stays <= 1. */
@keyframes co-dm-in { 0% { opacity: 0; transform: scale(.9) rotate(-2deg); } 100% { opacity: 1; transform: scale(1) rotate(-2deg); } }
@keyframes co-dm-out { from { opacity: 1; transform: scale(1) rotate(-2deg); } to { opacity: 0; transform: scale(1) rotate(-2deg); } }
.co.dm.play .co-body, .co.tame.play .co-body { animation-name: co-dm-in, co-dm-out; }
.co.dm, .co.tame { transform-origin: 50% 50%; }
/* .tame (drone-callouts, Anton 2026-11-25): a normal-band card that plays while a drone / the tollbar / the threat ring is on
   screen gets the same calm entrance and exit as a drone-band card, so it never punches up over the drone it is dodging. */

/* ---------- warning cards (drone-callouts, Anton 2026-11-25: "change the color from a red sign to something accent to the game,
   smaller and make it flash like a warning"). Every danger card except the run-ending caught / fell cards (those keep Hit Red,
   which ENV_BIBLE v2 reserves for run-ending danger). Plate = Warden violet (--warden #8861FF family, css/game.css): the drones
   are the Warden's, and violet is in the UI v2 palette but is no hero's colour, not amber (drone light) and not red.
   Size: 72% (JS ALERT_K scales the headline; outline, slab, plate and sub plate scale here).
   Flash: the plate blinks 2.5 times a second (<= 3 Hz, photosensitivity-safe) for the card's life; opacity only; the text stays
   solid so it can always be read. Reduced motion (OS or .co-calm): no blink, steady plate. */
.c-danger.c-alert { --ink: #120C2E; --slab: #2A1C66; --sub: #F4EEF8; --hc: #8861FF; }
.c-alert.t1 { --sw: 4px; --slab-x: 1.5px; --slab-y: 2px; }
.c-alert.t2 { --sw: 5px; --slab-x: 2px; --slab-y: 3px; }
.c-alert.t3 { --sw: 6px; --slab-x: 2px; --slab-y: 3.5px; }
.c-alert.t4 { --sw: 6.5px; --slab-x: 3px; --slab-y: 4px; }
.c-danger.c-alert .co-body::before { left: -13px; right: -13px; background: linear-gradient(180deg, #7A52F5, #5A34D6);
  box-shadow: inset 0 0 0 2px #120C2E; will-change: opacity; }
.c-danger.c-alert .co-body::after { content: ""; position: absolute; left: -13px; right: -13px; top: 8%; bottom: 4%; z-index: -1;
  clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%); background: linear-gradient(180deg, rgba(185,163,255,.55), rgba(185,163,255,0) 70%);
  opacity: 0; pointer-events: none; will-change: opacity; }
.c-danger.c-alert .co-s { margin: 4px auto 0; padding: 2px 7px 1px; border-radius: 4px; color: #F4EEF8; background: rgba(18, 12, 46, .9); }
.co.play.c-alert .co-body::before { animation: co-warn-plate 400ms steps(1, end) infinite; }
.co.play.c-alert .co-body::after { animation: co-warn-glint 400ms steps(1, end) infinite; }
@keyframes co-warn-plate { 0% { opacity: 1; } 55% { opacity: .28; } }
@keyframes co-warn-glint { 0% { opacity: 1; } 55% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .co.play.c-alert .co-body::before, .co.play.c-alert .co-body::after { animation: none !important; } .c-alert .co-body::before { opacity: 1; } }
.co-calm .co.play.c-alert .co-body::before, .co-calm .co.play.c-alert .co-body::after { animation: none !important; }
.c-danger.t1 .co-body::after { display: none; }
