/* Le Mot in Encre sobre (#72, #74): the shared bar, one status line, the board, the
   legend and the keyboard, centred on one axis. No framed box. On a phone the keyboard
   sits at the bottom; on a desktop board and keyboard form one group. Text stays at
   13 px or more, except tile letters, which scale with the tile. */

body.le-mot {
  --mot-red: #e7002a;
  --mot-yellow: #ffbd00;
  --mot-absent: #343943;
  --on-yellow: #171717;
  --tile: #232a3a;
  --tile-line: #48536c;
  --tile-typed: #303a50;
  --tile-typed-line: #afbad6;
  --ghost: #98a3b7;
  --key-light: #ced5e0;
  --on-key-light: #17202f;
  --key-ink: #2e3548;
  --on-key-ink: #f7f8fc;
  --key-ink-absent: #181b26;
  --on-key-ink-absent: #949db2;
  --danger: #ffb4a6;
}
/* Without specificity, so that each component sets its own margins. */
:where(.le-mot) :where(h1, h2, h3, p) {
  margin: 0;
}
.num {
  font-variant-numeric: tabular-nums;
}
.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The bar: « Jeux » on the container's left edge, the title on the page axis. */
.le-mot .bar-in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}
.back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--target);
  padding-right: var(--space-2);
  margin-left: -6px;
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--fs-15);
  font-weight: 600;
}
@media (hover: hover) {
  .back:hover {
    color: var(--text);
  }
}
.bar-title {
  font-size: var(--fs-17);
  font-weight: 600;
  white-space: nowrap;
}
.bar-end {
  justify-self: end;
  display: flex;
  gap: var(--space-1);
}
.icon-btn {
  flex: none;
  width: var(--target);
  height: var(--target);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-2);
}
@media (hover: hover) {
  .icon-btn:hover {
    background: var(--surface);
    color: var(--text);
  }
}

/* The game. `--reserve` is the height the bar, lines and keyboard take, so that six rows
   of tiles fit what is left. */
.mot {
  --reserve: 426px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100dvh - var(--bar) - 1px);
  padding: 14px max(8px, env(safe-area-inset-right, 0px))
    calc(12px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  /* The victory sparks never widen the page. */
  overflow-x: clip;
}
.board-col {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Phones: the board sits a little above the middle of the space the keyboard leaves. */
.board-col::before,
.board-col::after {
  content: '';
  flex: 1 1 0;
}
.board-col::after {
  flex-grow: 1.6;
}
.mot-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-1) 10px;
  margin-bottom: 14px;
  font-size: var(--fs-15);
  color: var(--text-2);
}
.mot-status b {
  color: var(--text);
  font-weight: 600;
}
.badge-hard {
  border: 1px solid var(--gold);
  color: var(--gold);
}

.board {
  --gap: 5px;
  --tile-max: clamp(
    22px,
    calc(
      (100dvh - var(--reserve) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) /
        6 - var(--gap)
    ),
    58px
  );
  container-type: inline-size;
  width: min(100%, calc(var(--n, 5) * var(--tile-max) + (var(--n, 5) - 1) * var(--gap)));
  display: grid;
  gap: var(--gap);
  border-radius: var(--r);
  /* A tap neither flashes the board (Chrome's blue tap highlight) nor selects its letters. */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.board:focus {
  outline: none;
}
.board:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}
.board-row {
  display: grid;
  grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
  gap: var(--gap);
}
.tile {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
  min-width: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--tile-line);
  border-radius: var(--r);
  background: var(--tile);
  color: var(--text);
  /* 54 % of a tile: 31 px at 58 px, 13.5 px for 11 letters at 320 px. */
  font-size: calc((100cqi - (var(--n, 5) - 1) * var(--gap)) / var(--n, 5) * 0.54);
  font-weight: 700;
  line-height: 1;
}
.tile.filled {
  border-color: var(--tile-typed-line);
  background: var(--tile-typed);
}
/* The next editable cell has a solid caret. */
.tile.input-next {
  box-shadow: inset 0 -3px 0 var(--text);
}
/* Prior exact feedback is a visual memory aid, never entered text. */
.tile.ghost-hint {
  color: var(--ghost);
  font-weight: 400;
}
/* The offered first letter is a plain red square with a white letter (#46). */
.tile.correct,
.tile.first-letter-hint {
  background: var(--mot-red);
  border-color: var(--mot-red);
  color: #fff;
}
.tile.absent {
  background: var(--mot-absent);
  border-color: var(--mot-absent);
  color: #fff;
}
/* Misplaced: a filled yellow disc, so shape tells it apart as well as colour. */
.tile.present {
  color: var(--on-yellow);
}
.tile.present::before,
.swatch.present::before {
  content: '';
  position: absolute;
  inset: 7%;
  z-index: -1;
  border-radius: 50%;
  background: var(--mot-yellow);
}

