/* Turn readout v4 — one glanceable message (2026-10-11). Loaded last.

     TURN 3 / 6   ★★★        battle: the turn and the limit of the best star tier still reachable
     TURN 8 / 9   ★★☆        ★★★ lost → the limit becomes Par, the third star turns to stone
     TURN 10  OVERTIME ★☆☆   past Par: ember
     MOVES 10   ★★★          trial: moves counting down

   History, all rejected by the owner: "TURN 1 / PAR 8" (unclear), "★★★ 9 left · ★★ 13" (two adjacent counts, tiny
   clusters), a progress track with star markers ("làm đơn giản, rõ số là được, không cần phải phức tạp").
   Rule: a number + a state icon, nothing else. Forged numerals for the counts, painted stars (clean star /
   starEmpty) at 15 px with 2 px air, no labels on stars, no boxes. Lives on the top bar's second line. */

#game .b-top .battle-meta { align-items: center; gap: 7px; margin-top: 3px; line-height: 1; }
#game .b-top .title small:not([hidden])::after { padding-left: 7px; }
#game .b-top .battle-meta .sub { font: 600 11px/1 var(--ff-body); letter-spacing: .06em; text-transform: uppercase; color: #bdb59e;
  flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
#game .b-top .battle-meta .sub .wv-s { display: none; }
@media (max-width: 400px) {
  #game .b-top .battle-meta .sub .wv-l { display: none; }
  #game .b-top .battle-meta .sub .wv-s { display: inline; }
}

#game .b-top .turn-counter {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto;
  font: 600 12px/1 var(--ff-body); letter-spacing: .02em; color: #d9ceb3; text-transform: none;
}
#game .b-top .turn-counter .tc-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- the count: small tracked label + forged numerals; "/ 6" a step dimmer */
#game .b-top .turn-counter .tc-turn { display: inline-flex; align-items: baseline; gap: 5px; flex: none; color: inherit; font: inherit; }
#game .b-top .turn-counter .tc-label {
  display: inline; margin: 0; font: 700 11px/1 var(--ff-body); letter-spacing: .1em; text-transform: uppercase; color: #bfb08a;
}
#game .b-top .turn-counter .tc-num, #game .b-top .turn-counter .tc-lim {
  display: inline-block; text-align: center;
  font-family: var(--ff-forge); font-weight: 900; font-size: 18px; line-height: .9; letter-spacing: 0;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--forge-solid); text-shadow: none;
  --forge-fill: var(--forge-fill-lite);
  filter: drop-shadow(0 1px 0 var(--forge-edge)) drop-shadow(0 0 1.5px #000000d9);
}
#game .b-top .turn-counter .tc-num { min-width: 1.1em; }
#game .b-top .turn-counter .tc-lim { font-size: 16px; opacity: .72; margin-left: -3px; }
#game .b-top .turn-counter .tc-lim:empty { display: none; }
#game .b-top .turn-counter .tc-lim i { display: inline-block; font-style: normal; font-weight: 700; line-height: .9; padding: 0 .28em 0 .05em; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  #game .b-top .turn-counter .tc-num, #game .b-top .turn-counter .tc-lim {
    background-image: var(--forge-fill); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
}
#game .b-top .turn-counter .tick { animation: tc-tick 260ms cubic-bezier(.2, .8, .3, 1); }
@keyframes tc-tick { from { transform: translateY(-2px) scale(1.16); } to { transform: none; } }

/* ---- state: three painted stars (what a win right now gives) */
#game .b-top .turn-counter .tc-par { display: inline-flex; align-items: center; gap: 8px; flex: none; margin: 0; padding: 0; border: 0; color: inherit; font: inherit; }
#game .b-top .turn-counter .tc-stars { display: inline-flex; align-items: center; gap: 2px; }
#game .b-top .turn-counter .tc-star { display: block; width: 15px; height: 15px; font-style: normal; color: #f2c25a; font-size: 14px; line-height: 15px; text-align: center; }
#game .b-top .turn-counter .tc-star img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 1px #000); }
#game .b-top .turn-counter .tc-star[data-s="off"] { opacity: .85; color: #6b7076; }
#game .b-top .turn-counter .tc-star[data-s="risk"] img { filter: saturate(.25) brightness(.7) drop-shadow(0 1px 1px #000); }
#game .b-top .turn-counter .tc-star[data-s="risk"] { color: #8d8065; }
#game .b-top .turn-counter .tc-star.dropped { animation: tc-drop 520ms ease-out; }
@keyframes tc-drop {
  0% { transform: scale(1.15); opacity: 1; }
  15% { transform: translateX(-2px) rotate(-8deg); }
  30% { transform: translateX(2px) rotate(6deg); }
  45% { transform: translateX(-1.5px) rotate(-3deg); }
  60% { transform: translateX(1px); }
  100% { transform: none; }
}

/* ---- overtime: ember word + ember numeral; also the last trial moves */
#game .b-top .turn-counter .tc-ot { display: none; font: 800 11px/1 var(--ff-body); letter-spacing: .14em; text-transform: uppercase; color: #ff9a55; }
#game .b-top .turn-counter.over-par .tc-ot { display: inline; }
#game .b-top .turn-counter.over-par .tc-num, #game .b-top .turn-counter.trial.near-par .tc-num {
  --forge-fill: var(--forge-ember-fill); filter: drop-shadow(0 1px 0 var(--forge-edge)) drop-shadow(0 0 5px #ff7a2a8c);
}
#game .b-top .turn-counter.over-par .tc-label, #game .b-top .turn-counter.trial.near-par .tc-label { color: #f09a62; }
/* old near/over colours from system.css must not tint the whole row */
#game .b-top .turn-counter.near-par .tc-par, #game .b-top .turn-counter.over-par .tc-turn { color: inherit; }
#game .b-top .turn-counter.over-par { color: #d9ceb3; }

@media (prefers-reduced-motion: reduce) {
  #game .b-top .turn-counter .tick, #game .b-top .turn-counter .dropped { animation: none; }
}
@media (forced-colors: active) {
  #game .b-top .turn-counter .tc-num, #game .b-top .turn-counter .tc-lim { background: none; -webkit-text-fill-color: CanvasText; filter: none; }
}
