/* The transcript and its tools share a single reading column on all screens. */
body.reading { background: #f6f1ea; }
.reading .layout { display: block; min-height: 100dvh; }
.reading .rail { display: none; }
.reading .work { padding: 0; }
.reading main { max-width: 740px; margin: auto; padding: 0; }
.reader {
  --rd-paper: #fffaf4;
  --rd-ink: #2e201a;
  --rd-line: #e8dcd1;
  --rd-muted: #6a6059;
  --rd-coral: #d34427;
  --rd-x: clamp(14px, 4.5vw, 38px);
  background: var(--rd-paper);
  color: var(--rd-ink);
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 var(--rd-x) max(26px, env(safe-area-inset-bottom));
}
.reader > * + * { margin-top: 16px; }
.reader .rd-head { height: 54px; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.rd-head h1 { margin: 0; text-align: center; font-size: 19px; font-weight: 760; line-height: 1.3; }
.rd-head h1:focus { outline: none; }
.rd-head a { display: grid; place-items: center; min-height: 44px; color: var(--rd-ink); border-radius: 24px; }
.rd-head a:hover { background: #f8ece1; }
.rd-head .rd-history { color: var(--rd-muted); }
.rd-back svg { transform: rotate(180deg); }
.reader .rd-intro { position: relative; display: grid; align-items: center; min-height: 102px; isolation: isolate; }
.rd-intro h2 { display: inline; padding-bottom: 2px; font-size: clamp(30px, 8vw, 40px); font-weight: 850; letter-spacing: -.055em; line-height: 1.35; text-decoration: underline #ff7655 4px; text-underline-offset: 6px; }
.rd-intro p { width: fit-content; color: var(--rd-muted); font-size: 14px; line-height: 1.65; margin: 13px 0 0; }
.rd-intro img { position: absolute; inset: 0 0 auto auto; width: clamp(68px, 21vw, 112px); height: 76px; object-fit: contain; z-index: -1; }
.rd-intro h2 { max-width: 75%; display: inline-block; }
.reader-report .rd-intro img { width: clamp(57px, 16vw, 100px); }
.reader .rd-overview { display: flex; gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rd-line); }
.rd-session { margin-top: 0; }
.rd-overview button,.rd-load-actions button { margin-left: auto; min-height: 36px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 20px; color: var(--rd-ink); background: #fbe9da; font-size: 13px; font-weight: 640; white-space: nowrap; }
.rd-session strong { overflow-wrap: anywhere; min-width: 0; }
.rd-peer-icon,.rd-avatar { display: grid; place-items: center; flex: none; border-radius: 50%; background: #ffdbc2; color: #36251c; }
.rd-peer-icon { width: 38px; height: 38px; }
.rd-avatar { width: 33px; height: 33px; margin-top: 2px; font-size: 15px; font-weight: 730; }
.rd-me .rd-avatar { background: #def1bc; }
.rd-unknown .rd-avatar { background: #ffeaa8; }
.rd-thread { border: 1px solid #eddbce; border-radius: 18px; padding: 4px 12px 12px; }
.rd-contact-name { min-width: 0; flex: 1; }
.rd-contact-name small { display: block; color: var(--rd-muted); font-size: 12px; }
.reader #fx-title { padding: 2px 0; font-weight: 720; background: transparent; border: 1px solid transparent; border-radius: 5px; line-height: 1.35; }
.reader #fx-title:not([readonly]):hover { border-color: var(--rd-line); }
.rd-timeline { padding: 14px 0; }
.rd-turn + .rd-turn { margin-top: 15px; }
.rd-row { display: flex; gap: 8px; align-items: flex-start; }
.rd-me .rd-row { flex-direction: row-reverse; }
.rd-col,.rd-chat { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.rd-col { max-width: min(82%, 490px); }
.rd-me :is(.rd-col,.rd-chat) { align-items: flex-end; }
.rd-speaker { font-size: 11px; font-weight: 660; line-height: 1.5; color: #75531b; }
.rd-chat { max-width: 100%; padding: 0; border: none; text-align: left; background: transparent; }
.rd-bubble { font-weight: 580; background: #fff; padding: 9px 12px; border: 1px solid #ddd7cf; border-radius: 4px 15px 15px; font-size: 16px; line-height: 1.55; text-align: start; white-space: pre-wrap; overflow-wrap: anywhere; }
.rd-me .rd-bubble { font-weight: 580; background: #d8f2c4; border-color: #d4ecbf; border-radius: 15px 4px 15px 15px; }
.rd-unknown .rd-bubble { font-weight: 580; background: #fff2cf; }
button.rd-chat:hover .rd-bubble { border-color: #b76540; }
.rd-time { margin: 0 0 14px; text-align: center; font-size: 12px; color: var(--rd-muted); }
.rd-quote { display: grid; gap: 2px; border-left: 3px solid #b3aca5; border-radius: 3px 9px 9px 3px; padding: 5px 9px; margin-top: 4px; background: #ece8e3; color: #58524d; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.rd-quote-label { font-size: 11px; font-weight: 650; }
.rd-insight { margin: 6px 0 0; padding: 8px 12px; border-radius: 5px 12px 12px; background: #fff0dc; text-align: left; }
.rd-insight strong { display: flex; align-items: center; gap: 5px; color: #7a4d29; font-size: 11px; }
.rd-insight p { margin-top: 4px; font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.rd-add-row { display: flex; justify-content: center; padding-top: 10px; border-top: 1px solid var(--rd-line); }
.rd-add { display: inline-flex; align-items: center; gap: 7px; background: #fff3e8; color: var(--rd-ink); border: 1px solid #f7d9c5; border-radius: 24px; padding: 6px 18px; min-height: 37px; font-weight: 680; }
.rd-add svg { color: var(--rd-coral); }
.rd-preferences { padding: 2px 13px; border: 1px solid var(--rd-line); border-radius: 16px; }
.rd-preferences > label,.rd-switch { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 640; }
.rd-preferences > label { min-height: 46px; padding: 3px 0; }
.rd-preferences > * + * { border-top: 1px solid var(--rd-line); }
.rd-preferences select,.reader .rd-switch select { width: auto; max-width: 56%; height: 36px; border-radius: 22px; border: 0; padding: 4px 10px; background: #f9ecde; color: var(--rd-ink); }
.rd-goal { padding: 8px 0; }
.rd-goal summary,.rd-reason summary,.rd-observations summary { cursor: pointer; font-size: 13px; color: #654e41; }
.rd-goal summary { padding: 3px 0; }
.rd-goal small { font-weight: 400; margin-left: 4px; }
.rd-goal textarea { margin: 8px 0 0; }
.reader-review .fx-actions { position: sticky; bottom: 0; z-index: 2; border-top: 1px solid var(--rd-line); margin: 14px calc(-1 * var(--rd-x)) 0; padding: 10px var(--rd-x) max(10px,env(safe-area-inset-bottom)); background: var(--rd-paper); }
.reader-review [data-run] { flex: 1; }
.reader-review { padding-bottom: 0; }
.reader-review .fx-error { scroll-margin-block: 85px; }
.rd-correction { width: min(440px,calc(100% - 24px)); max-height: 90dvh; overflow: auto; margin: auto; border: 1px solid #dbcaba; border-radius: 20px; padding: 20px; box-shadow: 0 14px 45px #27190f23; color: #30241c; background: #fffaf4; }
.rd-correction::backdrop { background: #33241964; }
.rd-correction .fx-field { font-size: 13px; }
.rd-correction .fx-two .fx-field { margin-top: 0; }
.rd-edit-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.rd-edit-head h2 { font-size: 20px; }
.rd-edit-quote { padding: 10px 13px; border-radius: 9px; background: #f1ece4; margin: 12px 0; }
.rd-edit-quote summary { cursor: pointer; font-size: 13px; }
.rd-correction .fx-actions { position: static; margin: 16px 0 0; padding: 0; border: 0; background: none; }
.rd-correction .rd-position { margin: 0 0 12px; }
.rd-saved-quote { display: block; margin-top: 5px; padding-left: 8px; border-left: 2px solid #aaa197; color: var(--rd-muted); }
.rd-scan { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 65dvh; text-align: center; }
.rd-scan h2 { font-size: 28px; font-weight: 800; }
.rd-scan p { font-size: 14px; color: var(--rd-muted); }
.rd-scan-art { position: relative; width: 175px; height: 170px; margin-bottom: 12px; }
.rd-sheet { position: absolute; left: 42px; top: 15px; width: 94px; height: 137px; border: 3px solid var(--rd-ink); border-radius: 12px; box-shadow: 4px 4px #f9b798; }
.rd-shadow-sheet { transform: rotate(-14deg) translateX(-8px); background: #ffd6bc; }
.rd-photo { overflow: hidden; background: white; transform: rotate(5deg); }
.rd-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rd-photo.sheet-1 { transform: translate(-8px,2px) rotate(-5deg); }
.rd-photo.sheet-2 { transform: translate(8px,-2px) rotate(12deg); }
.rd-scan-beam { position: absolute; left: 22px; right: 11px; top: 27px; height: 3px; background: #ee6542; animation: rd-scan-line 2s ease-in-out infinite alternate; }
@keyframes rd-scan-line { to { transform: translateY(113px); } }
.rd-load-actions { text-align: center; }
.reader-play { display: flex; flex-direction: column; margin: 0 auto; height: 100vh; height: 100dvh; padding: 0; overflow: hidden; min-height: 0; }
.reader-play > * { margin: 0; }
.reader-play .rd-head { margin: 0 var(--rd-x); flex: none; }
.rd-replay-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px var(--rd-x); }
.rd-replay-title span { font-size: 12px; color: var(--rd-muted); }
.rd-replay-title h2 { overflow-wrap: anywhere; font-size: 22px; line-height: 1.4; }
.rd-version { flex: none; background: #fff0db; border-radius: 20px; padding: 5px 9px; font-size: 12px; }
.rd-play-meter { height: 3px; background: #ecdfd3; flex: none; }
.rd-play-meter i { display: block; height: 100%; background: #ee7655; transition: width .45s ease; }
.rd-stream { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; }
.rd-stream .rd-timeline { padding: 18px var(--rd-x); }
.rd-stream .rd-turn:not([hidden]) { animation: rd-reveal .23s ease-out; }
@keyframes rd-reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.rd-playbar { padding: 9px var(--rd-x) max(10px,env(safe-area-inset-bottom)); border-top: 1px solid var(--rd-line); background: var(--rd-paper); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rd-playbar > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rd-playbar [data-count] { font-size: 12px; color: var(--rd-muted); font-variant-numeric: tabular-nums; }
.rd-playbar [data-play] { border: 1px solid var(--rd-line); border-radius: 24px; min-height: 36px; padding: 5px 10px; font-size: 13px; }
.rd-playbar [data-summary] { flex-shrink: 0; }
.rd-peek { display: flex; align-items: flex-start; gap: 8px; padding: 12px var(--rd-x); background: #fff0dc; border-radius: 16px 16px 0 0; animation: rd-reveal .3s ease-out; }
.rd-peek [data-open-summary] { text-align: left; padding: 0; min-width: 0; flex: 1; }
.rd-peek strong { display: block; font-size: 12px; margin-bottom: 4px; color: #8c462c; }
.rd-peek span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.6; }
.rd-peek [data-hide-peek] { width: 32px; height: 32px; font-size: 19px; }
.rd-notices { border-left: 3px solid #b4883e; background: #fff2d6; padding: 8px 13px; color: #75541e; font-size: 13px; border-radius: 3px 10px 10px 3px; }
.rd-notices ul { margin: 4px 0 0; padding-left: 16px; }
.rd-compare { border: 1px solid var(--rd-line); border-radius: 13px; }
.rd-compare summary { cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 11px 13px; list-style: none; }
.rd-compare summary::-webkit-details-marker { display: none; }
.rd-compare summary strong { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.rd-compare summary span { margin-left: auto; color: var(--rd-muted); font-size: 12px; }
.rd-compare summary::after { content: '⌄'; }
.rd-compare[open] summary::after { transform: rotate(180deg); }
.rd-compare-bar { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 0 10px 8px; }
.rd-compare-bar div { display: flex; gap: 3px; flex-wrap: wrap; }
.rd-compare-bar button { min-height: 34px; padding: 5px 8px; border-radius: 10px; color: var(--rd-ink); font-size: 12px; }
.rd-compare-bar [aria-pressed=true] { background: #f9e2ce; }
.rd-original-window { border-radius: 0 0 12px 12px; max-height: min(46dvh,360px); max-width: 100%; overflow: auto; overscroll-behavior: contain; background: #eee8df; }
.rd-original-window img { display: block; width: 100%; max-width: none; height: auto; }
.rd-original-window.rd-zoomed img { width: 200%; }
.fx.reader .fx-summary { border: none; background: #ffebdc; border-radius: 17px; padding: 15px; }
.fx.reader .fx-summary h3,.fx.reader .fx-reply h4 { display: inline-block; padding: 3px 11px; background: #ffd3a8; border-radius: 16px; }
.fx.reader .fx-summary p { font-weight: 580; }
.fx.reader .fx-replies { padding: 0; background: transparent; border: none; }
.fx-replies > .fx-cardhead { display: block; }
.fx.reader .fx-replies h3 { font-size: 31px; color: #cf3819; font-weight: 840; text-shadow: 0 2px #fff, 1px 3px #f8ceba; line-height: 1.4; letter-spacing: -.035em; }
.fx-replies .fx-hint { display: block; }
.fx.reader .fx-reply { padding: 13px 14px; border: none; border-left: 4px solid #ff8850; background: #fff2d1; border-radius: 14px; }
.fx.reader .fx-reply:nth-of-type(even) { background: #e6f1ff; border-left-color: #76a9e7; }
.fx.reader .fx-reply h4 { background: #ffe093; overflow-wrap: anywhere; }
.fx.reader .fx-reply:nth-of-type(even) h4 { background: #c7dffb; }
.fx-reply [data-copy] { display: inline-flex; flex: none; align-items: center; gap: 4px; color: var(--rd-ink); }
.fx.reader .fx-reply textarea { display: block; padding: 5px 0; margin: 5px 0; font-weight: 730; font-size: 19px; line-height: 1.56; background: transparent; border: none; min-height: 42px; }
@supports (field-sizing: content) {
  .fx.reader .fx-reply textarea { field-sizing: content; resize: none; }
}
.rd-reason summary { font-size: 12px; }
.rd-switch { flex-wrap: wrap; padding: 7px 0; }
.rd-switch label { margin-right: auto; }
.rd-switch .fx-btn { min-height: 36px; padding: 7px 14px; }
.rd-observations,.rd-tools { font-size: 14px; }
.rd-observations summary { padding: 5px 0; }
@media (min-width: 740px) { .reader { border-inline: 1px solid var(--rd-line); } }
@media (max-width: 360px) {
  .reader { --rd-x: 12px; }
  .reader .rd-intro h2 { font-size: 26px; }
  .rd-switch { gap: 5px; }
  .rd-switch label { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rd-scan-beam,.rd-stream .rd-turn:not([hidden]),.rd-peek { animation: none; }
  .rd-play-meter i { transition: none; }
}
