/* LEAD Linguistic: practice games. Every rule is scoped to .tl-games and uses the theme tokens. */

.tl-games { position: relative; color: var(--ink); font-family: var(--f-body); line-height: 1.55; --tlg-tone: var(--purple); }
.tl-games *, .tl-games *::before, .tl-games *::after { box-sizing: border-box; }
.tl-games :where(button, input) { font: inherit; letter-spacing: inherit; }
.tl-games :where(p, h2, h3, ul, ol, dl, dd, fieldset, figure) { margin: 0; }
.tl-games :where(ul, ol) { list-style: none; padding: 0; }
.tl-games [hidden] { display: none !important; }
.tl-games .tlg-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.tl-games [tabindex="-1"]:focus { outline: none; }
.tl-games .ic { width: 20px; height: 20px; flex: none; }
.tl-games .tlg-flip { transform: scaleX(-1); }
.tl-games kbd { display: inline-block; min-width: 1.7em; padding: 1px 6px; border: 1.5px solid rgba(30, 20, 48, .28); border-bottom-width: 3px; border-radius: 5px; font-family: var(--f-mono); font-size: .78em; line-height: 1.4; text-align: center; color: var(--ink); background: var(--sheet); }

/* Skill tones */
.tl-games .tlg-tone--reading { --tlg-tone: var(--purple); }
.tl-games .tlg-tone--listening { --tlg-tone: var(--pen); }
.tl-games .tlg-tone--writing { --tlg-tone: var(--red); }
.tl-games .tlg-tone--speaking { --tlg-tone: var(--green-2); }
.tl-games .tlg-tone--grammar { --tlg-tone: var(--ink-2); }
.tl-games .tlg-tone--vocabulary { --tlg-tone: var(--sun-2); }

/* Gentle entrance whenever the stage changes */
.tl-games .tlg-stage.is-in > * { animation: tlgIn .55s var(--ease) both; }
@keyframes tlgIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes tlgDraw { from { stroke-dashoffset: 100; } }
@keyframes tlgFade { from { opacity: 0; } }
@keyframes tlgThump { from { opacity: 0; transform: rotate(-12deg) scale(1.6); } 60% { opacity: 1; transform: rotate(-12deg) scale(.94); } }
@keyframes tlgPop { 0% { opacity: 0; transform: translate(0, 4px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(0, -22px); } }
@keyframes tlgEq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes tlgPulse { 50% { transform: scale(1.12); } }
@keyframes tlgCard { from { opacity: 0; transform: translateY(14px) rotate(var(--tilt, 0deg)); } }

/* ===================================================================== hub */
.tl-games .tlg-hub__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 30px; margin-bottom: clamp(34px, 5vw, 60px); }
.tl-games .tlg-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-games .tlg-filter { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 8px 16px; border-radius: 999px; border: 1.5px solid rgba(30, 20, 48, .25); background: transparent; color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.1; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .3s var(--ease); }
.tl-games .tlg-filter span { font-family: var(--f-mono); font-size: .76rem; font-weight: 600; color: var(--muted); transition: color .2s; }
.tl-games .tlg-filter:hover { border-color: var(--tlg-tone); transform: translateY(-1px); }
.tl-games .tlg-filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tl-games .tlg-filter[aria-pressed="true"] span { color: var(--sun); }
.tl-games .tlg-hub__note { font-family: var(--f-hand); color: var(--red); font-size: 1.2rem; line-height: 1.3; transform: rotate(-1.5deg); max-width: 22em; }

.tl-games .tlg-group + .tlg-group { margin-top: clamp(50px, 6vw, 84px); }
.tl-games .tlg-group__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding-bottom: 14px; margin-bottom: clamp(22px, 2.6vw, 32px); border-bottom: 1.5px solid rgba(30, 20, 48, .16); }
.tl-games .tlg-group__h { display: flex; align-items: center; gap: 14px; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.75rem, 2.8vw, 2.5rem); line-height: 1.05; letter-spacing: -.01em; color: var(--ink); }
.tl-games .tlg-group__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--tlg-tone); color: var(--paper); flex: none; }
.tl-games .tlg-tone--vocabulary .tlg-group__ic { color: var(--ink); }
.tl-games .tlg-group__ic .ic { width: 21px; height: 21px; }
.tl-games .tlg-group__n { font-family: var(--f-hand); color: var(--red); font-size: 1.25rem; line-height: 1; transform: rotate(-3deg) translateY(4px); }

.tl-games .tlg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: clamp(20px, 2.2vw, 30px) clamp(18px, 2vw, 28px); }
.tl-games .tlg-cards__li { display: flex; --tilt: -.6deg; }
.tl-games .tlg-cards__li:nth-child(4n + 2) { --tilt: .5deg; }
.tl-games .tlg-cards__li:nth-child(4n + 3) { --tilt: -.25deg; }
.tl-games .tlg-cards__li:nth-child(4n + 4) { --tilt: .8deg; }
.tl-games .tlg-stage.is-in .tlg-cards__li, .tl-games .tlg-hub.is-filtered .tlg-cards__li { animation: tlgCard .6s var(--ease) both; animation-delay: calc(min(var(--k, 0), 14) * 35ms); }

