:root { font-family: system-ui, sans-serif; color: #20262b; background: #fafaf8; }
body { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header-top h1 { margin: 0; }
.mode-toggle { display: inline-flex; gap: 8px; align-items: center; flex-shrink: 0; }
.mode-toggle svg, .reader-brand svg, .listen-lesson svg, .reader-play svg, .reading-paragraph-play svg, .reading-marker svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
header { padding: 18px 24px; border-bottom: 1px solid #d5d9db; background: white; }
h1 { font-size: 1.35rem; margin: 0 0 8px; }
p { line-height: 1.6; }
audio { width: min(680px, 100%); display: block; margin: 12px 0; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
button, select, .file-button { font: inherit; padding: 6px 9px; border: 1px solid #aab4bb; border-radius: 4px; background: white; color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
.file-button input { width: 0; height: 0; opacity: 0; }
.file-button:focus-within, button:focus-visible, select:focus-visible, .sentence:focus-visible { outline: 2px solid #185c87; outline-offset: 2px; }
.small { font-size: .85rem; max-width: 1000px; color: #53616b; }
#status { margin: 10px 0 0; font-size: .9rem; color: #185c87; }
#status:empty { display: none; }
#status.error { color: #a22419; }
main { padding: 24px; max-width: 960px; margin: auto; }
footer { padding: 14px 24px; font-size: .8rem; color: #53616b; text-align: center; }
.paragraph { margin: 0 0 24px; padding: 10px 14px; border-left: 3px solid transparent; }
.paragraph.active { border-left-color: #185c87; background: #eff5f8; }
.paragraph-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #65737d; font-size: .75rem; }
.paragraph-meta button { font-size: .75rem; }
.text { font-size: 1.08rem; line-height: 1.9; margin: 10px 0; padding-inline: 10px; }
.heading .text { font-weight: 650; }
.sentence { cursor: pointer; border-bottom: 2px dotted #c99541; border-radius: 2px; }
.sentence.exact { border-bottom-color: #4e9560; }
.sentence.unavailable { border-bottom: none; cursor: text; }
.sentence:not(.mark-target):hover, .word:hover { background: #fbe9bc; }
.text:not(.text-cut-editor) .sentence.unavailable:hover, .text:not(.text-cut-editor) .sentence.unavailable .word:hover { background: transparent; }
.sentence.playing { background: #fbe9bc; border-bottom: 3px solid #dfb400; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.word.cut-target { box-shadow: inset 0 -3px #185c87; }
.sentence.mark-target { cursor: crosshair; }
.text-marker { display: inline-block; position: relative; min-width: 1.1em; padding: 0 2px; margin: 0 3px; font-size: .68em; font-weight: 600; line-height: 1.35; text-align: center; vertical-align: super; border: 1px solid #357746; border-radius: 3px; background: #d5eadb; color: #245a33; user-select: none; cursor: grab; touch-action: none; }
.text-marker::before { content: ''; position: absolute; left: -1px; top: 100%; height: .85em; width: 2px; background: #357746; pointer-events: none; }
.text-marker[data-boundary-type="sentence"] { background: #f8ddd8; border-color: #a22419; color: #a22419; }
.text-marker[data-boundary-type="sentence"]::before { background: #a22419; }
.text-marker.selected { outline: 2px solid #185c87; outline-offset: 1px; }
.text-marker:focus-visible { outline: 2px solid #185c87; outline-offset: 2px; }
.text-marker.dragging { opacity: .4; }
.text-marker-spacer { display: inline-block; width: 1.25em; height: .45em; vertical-align: super; border-bottom: 2px dashed #9a622b; user-select: none; }
.text-marker-pair { display: inline-block; white-space: nowrap; }
.timeline-part.audio-only { background: repeating-linear-gradient(135deg, #b9803430 0 5px, #b9803408 5px 10px); }
.timeline-audio-gap { font-size: .7rem; color: #785125; white-space: nowrap; }
.text.moving-marker, .text.moving-marker * { user-select: none; cursor: grabbing; }
.text-drop-target { position: fixed; z-index: 10; min-width: 1.1em; padding: 0 2px; font-size: .68em; font-weight: 600; line-height: 1.35; text-align: center; border: 1px solid #185c87; border-radius: 3px; background: #d9ecf9; color: #185c87; pointer-events: none; user-select: none; }
.text-drop-target[hidden] { display: none; }
.text-drop-target::before { content: ''; position: absolute; left: -1px; top: 100%; height: var(--gap-height); width: 2px; background: #185c87; }
.text-drop-target.invalid { border-color: #a22419; background: #f8ddd8; color: #a22419; }
.text-drop-target.invalid::before { background: #a22419; }
.paragraph-notice { font-size: .8rem; color: #185c87; margin: 5px 0; }
.paragraph-notice:empty { display: none; }
.paragraph-notice.error { color: #a22419; }
.dataset-review { margin: 12px 0 6px; padding: 10px 12px; border: 1px solid #cbd5da; border-radius: 5px; background: #f7faf8; }
.dataset-validate { font-size: .75rem; }
.dataset-disclosure { display: block; margin: 0 0 6px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #357746; font-size: .8rem; }
.dataset-disclosure:hover { text-decoration: underline; }
.dataset-status { font-size: .77rem; line-height: 1.45; color: #426a50; margin: 7px 0; }
.dataset-status[data-state="stale"] { color: #875214; }
.dataset-status[data-state="unvalidated"] { color: #53616b; }
.dataset-status.error { color: #a22419; }
.article-translation-toolbar { margin-top: 16px; padding: 12px; border: 1px solid #cbd5da; border-radius: 5px; background: #f7faf8; }
.article-translation-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
#article-translation-status { margin: 8px 0 0; font-size: .82rem; color: #426a50; }
#article-translation-status.error { color: #a22419; }
.chunk-editor-count { font-size: .73rem; }
.text-cut-hint { color: #53616b; font-size: .75rem; margin: 4px 0; }
.text-cut-editor .sentence, .text-cut-editor .word { cursor: crosshair; }
.text-cut-toggle[aria-pressed="true"] { background: #d9ecf9; border-color: #185c87; color: #185c87; }
.warning { color: #9a5620; font-size: .83rem; }
.paragraph-timeline { margin: 14px 0 6px; border: 1px solid #cbd5da; border-radius: 5px; padding: 10px; background: white; user-select: none; }
.paragraph-timeline [hidden] { display: none; }
.paragraph-timeline.zoomed { border-color: #185c87; background: #f3f8fb; }
.timeline-caption { font-size: .76rem; color: #875214; line-height: 1.5; }
.zoomed .timeline-hint { color: #185c87; font-weight: 600; }
.timeline-remove { margin-top: 6px; padding: 3px 6px; font-size: .73rem; }
.timeline-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.timeline-navigation button { min-width: 32px; min-height: 32px; padding: 3px 9px; font-size: .76rem; }
.timeline-follow { margin-left: auto; }
.timeline-follow[aria-pressed="true"] { background: #d9ecf9; border-color: #185c87; color: #185c87; }
.timeline-viewport { min-width: 0; }
.timeline-viewport:focus-visible, .timeline-scroll-position:focus-visible { outline: 2px solid #185c87; outline-offset: 3px; }
.timeline-track { position: relative; height: 144px; margin: 6px 12px 0; }
.timeline-waveform { position: absolute; left: 0; top: 32px; width: 100%; height: 110px; pointer-events: none; }
.timeline-segments { position: absolute; inset: 32px 0 2px; }
.timeline-trimmed { position: absolute; top: 32px; bottom: 2px; background: repeating-linear-gradient(135deg, #65737d22 0 4px, transparent 4px 8px); pointer-events: none; }
.timeline-part { position: absolute; top: 0; bottom: 0; }
.timeline-segment { position: absolute; inset: 0; width: 100%; padding: 0; border-radius: 0; border: none; border-right: 1px solid #b5c6ce; background: #b8d0dc33; color: #234452; font-size: .75rem; }
.timeline-part:nth-child(even) .timeline-segment { background: #e9c8892b; }
.timeline-part .timeline-segment.selected-part { box-shadow: inset 0 -3px #185c87; }
.timeline-actions { position: relative; min-height: 36px; margin: 2px 12px 0; }
.timeline-audio-policy-row { position: absolute; top: 0; display: flex; transform: translateX(-50%); }
.timeline-segment-play, .timeline-audio-policy-toggle, .timeline-dock-play, .timeline-dock-policy { flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 3px; display: grid; place-items: center; background: transparent; color: #234452; cursor: pointer; }
.timeline-segment-play:hover, .timeline-dock-play:hover { background: #f4d67e77; }
.timeline-action-dock { display: flex; align-items: center; gap: 0; }
.timeline-part-selector { min-width: 0; flex: 1; height: 32px; margin-right: 8px; padding: 3px 6px; font-size: .75rem; }
.timeline-scroll-frame { position: relative; height: 18px; margin: 5px 12px 0; }
.timeline-scrollbar { position: absolute; inset: 0; overflow-x: scroll; overflow-y: hidden; scrollbar-width: none; pointer-events: none; }
.timeline-scroll-content { height: 1px; }
.timeline-scrollbar::-webkit-scrollbar { display: none; }
.timeline-scroll-position { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: #e3e9ed; border-radius: 4px; cursor: pointer; }
.timeline-scroll-position::-webkit-slider-runnable-track { height: 18px; }
.timeline-scroll-position::-webkit-slider-thumb { appearance: none; width: var(--thumb-width, 24px); height: 18px; background: #8aa6b5; border: 2px solid #e3e9ed; border-radius: 6px; }
.timeline-scroll-position::-webkit-slider-thumb:hover { background: #557882; }
.timeline-scroll-position::-moz-range-thumb { width: var(--thumb-width, 24px); height: 14px; background: #8aa6b5; border: 2px solid #e3e9ed; border-radius: 6px; }
.timeline-segment:hover { background: #f4d67e77; }
.timeline-part .timeline-segment.audio-excluded { background: repeating-linear-gradient(135deg, #a6652333 0 5px, #f4e5d744 5px 10px); color: #754419; }
.timeline-part .timeline-segment.audio-excluded:hover { background: repeating-linear-gradient(135deg, #a6652355 0 5px, #f4e5d766 5px 10px); }
.timeline-cursor, .timeline-edge { position: absolute; top: 8px; bottom: 0; width: 26px; padding: 0; transform: translateX(-50%); background: transparent; border: 0; border-radius: 0; cursor: ew-resize; touch-action: none; user-select: none; z-index: 2; }
.timeline-cursor::after, .timeline-edge::after { content: ''; position: absolute; top: 24px; bottom: 0; left: 12px; width: 2px; background: #357746; }
.timeline-track.paired-markers { height: 172px; }
.paired-markers .timeline-waveform, .paired-markers .timeline-trimmed { top: 60px; }
.paired-markers .timeline-segments { top: 60px; }
.paired-markers .timeline-cursor::after, .paired-markers .timeline-edge::after { top: 52px; }
.paired-markers .timeline-cursor[data-paired="true"] { pointer-events: none; }
.paired-markers .timeline-cursor[data-paired="true"] .cursor-label { pointer-events: auto; }
.paired-markers .timeline-cursor[data-paired="true"]::after { pointer-events: auto; }
.paired-markers .timeline-cursor[data-paired="true"][data-occurrence="1"] .cursor-label { top: 28px; }
.paired-markers .timeline-cursor[data-paired="true"][data-occurrence="1"] .cursor-time { top: 14px; }
.timeline-edge .cursor-label { width: 38px; left: -6px; background: #e3e9ed; border-color: #65737d; color: #364853; }
.timeline-edge::after { background: #65737d; }
.cursor-label { position: absolute; top: 0; left: 1px; width: 24px; height: 24px; line-height: 24px; font-size: .72rem; font-weight: 600; background: #d5eadb; border: 1px solid #357746; border-radius: 4px; color: #245a33; }
.timeline-cursor[data-boundary-type="sentence"] .cursor-label { background: #f8ddd8; border-color: #a22419; color: #a22419; }
.timeline-cursor[data-boundary-type="sentence"]::after { background: #a22419; }
.timeline-cursor.selected .cursor-label, .timeline-cursor.dragging .cursor-label, .timeline-edge.selected .cursor-label, .timeline-edge.dragging .cursor-label { outline: 2px solid #185c87; outline-offset: 1px; }
.timeline-cursor:focus-visible, .timeline-edge:focus-visible { outline: none; }
.timeline-cursor:focus-visible .cursor-label, .timeline-edge:focus-visible .cursor-label { outline: 2px solid #185c87; outline-offset: 2px; }
.cursor-time { display: none; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 1px 4px; font-size: .66rem; background: #20262b; color: white; border-radius: 3px; white-space: nowrap; pointer-events: none; }
.timeline-cursor:hover .cursor-time, .timeline-cursor.dragging .cursor-time, .timeline-edge:hover .cursor-time, .timeline-edge.dragging .cursor-time { display: block; }
.timeline-playhead { position: absolute; top: 30px; bottom: 0; width: 1px; background: #1561a1; pointer-events: none; z-index: 3; }
.timeline-ruler { display: flex; justify-content: space-between; gap: 2px; margin: 3px 12px 0; }
.timeline-ruler button { padding: 2px 0; font-size: .68rem; border: none; background: transparent; color: #53616b; white-space: nowrap; }
.timeline-audio-policy-toggle, .timeline-dock-policy { color: #65737d; font-size: 1.05rem; line-height: 1; }
.timeline-audio-policy-toggle:hover, .timeline-dock-policy:hover { background: #e3e9edaa; color: #20262b; }
.timeline-audio-policy-toggle[aria-pressed="true"], .timeline-dock-policy[aria-pressed="true"] { color: #a22419; background: #f8ddd8bb; }
.timeline-feedback { display: block; margin-top: 6px; min-height: 1.4em; font-size: .73rem; color: #185c87; line-height: 1.4; font-variant-numeric: tabular-nums; }
@media (pointer: coarse) {
  .timeline-segment-play, .timeline-audio-policy-toggle, .timeline-dock-play, .timeline-dock-policy { flex-basis: 36px; width: 36px; height: 36px; }
  .timeline-navigation button, .timeline-part-selector { min-height: 36px; }
  .timeline-actions { min-height: 40px; }
  .timeline-scroll-frame { height: 24px; }
  .timeline-scroll-position::-webkit-slider-runnable-track, .timeline-scroll-position::-webkit-slider-thumb { height: 24px; }
}
@media (max-width: 850px) { main { padding: 12px; } header { padding: 15px; } }

/* The same lesson and audio clock, with an uncluttered listening surface. */
body.reading-mode { min-height: 100vh; min-height: 100dvh; color-scheme: dark; background: #101613; color: #e3e8df; --reader-accent: #a6debb; --reader-muted: #95a69b; }
.reading-mode .app-header { position: sticky; top: 0; z-index: 5; padding: 18px max(24px, calc((100vw - 1120px) / 2)); background: #101613f5; backdrop-filter: blur(16px); border-bottom: 1px solid #28342c; }
.reader-brand { display: flex; align-items: center; gap: 12px; }
.reader-brand svg { width: 28px; height: 28px; color: var(--reader-accent); }
.reader-brand span { font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; }
.reader-brand small { display: block; margin-top: 2px; font-size: .65rem; font-weight: 500; color: var(--reader-muted); text-transform: uppercase; letter-spacing: .14em; }
.reading-mode button, .reading-mode select { color: inherit; border-color: #37463c; background: transparent; }
.reading-mode button:focus-visible, .reading-mode select:focus-visible, .reading-mode input:focus-visible, .reading-unit:focus-visible { outline: 2px solid var(--reader-accent); outline-offset: 4px; }
.reading-mode .mode-toggle { border-radius: 9px; padding: 9px 13px; font-size: .82rem; color: #c0cec4; }
.reading-mode .mode-toggle:hover { background: #233027; color: #eef5ef; }
#reading-view { max-width: 960px; padding: 38px 32px 160px; }
.reading-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 34px; margin-bottom: 32px; border-bottom: 1px solid #28342c; }
.toolbar-label { display: block; margin-bottom: 11px; font-size: .7rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--reader-muted); }
.reading-levels { display: flex; gap: 4px; padding: 4px; border: 1px solid #2e3b32; border-radius: 12px; background: #151e18; }
.reading-levels button { min-width: 119px; padding: 9px 12px; text-align: left; border: 1px solid transparent; border-radius: 8px; }
.reading-levels strong { display: block; font-weight: 550; font-size: .84rem; }
.reading-levels small { display: block; margin-top: 4px; font-size: .68rem; color: var(--reader-muted); }
.reading-levels button:hover { background: #202e24; }
.reading-levels button[aria-pressed="true"] { background: #2b3e30; border-color: #45634c; color: #c6edcf; }
.reading-levels button[aria-pressed="true"] small { color: #a8c6af; }
.listen-lesson { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 9px; font-size: .84rem; white-space: nowrap; }
.listen-lesson:hover { background: #24372a; border-color: #688e70; }
.listen-lesson svg { width: 18px; height: 18px; }
#reading-article { max-width: 760px; margin: 0 auto; }
.reading-translation-hint { max-width: 760px; margin: -13px auto 27px; color: var(--reader-muted); font-size: .7rem; line-height: 1.5; }
.reading-chunk.translated { border-bottom: 1px dotted #63886d88; }
.reading-chunk.translated:hover, .reading-chunk.translated:focus-visible { background: #304733; border-radius: 2px; }
.reading-chunk:focus-visible { outline: 1px solid var(--reader-accent); outline-offset: 2px; }
.chunk-translation { position: fixed; box-sizing: border-box; z-index: 8; width: min(440px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 14px 16px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #526858 #17241b; border: 1px solid #425448; border-radius: 10px; background: #17241b; color: #e0e9e2; box-shadow: 0 10px 32px #0006; font-family: system-ui, sans-serif; font-size: .8125rem; font-weight: 400; line-height: 1.55; overflow-wrap: anywhere; pointer-events: auto; color-scheme: dark; }
.chunk-translation-field + .chunk-translation-field { margin-top: 12px; }
.chunk-translation-field > strong { display: block; margin-bottom: 4px; font-size: .7rem; font-weight: 600; color: #a7bcae; }
.chunk-translation-literal { color: #e5eee7; }
.chunk-translation-sense { color: #c7d8cc; }
.chunk-translation ul { padding-left: 18px; margin: 4px 0 0; font-size: .775rem; color: #bdcec2; }
.chunk-translation .chunk-translation-words { list-style: none; padding: 0; margin: 6px 0 0; }
.chunk-translation-more { margin-top: 14px; padding-top: 10px; border-top: 1px solid #35473b; }
.chunk-translation-more > summary { width: fit-content; color: #a7bcae; font-size: .72rem; font-weight: 500; cursor: pointer; }
.chunk-translation-more > summary:hover { color: #d7e7dc; }
.chunk-translation-more > summary:focus-visible { outline: 2px solid var(--reader-accent, #a6debb); outline-offset: 4px; border-radius: 2px; }
.chunk-translation-more[open] > summary { margin-bottom: 11px; }
.chunk-translation .reading-word-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0; margin: 0; list-style: none; }
.reading-word-chip { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid #3b5243; border-radius: 6px; background: #213429; }
.reading-word-chip > button { box-sizing: border-box; min-width: 0; margin: 0; border: 0; border-radius: 5px; background: transparent; color: #e1ede4; font-size: .8125rem; line-height: 1.4; }
.reading-word-chip > .reading-word-button { padding: 5px 7px; text-align: left; overflow-wrap: anywhere; }
.reading-word-chip > .reading-word-button:hover, .reading-word-chip > .reading-word-button[aria-expanded="true"] { background: #304b38; color: #edf8ef; }
.reading-word-chip > .reading-word-add { flex: 0 0 26px; width: 26px; padding: 4px 0; opacity: 0; visibility: hidden; pointer-events: none; color: #a6debb; font-size: 1rem; transition: opacity .12s ease; }
.reading-word-chip.add-visible > .reading-word-add { opacity: 1; visibility: visible; pointer-events: auto; }
.reading-word-chip > .reading-word-add:hover { background: #304b38; color: #e3f7e9; }
.reading-word-chip > button:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--reader-accent, #a6debb); outline-offset: 2px; }
.reading-word-detail { list-style: none; margin: 12px 0 0; padding: 11px 12px; border: 1px solid #3a5041; border-radius: 7px; background: #1d2d22; color: #dce7df; font-size: .8125rem; line-height: 1.5; }
.reading-word-detail-title { margin: 0 0 9px; color: #edf3ee; font-size: .875rem; font-weight: 600; line-height: 1.4; }
.reading-word-field + .reading-word-field { margin-top: 9px; }
.reading-word-label { display: block; margin-bottom: 2px; color: #9eb5a6; font-size: .69rem; font-weight: 550; }
.reading-word-value { margin: 0; color: #dce7df; overflow-wrap: anywhere; }
.reading-word-value ul, .reading-word-value ol { margin: 3px 0 0; padding-left: 18px; color: inherit; font-size: inherit; }
.reading-word-value li + li { margin-top: 3px; }
.reading-word-dialog { box-sizing: border-box; width: min(480px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #526858 #17241b; border: 1px solid #526858; border-radius: 12px; background: #17241b; color: #e1ebe4; box-shadow: 0 20px 70px #0009; font-family: system-ui, sans-serif; font-size: .875rem; line-height: 1.55; color-scheme: dark; }
.reading-word-dialog::backdrop { background: #07110bbc; }
.reading-word-dialog > header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #3b4e40; background: #17241b; }
.reading-word-dialog-title { margin: 0; font-size: 1.15rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.reading-word-dialog .reading-word-dialog-close { flex: 0 0 auto; display: grid; place-items: center; min-width: 32px; min-height: 32px; padding: 6px 10px; border: 1px solid #415849; border-radius: 7px; background: #213429; color: #d4e6db; font-size: .75rem; line-height: 1.4; }
.reading-word-dialog .reading-word-dialog-close:hover { background: #304b38; color: #f1f8f3; }
.reading-word-dialog .reading-word-dialog-close:focus-visible { outline: 2px solid var(--reader-accent, #a6debb); outline-offset: 3px; }
.reading-word-dialog-content { padding: 18px 20px 22px; }
.reading-word-dialog-content .reading-word-field + .reading-word-field { margin-top: 14px; }
.reading-word-dialog-content .reading-word-label { font-size: .72rem; }
@media (prefers-reduced-motion: reduce) { .reading-word-chip > .reading-word-add { transition: none; } }
.reading-paragraph { position: relative; padding-right: 46px; margin: 0 0 30px; scroll-margin-top: 110px; }
.reading-text { font-family: Georgia, 'Times New Roman', serif; font-size: 1.22rem; line-height: 1.95; margin: 0; letter-spacing: .005em; }
.reading-paragraph[data-pid="p1"] { margin-top: 12px; margin-bottom: 14px; }
.reading-paragraph[data-pid="p1"] .reading-text { color: var(--reader-accent); font-family: inherit; font-size: .73rem; font-weight: 550; letter-spacing: .14em; }
.reading-paragraph h1.reading-text { font-family: inherit; font-size: clamp(2rem, 4.2vw, 2.9rem); line-height: 1.22; font-weight: 600; letter-spacing: -.04em; margin-bottom: 38px; color: #f2f4eb; }
.reading-paragraph h2.reading-text { font-family: inherit; font-size: .9rem; line-height: 1.5; font-weight: 550; color: var(--reader-accent); letter-spacing: .08em; margin-top: 58px; }
.reading-paragraph h3.reading-text { font-family: inherit; font-size: 1.3rem; font-weight: 550; line-height: 1.55; letter-spacing: -.02em; color: #edf1e7; margin-top: 46px; }
.reading-paragraph-play { position: absolute; top: 4px; right: 0; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid #314037 !important; border-radius: 50%; color: #8ba895 !important; }
.reading-paragraph-play svg { width: 16px; height: 16px; }
.reading-paragraph-play:hover, .reading-paragraph.active .reading-paragraph-play { background: #2b3e30; color: var(--reader-accent) !important; border-color: #63886d !important; }
.reading-unit { border-radius: 4px; cursor: pointer; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-color .15s; }
.reading-unit:hover { background: #283b2d; }
.reading-unit.playing { background: #304f39; color: #f2f7eb; }
.reading-unit.unavailable { cursor: text; }
.reading-unit.unavailable:hover { background: transparent; }
.reading-marker { display: inline-flex; align-items: center; justify-content: center; padding: 0; width: 18px; height: 23px; margin: 0 3px 0 1px; border: 0 !important; border-radius: 4px; vertical-align: .04em; color: #658571 !important; }
.reading-marker svg { width: 12px; height: 12px; stroke-width: 1.8; }
.reading-marker:hover { color: var(--reader-accent) !important; background: #304f39; }
.reading-paragraph.heading .reading-marker { display: none; }
.reader-player { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 18px; box-sizing: border-box; width: min(860px, calc(100% - 40px)); padding: 16px 20px; background: #1b271ff5; border: 1px solid #405146; border-radius: 16px; box-shadow: 0 12px 48px #0008; backdrop-filter: blur(20px); }
.reader-play { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 0 !important; background: var(--reader-accent) !important; color: #14241a !important; }
.reader-play:hover { background: #c3edcc !important; }
.reader-track { min-width: 130px; max-width: 210px; }
.reader-track strong { display: block; font-size: .82rem; font-weight: 550; }
.reader-track span { display: block; margin-top: 5px; font-size: .7rem; color: var(--reader-muted); }
#reader-status.error { color: #f4ae98; }
.reader-progress { flex: 1; min-width: 60px; }
#reader-seek { display: block; width: 100%; margin: 0; accent-color: var(--reader-accent); cursor: pointer; }
.reader-times { display: flex; justify-content: space-between; margin-top: 6px; font-size: .65rem; font-variant-numeric: tabular-nums; color: var(--reader-muted); }
.reader-speed select { font-size: .8rem; padding: 7px 8px; border-radius: 7px; }
.reader-speed option { background: #1b271f; }
@media (max-width: 640px) {
  .header-top { gap: 10px; }
  .editor-title { font-size: 1rem; }
  .mode-toggle { font-size: .75rem; }
  .reading-mode .app-header { padding: 14px 20px; }
  #reading-view { padding: 28px 22px 180px; }
  .reading-toolbar { align-items: stretch; flex-direction: column; gap: 16px; padding-bottom: 26px; margin-bottom: 26px; }
  .reading-levels button { min-width: 0; flex: 1; padding: 9px 8px; }
  .reading-levels small { font-size: .64rem; white-space: nowrap; }
  .listen-lesson { align-self: flex-start; }
  .reading-paragraph { padding-right: 34px; margin-bottom: 25px; }
  .reading-text { font-size: 1.08rem; line-height: 1.9; }
  .reading-paragraph h1.reading-text { font-size: 2.15rem; }
  .reading-paragraph h3.reading-text { font-size: 1.16rem; }
  .reading-paragraph-play { width: 28px; height: 28px; }
  .chunk-translation { padding: 12px 13px; }
  .reading-word-dialog > header { padding: 14px 16px; }
  .reading-word-dialog-content { padding: 16px 16px 20px; }
  .reader-player { bottom: 12px; width: calc(100% - 24px); padding: 13px 16px; gap: 13px; flex-wrap: wrap; border-radius: 13px; }
  .reader-track { flex: 1; min-width: 0; max-width: none; }
  .reader-progress { flex-basis: 100%; order: 4; }
  .reader-play { width: 40px; height: 40px; }
}
