/* avatar/transcript.css - the transcript's ruby rules (plan 02-07, research ยง Q5). * * The numbers here are what make the rendering verifiable: line-height 2.1 leaves room for * an rt at 0.55em so consecutive lines never collide, ruby-position is pinned to `over` so * a future theme cannot flip it, and the annotation is not selectable so copying a line * copies the base text. tests/test_transport_seam.py greps these rules; the browser suites * measure their effect (debug.furigana.lastLineRtHeightPx / lastLineHeightPx). Loaded by * the app through a inside the transcript's gr.HTML value and by * avatar/transcript-harness.html relative to itself. */ /* The transcript is a COLUMN with a top and a bottom, not an ever-growing block. host.js has * always ended every line with `el.scrollTop = el.scrollHeight`, which is a no-op on an * auto-height element - so a long conversation grew the page instead of scrolling the * transcript. The height is also what makes plan 02-08's `insideTranscript` a fact rather * than a coincidence: a card can only be proven to have stayed inside a box that has edges, * and on a phone that box is all the room there is. It is a viewport fraction rather than a * max-height because the lookup card needs room BESIDE the words as well as under them: on * a 196 px column a card is wide enough to cover the line above the one it is anchored to, * and a word under the card cannot be tapped. 40vh is 335 px on a Pixel 7. */ #transcript-text { position: relative; overflow-x: clip; overflow-y: auto; height: 40vh; min-height: 14em; } #transcript-text .said { line-height: 2.1; } #transcript-text ruby { ruby-position: over; ruby-align: center; } #transcript-text rt { font-size: 0.55em; user-select: none; } #transcript-text .tok { cursor: pointer; touch-action: manipulation; border-radius: 3px; } #transcript-text .tok:hover, #transcript-text .tok:focus-visible { background: rgba(0, 0, 0, 0.06); outline: none; } /* The word-level badge on the word itself (D-14): one pixel of the same rank colour under a * tappable unit, so the transcript carries the level information the card spells out. */ #transcript-text .tok[data-level] { border-bottom: 1px solid rgba(0, 0, 0, 0.25); } #transcript-text .tok[data-level="N5"] { border-bottom-color: #2e7d32; } #transcript-text .tok[data-level="N4"] { border-bottom-color: #558b2f; } #transcript-text .tok[data-level="N3"] { border-bottom-color: #f9a825; } #transcript-text .tok[data-level="N2"] { border-bottom-color: #ef6c00; } #transcript-text .tok[data-level="N1"] { border-bottom-color: #c62828; } /* ------------------------------------------------- the EN reveal (plan 02-09, D-15/D-16) * * Every selector is prefixed with #transcript-text on purpose. The control is a real *