/* An index card: tone tab on top, red header rule, blue ruled lines below */
.tl-games .tlg-card { --lh: 28px; position: relative; display: flex; flex-direction: column; width: 100%; min-height: 238px; background: var(--sheet); color: var(--ink); text-decoration: none; border-radius: 3px 3px 5px 5px; border-top: 5px solid var(--tlg-tone); box-shadow: 0 1px 1px rgba(30, 20, 48, .06), 0 14px 26px -16px rgba(30, 20, 48, .45); transform: rotate(var(--tilt, 0deg)); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.tl-games .tlg-card:hover, .tl-games .tlg-card:focus-visible { transform: rotate(0deg) translateY(-6px); box-shadow: 0 2px 2px rgba(30, 20, 48, .06), 0 28px 40px -22px rgba(30, 20, 48, .55); }
.tl-games .tlg-card:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
.tl-games .tlg-card__head { display: block; padding: 16px 20px 12px; border-bottom: 2px solid var(--margin); }
.tl-games .tlg-card.has-best .tlg-card__head { padding-right: 76px; }
.tl-games .tlg-card__t { display: block; font-family: var(--f-display); font-size: 1.32rem; line-height: 1.16; letter-spacing: -.005em; text-wrap: balance; }
.tl-games .tlg-card__t span { background-image: linear-gradient(var(--red), var(--red)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 2px; transition: background-size .55s var(--ease); }
.tl-games .tlg-card:hover .tlg-card__t span, .tl-games .tlg-card:focus-visible .tlg-card__t span { background-size: 100% 2px; }
.tl-games .tlg-card__body { flex: 1; display: flex; flex-direction: column; padding: 4px 20px 10px; line-height: var(--lh); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px), var(--rule) var(--lh)); background-position: 0 4px; }
.tl-games .tlg-card__d { display: block; font-size: .97rem; color: var(--ink-2); margin-bottom: var(--lh); }
.tl-games .tlg-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tl-games .tlg-card__meta { display: flex; flex-direction: column; font-family: var(--f-mono); font-size: .76rem; color: var(--muted); min-width: 0; }
.tl-games .tlg-card__meta span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tl-games .tlg-card__meta .ic { width: 14px; height: 14px; }
.tl-games .tlg-card__meta .tlg-card__snd { margin-left: 4px; color: var(--pen); }
.tl-games .tlg-card__best { position: absolute; top: -14px; right: 14px; padding: 5px 10px 3px; background: var(--sun); color: var(--ink); font-family: var(--f-hand); font-weight: 700; font-size: .98rem; line-height: 1.1; transform: rotate(4deg); box-shadow: 0 6px 12px -8px rgba(120, 80, 0, .6); }

/* Stamps: a teacher's rubber stamp for each format */
.tl-games .tlg-stamp { --s: var(--purple); flex: none; display: inline-block; font-family: var(--f-mono); font-weight: 800; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1.15; text-align: center; color: var(--s); border: 3px double var(--s); border-radius: 6px; padding: 5px 8px 4px; max-width: 8.6em; transform: rotate(-7deg); mix-blend-mode: multiply; opacity: .88; transition: transform .45s var(--ease); }
.tl-games .tlg-card:hover .tlg-stamp { transform: rotate(-11deg) scale(1.05); }
.tl-games .tlg-stamp--listen-mcq { --s: var(--pen); }
.tl-games .tlg-stamp--dictation { --s: var(--red); }
.tl-games .tlg-stamp--type { --s: var(--green-2); }
.tl-games .tlg-stamp--flash { --s: var(--ink-2); }

/* ============================================================= game frame */
.tl-games .tlg-game { max-width: 900px; margin: 0 auto; }
.tl-games .tlg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 18px; }
.tl-games .tlg-back { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 8px 16px 8px 12px; border-radius: 999px; border: 1.5px solid rgba(30, 20, 48, .25); background: transparent; color: var(--ink); font-weight: 600; font-size: .95rem; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.tl-games .tlg-back .ic { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.tl-games .tlg-back:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tl-games .tlg-back:hover .ic { transform: scaleX(-1) translateX(3px); }
.tl-games .tlg-bar__t { font-family: var(--f-display); font-size: 1.12rem; line-height: 1.2; color: var(--ink-2); min-width: 0; }

/* The exam paper: margin rule, punched holes, a second sheet underneath */
.tl-games .tlg-desk { position: relative; }
.tl-games .tlg-desk::before { content: ""; position: absolute; inset: 18px -8px -12px 14px; background: var(--sheet); border-radius: 4px; transform: rotate(1.3deg); box-shadow: 0 16px 30px -18px rgba(30, 20, 48, .4); pointer-events: none; }
.tl-games .tlg-desk--end::before { transform: rotate(2.4deg); }
.tl-games .tlg-sheet { position: relative; background: var(--sheet); border-radius: 4px 4px 6px 6px; box-shadow: var(--shadow-paper); padding: clamp(22px, 3vw, 34px) clamp(18px, 3.6vw, 46px) clamp(26px, 3.2vw, 40px) 88px; }
.tl-games .tlg-sheet::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background-image: linear-gradient(90deg, transparent 58px, var(--margin) 58px, var(--margin) 60px, transparent 60px), radial-gradient(circle at 26px 70px, var(--paper-2) 8px, transparent 9px), radial-gradient(circle at 26px 50%, var(--paper-2) 8px, transparent 9px), radial-gradient(circle at 26px calc(100% - 70px), var(--paper-2) 8px, transparent 9px); }
.tl-games .tlg-sheet > * { position: relative; }
.tl-games .tlg-end { transform: rotate(-.5deg); }

.tl-games .tlg-loading { min-height: 220px; display: grid; place-items: center; }
.tl-games .tlg-loading__t { font-family: var(--f-hand); color: var(--pen); font-size: 1.4rem; }
.tl-games .tlg-loading__t::after { content: ""; display: block; height: 3px; margin-top: 6px; background: var(--red); border-radius: 2px; transform-origin: left; animation: tlgLoad 1.2s var(--ease) infinite; }
@keyframes tlgLoad { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.tl-games .tlg-err { min-height: 220px; }
.tl-games .tlg-err__h { font-family: var(--f-display); font-size: 1.7rem; line-height: 1.15; margin-bottom: 10px; }
.tl-games .tlg-err p { color: var(--ink-2); margin-bottom: 18px; }

.tl-games .tlg-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.04; letter-spacing: -.02em; text-wrap: balance; margin-bottom: 18px; color: var(--ink); }
.tl-games .tlg-lede { font-size: clamp(1.04rem, 1.3vw, 1.15rem); line-height: 1.6; color: var(--ink-2); max-width: 38em; margin-bottom: 22px; }
.tl-games .tlg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 8px; }
.tl-games .tlg-actions .btn .ic { width: 18px; height: 18px; }
.tl-games .tlg-keys { font-size: .88rem; color: var(--muted); line-height: 1.5; }
.tl-games .tlg-keys--c { text-align: center; margin-top: 16px; }
.tl-games .tlg-link { -webkit-appearance: none; appearance: none; margin: 0 0 0 8px; padding: 6px 2px; border: 0; background: none; color: var(--purple); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }

