/* GAME-SPEC v2.0 §18: kola gapfill / match / quiz a úvodní karty bloků (renderer deck/js/rounds-view.js).
   Sdílí /host (světlý i tmavý embedded) a deck tour. Barvy z proměnných rodiče (--fg, --muted, --soft, --line, --ok,
   --accent, --gold, --ink), velikost z --tr-u (host 1vw, deck 19.2px na plátně 1920). Klid: žádné dekorativní animace. */
.tr {
  --u: var(--tr-u, 1vw);
  display: flex;
  flex-direction: column;
  gap: calc(1.1 * var(--u));
  height: 100%;
  min-height: 0;
  color: var(--fg);
}
.tr-head { display: flex; align-items: baseline; gap: calc(1 * var(--u)); }
.tr-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; font-size: clamp(14px, calc(1.05 * var(--u)), 22px); color: var(--muted); }
.tr-of { margin-left: auto; font-weight: 800; font-size: clamp(16px, calc(1.3 * var(--u)), 28px); font-variant-numeric: tabular-nums; color: var(--muted); }

.tr-prompt { margin: 0; font-weight: 800; font-size: clamp(26px, calc(3.1 * var(--u)), 62px); line-height: 1.18; letter-spacing: -0.01em; text-wrap: balance; }
.tr-def { font-weight: 700; }
.tr-def.is-small { font-size: clamp(20px, calc(2 * var(--u)), 40px); color: var(--muted); }
.tr-gap { display: inline-block; min-width: 4.2em; border-bottom: 0.08em solid var(--fg); margin: 0 0.12em; text-align: center; line-height: 1.05; }
.tr-gap.is-filled { border-color: var(--ok); color: var(--ok); padding: 0 0.15em; }
.tr-at { margin: 0; font-weight: 700; color: var(--muted); font-size: clamp(16px, calc(1.3 * var(--u)), 26px); }
.tr-ask { margin: 0; color: var(--muted); font-size: clamp(16px, calc(1.4 * var(--u)), 28px); font-weight: 600; }

/* volby */
.tr-opts { list-style: none; margin: calc(0.4 * var(--u)) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: calc(0.8 * var(--u)); }
.tr-opt { position: relative; display: flex; align-items: center; gap: 0.6em; min-height: calc(5.4 * var(--u)); padding: calc(0.8 * var(--u)) calc(1.2 * var(--u)); border-radius: 14px; background: var(--soft); border: 2px solid var(--line); font-weight: 750; font-size: clamp(20px, calc(2 * var(--u)), 40px); line-height: 1.15; overflow: hidden; }
.tr-shape { font-size: 1.05em; flex: 0 0 auto; }
.tr-otext { position: relative; z-index: 1; flex: 1; min-width: 0; }
.tr-opts-quiz .tr-opt { color: #fff; border-color: transparent; }
.tr-opts-quiz .k0 { background: #e21b3c; }
.tr-opts-quiz .k1 { background: #1368ce; }
.tr-opts-quiz .k2 { background: #c98a00; }
.tr-opts-quiz .k3 { background: #26890c; }
.tr-opts-gapfill { grid-template-columns: repeat(4, 1fr); }
.tr-opts-gapfill .tr-opt { justify-content: center; text-align: center; }
.tr-opts-match { grid-template-columns: repeat(4, 1fr); gap: calc(0.6 * var(--u)); }
.tr-opts-match .tr-opt { min-height: calc(4 * var(--u)); font-size: clamp(16px, calc(1.45 * var(--u)), 30px); }
.tr-opt.is-used { opacity: 0.4; }

/* odpověď: rozložení hlasů jako Kahoot */
.tr-r .tr-opts-gapfill, .tr-r .tr-opts-quiz { grid-template-columns: 1fr 1fr; }
.tr-opt .tr-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: transparent; }
.tr-opt .tr-bar i { display: block; height: 100%; width: 0; background: currentColor; opacity: 0.55; }
.tr-opt .tr-n { position: relative; z-index: 1; font-variant-numeric: tabular-nums; font-size: 0.85em; opacity: 0.9; }
.tr-opt.is-wrong { opacity: 0.38; }
.tr-opt.is-right { border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok); opacity: 1; }
.tr-opts-gapfill .tr-opt.is-right { color: var(--ok); }
.tr-opt.is-right .tr-otext::before { content: "\2713\00a0"; }

.tr-answer { margin: 0; font-weight: 850; color: var(--ok); font-size: clamp(36px, calc(4.4 * var(--u)), 88px); line-height: 1.05; letter-spacing: -0.015em; }
.tr-example { margin: 0; display: flex; flex-direction: column; gap: 0.35em; max-width: 60em; }
.tr-ex-label { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; font-size: clamp(13px, calc(1 * var(--u)), 20px); color: var(--muted); }
.tr-ex-text { font-weight: 600; font-size: clamp(20px, calc(2 * var(--u)), 40px); line-height: 1.25; }
.tr-transcript { margin: 0; font-size: clamp(18px, calc(1.7 * var(--u)), 34px); line-height: 1.3; color: var(--muted); font-style: italic; }
.tr-q-mark { font-style: normal; }
.tr-at-inline { font-style: normal; font-weight: 700; margin-left: 0.6em; padding: 0.05em 0.45em; border-radius: 8px; border: 1px solid var(--line); font-size: 0.8em; }
.tr-stat { margin: auto 0 0; font-weight: 700; font-size: clamp(18px, calc(1.6 * var(--u)), 32px); color: var(--muted); }

/* časovač a kdo odpověděl */
.tr-foot { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: calc(1.2 * var(--u)); margin-top: auto; }
.tr-timer { height: 14px; border-radius: 7px; background: var(--soft); overflow: hidden; }
.tr-timer i { display: block; height: 100%; background: var(--fg); transform-origin: left center; }
.tr-timer.low i { background: var(--accent); }
.tr-time { font-weight: 850; font-variant-numeric: tabular-nums; font-size: clamp(30px, calc(3.4 * var(--u)), 68px); min-width: 2.4em; text-align: right; }
.tr-answered { font-weight: 700; color: var(--muted); font-size: clamp(16px, calc(1.4 * var(--u)), 28px); }
.tr-who { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-height: calc(7 * var(--u)); overflow: hidden; }
.tr-who li { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 12px 3px 4px; font-size: clamp(13px, calc(1 * var(--u)), 19px); font-weight: 650; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.tr-who li.done { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tr-who .av { width: 1.6em; height: 1.6em; }
.tr-who .av svg { width: 100%; height: 100%; display: block; }

/* úvodní karta bloku */
.tr-intro { justify-content: center; }
.tr-card { max-width: 62em; }
.tr-card .tr-kicker { display: block; margin: 0 0 calc(1 * var(--u)); font-size: clamp(16px, calc(1.4 * var(--u)), 28px); color: var(--gold, var(--muted)); }
.tr-title { margin: 0; font-weight: 900; font-size: clamp(48px, calc(6.4 * var(--u)), 128px); line-height: 0.98; letter-spacing: -0.02em; }
.tr-instr { margin: calc(1.6 * var(--u)) 0 0; font-size: clamp(24px, calc(2.6 * var(--u)), 52px); font-weight: 650; line-height: 1.2; }
.tr-meta { margin: calc(1.2 * var(--u)) 0 0; font-size: clamp(18px, calc(1.6 * var(--u)), 32px); color: var(--muted); font-weight: 600; }
.tr-hint { margin: calc(2.4 * var(--u)) 0 0; font-size: clamp(14px, calc(1.1 * var(--u)), 22px); color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; }
