/* Test de frappe */
.ty { display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.6vh, 18px); width: min(980px, 100%); margin: 0 auto; text-align: center; }
.ty-out { display: flex; align-items: baseline; justify-content: center; gap: .14em; font-family: var(--f-display); font-size: clamp(84px, min(11vw, 17vh), 170px); line-height: .95; }
.ty-big { font-variant-numeric: tabular-nums; }
.ty-unit { font-size: .26em; }
.ty-detail { margin: 0; min-height: 1.35em; font-size: clamp(17px, 1.7vw, 22px); font-weight: 500; line-height: 1.3; opacity: .94; }
/* Le texte : trois lignes dans le cadre maison ; la ligne en cours glisse vers le haut */
.ty-box { position: relative; width: 100%; box-sizing: border-box; padding: 18px 26px; border-radius: 22px; background: var(--frame); cursor: text; text-align: left; transition: background-color .2s; }
.ty-box:hover, .ty-box.is-focus { background: var(--frame-hi); }
.ty-win { --lh: 1.55em; height: calc(var(--lh) * 3); overflow: hidden; font-size: clamp(21px, 2.2vw, 30px); font-weight: 500; line-height: var(--lh); }
.ty-text { transition: transform .28s var(--ease, ease); will-change: transform; }
.ty-w { white-space: nowrap; }
.ty-c { opacity: .55; border-radius: 3px; }
.ty-c.ok { opacity: 1; }
.ty-c.ko { opacity: 1; background: var(--white); color: var(--bg); }
.ty-c.cur { opacity: 1; box-shadow: -2px 0 0 0 var(--white); }
.ty-box:not(.is-focus) .ty-c.cur { box-shadow: none; }
.ty-box.is-focus .ty-c.cur { animation: ty-blink 1s steps(1) infinite; }
.ty[data-state="run"] .ty-box.is-focus .ty-c.cur { animation: none; }
@keyframes ty-blink { 50% { box-shadow: -2px 0 0 0 transparent; } }
.ty-in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; font-size: 16px; color: transparent; background: transparent; caret-color: transparent; cursor: text; }
.ty[data-state="done"] .ty-c:not(.ok):not(.ko) { opacity: .3; }
@media (max-width: 520px) {
  .ty-detail { min-height: 2.6em; display: flex; align-items: center; justify-content: center; }
  .ty-verdict { display: none; }
  .ty-box { padding: 12px 14px; border-radius: 16px; }
  .ty-win { font-size: 20px; }
  .ty-bar .ty-opt { display: none; }
}