/* Intro */
.tl-games .tlg-fields { display: flex; flex-wrap: wrap; gap: 6px 26px; padding: 0 0 14px; margin-bottom: 20px; border-bottom: 2px solid var(--rule); }
.tl-games .tlg-fields li { display: flex; align-items: baseline; gap: 8px; }
.tl-games .tlg-fields span { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); }
.tl-games .tlg-fields em { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-hand); font-style: normal; font-size: 1.18rem; color: var(--pen); }
.tl-games .tlg-fields em .ic { width: 16px; height: 16px; color: var(--pen); }
.tl-games .tlg-note { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 22px; padding: 14px 16px; border-radius: 8px; background: var(--lilac); color: var(--ink); font-size: .98rem; line-height: 1.5; max-width: 40em; }
.tl-games .tlg-note .ic { color: var(--purple); margin-top: 1px; }
.tl-games .tlg-note--warn { background: rgba(207, 53, 39, .08); box-shadow: inset 3px 0 0 var(--red); }
.tl-games .tlg-note--warn .ic { color: var(--red); }
.tl-games .tlg-len { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 14px; border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.tl-games .tlg-len__l { grid-column: 1 / -1; padding: 0; margin-bottom: 2px; font-family: var(--f-hand); color: var(--red); font-size: 1.2rem; }
.tl-games .tlg-len__o { position: relative; cursor: pointer; display: block; }
.tl-games .tlg-len__o input { position: absolute; opacity: 0; pointer-events: none; }
.tl-games .tlg-len__o > span { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 12px 22px; border-radius: 4px; background: #fff; border: 1.5px solid rgba(30, 20, 48, .18); box-shadow: 0 8px 16px -14px rgba(30, 20, 48, .45); transition: border-color .2s, transform .35s var(--ease); }
.tl-games .tlg-len__o b { font-weight: 700; }
.tl-games .tlg-len__o small { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); }
.tl-games .tlg-len__o:hover > span { border-color: var(--purple); transform: translateY(-2px); }
.tl-games .tlg-len__o input:focus-visible + span { outline: 3px solid var(--purple); outline-offset: 3px; }
.tl-games .tlg-ringmark { position: absolute; left: -9%; top: -20%; width: 118%; height: 140%; overflow: visible; fill: none; stroke: var(--red); stroke-width: 2.6; stroke-linecap: round; pointer-events: none; opacity: 0; }
.tl-games .tlg-ringmark path { vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .7s var(--ease); }
.tl-games .tlg-len__o input:checked + span { border-color: transparent; }
.tl-games .tlg-len__o input:checked + span .tlg-ringmark { opacity: 1; }
.tl-games .tlg-len__o input:checked + span .tlg-ringmark path { stroke-dashoffset: 0; }
.tl-games .tlg-best { margin-top: 18px; font-family: var(--f-hand); color: var(--red); font-size: 1.2rem; transform: rotate(-1.5deg); }

/* ================================================================= play */
.tl-games .tlg-hud { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: flex-end; gap: 8px clamp(18px, 5vw, 56px); padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid var(--rule); }
.tl-games .tlg-hud__f { position: relative; display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.tl-games .tlg-hud__f > span { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); letter-spacing: .04em; margin-bottom: 2px; }
.tl-games .tlg-hud__f > b { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-hand); font-weight: 700; font-size: 1.5rem; line-height: 1.1; color: var(--pen); }
.tl-games .tlg-hud__f small { font-weight: 400; font-size: .72em; color: var(--muted); }
.tl-games .tlg-hud__f.is-hot > b { color: var(--red); animation: tlgPulse .5s var(--ease); }
.tl-games .tlg-pop { position: absolute; left: 100%; bottom: 4px; margin-left: 2px; font-family: var(--f-hand); font-style: normal; font-weight: 700; font-size: 1.1rem; color: var(--red); white-space: nowrap; opacity: 0; pointer-events: none; }
.tl-games .tlg-pop.is-on { animation: tlgPop 1.1s var(--ease) forwards; }
.tl-games .tlg-hud__clock { margin-left: auto; }
.tl-games .tlg-hud__clock > b svg { width: 30px; height: 30px; transform: rotate(-90deg); }
.tl-games .tlg-clock__track { fill: none; stroke: rgba(30, 20, 48, .12); stroke-width: 4; }
.tl-games .tlg-clock__bar { fill: none; stroke: var(--pen); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .12s linear, stroke .3s; }
.tl-games .tlg-hud__clock [data-left] { min-width: 1.4em; font-variant-numeric: tabular-nums; }
.tl-games .tlg-hud__clock.is-low > b { color: var(--red); }
.tl-games .tlg-hud__clock.is-low .tlg-clock__bar { stroke: var(--red); }
.tl-games .tlg-hud__clock.is-low:not(.is-done) [data-left] { display: inline-block; animation: tlgPulse 1s ease-in-out infinite; }
.tl-games .tlg-hud__clock.is-wait > b, .tl-games .tlg-hud__clock.is-off > b { color: var(--muted); }
.tl-games .tlg-hud__clock.is-wait > span::after { content: " waits for the audio"; }
.tl-games .tlg-hud__clock.is-off { display: none; }