.legend {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  font-size: var(--fs-14);
  color: var(--text-2);
}
.legend li {
  display: flex;
  align-items: center;
  gap: 7px;
}
.swatch {
  position: relative;
  isolation: isolate;
  width: 18px;
  height: 18px;
  border: 1px solid var(--tile-line);
  border-radius: var(--r-sm);
  background: var(--tile);
}
.swatch.correct {
  background: var(--mot-red);
  border-color: var(--mot-red);
}
.swatch.absent {
  background: var(--mot-absent);
  border-color: var(--mot-absent);
}

/* Forced colours (Windows contrast themes) would paint every tile, swatch and key alike:
   they keep the game's colours instead, and the marks a shape each, so none rests on colour
   alone: a framed square for a correct letter, a disc for a misplaced one, a plain square
   for an absent one. Empty tiles and keys get an edge in the theme's text colour. */
@media (forced-colors: active) {
  .tile,
  .swatch,
  .key {
    forced-color-adjust: none;
  }
  .tile:not(.correct, .first-letter-hint, .absent),
  .swatch:not(.correct, .absent) {
    border-color: CanvasText;
  }
  .tile.correct,
  .tile.first-letter-hint,
  .keyboard .key.correct {
    box-shadow: inset 0 0 0 3px CanvasText;
  }
  .swatch.correct {
    box-shadow: inset 0 0 0 2px CanvasText;
  }
  .keyboard .key {
    border: 1px solid CanvasText;
  }
}

/* One line: the message when there is one, otherwise what to do next. Only the message
   is a live region, so typing announces nothing. Two lines are reserved, so a longer
   message never moves the board. */
