/* word-chain - progress panels, coach line, turn ring and hit flashes. Pairs with wc-progress/meta/coach/feel.js. */
#wc-coach[hidden], .wcm[hidden] { display: none; }
.wc-coach { margin: 0; padding: 8px 12px; border-radius: 12px; border: 2px dashed var(--wc-a, #0891B2); background: color-mix(in srgb, var(--wc-a, #0891B2) 9%, var(--wc-card, #fff));
  color: var(--wc-ink, #1e293b); font: 600 .84rem/1.35 'Plus Jakarta Sans', system-ui, sans-serif; text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.wc-letter[role="button"] { cursor: pointer; min-width: 64px; min-height: 64px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.wc-letter[role="button"]:focus-visible { outline: 3px solid var(--color-focus, #0891B2); outline-offset: 3px; border-radius: 16px; }
.wc .btn, .wc-go, #wc-hint { min-height: 44px; }
#wc-hint { min-width: 44px; }

.wc:has(.wc-panel:not([hidden])) { min-height: 470px; }
.wcm { width: 100%; max-width: 22em; display: grid; gap: 6px; text-align: left; padding: 8px 10px; border: 2px solid var(--wc-rule, #e2e8f0); border-radius: 12px; background: color-mix(in srgb, var(--wc-card, #fff) 80%, transparent); }
.wcm-first { margin: 0; text-align: center; font-size: .8rem; color: var(--wc-mute, #475569); }
.wcm-note { margin: 0; text-align: center; font: 800 .85rem/1.2 'Plus Jakarta Sans', system-ui, sans-serif; color: #c2410c; animation: wcPop .5s ease-out; }
.wcm-rank { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wcm-name { font: 800 .95rem/1.1 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--wc-ink, #1e293b); }
.wcm-next { font: 500 .7rem/1.2 'JetBrains Mono', monospace; color: var(--wc-mute, #475569); }
.wcm-bar { height: 8px; border-radius: 99px; background: var(--wc-rule, #e2e8f0); overflow: hidden; }
.wcm-bar i { display: block; height: 100%; background: var(--wc-a, #0891B2); transform-origin: left center; transition: transform .5s ease-out; }
.wcm-streak { margin: 0; font: 600 .74rem/1.2 'JetBrains Mono', monospace; color: #c2410c; }
.wcm-goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.wcm-goals li { font-size: .78rem; line-height: 1.3; color: var(--wc-mute, #475569); padding-left: 1.5em; position: relative; }
.wcm-goals li::before { content: ''; position: absolute; left: 0; top: .12em; width: 1em; height: 1em; border: 2px solid var(--wc-mute, #475569); border-radius: 4px; box-sizing: border-box; }
.wcm-goals li.done { color: var(--wc-ink, #1e293b); font-weight: 700; }
.wcm-goals li.done::before { background: #16a34a; border-color: #16a34a; }
.wcm-goals li.done::after { content: ''; position: absolute; left: .32em; top: .26em; width: .3em; height: .55em; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(40deg); }
.wcm-goals li.fresh { animation: wcPop .6s ease-out; }

.wc-score.pb::after { content: ' PB'; font-size: .7rem; font-weight: 800; color: #c2410c; letter-spacing: .06em; }
.wc-stage::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; box-shadow: inset 0 0 0 4px var(--fx, transparent), inset 0 0 26px 6px var(--fx, transparent); }
.wc-stage.fx-good { --fx: rgb(22 163 74 / .55); }
.wc-stage.fx-bad { --fx: rgb(225 29 72 / .6); }
.wc-stage.fx-win { --fx: rgb(245 158 11 / .75); }
.wc-stage.fx-good::after, .wc-stage.fx-bad::after, .wc-stage.fx-win::after { animation: wcFx .55s ease-out; }
.wc-stage[data-turn="me"] { border-color: #d97706; }
@keyframes wcFx { 0% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .wc-stage.fx-good::after, .wc-stage.fx-bad::after, .wc-stage.fx-win::after { animation: none; opacity: .6; }
  .wcm-bar i { transition: none; }
}