/* Progress: numbered answer boxes that get ticked */
.tl-games .tlg-boxes { display: flex; gap: 5px; margin: 0 0 clamp(20px, 2.6vw, 28px); }
.tl-games .tlg-boxes li { position: relative; flex: 1 1 0; max-width: 30px; min-width: 0; height: 24px; border: 1.5px solid rgba(30, 20, 48, .28); border-radius: 3px; background: #fff; }
.tl-games .tlg-boxes li.is-now { border-color: var(--ink); box-shadow: inset 0 -4px 0 var(--sun); }
.tl-games .tlg-boxes svg { position: absolute; left: -3px; top: -9px; width: calc(100% + 10px); height: 32px; overflow: visible; fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tl-games .tlg-boxes svg path { stroke-dasharray: 100; stroke-dashoffset: 0; animation: tlgDraw .5s var(--ease) both; }
.tl-games .tlg-boxes li.is-old svg path { animation: none; }
.tl-games .tlg-boxes li.is-skip svg { stroke: var(--muted); }

/* Listening */
.tl-games .tlg-audio { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 22px; padding: 14px 16px; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(30, 20, 48, .1); }
.tl-games .tlg-playbtn { -webkit-appearance: none; appearance: none; position: relative; display: grid; place-items: center; width: 60px; height: 60px; flex: none; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: var(--sun); cursor: pointer; box-shadow: 0 4px 0 #000, 0 12px 20px -12px rgba(0, 0, 0, .6); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.tl-games .tlg-playbtn:hover { transform: translateY(-2px); }
.tl-games .tlg-playbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
.tl-games .tlg-playbtn .ic { width: 24px; height: 24px; margin-left: 3px; transition: opacity .2s; }
.tl-games .tlg-playbtn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.tl-games .tlg-eq { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3px; opacity: 0; transition: opacity .2s; }
.tl-games .tlg-eq i { width: 3.5px; height: 22px; border-radius: 2px; background: var(--sun); transform: scaleY(.3); }
.tl-games .is-playing .tlg-playbtn .ic { opacity: 0; }
.tl-games .is-playing .tlg-eq { opacity: 1; }
.tl-games .is-playing .tlg-eq i { animation: tlgEq .9s ease-in-out infinite; }
.tl-games .is-playing .tlg-eq i:nth-child(2) { animation-delay: -.6s; }
.tl-games .is-playing .tlg-eq i:nth-child(3) { animation-delay: -.3s; }
.tl-games .is-playing .tlg-eq i:nth-child(4) { animation-delay: -.75s; }
.tl-games .is-playing .tlg-eq i:nth-child(5) { animation-delay: -.15s; }
.tl-games .tlg-audio__txt { flex: 1 1 180px; min-width: 0; }
.tl-games .tlg-audio__st { font-family: var(--f-hand); color: var(--pen); font-size: 1.22rem; line-height: 1.2; }
.tl-games .tlg-audio__meta { font-family: var(--f-mono); font-size: .74rem; color: var(--muted); }
.tl-games .tlg-slow .ic { width: 16px; height: 16px; }
.tl-games .tlg-transcript, .tl-games .tlg-novoice { margin: 0 0 22px; padding: 14px 18px; border-radius: 8px; background: rgba(207, 53, 39, .06); box-shadow: inset 3px 0 0 var(--red); }
.tl-games .tlg-transcript__l { font-family: var(--f-hand); color: var(--red); font-size: 1.1rem; line-height: 1.2; margin-bottom: 4px; }
.tl-games .tlg-transcript__t { font-family: var(--f-hand); color: var(--pen); font-size: 1.3rem; line-height: 1.45; }
.tl-games .tlg-novoice p { display: flex; gap: 12px; align-items: flex-start; font-size: .98rem; line-height: 1.5; color: var(--ink-2); margin-bottom: 12px; }
.tl-games .tlg-novoice .ic { color: var(--red); margin-top: 2px; }
.tl-games .tlg-novoice .btn .ic, .tl-games .tlg-skiprow .btn .ic { color: currentColor; width: 16px; height: 16px; margin: 0; }
.tl-games .tlg-skiprow { margin: -10px 0 20px; }
.tl-games .tlg-play.is-locked [data-act=skip] { display: none; }

/* Question text */
.tl-games .tlg-passage { position: relative; margin: 6px 0 24px; padding: 20px 22px 18px; background: #fff; border-radius: 2px; box-shadow: 0 1px 1px rgba(30, 20, 48, .06), 0 12px 22px -16px rgba(30, 20, 48, .45); transform: rotate(-.35deg); font-size: 1.04rem; line-height: 1.68; color: var(--ink-2); }
.tl-games .tlg-passage::before { content: ""; position: absolute; top: -11px; left: 50%; width: 92px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: rgba(240, 226, 190, .8); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.tl-games .tlg-passage p + p { margin-top: .7em; }
.tl-games .tlg-passage--quote { font-family: var(--f-display); font-size: 1.16rem; line-height: 1.5; color: var(--ink); }
.tl-games .tlg-passage__l { font-family: var(--f-hand) !important; color: var(--red); font-size: 1.1rem !important; line-height: 1.2 !important; margin-bottom: 4px; }
.tl-games .tlg-q { margin: 0 0 20px; }
.tl-games .tlg-q__l { font-family: var(--f-hand); color: var(--red); font-size: 1.18rem; line-height: 1.2; margin-bottom: 4px; transform: rotate(-1deg); transform-origin: left; }
.tl-games .tlg-q__t, .tl-games .tlg-q--dict, .tl-games .tlg-q--type { font-family: var(--f-display); font-size: clamp(1.28rem, 2.1vw, 1.62rem); line-height: 1.38; color: var(--ink); text-wrap: pretty; }
.tl-games .tlg-q--statement .tlg-q__t { padding-left: 14px; border-left: 3px solid var(--sun); }
.tl-games .tlg-q--examiner .tlg-q__t { position: relative; display: inline-block; padding: 12px 18px; background: var(--lilac); border-radius: 4px 18px 18px 18px; font-size: clamp(1.18rem, 1.9vw, 1.42rem); }
.tl-games .tlg-q__err { display: inline; font-family: var(--f-hand); font-size: clamp(1.35rem, 2.3vw, 1.7rem); line-height: 1.5; color: var(--pen); text-decoration: underline wavy var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
.tl-games .tlg-gap { display: inline-block; min-width: 3.4em; height: 1.05em; margin: 0 .12em; vertical-align: -0.12em; border-bottom: 3px solid var(--purple); }
.tl-games .tlg-gap.is-filled { min-width: 0; height: auto; padding: 0 .2em; vertical-align: baseline; border-bottom-color: var(--red); font-family: var(--f-hand); font-weight: 700; color: var(--red); background: rgba(255, 197, 61, .3); animation: tlgFade .5s var(--ease) both; }

/* Options as small index strips */
.tl-games .tlg-opts { display: grid; gap: 10px; margin: 0 0 20px; }
.tl-games .tlg-opts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tl-games .tlg-opt { -webkit-appearance: none; appearance: none; position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; margin: 0; padding: 10px 16px 10px 10px; text-align: left; background: #fff; color: var(--ink); border: 1.5px solid rgba(30, 20, 48, .16); border-radius: 6px; box-shadow: 0 6px 14px -12px rgba(30, 20, 48, .5); font-size: 1.02rem; line-height: 1.42; cursor: pointer; transition: transform .3s var(--ease), border-color .2s, background-color .25s, opacity .3s, box-shadow .3s var(--ease); }
.tl-games .tlg-opt:hover:not([disabled]) { border-color: var(--purple); transform: translateY(-2px); box-shadow: 0 12px 20px -14px rgba(30, 20, 48, .55); }
.tl-games .tlg-opt:active:not([disabled]) { transform: translateY(1px); }
.tl-games .tlg-opt[disabled] { cursor: default; }
.tl-games .tlg-opt__k { position: relative; display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1.5px solid rgba(30, 20, 48, .3); border-radius: 4px; font-family: var(--f-mono); font-weight: 700; font-size: .85rem; color: var(--ink-2); background: var(--sheet); transition: border-color .2s, background-color .2s; }
.tl-games .tlg-opt:hover:not([disabled]) .tlg-opt__k { border-color: var(--purple); background: var(--lilac); }
.tl-games .tlg-opt__t { flex: 1; min-width: 0; }
.tl-games .tlg-opt__note { position: absolute; right: 12px; top: -11px; padding: 1px 7px; background: var(--sheet); border-radius: 4px; font-family: var(--f-hand); color: var(--red); font-size: 1.02rem; line-height: 1.1; transform: rotate(-3deg); pointer-events: none; animation: tlgFade .4s .2s var(--ease) both; }
.tl-games .tlg-opt__note:empty { display: none; }
.tl-games .tlg-opt.is-right .tlg-opt__k, .tl-games .tlg-opt.is-wrong .tlg-opt__k { color: transparent; border-color: transparent; background: transparent; }
.tl-games .tlg-opt__k svg { position: absolute; left: -6px; top: -12px; width: 50px; height: 44px; overflow: visible; fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.tl-games .tlg-opt__k svg path { stroke-dasharray: 100; stroke-dashoffset: 0; animation: tlgDraw .55s var(--ease) both; }
.tl-games .tlg-opt__k .tlg-cross path:last-child { animation-delay: .18s; }
.tl-games .tlg-opt.is-right { border-color: var(--red); background: linear-gradient(transparent 0, rgba(255, 197, 61, .28) 0); opacity: 1; }
.tl-games .tlg-opt.is-wrong { border-color: rgba(207, 53, 39, .45); }
.tl-games .tlg-opt.is-wrong .tlg-opt__t { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; color: var(--muted); }
.tl-games .tlg-opt.is-dim { opacity: .5; box-shadow: none; }
.tl-games .tlg-opts--heads .tlg-opt__k { font-family: var(--f-hand); font-size: 1.05rem; font-weight: 700; }
.tl-games .tlg-opts--heads .tlg-opt__t { font-family: var(--f-display); font-size: 1.06rem; }

/* TRUE / FALSE / NOT GIVEN as three stamps */
.tl-games .tlg-opts--judge { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tl-games .tlg-opt--judge { flex-direction: column; justify-content: center; gap: 8px; min-height: 92px; padding: 14px 10px; text-align: center; }
.tl-games .tlg-opt--judge .tlg-opt__k { width: 28px; height: 28px; font-size: .78rem; position: absolute; left: 8px; top: 8px; }
.tl-games .tlg-opt--judge .tlg-opt__t { flex: none; display: inline-block; padding: 7px 10px 6px; border: 3px double currentColor; border-radius: 6px; font-family: var(--f-mono); font-weight: 800; font-size: .86rem; letter-spacing: .12em; line-height: 1.1; color: var(--ink-2); transform: rotate(-3deg); transition: transform .35s var(--ease), color .2s; }
.tl-games .tlg-opt--judge:hover:not([disabled]) .tlg-opt__t { color: var(--purple); transform: rotate(-6deg) scale(1.04); }
.tl-games .tlg-opt--judge.is-right .tlg-opt__t { color: var(--red); transform: rotate(-8deg) scale(1.06); text-decoration: none; }
.tl-games .tlg-opt--judge.is-wrong .tlg-opt__t { text-decoration: line-through; text-decoration-thickness: 2px; }
.tl-games .tlg-opt--judge .tlg-opt__note { top: auto; right: 6px; bottom: 5px; padding: 0 2px; background: transparent; font-size: .95rem; }
.tl-games .tlg-opt--judge .tlg-opt__k svg { left: -6px; top: -8px; width: 38px; height: 34px; }

/* Word stress: syllables with a big dot over the strong one */
.tl-games .tlg-stress { display: inline-flex; flex-wrap: wrap; align-items: flex-end; gap: 2px 3px; font-family: var(--f-display); font-size: 1.16rem; letter-spacing: .01em; }
.tl-games .tlg-syl { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 2px; color: var(--ink-2); }
.tl-games .tlg-syl i { display: block; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .55; }
.tl-games .tlg-syl.is-on { color: var(--ink); font-weight: 700; }
.tl-games .tlg-syl.is-on i { width: 14px; height: 14px; border: 0; background: var(--purple); opacity: 1; }
.tl-games .tlg-syl + .tlg-syl::before { content: none; }
.tl-games .tlg-opt--stress { min-height: 64px; }

/* Typing */
.tl-games .tlg-form { margin: 0 0 18px; }
.tl-games .tlg-form:not(.tlg-form--inline) { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 16px; }
.tl-games .tlg-field { flex: 1 1 260px; min-width: 0; display: block; }
.tl-games .tlg-input { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-height: 54px; margin: 0; padding: 6px 4px 4px; border: 0; border-bottom: 2.5px solid rgba(30, 20, 48, .3); border-radius: 0; background: repeating-linear-gradient(to bottom, transparent 0, transparent 52px, var(--rule) 52px, var(--rule) 54px); color: var(--pen); font-family: var(--f-hand); font-size: 1.7rem; line-height: 1.2; transition: border-color .2s, background-color .2s; }
.tl-games .tlg-input::placeholder { color: rgba(35, 53, 110, .32); }
.tl-games .tlg-input:focus { outline: none; border-bottom-color: var(--purple); background-color: rgba(255, 197, 61, .1); }
.tl-games .tlg-input:focus-visible { outline: none; }
.tl-games .tlg-input[disabled] { opacity: 1; -webkit-text-fill-color: currentColor; }
.tl-games .tlg-input.is-bad { border-bottom-color: var(--red); text-decoration: line-through; text-decoration-color: var(--red); }
.tl-games .tlg-input.is-good { border-bottom-color: var(--red); }
.tl-games .tlg-inline { position: relative; display: inline-block; vertical-align: baseline; max-width: 100%; margin: 0 .15em; }
.tl-games .tlg-input--inline { display: inline-block; width: 8.5em; max-width: 100%; min-height: 46px; font-size: 1.12em; padding: 2px 6px 0; border-bottom-style: dashed; border-bottom-color: var(--purple); background: rgba(255, 197, 61, .14); }
.tl-games .tlg-inline svg { position: absolute; right: -26px; top: -14px; width: 40px; height: 34px; overflow: visible; fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.tl-games .tlg-inline svg path { stroke-dasharray: 100; animation: tlgDraw .55s var(--ease) both; }
.tl-games .tlg-clue { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 18px; font-size: 1.02rem; color: var(--ink-2); }
.tl-games .tlg-clue span { font-family: var(--f-hand); color: var(--red); font-size: 1.15rem; }
.tl-games .tlg-clue--word { font-family: var(--f-mono); font-weight: 700; letter-spacing: .12em; color: var(--ink); }
.tl-games .tlg-clue--word span { letter-spacing: 0; font-weight: 400; }
.tl-games .tlg-hint { font-size: .92rem; color: var(--muted); margin: -8px 0 16px; }
.tl-games .tlg-field { position: relative; }
.tl-games .tlg-correct { position: absolute; left: 4px; bottom: calc(100% - 4px); font-family: var(--f-hand); font-weight: 700; font-size: 1.3rem; line-height: 1; color: var(--red); white-space: nowrap; transform: rotate(-4deg); transform-origin: left bottom; pointer-events: none; animation: tlgIn .5s .1s var(--ease) both; }
.tl-games .tlg-inline .tlg-correct { font-size: .82em; }
.tl-games .tlg-form.is-marked [data-check] { display: none; }
.tl-games .tlg-checkrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.tl-games .tlg-formmsg { font-family: var(--f-hand); color: var(--red); font-size: 1.1rem; min-height: 0; }
.tl-games .tlg-formmsg:empty { display: none; }
.tl-games .btn .ic { width: 18px; height: 18px; }
.tl-games .btn--sm { min-height: 44px; }

/* Feedback: the teacher's note in the margin */
.tl-games .tlg-fb { display: grid; grid-template-columns: 48px 1fr; gap: 6px 14px; align-items: start; margin: 0 0 22px; padding: 16px 18px 14px; border-radius: 6px; background: rgba(207, 53, 39, .045); border: 1.5px dashed rgba(207, 53, 39, .38); animation: tlgIn .45s var(--ease) both; }
.tl-games .tlg-fb.is-skip { background: rgba(30, 20, 48, .03); border-color: rgba(30, 20, 48, .25); }
.tl-games .tlg-fb__mark svg { display: block; width: 48px; height: 40px; overflow: visible; fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.tl-games .tlg-fb.is-skip .tlg-fb__mark svg { stroke: var(--muted); }
.tl-games .tlg-fb__mark svg path { stroke-dasharray: 100; animation: tlgDraw .6s .05s var(--ease) both; }
.tl-games .tlg-fb__mark .tlg-cross path:last-child { animation-delay: .22s; }
.tl-games .tlg-fb__txt { min-width: 0; }
.tl-games .tlg-fb__v { font-family: var(--f-hand); font-weight: 700; color: var(--red); font-size: 1.55rem; line-height: 1.15; margin-bottom: 4px; }
.tl-games .tlg-fb.is-skip .tlg-fb__v { color: var(--ink-2); }
.tl-games .tlg-fb__pts { font-family: var(--f-mono); font-weight: 600; font-size: .8rem; color: var(--muted); margin-left: 6px; }
.tl-games .tlg-fb__a { font-weight: 600; margin-bottom: 4px; }
.tl-games .tlg-fb__a b { font-weight: 700; background: linear-gradient(transparent 60%, rgba(255, 197, 61, .55) 60%); }
.tl-games .tlg-fb__y, .tl-games .tlg-fb__also { font-size: .94rem; color: var(--ink-2); margin-bottom: 4px; }
.tl-games .tlg-fb__y s { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.tl-games .tlg-fb__x { color: var(--ink-2); line-height: 1.55; }
.tl-games .tlg-heard { margin-top: 12px; padding-top: 10px; border-top: 1.5px solid var(--rule); }
.tl-games .tlg-heard__l { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.tl-games .tlg-heard__t { font-family: var(--f-hand); color: var(--pen); font-size: 1.22rem; line-height: 1.4; }
.tl-games .tlg-next { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; animation: tlgIn .45s .08s var(--ease) both; }

/* ================================================================ results */
.tl-games .tlg-end__top { display: grid; grid-template-columns: auto 1fr; gap: 10px clamp(18px, 3vw, 34px); align-items: center; margin-bottom: 8px; }
.tl-games .tlg-end .tlg-title { margin-bottom: 8px; }
.tl-games .tlg-end .tlg-lede { margin-bottom: 0; }
.tl-games .tlg-grade { position: relative; display: grid; place-content: center; justify-items: center; width: clamp(112px, 14vw, 140px); aspect-ratio: 1; transform: rotate(-6deg); }
.tl-games .tlg-grade__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--red); stroke-width: 3.5; stroke-linecap: round; }
.tl-games .tlg-grade__ring path { stroke-dasharray: 100; stroke-dashoffset: 0; animation: tlgDraw 1s .15s var(--ease) both; }
.tl-games .tlg-grade__n { position: relative; font-family: var(--f-hand); font-weight: 700; font-size: clamp(2rem, 3.6vw, 2.5rem); line-height: 1; color: var(--red); animation: tlgFade .5s .5s var(--ease) both; }
.tl-games .tlg-grade__sub { position: relative; font-family: var(--f-hand); font-size: 1rem; line-height: 1.1; color: var(--red); animation: tlgFade .5s .7s var(--ease) both; }
.tl-games .tlg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0 20px; border-top: 2px solid var(--ink); border-bottom: 1.5px dashed rgba(30, 20, 48, .25); }
.tl-games .tlg-stats > div { padding: 12px 12px 12px 0; }
.tl-games .tlg-stats > div + div { padding-left: 14px; border-left: 1.5px dashed rgba(30, 20, 48, .2); }
.tl-games .tlg-stats dt { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.tl-games .tlg-stats dd { margin: 0; font-family: var(--f-hand); font-weight: 700; font-size: 1.7rem; line-height: 1.15; color: var(--pen); }
.tl-games .tlg-newbest { position: absolute; right: clamp(16px, 4vw, 46px); top: clamp(16px, 3vw, 30px); font-size: 1.05rem; transform: rotate(-12deg); animation: tlgThump .6s .6s var(--ease) both; }
.tl-games .tlg-tip { margin: 0 0 22px; padding: 14px 18px; background: #ffe9a6; box-shadow: 0 10px 20px -14px rgba(120, 80, 0, .55); transform: rotate(.4deg); max-width: 44em; }
.tl-games .tlg-tip__l { font-family: var(--f-hand); font-weight: 700; color: var(--red); font-size: 1.2rem; line-height: 1.1; margin-bottom: 4px; }
.tl-games .tlg-tip p:not(.tlg-tip__l) { color: var(--ink); line-height: 1.55; }
.tl-games .tlg-end > p:not([class]) { color: var(--ink-2); margin: 16px 0 18px; max-width: 40em; }
.tl-games .tlg-nextgame { margin-top: 2px; font-size: .95rem; color: var(--muted); }
.tl-games .tlg-nextgame a { display: inline-block; padding: 11px 0; color: var(--purple); font-weight: 700; text-underline-offset: 3px; }
.tl-games .tlg-wa { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 24px; padding-top: 18px; border-top: 1.5px dashed rgba(30, 20, 48, .2); }
.tl-games .tlg-wa p { font-family: var(--f-hand); font-size: 1.28rem; line-height: 1.2; color: var(--ink-2); }
.tl-games .tlg-wa .btn .ic { width: 18px; height: 18px; }

/* Corrections list */
.tl-games .tlg-review { margin-top: clamp(40px, 5vw, 60px); }
.tl-games .tlg-review__h { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.1; margin-bottom: 6px; }
.tl-games .tlg-review__sub { color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.tl-games .tlg-review__ok { display: flex; align-items: center; gap: 12px; font-family: var(--f-hand); font-size: 1.35rem; color: var(--red); margin-top: 8px; }
.tl-games .tlg-review__ok svg { width: 46px; height: 40px; overflow: visible; fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.tl-games .tlg-fix { border-top: 1.5px solid rgba(30, 20, 48, .16); }
.tl-games .tlg-fix__i { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1.5px solid rgba(30, 20, 48, .16); }
.tl-games .tlg-fix__n svg { width: 34px; height: 30px; overflow: visible; fill: none; stroke: var(--red); stroke-width: 3.5; stroke-linecap: round; margin-top: 2px; }
.tl-games .tlg-fix__i p { margin-bottom: 4px; }
.tl-games .tlg-fix__q { font-family: var(--f-display); font-size: 1.12rem; line-height: 1.4; }
.tl-games .tlg-fix__i .tlg-lab { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); margin-right: 6px; }
.tl-games .tlg-fix__q .tlg-gap { min-width: 2.4em; border-bottom-width: 2px; }
.tl-games .tlg-fix__y { color: var(--ink-2); }
.tl-games .tlg-fix__y s { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.tl-games .tlg-fix__a b { font-family: var(--f-hand); font-size: 1.25rem; color: var(--red); }
.tl-games .tlg-fix__x { color: var(--ink-2); font-size: .97rem; line-height: 1.55; }
.tl-games .tlg-fix__heard { font-family: var(--f-hand); color: var(--pen); font-size: 1.12rem; line-height: 1.4; }
.tl-games .tlg-fix__p { margin: 0 0 8px; }
.tl-games .tlg-fix__p summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--purple); font-weight: 600; font-size: .92rem; }
.tl-games .tlg-fix__p p { padding: 10px 14px; background: #fff; border-radius: 4px; color: var(--ink-2); font-size: .96rem; line-height: 1.6; }

/* ============================================================ flashcards */
.tl-games .tlg-hud--flash { justify-content: flex-start; gap: 8px 36px; }
.tl-games .tlg-fwrap { position: relative; max-width: 580px; margin: 8px auto 24px; perspective: 1500px; }
.tl-games .tlg-fwrap::before, .tl-games .tlg-fwrap::after { content: ""; position: absolute; inset: 0; background: var(--sheet); border-radius: 4px; box-shadow: 0 10px 20px -14px rgba(30, 20, 48, .45); }
.tl-games .tlg-fwrap::before { transform: rotate(-3deg) translate(-6px, 8px); }
.tl-games .tlg-fwrap::after { transform: rotate(2deg) translate(6px, 4px); }
.tl-games .tlg-fcard { position: relative; z-index: 1; cursor: pointer; }
.tl-games .tlg-fcard__in { display: grid; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.tl-games .tlg-fcard.is-flipped .tlg-fcard__in { transform: rotateY(180deg); }
.tl-games .tlg-fface { --lh: 32px; grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; min-height: 270px; padding: 30px clamp(18px, 4vw, 40px) 26px; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; background-color: #fff; background-image: linear-gradient(to bottom, transparent 46px, var(--margin) 46px, var(--margin) 48px, transparent 48px), repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px), var(--rule) var(--lh)); background-size: 100% 100%, 100% calc(100% - 60px); background-position: 0 0, 0 60px; background-repeat: no-repeat; border-radius: 4px; box-shadow: 0 2px 2px rgba(30, 20, 48, .06), 0 22px 36px -22px rgba(30, 20, 48, .55); }
.tl-games .tlg-fface--front { background-image: linear-gradient(to bottom, transparent 46px, var(--margin) 46px, var(--margin) 48px, transparent 48px); background-size: 100% 100%; background-position: 0 0; }
.tl-games .tlg-fface--back { transform: rotateY(180deg); justify-content: flex-start; align-items: flex-start; gap: 0; padding: 0 clamp(18px, 4vw, 34px) 22px; text-align: left; background-size: 100% 100%, 100% calc(100% - 56px); background-position: 0 0, 0 56px; }
.tl-games .tlg-fback-w { height: 47px; padding-top: 12px; font-family: var(--f-display); font-size: 1.05rem; line-height: 24px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tl-games .tlg-ftag { position: absolute; top: 12px; right: 14px; font-family: var(--f-mono); font-weight: 800; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--purple); border: 3px double var(--purple); border-radius: 6px; padding: 4px 8px 3px; transform: rotate(5deg); mix-blend-mode: multiply; }
.tl-games .tlg-fword { margin-top: 30px; font-family: var(--f-display); font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.tl-games .tlg-fhint { font-family: var(--f-hand); color: var(--red); font-size: 1.1rem; }
.tl-games .tlg-fmean { margin-top: 12px; font-size: clamp(1.04rem, 1.5vw, 1.16rem); line-height: var(--lh); color: var(--ink); max-width: 32em; }
.tl-games .tlg-fex { font-family: var(--f-hand); color: var(--pen); font-size: 1.24rem; line-height: var(--lh); max-width: 30em; }
.tl-games .tlg-fex::before { content: "\201C"; }
.tl-games .tlg-fex::after { content: "\201D"; }
.tl-games .tlg-factions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.tl-games .tlg-factions .btn { min-height: 50px; }
.tl-games .tlg-factions kbd { border-color: currentColor; background: transparent; color: inherit; opacity: .8; }
.tl-games .tlg-factions .btn--ink kbd { border-color: rgba(246, 240, 227, .5); }
.tl-games .btn.is-playing .ic { animation: tlgPulse .8s ease-in-out infinite; }

.tl-games .tlg-fail { padding: 20px; color: var(--ink-2); }

/* ============================================================ responsive */
@media (max-width: 760px) {
	.tl-games .tlg-hub__note { font-size: 1.1rem; }
	.tl-games .tlg-card { min-height: 0; }
	.tl-games .tlg-card__head { padding: 14px 16px 10px; }
	.tl-games .tlg-card__body { padding: 4px 16px 8px; }
	.tl-games .tlg-card__d { margin-bottom: 4px; }
	.tl-games .tlg-cards { gap: 18px; }
	.tl-games .tlg-sheet { padding: 20px 16px 24px 50px; }
	.tl-games .tlg-sheet::before { background-image: linear-gradient(90deg, transparent 36px, var(--margin) 36px, var(--margin) 38px, transparent 38px), radial-gradient(circle at 17px 60px, var(--paper-2) 6px, transparent 7px), radial-gradient(circle at 17px 50%, var(--paper-2) 6px, transparent 7px), radial-gradient(circle at 17px calc(100% - 60px), var(--paper-2) 6px, transparent 7px); }
	.tl-games .tlg-desk::before { inset: 14px -4px -8px 8px; }
	.tl-games .tlg-bar__t { display: none; }
	.tl-games .tlg-hud { gap: 6px 10px; }
	.tl-games .tlg-hud__f > span { font-size: .66rem; }
	.tl-games .tlg-hud__f > b { font-size: 1.28rem; }
	.tl-games .tlg-hud__clock { margin-left: auto; }
.tl-games .tlg-hud__clock > b svg { width: 24px; height: 24px; }
	.tl-games .tlg-hud__clock.is-wait > span::after { content: " waits"; }
	.tl-games .tlg-boxes { gap: 3px; }
	.tl-games .tlg-boxes li { height: 20px; }
	.tl-games .tlg-opts--2 { grid-template-columns: 1fr; }
	.tl-games .tlg-opt { gap: 12px; padding: 8px 12px 8px 8px; font-size: 1rem; }
	.tl-games .tlg-opt__k { width: 30px; height: 30px; }
	.tl-games .tlg-opts--judge { gap: 8px; }
	.tl-games .tlg-opt--judge { min-height: 84px; padding: 30px 4px 12px; }
	.tl-games .tlg-opt--judge .tlg-opt__t { font-size: .7rem; letter-spacing: .06em; padding: 6px 6px 5px; }
	.tl-games .tlg-opt--judge .tlg-opt__k { width: 24px; height: 24px; left: 6px; top: 6px; font-size: .7rem; }
	.tl-games .tlg-opt--judge .tlg-opt__note { right: 4px; bottom: 2px; font-size: .82rem; }
	.tl-games .tlg-passage { padding: 18px 16px 16px; margin-left: -6px; font-size: 1rem; }
	.tl-games .tlg-audio { padding: 12px; }
	.tl-games .tlg-playbtn { width: 54px; height: 54px; }
	.tl-games .tlg-input { font-size: 1.5rem; }
	.tl-games .tlg-fb { grid-template-columns: 36px 1fr; gap: 6px 10px; padding: 14px 14px 12px; }
	.tl-games .tlg-fb__mark svg { width: 38px; height: 32px; }
	.tl-games .tlg-fb__v { font-size: 1.38rem; }
	.tl-games .tlg-len { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tl-games .tlg-end__top { grid-template-columns: 1fr; justify-items: start; }
	.tl-games .tlg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tl-games .tlg-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
	.tl-games .tlg-stats > div:nth-child(n + 3) { border-top: 1.5px dashed rgba(30, 20, 48, .2); }
	.tl-games .tlg-newbest { top: 18px; right: 14px; font-size: .9rem; }
	.tl-games .tlg-actions .btn { flex: 1 1 100%; }
	.tl-games .tlg-fface { min-height: 240px; padding: 34px 16px 22px; }
	.tl-games .tlg-factions .btn { flex: 1 1 calc(50% - 6px); padding-inline: 12px; }
	.tl-games .tlg-fix__i { grid-template-columns: 30px 1fr; gap: 10px; }
	.tl-games .tlg-fix__n svg { width: 26px; height: 24px; }
}
@media (max-width: 420px) {
	.tl-games .tlg-opt--judge .tlg-opt__t { letter-spacing: .03em; }
	.tl-games .tlg-filter { padding: 8px 13px; font-size: .9rem; }
}
@media (hover: none) and (pointer: coarse) {
	.tl-games .tlg-intro .tlg-keys, .tl-games .tlg-next .tlg-keys, .tl-games .tlg-kbdhint, .tl-games .tlg-factions kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.tl-games *, .tl-games *::before, .tl-games *::after { animation: none !important; transition: none !important; }
	.tl-games .tlg-card, .tl-games .tlg-card:hover { transform: none; }
}