.message-line {
  min-height: 3em;
  line-height: 1.5;
  margin-top: 12px;
  max-width: 440px;
  font-size: var(--fs-15);
  color: var(--text-2);
  text-align: center;
}
.message:not(:empty) + .instruction {
  display: none;
}
/* The result of each guess, in words, for screen readers only (app.ts). */
.announce {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.message.error {
  color: var(--danger);
}
.message.success {
  color: var(--lime);
}

/* Keyboard: light keys by default, ink keys as an option of « Profil et données ». */
.keyboard {
  width: 100%;
  max-width: 560px;
  margin-top: auto;
  padding-top: 16px;
  display: grid;
  gap: var(--space-2);
}
.key-row {
  display: flex;
  gap: 5px;
}
.key {
  flex: 1 1 0;
  min-width: 0;
  height: 56px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  font-size: 19px;
  font-weight: 600;
}
.key.wide {
  flex: 1.9 1 0;
  font-size: var(--fs-15);
}
.key.erase {
  flex: 1.35 1 0;
}
.key .icon {
  width: 24px;
  height: 24px;
}
.kb-light .key {
  background: var(--key-light);
  color: var(--on-key-light);
}
.kb-ink .key {
  background: var(--key-ink);
  color: var(--on-key-ink);
}
/* An absent key looks like an absent tile on the light keyboard. */
.kb-light .key.absent {
  background: var(--mot-absent);
  color: #fff;
}
.kb-ink .key.absent {
  background: var(--key-ink-absent);
  color: var(--on-key-ink-absent);
}
.keyboard .key.correct {
  background: var(--mot-red);
  color: #fff;
}
.keyboard .key.present {
  background: var(--mot-yellow);
  color: var(--on-yellow);
}
.keyboard .key.enter {
  background: var(--lime);
  color: var(--on-lime);
}
.key:disabled {
  cursor: default;
}
/* A key gives way under the finger or the click, when it takes the press: not while a
   reveal or a check refuses input. iOS Safari applies :active only with a touchstart
   listener, which mountKeyboard adds. */
.key {
  transition:
    transform 60ms ease-out,
    filter 60ms ease-out;
}
.key:active:not(:disabled, [aria-disabled='true']) {
  transform: scale(0.94);
  filter: brightness(0.85);
}
/* A submission waiting for the lexicon refuses input. */
.keyboard[aria-busy='true'] .key {
  cursor: progress;
  opacity: 0.55;
}
/* Game keys are controls, including any nested icon/text; page copy stays available. */
#keyboard button.key,
#keyboard button.key * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Long words on phones: tighter gaps keep the tiles as large as possible. */
@media (max-width: 719px) {
  .board[data-length='9'],
  .board[data-length='10'] {
    --gap: 4px;
  }
  .board[data-length='11'] {
    --gap: 3px;
  }
}
/* Short phones: slightly lower keys and tighter lines leave the tiles more room. */
@media (max-width: 719px) and (max-height: 700px) {
  .mot {
    --reserve: 388px;
    padding-top: 10px;
  }
  .mot-status {
    margin-bottom: 10px;
  }
  .legend {
    margin-top: 10px;
  }
  .message-line {
    margin-top: 8px;
  }
  .keyboard {
    padding-top: 10px;
    gap: 6px;
  }
  .key {
    height: 50px;
  }
}
@media (min-width: 720px) {
  .mot {
    --reserve: 472px;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 28px;
  }
  .board-col {
    flex: none;
  }
  .board-col::before,
  .board-col::after {
    display: none;
  }
  .mot-status {
    margin-bottom: 20px;
  }
  .board {
    --gap: 6px;
  }
  .keyboard {
    margin-top: 24px;
    padding-top: 0;
  }
  .key-row {
    gap: 6px;
  }
  .key {
    height: 58px;
  }
}

/* End of the game (#70): the panel replaces the keyboard; on a desktop it sits to the
   right of the board. The message line stays for screen readers only. */
.mot.done {
  justify-content: flex-start;
}
.mot.done .board-col {
  flex: none;
}
.mot.done .board-col::before,
.mot.done .board-col::after,
.mot.done .mot-status,
.mot.done .legend,
.mot.done .keyboard {
  display: none;
}
.mot.done .message-line {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.end {
  width: 100%;
  max-width: 440px;
  margin-top: 20px;
  display: grid;
  gap: 18px;
}
.end h2 {
  font-size: var(--fs-24);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.end h2:focus {
  outline: none;
}
.answer {
  margin-top: var(--space-1);
  font-size: var(--fs-16);
  color: var(--text-2);
}
.answer .badge {
  margin-left: 10px;
  vertical-align: 2px;
}
.answer b {
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.next-word {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-15);
  color: var(--text-2);
}
.next-word b {
  font-size: var(--fs-17);
  font-weight: 600;
  color: var(--text);
}
.btn-block {
  width: 100%;
}
.share-status {
  margin-top: -10px;
  font-size: var(--fs-14);
  color: var(--text-2);
  text-align: center;
}
.share-status:empty {
  display: none;
}
/* Plain HTTP offers neither the share sheet nor the clipboard: the result to copy by hand. */
.share-fallback textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-15);
  line-height: 1.35;
  resize: none;
}
.share-fallback textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.dist h3 {
  font-size: var(--fs-15);
  font-weight: 600;
}
.dist-summary {
  margin-top: 2px;
  font-size: var(--fs-14);
  color: var(--text-3);
}
.dist-bars {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.dist-bars li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: center;
  font-size: var(--fs-14);
  color: var(--text-2);
}
.bar-fill {
  height: 24px;
  min-width: 30px;
  padding: 0 var(--space-2);
  border-radius: var(--r-sm);
  background: var(--raised);
  color: var(--text);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.dist-bars li.today .bar-fill {
  background: var(--cyan);
  color: var(--on-cyan);
}
.other-game {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
}
@media (hover: hover) {
  .other-game:hover {
    border-color: var(--line-2);
  }
}
.mini-thumb {
  width: 76px;
  height: 57px;
  flex: none;
  object-fit: cover;
  border-radius: var(--r-sm);
}
.og-text {
  display: grid;
  flex: 1;
  font-size: var(--fs-14);
  color: var(--text-3);
}
.og-text strong {
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--text);
}
@media (max-width: 719px) {
  .mot.done .board {
    --tile-max: 38px;
    --gap: 4px;
  }
}
@media (min-width: 900px) {
  .mot.done {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 64px;
    padding-top: 48px;
  }
  .mot.done .board-col {
    width: 500px;
  }
  .mot.done .board {
    --tile-max: 56px;
  }
  .end {
    width: 400px;
    margin-top: 0;
  }
}

/* A phone held sideways (844 × 390): the keyboard stands beside the board, so both fit the
   screen's height and no letter needs a scroll. Tiles follow the height; keys stay at least
   40 px high. The finished game puts its panel beside the board too. After the rules of the
   finished game, which it overrides, the desktop's 900 px layout included. */
@media (orientation: landscape) and (max-height: 540px) {
  .mot {
    --reserve: 166px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: var(--space-6);
    padding-top: 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }
  /* As wide as the board: the status lines wrap under it rather than push the keyboard. */
  .board-col {
    flex: none;
    width: min-content;
    min-width: 340px;
  }
  .board-col::before,
  .board-col::after {
    display: none;
  }
  .mot-status {
    margin-bottom: 6px;
  }
  .board {
    width: min(
      calc(var(--n, 5) * var(--tile-max) + (var(--n, 5) - 1) * var(--gap)),
      calc(100vw - 400px)
    );
  }
  .board[data-length='9'],
  .board[data-length='10'] {
    --gap: 4px;
  }
  .board[data-length='11'] {
    --gap: 3px;
  }
  .legend {
    margin-top: 8px;
  }
  .message-line {
    min-height: 1.5em;
    margin-top: 4px;
  }
  .keyboard {
    flex: 0 1 440px;
    min-width: 0;
    margin-top: 0;
    padding-top: 0;
    gap: 6px;
  }
  .key-row {
    gap: 5px;
  }
  .key {
    height: clamp(40px, calc((100dvh - var(--bar) - 40px) / 3 - 6px), 52px);
  }
  .mot.done {
    align-items: flex-start;
    padding-top: 12px;
  }
  .mot.done .board-col {
    width: auto;
  }
  .end {
    width: min(400px, 46vw);
    margin-top: 0;
  }
}

/* Dialogs: flat surfaces, a hairline, no blur or shadow. */
.le-mot dialog {
  width: calc(100% - 32px);
  max-width: 440px;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 16px 20px 24px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
}
.le-mot dialog::backdrop {
  background: rgb(8 10 18 / 0.8);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 -10px 12px 0;
}
.dialog-head h2 {
  font-size: var(--fs-22);
  line-height: 1.25;
  font-weight: 700;
}
.le-mot dialog p {
  margin-bottom: var(--space-3);
  font-size: var(--fs-15);
  color: var(--text-2);
}
.le-mot dialog .dialog-note {
  font-size: var(--fs-14);
  color: var(--text-3);
}
.help-legend {
  list-style: none;
  margin: var(--space-1) 0 var(--space-4);
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.help-legend li {
  display: flex;
  align-items: center;
  gap: 14px;
}
.help-legend .tile {
  width: var(--target);
  flex: none;
  font-size: var(--fs-22);
}
.le-mot .help-legend p {
  margin: 0;
}
.help-legend strong {
  color: var(--text);
  font-weight: 600;
}
.le-mot dialog .btn {
  margin-top: var(--space-2);
}
.le-mot dialog .dist {
  margin-bottom: var(--space-4);
}
/* The keyboard settings, until « Profil et données » is published. */
.settings {
  margin: var(--space-4) 0 var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.settings h3 {
  margin-bottom: var(--space-2);
  font-size: var(--fs-16);
  font-weight: 600;
}
.setting {
  min-width: 0;
  margin: 0 0 var(--space-3);
  padding: 0;
  border: 0;
}
.setting legend {
  margin-bottom: 6px;
  padding: 0;
  font-size: var(--fs-14);
  color: var(--text-2);
}
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.segmented label {
  position: relative;
}
.segmented input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.segmented span {
  min-height: var(--target);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  font-size: var(--fs-15);
  font-weight: 600;
  color: var(--text-2);
}
.segmented input:checked + span {
  border-color: var(--cyan);
  background: var(--raised);
  color: var(--text);
}
.segmented input:focus-visible + span {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}
.le-mot .settings .dialog-note:empty {
  display: none;
}
.text-btn {
  display: block;
  min-height: var(--target);
  margin: var(--space-2) auto 0;
  padding: 0 var(--space-2);
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-15);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.le-mot dialog a {
  color: var(--text);
}
.danger-button {
  min-height: var(--target);
  margin-top: var(--space-2);
  padding: 0 var(--space-4);
  border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--danger);
  font-size: var(--fs-15);
  font-weight: 600;
}
.danger-button.confirm {
  background: var(--danger);
  color: #2a0a04;
}
#reset-status.reset-feedback {
  margin-top: var(--space-3);
  padding: var(--space-4);
  border: 1px solid currentColor;
  border-radius: var(--r-md);
  font-size: var(--fs-15);
  font-weight: 600;
}
#reset-status.success {
  color: var(--lime);
}
#reset-status.error {
  color: var(--danger);
}

