/* Jeux (/games, its two games and /games/:id): the site's printed sleeve, laid on a green page.
 * Only the page background changes; everything else is the site's vocabulary (paper slips, ink rules, solid drops). */

/* The panels open and close with the hidden attribute. */
.blindtest [hidden] { display: none !important; }

@layer pages {
  /* The green: --ok darkened with a touch of ink; the global paper grain stays on top of it. */
  html:has(.blindtest), body:has(.blindtest) { background: color-mix(in srgb, var(--ok) 82%, var(--ink)); }
  body:has(.blindtest) .site-footer { background: var(--paper); }

  .blindtest { color: var(--paper); }
  .blindtest h1 small { border-color: currentColor; }
  .blindtest h1 a:hover { background: var(--paper); color: var(--ink); }
  /* Paper slips on the green: back to ink. */
  .blindtest :is(.acl-totals, .acl-filter label:not([data-active]), .bt-choice, .bt-panel, .bt-reveal, .bt-suggestions, .people-list,
    .bt-recap) { color: var(--ink); }

  /* --- Setup ------------------------------------------------------------------------------------------ */
  .bt-head { margin-bottom: 0.6rem; }
  .bt-lede { max-width: 46rem; margin: 1.2rem 0 0.4rem; }

  /* --- The door to the two games: two posters, their sleeves over the title, dealt on the green -------------- */
  .bt-hub .bt-head { justify-items: center; text-align: center; }
  .bt-games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); gap: 2rem; max-width: 64rem; margin: 1.2rem auto 0; }
  .bt-game {
    position: relative;
    display: grid;
    align-content: end;
    justify-items: center;
    gap: 0.35rem;
    padding: 1.4rem 1.4rem 1.7rem;
    border: var(--rule-thick);
    background: var(--paper);
    color: var(--ink);
    box-shadow: 7px 7px 0 var(--ink);
    text-align: center;
    text-decoration: none;
    rotate: -1.2deg;
    transition: rotate 220ms var(--ease-snap), translate 220ms var(--ease-snap), box-shadow 220ms var(--ease-snap);
  }
  .bt-game[data-game="challenge"] { rotate: 1deg; border-color: var(--paper); background: var(--ink); color: var(--paper); box-shadow: 7px 7px 0 var(--stamp); }
  .bt-game:is(:hover, :focus-visible) { translate: -4px -4px; rotate: 0deg; box-shadow: 11px 11px 0 var(--stamp); }
  .bt-game[data-game="challenge"]:is(:hover, :focus-visible) { box-shadow: 11px 11px 0 var(--paper); }
  .bt-game[data-game]:active { translate: 3px 3px; box-shadow: 0 0 0 transparent; transition-duration: 30ms; }
  .bt-game:focus-visible { outline: 4px solid var(--paper); outline-offset: 5px; }

  /* The art: three sleeves fanned out over a turning disc (the blind test: what plays is a mystery, the covers are
     blurred inside their frames), or two face to face. */
  .bt-game-art { position: relative; width: 100%; height: clamp(11rem, 26vw, 15rem); margin-bottom: 0.4rem; }
  .bt-game-sleeve {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(7.5rem, 17vw, 10rem);
    aspect-ratio: 1;
    overflow: hidden;
    border: var(--rule-thick);
    background: var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    translate: -50% -50%;
    transition: translate 320ms var(--ease-pop), rotate 320ms var(--ease-pop);
  }
  .bt-game-sleeve img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter 320ms var(--ease-snap); }
  .bt-game-mystery::after {
    content: "?";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font: 400 clamp(4rem, 9vw, 5.5rem)/1 var(--font-display);
    color: var(--paper);
  }
  [data-game="blindtest"] .bt-game-sleeve img { filter: blur(6px) saturate(1.3); scale: 1.2; }
  [data-game="blindtest"]:is(:hover, :focus-visible) .bt-game-sleeve img { filter: blur(2.5px) saturate(1.3); }
  [data-game="blindtest"] .bt-game-sleeve:nth-child(1) { translate: -112% -50%; rotate: -14deg; }
  [data-game="blindtest"] .bt-game-sleeve:nth-child(2) { translate: -50% -50%; rotate: -2deg; z-index: 2; }
  [data-game="blindtest"] .bt-game-sleeve:nth-child(3) { translate: 12% -48%; rotate: 12deg; }
  [data-game="blindtest"]:is(:hover, :focus-visible) .bt-game-sleeve:nth-child(1) { translate: -128% -46%; rotate: -20deg; }
  [data-game="blindtest"]:is(:hover, :focus-visible) .bt-game-sleeve:nth-child(3) { translate: 28% -44%; rotate: 18deg; }
  [data-game="challenge"] .bt-game-sleeve { border-color: var(--paper); box-shadow: 5px 5px 0 var(--stamp); }
  [data-game="challenge"] .bt-game-mystery { background: var(--stamp); }
  [data-game="challenge"] .bt-game-sleeve:nth-child(1) { translate: -102% -50%; rotate: -8deg; }
  [data-game="challenge"] .bt-game-sleeve:nth-child(2) { translate: 2% -50%; rotate: 8deg; }
  [data-game="challenge"]:is(:hover, :focus-visible) .bt-game-sleeve:nth-child(1) { translate: -92% -50%; rotate: -3deg; }
  [data-game="challenge"]:is(:hover, :focus-visible) .bt-game-sleeve:nth-child(2) { translate: -8% -50%; rotate: 3deg; }

  /* The record sliding out of the middle sleeve, its label off-centre so that its turn shows. */
  .bt-game-disc {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: clamp(7rem, 16vw, 9.4rem);
    aspect-ratio: 1;
    border: var(--rule);
    border-radius: 50%;
    background:
      radial-gradient(circle at 58% 44%, var(--paper) 0 2.5%, transparent 3%),
      radial-gradient(circle, var(--ink) 0 3%, var(--stamp) 3.5% 17%, transparent 17.5%),
      repeating-radial-gradient(circle, var(--ink) 0 2px, color-mix(in srgb, var(--ink) 82%, var(--paper)) 2px 3px);
    translate: -50% -84%;
    transition: translate 320ms var(--ease-pop);
  }
  [data-game="blindtest"]:is(:hover, :focus-visible) .bt-game-disc { translate: -50% -104%; }

  /* The stamp slammed over the art: "?" on the blind test, "VS" between the two radios; worn like the site's. */
  .bt-game-stamp {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: clamp(4.2rem, 9vw, 5.4rem);
    aspect-ratio: 1;
    border: 4px solid currentColor;
    border-radius: 50%;
    outline: 2px solid currentColor;
    outline-offset: -9px;
    background: var(--paper);
    color: var(--stamp);
    font: 400 clamp(2rem, 5vw, 2.8rem)/1 var(--font-display);
    translate: -50% -50%;
    rotate: -12deg;
    -webkit-mask: var(--wear) 0 0 / 160px;
    mask: var(--wear) 0 0 / 160px;
    transition: scale 260ms var(--ease-pop), rotate 260ms var(--ease-pop);
  }
  .bt-game:is(:hover, :focus-visible) .bt-game-stamp { scale: 1.15; rotate: -4deg; }
  /* The same stamp after the title of the game's own page. */
  .bt-head h1 .bt-game-stamp { position: relative; top: auto; left: auto; display: inline-grid; width: 1.5em; margin-left: 0.2em;
    vertical-align: 0.15em; font-size: 0.45em; translate: none; text-shadow: none; filter: none; }

  .bt-game-name {
    font: 400 clamp(3rem, 8vw, 4.8rem)/0.9 var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.01em;
    text-shadow: 0.035em 0.03em 0 color-mix(in srgb, var(--stamp) 85%, transparent);
    filter: url(#ink-bleed);
  }
  [data-game="challenge"] .bt-game-name { font-size: clamp(4rem, 11vw, 6.4rem); }
  .bt-game-pitch { margin-top: 0.6rem; font: 600 0.85rem/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
  .bt-game-badge {
    position: absolute;
    z-index: 4;
    top: -1rem;
    right: 0.8rem;
    padding: 0.35rem 0.7rem 0.25rem;
    background: var(--stamp);
    color: var(--paper);
    font: 400 1.5rem/1 var(--font-display);
    text-transform: uppercase;
    rotate: 6deg;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .bt-form { display: grid; gap: 0.4rem; max-width: 56rem; }
  .bt-form fieldset { border-color: color-mix(in srgb, var(--paper) 70%, transparent); }

  .bt-difficulty { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.2rem; padding-top: 1.8rem; }
  .bt-choice {
    position: relative;
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0.9rem 1rem 0.9rem;
    border: var(--rule);
    background: var(--paper-lift);
    box-shadow: var(--drop);
    text-transform: none;
    letter-spacing: 0;
    rotate: -0.6deg;
    cursor: pointer;
    transition: rotate 160ms var(--ease-snap), translate 160ms var(--ease-snap), box-shadow 160ms var(--ease-snap);
  }
  .bt-choice:nth-of-type(2n) { rotate: 0.5deg; }
  .bt-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
  .bt-choice-name { font: 400 1.8rem/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; }
  .bt-choice-reward { font: 600 1rem/1.2 var(--font-mono); }
  .bt-choice-reward small { font-size: 0.72rem; opacity: 0.75; }
  .bt-choice-pitch { font: 500 0.9rem/1.35 var(--font-body); opacity: 0.85; }
  .bt-choice:hover { translate: -2px -2px; box-shadow: var(--drop-lg); }
  .bt-choice:has(input:checked) { border-width: 3px; background: var(--paper); box-shadow: 5px 5px 0 var(--stamp); rotate: 0deg; }
  .bt-choice[data-difficulty="hard"] .bt-choice-reward { color: var(--stamp); }
  .bt-choice:has(input:focus-visible) { outline: 3px solid var(--stamp); outline-offset: 3px; }


  .bt-launch { display: grid; justify-items: start; gap: 0.7rem; margin-top: 0.6rem; }
  .bt-eligible { font: 600 0.95rem/1.3 var(--font-mono); letter-spacing: 0.04em; }
  .bt-eligible[data-none] { padding: 0.2rem 0.5rem 0.1rem; background: var(--stamp); rotate: -1deg; }

  /* --- Duels ------------------------------------------------------------------------------------------- */
  .bt-duel-start { margin: 1.2rem 0 1.6rem; }
  .bt-duel-note { max-width: 40rem; font: 600 0.95rem/1.4 var(--font-mono); }
  .bt-duel-note a { color: inherit; }
  .bt-duels .people-meta { flex: 1 1 12rem; }
  .bt-duel-state { font: 400 1.05rem/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; }
  .bt-duels li[data-state="won"] .bt-duel-state { color: var(--ok); }
  .bt-duels li[data-state="lost"] .bt-duel-state { color: var(--stamp); }

  .bt-today {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.8rem;
    margin-top: 2.2rem;
    padding-top: 0.8rem;
    border-top: 2px dashed color-mix(in srgb, var(--paper) 70%, transparent);
    font: 600 0.72rem/1 var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .bt-today b { font: 400 1.3rem/1 var(--font-display); letter-spacing: 0.03em; }
  .bt-today meter { width: min(14rem, 100%); height: 0.8rem; border: var(--rule); background: var(--paper); }
  .bt-today meter::-webkit-meter-bar { border: 0; border-radius: 0; background: var(--paper); height: 100%; }
  .bt-today meter::-webkit-meter-optimum-value,
  .bt-today meter::-webkit-meter-suboptimum-value,
  .bt-today meter::-webkit-meter-even-less-good-value { background: var(--stamp); }
  .bt-today meter::-moz-meter-bar { background: var(--stamp); }

  /* --- The game --------------------------------------------------------------------------------------- */
  .bt-play-head h1 a { text-decoration: none; }
  /* A lower head than the other pages: the TV and the answer have to fit under it. The score goes to the right. */
  .bt-play-head { gap: 0.5rem; margin-bottom: 1rem; }
  .bt-play-head h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
  @media (min-width: 760px) {
    .bt-play-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 1.5rem; }
    .bt-play-head > :not(.bt-score) { grid-column: 1; }
    .bt-play-head > .bt-score { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
  }
  .bt-play-head .genre-stamps > li { background: var(--paper); color: var(--ink); }

  /* The TV, the answer and the reveal under it: low enough that the answer stays in view while the 30 s run. */
  .bt-stage { display: grid; gap: 1rem; max-width: 46rem; }
  .bt-screen { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); isolation: isolate; }
  .bt-screen > * { grid-area: 1 / 1; }

  /* The radio's TV, standing on the page (the dock's look, larger); its screen is the player. */
  .bt-tv {
    position: relative;
    z-index: 0;
    height: clamp(15rem, 36vw, 19.5rem);
    filter: drop-shadow(5px 6px 0 color-mix(in srgb, var(--ink) 55%, transparent));
  }
  /* Before the TV takes the screen, and without WebGL: the screen alone in an ink frame (≥ 200 px). */
  .bt-tv > .bt-tv-screen { position: absolute; inset: 0; margin: auto; width: min(100%, 26rem); height: max(200px, 82%); visibility: hidden; }
  .bt-tv[data-flat] { filter: none; }
  .bt-tv[data-flat] > .bt-tv-screen { visibility: visible; border: 10px solid var(--ink); border-radius: 14px; box-shadow: var(--drop); }

  /* The one YouTube player: blurred (and a little scaled so the blur has no edges) until the reveal. */
  .bt-frame-host { position: absolute; inset: 0; filter: blur(28px); scale: 1.18; transition: filter 900ms var(--ease-snap), scale 900ms var(--ease-snap); }
  .bt-frame { width: 100%; height: 100%; border: 0; display: block; }
  .blindtest[data-state="reveal"] .bt-frame-host { filter: none; scale: 1; }

  /* The slips over the screen. */
  .bt-panel { position: relative; z-index: 3; align-self: center; justify-self: center; margin: 1.2rem; text-align: center; }
  .bt-ready, .bt-done, .bt-duel-reveal {
    display: grid;
    gap: 0.8rem;
    justify-items: center;
    max-width: 32rem;
    padding: 1.2rem 1.3rem 1.3rem;
    border: var(--rule-thick);
    background: var(--paper-lift);
    box-shadow: 5px 5px 0 var(--stamp);
    rotate: -1deg;
  }
  .bt-ready p, .bt-done p, .bt-duel-reveal p { margin: 0; }
  .bt-panel-title { font: 400 clamp(2.4rem, 8vw, 4rem)/0.95 var(--font-display); text-transform: uppercase; filter: url(#ink-bleed); }
  .bt-done-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
  .bt-done-actions form { display: contents; }

  /* A game over: the result, then the sounds heard, each a link to its page. */
  .bt-result { display: grid; gap: 1.6rem; justify-items: start; max-width: 46rem; }
  .bt-result .bt-panel { margin: 0; justify-self: start; }
  .bt-panel-title a { color: inherit; }
  .bt-duel-verdict { font: 600 1rem/1.4 var(--font-mono); }
  .bt-duel-verdict b { display: block; font: 400 2rem/1 var(--font-display); text-transform: uppercase; }
  .bt-duel-verdict[data-state="won"] b { color: var(--ok); }
  .bt-duel-verdict[data-state="lost"] b { color: var(--stamp); }
  .bt-recap { list-style: none; width: 100%; margin: 0; padding: 0; border: var(--rule); background: var(--paper-lift); }
  .bt-recap li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.15rem 1rem;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px dashed var(--ink-soft);
  }
  .bt-recap li:last-child { border-bottom: 0; }
  /* Each sound's sleeve, medium: the record to find again. */
  .bt-recap-cover { grid-row: 1 / span 2; display: block; width: 5rem; aspect-ratio: 1; object-fit: cover; border: var(--rule); background: var(--ink); }
  .bt-recap-title { align-self: end; font-weight: 700; }
  .bt-recap-title a { color: inherit; }
  .bt-recap-meta { grid-column: 2; align-self: start; font: 500 0.85rem/1.3 var(--font-body); opacity: 0.85; }
  .bt-recap-verdict { grid-column: 3; grid-row: 1 / span 2; align-self: center; font: 600 0.8rem/1 var(--font-mono); text-transform: uppercase; }
  .bt-recap li[data-found="missed"] .bt-recap-verdict { opacity: 0.6; }

  /* The reveal: a paper slip under the TV, the video sharp on its screen. */
  .bt-reveal {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: var(--rule-thick);
    background: var(--paper-lift);
    box-shadow: var(--drop);
    rotate: -0.4deg;
  }
  .bt-cover { flex: none; width: clamp(4.5rem, 16vw, 7rem); height: auto; aspect-ratio: 1; object-fit: cover; border: var(--rule); box-shadow: var(--drop); rotate: -2deg; }
  .bt-reveal-text { min-width: 0; display: grid; gap: 0.35rem; }
  .bt-reveal-text p { margin: 0; }
  .bt-verdict {
    justify-self: start;
    padding: 0.15em 0.45em 0.05em;
    border: 0.12em solid currentColor;
    outline: 0.05em solid currentColor;
    outline-offset: 0.12em;
    color: var(--stamp);
    font: 400 clamp(1.2rem, 3.6vw, 1.7rem)/1 var(--font-display);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    rotate: -4deg;
    mix-blend-mode: multiply;
    -webkit-mask: var(--wear) 0 0 / 160px;
    mask: var(--wear) 0 0 / 160px;
  }
  .blindtest[data-verdict="found"] .bt-verdict { color: var(--ok); }
  .bt-reveal-title { font: 400 clamp(1.4rem, 4.5vw, 2.1rem)/1 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
  .bt-reveal-title a { text-decoration: none; }
  .bt-reveal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font: 500 0.92rem/1.3 var(--font-body); }
  .bt-reveal-meta .tier { font-size: 0.8rem; }
  .bt-reveal-note { font: 500 0.75rem/1.4 var(--font-mono); letter-spacing: 0.04em; opacity: 0.85; }

  /* The equaliser and the clock, while a sound plays. */
  .bt-eq {
    z-index: 3;
    align-self: end;
    justify-self: start;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 2.4rem;
    margin: 1rem;
    padding: 0.35rem;
    background: var(--paper);
    border: var(--rule);
    opacity: 0;
    transition: opacity 300ms;
  }
  .bt-eq span { width: 5px; height: 100%; background: var(--ink); transform-origin: bottom; scale: 1 0.25; }
  .bt-clock {
    --left: 1;
    z-index: 3;
    align-self: start;
    justify-self: end;
    position: relative;
    width: clamp(4.2rem, 12vw, 5.6rem);
    aspect-ratio: 1;
    margin: 1rem;
    display: grid;
    place-items: center;
    border: var(--rule);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--drop);
    opacity: 0;
    transition: opacity 300ms;
  }
  .bt-clock svg { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
  .bt-clock circle { fill: none; stroke-width: 10; }
  .bt-clock-track { stroke: var(--ink-faint); }
  .bt-clock-ring { stroke: var(--ink); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--left) * 100); }
  .bt-clock b { position: relative; font: 400 clamp(1.4rem, 4vw, 2rem)/1 var(--font-display); }
  .bt-clock[data-hurry] .bt-clock-ring { stroke: var(--stamp); }
  .bt-clock[data-hurry] b { color: var(--stamp); }
  .blindtest:is([data-state="listening"], [data-state="loading"], [data-state="sending"]) .bt-clock { opacity: 1; }
  .blindtest[data-state="listening"] .bt-eq { opacity: 1; }
  .blindtest:is([data-state="ready"], [data-state="done"]) .bt-clock { display: none; }

  /* The answer, under the screen. */
  .bt-answer { display: grid; gap: 0.8rem; }
  .bt-guess-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.7rem; }
  .bt-guess-label { flex-basis: 100%; margin: 0; }
  .bt-combo { position: relative; flex: 1 1 18rem; min-width: 0; }
  .bt-combo input { width: 100%; min-height: 3.1rem; font-size: 1.15rem; box-shadow: var(--drop); }
  .bt-answer-actions { display: flex; gap: 0.7rem; }
  .bt-answer-actions .btn { min-height: 3.1rem; }
  .bt-suggestions {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 18rem;
    overflow-y: auto;
    border: var(--rule-thick);
    background: var(--paper-lift);
    box-shadow: var(--drop-lg);
  }
  .bt-suggestions li { padding: 0.55rem 0.8rem; cursor: pointer; border-bottom: 1px dashed var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bt-suggestions li:last-child { border-bottom: 0; }
  .bt-suggestions li b { font-weight: 700; }
  .bt-suggestions li span { opacity: 0.75; }
  .bt-option-kind { margin-left: 0.5em; font: 600 0.68rem/1 var(--font-mono); text-transform: uppercase; opacity: 0.75; }
  .bt-suggestions li:hover, .bt-suggestions li[aria-selected="true"] { background: var(--ink); color: var(--paper); }
  .bt-next { justify-self: start; }
  .bt-message { min-height: 1.4em; font: 600 0.85rem/1.4 var(--font-mono); }

  @media (max-width: 600px) {
    .bt-reveal { flex-direction: column; align-items: flex-start; }
    .bt-answer-actions { flex: 1 1 100%; }
    .bt-answer-actions .btn { flex: 1; }
    .bt-start { width: 100%; }
    .bt-choice { rotate: 0deg; }
    /* The verdict under the artist: the title keeps the width. */
    .bt-recap li { grid-template-columns: auto minmax(0, 1fr); }
    .bt-recap-cover { grid-row: 1 / span 3; width: 4.5rem; }
    .bt-recap-verdict { grid-column: 2; grid-row: auto; align-self: start; }
  }
}

@layer fx {
  .blindtest[data-state="listening"] .bt-eq span { animation: bt-eq 0.9s ease-in-out infinite alternate; }
  .bt-eq span:nth-child(2n) { animation-duration: 0.62s !important; }
  .bt-eq span:nth-child(3n) { animation-duration: 0.77s !important; animation-delay: -0.3s !important; }
  .bt-eq span:nth-child(4n + 1) { animation-duration: 0.53s !important; animation-delay: -0.2s !important; }

  .bt-reveal:not([hidden]) { animation: drop-in 380ms var(--ease-snap) both; }
  .bt-reveal:not([hidden]) .bt-verdict { animation: stamp-slam 360ms var(--ease-snap) 120ms backwards; }
  .bt-ready:not([hidden]), .bt-done:not([hidden]) { animation: pop-in 320ms var(--ease-pop) backwards; }
  .bt-screen[data-shake] { animation: shake 380ms var(--ease-snap) both; }
  /* The posters dealt on the table, then the stamps slammed; the disc turns. Only "from" keyframes: the tilts and the
     hover moves stay theirs. */
  .bt-game { animation: bt-deal 480ms var(--ease-snap) backwards; }
  .bt-game + .bt-game { animation-delay: 110ms; }
  .bt-game-stamp, .bt-game-badge { animation: bt-slam 340ms var(--ease-pop) 450ms backwards; }
  .bt-game-disc { animation: bt-spin 6s linear infinite; }

  /* "Trouvé": the big stamp in green, printed on a paper slip so it reads on the green page (red says "missed"). */
  .fx-stamp[data-tone="ok"] { color: var(--ok); background: var(--paper); mix-blend-mode: normal; }

  /* Paper confetti, in the palette. */
  .bt-confetti { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; pointer-events: none; }
  .bt-confetti i {
    grid-area: 1 / 1;
    width: 9px;
    height: 14px;
    background: var(--paper);
    animation: bt-burst 1.3s cubic-bezier(0.12, 0.8, 0.3, 1) var(--d) both;
  }
  .bt-confetti i[data-hue="1"] { background: var(--stamp); }
  .bt-confetti i[data-hue="2"] { background: var(--paper-white); border-radius: 50%; width: 10px; height: 10px; }

  @keyframes bt-eq { 0% { scale: 1 0.2; } 100% { scale: 1 1; } }
  @keyframes bt-deal { from { opacity: 0; translate: 0 2.5rem; } }
  @keyframes bt-slam { from { opacity: 0; scale: 1.8; } }
  @keyframes bt-spin { to { rotate: 1turn; } }
  @keyframes bt-burst {
    0% { opacity: 1; translate: 0 0; rotate: 0deg; }
    100% { opacity: 0; translate: var(--x) calc(var(--y) + 120px); rotate: var(--r); }
  }

  @media (prefers-reduced-motion: reduce) {
    .blindtest *, .blindtest *::before, .blindtest *::after { animation: none !important; transition-duration: 1ms !important; }
    .blindtest[data-state="listening"] .bt-eq span { scale: 1 0.6; }
  }
}
