/* Plain server text reserves the same three aid rows before enhancement. */
#storyReaderLines .story-line:not(.reading-interlinear) {line-height:122px;}
/* Keep three reading-aid rows above each naturally sized line of Chinese. */
#storyReaderLines .reading-interlinear {display:block; line-height:1.5; text-align:left; background:#fff!important; color:#111827;}
#storyReaderLines .reading-interlinear-line {display:grid; grid-template-rows:minmax(20px,auto) minmax(20px,auto) minmax(28px,auto) auto; margin:0 0 18px;}
#storyReaderLines .reading-aid {display:block; box-sizing:border-box; min-height:20px; font-family:system-ui,sans-serif; font-size:12px; font-weight:400; line-height:20px; text-align:left; overflow-wrap:anywhere; white-space:normal; user-select:none;}
#storyReaderLines .reading-aid-english {color:#53614d;}
#storyReaderLines .reading-aid-pinyin {color:#795515;}
#storyReaderLines .reading-aid-traditional {font-family:inherit; font-size:19px; line-height:28px; color:#795515;}
#storyReaderLines .reading-source-line {display:block; font-size:inherit; line-height:36px; white-space:nowrap;}
#storyReaderLines .reading-source-line > .story-reader-word {display:inline; margin:0; padding:0;}
#storyReaderLines.reading-hide-english .reading-aid-english,
#storyReaderLines.reading-hide-pinyin .reading-aid-pinyin,
#storyReaderLines.reading-hide-traditional .reading-aid-traditional {visibility:hidden;}
.reading-settings-toolbar {display:flex; align-items:center; justify-content:flex-end; margin:0 0 12px;}
#storyReaderLines :is(.reading-settings-toolbar,.news-reader-tools) > .shared-practice-gear {flex:0 0 44px; width:44px; height:44px; padding:10px; border:0; background:transparent; color:#365c39; box-shadow:none;}
.shared-practice-settings[data-reading-settings] .shared-practice-options {margin-bottom:24px;}

/* Reserve the top-right corner for settings; let the other controls use the row. */
.reading-reader-page .news-article #storyReaderLines > .news-reader-tools {position:relative; box-sizing:border-box; min-height:44px; padding-inline-end:52px; column-gap:8px;}
#storyReaderLines > .news-reader-tools > .shared-practice-gear {position:absolute; top:0; inset-inline-end:0;}
#storyReaderLines .news-reader-tools .news-listen-button {flex:0 0 44px; width:44px; min-width:44px; height:44px; min-height:44px;}
#storyReaderLines .news-reader-tools .news-explain-button {flex:0 0 auto; width:auto; min-width:0; min-height:44px; margin:0; padding:6px 10px;}
#storyReaderLines .news-reader-tools .news-explain-main {font-size:14px; white-space:nowrap;}
#storyReaderLines .news-reader-tools #newsAudioStatus {order:1; flex-basis:100%;}
@media (max-width:420px) {
    .reading-reader-page .news-article #storyReaderLines > .news-reader-tools {column-gap:4px;}
    #storyReaderLines .news-reader-tools .news-explain-button {padding-inline:6px;}
    #storyReaderLines .news-reader-tools .news-explain-main {font-size:13px;}
}

/* Invisible aid rows retain their reserved size while dictionaries arrive. */
#storyReaderLines.reading-hide-english .reading-aid-english,
#storyReaderLines.reading-hide-pinyin .reading-aid-pinyin {max-height:20px; overflow:hidden;}
#storyReaderLines.reading-hide-traditional .reading-aid-traditional {max-height:28px; overflow:hidden;}

.practice-hide-english #storyReaderLines .reading-aid-english,
.practice-hide-pinyin #storyReaderLines .reading-aid-pinyin {visibility:hidden;max-height:20px;overflow:hidden}