/* Motion is unchanged from the previous screen, and plays whatever
   `prefers-reduced-motion` says (#65). Transforms only: the grid never moves. */
.shake {
  animation: shake 0.2s ease-in-out 2;
}
@keyframes shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
/* A word the lexicon does not know: its typed letters fade out, the last one first.
   `app.ts` sets each delay and times the redraw to this 200 ms. */
.word-erase .tile + .tile {
  animation: letter-erase 200ms ease-in var(--erase-delay, 0ms) both;
}
@keyframes letter-erase {
  45% {
    transform: scale(0.82);
  }
  100% {
    transform: scale(1);
    color: transparent;
    border-color: var(--tile-line);
    background: var(--tile);
  }
}
.tile.letter-reward {
  animation: letter-reward 320ms ease-out;
}
.tile.letter-present {
  animation: letter-present 300ms ease-out;
}
@keyframes letter-reward {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-5px) scale(1.06);
  }
  70% {
    transform: translateY(1px) scale(1.01);
  }
}
@keyframes letter-present {
  0%,
  100% {
    transform: rotate(0);
  }
  30% {
    transform: rotate(-5deg);
  }
  65% {
    transform: rotate(4deg);
  }
}
/* One short, staggered pop per winning letter; local sparks never intercept input (#53). */
.word-victory .tile {
  z-index: 1;
  animation: winning-letter 580ms cubic-bezier(0.2, 0.7, 0.25, 1) var(--victory-delay, 0ms) both;
}
.word-victory .tile::before,
.word-victory .tile::after {
  content: '';
  position: absolute;
  pointer-events: none;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0;
  background: var(--mot-yellow);
  box-shadow:
    -12px -8px var(--mot-yellow),
    10px -13px #f5f2df,
    17px 2px var(--mot-red),
    -16px 7px #f5f2df,
    5px 13px var(--mot-yellow);
  animation: winning-sparks 620ms ease-out var(--victory-delay, 0ms) both;
}
.word-victory .tile::after {
  width: 3px;
  height: 6px;
  border-radius: 1px;
  --spark-turn: 65deg;
  box-shadow:
    -8px -15px #f5f2df,
    14px -7px var(--mot-red),
    11px 12px var(--mot-yellow),
    -13px 12px var(--mot-red);
  animation-duration: 680ms;
}
@keyframes winning-letter {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  28% {
    transform: translateY(-12px) scale(1.22) rotate(-3deg);
  }
  52% {
    transform: translateY(2px) scale(0.96) rotate(2deg);
  }
  75% {
    transform: translateY(-3px) scale(1.06);
  }
}
@keyframes winning-sparks {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45) rotate(0);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -70%) scale(1.9) rotate(var(--spark-turn, -25deg));
  }
}
