/* Reader content only. Global sidebar styling and behaviour belong to the shell. */
.reader-page .reader-layout,
.reader-page .page-topbar,
.reader-page .recent-documents-dialog {
  --reader-text: #101214;
  --reader-muted: #565d65;
  --reader-line: #e1e3e6;
  --reader-line-strong: #cdd0d4;
  --reader-surface: #fff;
  --reader-surface-soft: #f6f7f8;
  --reader-primary-soft: #f0f1f2;
  --reader-selected-bg: #f4f5f6;
  --reader-selected-border: #e1e3e6;
  --reader-selected-shadow: none;
  --reader-focus: #51575e;
  --reader-accent: #087c39;
  --reader-primary: #087c39;
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  color: var(--reader-text);
}
:root[data-theme="dark"] .reader-page :is(.reader-layout, .page-topbar, .recent-documents-dialog) {
  --reader-text: #f5f5f5;
  --reader-muted: #bcbcbc;
  --reader-line: #333;
  --reader-line-strong: #666;
  --reader-surface: #000;
  --reader-surface-soft: #111;
  --reader-primary-soft: #202020;
  --reader-selected-bg: #202020;
  --reader-selected-border: #444;
  --reader-focus: #eee;
  --reader-accent: #f5f5f5;
  --reader-primary: #f5f5f5;
}
.reader-page .page-topbar {
  min-height: 64px;
  padding: 8px 24px;
  gap: 28px;
  border-bottom: 1px solid var(--reader-line);
}
.reader-page .page-topbar-title-btn {
  font-size: 23px;
}
.reader-page .reader-section-tabs {
  align-self: stretch;
  gap: 22px;
}
.reader-page .reader-tab {
  padding: 10px 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: var(--reader-muted);
}
.reader-page .reader-tab.active {
  border-bottom-color: var(--reader-text);
  background: transparent;
  color: var(--reader-text);
}
.reader-page .reader-upload-btn {
  padding: 12px 22px;
  font-weight: 600;
  box-shadow: none;
}
.reader-page .reader-layout {
  max-width: 1536px;
  padding: 20px 60px;
}
.reader-page .reader-player-shell {
  padding-top: 0;
}
.reader-page .page-topbar .reader-upload-btn {
  box-shadow: none;
}
.reader-page .page-topbar .reader-tab-label {
  font-weight: 400;
}
.reader-page .reader-status:empty {
  display: none;
}
.reader-page .player-doc-head {
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
}
.reader-page .selected-title {
  font-size: 38px;
  line-height: 1.25;
  font-weight: 650;
}
.reader-page .document-meta {
  font-size: 17px;
  margin-top: 8px;
}
.reader-page .player-head-actions {
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
}
.reader-page .reader-narration-controls {
  align-items: center;
  gap: 24px;
}
.reader-page .reader-narration-controls .player-voice-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: auto;
  gap: 14px;
}
.reader-page .reader-narration-controls .player-voice-field span {
  font-size: 16px;
  color: var(--reader-text);
}
.reader-page .reader-narration-controls select {
  width: 215px;
}
.reader-page .reader-narration-controls .reader-generate-btn {
  background: var(--reader-surface);
  color: var(--reader-text);
  border: 1px solid var(--reader-line-strong);
  padding-inline: 20px;
}
.reader-page #playerStatusBadge {
  padding: 0;
  background: transparent !important;
  color: var(--reader-text) !important;
  border: 0;
  font-size: 16px;
  font-weight: 400;
}
.reader-page .player-main {
  gap: 26px;
}
.reader-page #playerHint[hidden] {
  display: none;
}
.reader-page .playback-strip {
  padding: 28px 26px 18px;
  background: var(--reader-surface-soft) !important;
  grid-template-columns: minmax(230px, 1fr) minmax(590px, 1.9fr);
  column-gap: 28px;
}
.reader-page .playback-strip-title {
  font-size: 29px;
  line-height: 1.25;
}
.reader-page .playback-strip > .reader-kicker {
  color: var(--reader-text);
  font-size: 13px;
}
.reader-page .segment-title {
  font-size: 17px;
}
.reader-page .transport {
  gap: 22px;
}
.reader-page .transport-buttons {
  gap: 16px;
}
.reader-page .reader-play-btn {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  min-height: 80px;
  background: var(--reader-text) !important;
  color: var(--reader-surface) !important;
}
.reader-page .reader-icon-btn {
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  color: var(--reader-text);
}
.reader-page .seek-icon {
  position: relative;
  width: 32px;
  height: 32px;
}
.reader-page .seek-arrow {
  width: 32px;
  height: 32px;
  stroke-width: 1.8;
}
.reader-page .seek-seconds {
  position: absolute;
  top: 12px;
  left: 7px;
  width: 20px;
  font-size: 11px;
  margin: 0;
  text-align: center;
}
.reader-page .transport-extras {
  align-items: end;
  gap: 28px;
}
.reader-page .transport-speed-field {
  width: 95px;
  flex-basis: 95px;
}
.reader-page .transport-speed-field select {
  width: 95px;
}
.reader-page .transport-speed-field > span,
.reader-page .volume-field > span {
  font-size: 14px;
  color: var(--reader-text);
}
.reader-page .volume-field {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  width: 160px;
}
.reader-page .volume-field > span {
  grid-column: 1 / -1;
}
.reader-page #volumeRange {
  width: 126px;
  accent-color: var(--reader-text);
}
.reader-page .player-time-row {
  grid-row: 4;
  min-height: 32px;
  align-items: center;
  font-size: 14px;
  margin-top: 20px;
}
.reader-page .progress-field {
  grid-row: 4;
  width: auto;
  margin: 20px 150px 0 64px;
  align-self: center;
}
.reader-page #progressRange {
  --reader-primary: var(--reader-text);
}
.reader-page #progressRange::-webkit-slider-thumb {
  background: var(--reader-text);
  border: 0;
  box-shadow: none;
}
.reader-page #progressRange::-moz-range-thumb {
  background: var(--reader-text);
  border: 0;
  width: 18px;
  height: 18px;
  box-shadow: none;
}
:root[data-theme="dark"] .reader-page #progressRange {
  background: transparent !important;
}
.reader-page .section-bookmark-row {
  margin-top: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--reader-line);
}
.reader-page .section-bookmark-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 14px 12px;
  color: var(--reader-muted);
}
.reader-page .section-bookmark-tab.active {
  color: var(--reader-text);
  border-bottom-color: var(--reader-text);
  background: transparent;
}
.reader-page .reader-count-pill {
  background: var(--reader-primary-soft);
  color: var(--reader-text);
  font-weight: 500;
}
.reader-page .segments-table-head,
.reader-page .segment-row {
  grid-template-columns: 48px minmax(0, 1fr) 160px 190px 44px;
  border-left: 0;
  padding: 12px;
}
.reader-page .segments-table-head {
  min-height: 48px;
  text-transform: none;
  font-size: 14px;
  font-weight: 400;
}
.reader-page .segment-row {
  min-height: 58px;
}
.reader-page .segment-row[aria-current="true"] {
  background: var(--reader-primary-soft) !important;
  border-left: 0 !important;
}
.reader-page .section-title {
  font-size: 17px;
  line-height: 1.4;
}
.reader-page .section-status {
  color: var(--reader-muted) !important;
  background: transparent !important;
}
.reader-page .section-play-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--reader-line-strong);
  border-radius: 50%;
  color: var(--reader-text) !important;
  background: transparent !important;
}
.reader-page :is(.library-full-panel, .playlist-full-panel, .upload-panel) {
  background: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 12px 0;
}
.reader-page .reader-panel-head h2,
.reader-page .upload-panel h2 {
  font-size: 28px;
  font-weight: 600;
}
.reader-page :is(.library-full-panel, .playlist-full-panel, .upload-panel) .reader-kicker {
  display: none;
}
.reader-page .library-full-panel .reader-panel-head {
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
}
.reader-page .library-head-controls {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: 100%;
  gap: 20px;
}
.reader-page .library-head-controls > .compact-field {
  width: 220px;
  flex: 0 0 220px;
}
.reader-page .library-head-controls .search-field {
  order: -1;
  flex: 1;
  max-width: none;
}
.reader-page .reader-list {
  gap: 0;
  padding: 0;
}
.reader-page .book-row {
  min-height: 76px;
  height: auto;
  padding: 12px 8px;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--reader-line);
  border-radius: 0;
  box-shadow: none !important;
  background: transparent;
}
.reader-page .book-row[aria-current="true"] {
  background: var(--reader-selected-bg) !important;
}
.reader-page .book-select {
  grid-template-columns: 44px minmax(0, 1fr) 110px 76px;
  gap: 16px;
  padding: 4px;
  border: 0;
  background: transparent !important;
}
.reader-page .book-icon {
  width: 42px;
  height: 46px;
  background: transparent !important;
  color: var(--reader-muted) !important;
  border: 1px solid var(--reader-line-strong) !important;
  border-radius: 3px;
  font:
    600 11px/1 "Segoe UI",
    sans-serif;
}
.reader-page .book-title {
  font-size: 16px;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.reader-page .book-meta {
  font-size: 13px;
  font-weight: 400;
  color: var(--reader-muted);
  overflow-wrap: anywhere;
}
.reader-page .book-status {
  font-weight: 400;
  padding: 0;
  background: transparent !important;
  color: var(--reader-text) !important;
  justify-self: start;
}
.reader-page .book-open-label {
  padding: 9px 16px;
  border-radius: 4px;
  background: var(--reader-primary);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}
:root[data-theme="dark"] .reader-page .book-open-label {
  color: #000;
}
.reader-page .document-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px 140px;
  padding: 14px 12px 14px 68px;
  color: var(--reader-muted);
  border-bottom: 1px solid var(--reader-line);
  font-size: 13px;
}
.reader-page .icon-action {
  min-width: 40px;
  min-height: 40px;
  color: var(--reader-muted);
  background: transparent;
  border-color: transparent;
}
.reader-page .recent-documents-dialog {
  width: min(640px, calc(100vw - 32px));
  padding: 24px;
  gap: 20px;
  background: var(--reader-surface) !important;
  border-radius: 8px;
}
.reader-page .recent-documents-head h2 {
  font-size: 23px;
  font-weight: 600;
}
.reader-page .recent-documents-dialog .book-select {
  grid-template-columns: 44px minmax(0, 1fr) 64px;
}
.reader-page .recent-documents-dialog .book-open-label {
  color: var(--reader-text);
  background: transparent;
}
.reader-page .recent-documents-dialog .book-status {
  display: none;
}
.reader-page .recent-documents-dialog .book-row {
  min-height: 80px;
}
.reader-page .recent-documents-dialog .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.reader-page .search-field {
  min-width: 0;
}
.reader-page .search-field input {
  min-height: 46px;
  font-weight: 400;
}
.reader-page .search-field::before {
  top: calc(50% - 8px);
}
.reader-page .search-field::after {
  top: calc(50% + 4px);
}
.reader-page .playlist-form {
  max-width: 640px;
}
.reader-page .reader-new-list {
  width: min(640px, 100%);
}
.reader-page .reader-new-list > summary {
  cursor: pointer;
  padding: 12px 18px;
  width: fit-content;
  border: 1px solid var(--reader-line-strong);
  border-radius: 4px;
}
.reader-page .reader-new-list[open] > summary {
  margin-bottom: 16px;
}
.reader-page .outline-jump-list {
  margin: 12px 0;
}
.reader-page .outline-jump-list label {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 16px;
  font-size: 15px;
  white-space: nowrap;
}
.reader-page .outline-jump-list select {
  width: min(300px, 60%);
  min-height: 44px;
  background: var(--reader-surface);
  color: var(--reader-text);
  border: 1px solid var(--reader-line-strong);
  border-radius: 4px;
  padding: 8px 12px;
}
.reader-page .reader-icon-btn .seek-arrow {
  width: 32px;
  height: 32px;
}
.reader-page .reader-icon-btn .seek-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.reader-page .reader-play-btn .control-icon svg path,
.reader-page .mini-play-btn .reader-action-icon path {
  stroke-width: 1;
}
.reader-page .transport-speed-field > span,
.reader-page .volume-field > span {
  font-weight: 400;
}
.reader-page .reader-panel-footer {
  font-size: 14px;
  font-weight: 400;
}
.reader-page .playlist-full-panel > .field {
  max-width: 540px;
}
.reader-page #addToPlaylistBtn {
  width: fit-content;
  min-height: 44px;
}
.reader-page .playlist-track-title {
  font-size: 16px;
  font-weight: 500;
}
.reader-page .playlist-manage-details {
  border: 0;
  padding-inline: 0;
}
.reader-page .bookmark-row {
  background: transparent !important;
  border: 0;
  border-bottom: 1px solid var(--reader-line);
  border-radius: 0;
  padding: 18px 10px;
  box-shadow: none !important;
}
.reader-page .bookmark-label {
  font-weight: 600;
  font-size: 16px;
}
.reader-page .bookmark-row .bookmark-meta {
  color: var(--reader-muted);
  font-size: 14px;
  font-weight: 400;
}
.reader-page
  .section-panel:has(#bookmarkList:not(.hidden))
  :is(.segments-table-head, .outline-jump-list) {
  display: none;
}
.reader-page .reader-mini-player {
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-top: 32px;
  padding: 16px 0;
  background: var(--reader-surface) !important;
  border: 0;
  border-top: 1px solid var(--reader-line);
  border-radius: 0;
  box-shadow: none;
}
.reader-page .mini-cover {
  display: none;
}
.reader-page .mini-now-playing {
  padding-right: 24px;
}
.reader-page .mini-now-playing span {
  font-weight: 400;
}
.reader-page .mini-control-btn,
.reader-page .mini-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.reader-page .reader-return {
  color: var(--reader-text);
  white-space: nowrap;
  min-height: 44px;
}
.reader-page .upload-panel {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
  width: 100%;
}
.reader-page .reader-dropzone {
  min-height: 260px;
  background: var(--reader-surface-soft) !important;
  border: 1px dashed var(--reader-line-strong);
  border-radius: 4px;
  gap: 14px;
  justify-items: center;
  align-content: center;
  text-align: center;
}
.reader-page .reader-dropzone > svg {
  width: 32px;
  height: 32px;
}
.reader-page .upload-picker-label {
  width: fit-content;
  background: var(--reader-primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: 4px;
}
.reader-page #miniProgressRange::-webkit-slider-thumb {
  box-shadow: none;
}
.reader-page #miniProgressRange::-moz-range-thumb {
  box-shadow: none;
}
:root[data-theme="dark"] .reader-page .upload-picker-label {
  color: #000;
}
.reader-page .upload-panel:focus-within .reader-dropzone {
  outline: 2px solid var(--reader-focus);
  outline-offset: 3px;
}
.reader-page #readerFileInput {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.reader-page .reader-upload-status {
  border-bottom: 1px solid var(--reader-line);
  padding: 16px;
  overflow-wrap: anywhere;
}
.reader-page
  :is(.reader-layout, .recent-documents-dialog)
  :is(button, input, select, summary):focus-visible {
  outline: 2px solid var(--reader-focus);
  outline-offset: 3px;
  box-shadow: none;
}
/* Match the approved Reader composition without changing the shell or sidebar. */
.reader-page
  :is(.reader-layout, .page-topbar, .recent-documents-dialog)
  :is(button, input, select, span, p, strong, h2, label, summary) {
  font-family: Arial, sans-serif;
}
.reader-page .page-topbar {
  padding-inline: 24px;
}
.reader-page .page-topbar-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.reader-page .page-topbar .page-topbar-title-btn {
  font-size: 23px;
  font-weight: 700;
}
.reader-page .reader-header-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.reader-page .page-topbar .reader-tab {
  font-size: 17px;
  padding: 14px 16px;
}
.reader-page .reader-tab[data-reader-view] .reader-tab-icon,
.reader-page .reader-tab-caret {
  display: none;
}
.reader-page .reader-tab-icon {
  width: 24px;
  height: 24px;
}
.reader-page .page-topbar .reader-upload-btn {
  font-size: 17px;
  box-shadow: none !important;
}
.reader-page .player-doc-head {
  padding: 10px 24px 0;
  gap: 26px;
}
.reader-page .selected-title {
  font-size: 40px;
  font-weight: 700;
}
.reader-page .document-meta {
  font-size: 19px;
}
.reader-page .reader-narration-controls :is(select, button),
.reader-page .reader-narration-controls .player-voice-field span {
  font-size: 18px;
}
.reader-page .reader-narration-controls select {
  width: 190px;
}
.reader-page .reader-generate-btn .reader-action-icon {
  width: 24px;
  height: 24px;
}
.reader-page #playerStatusBadge {
  font-size: 18px;
  display: inline-flex;
  gap: 12px;
  align-items: center;
}
.reader-page #playerStatusBadge.ready:not(.is-loading)::before {
  content: "\2713";
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #267c36;
  color: white;
  text-align: center;
  line-height: 23px;
}
.reader-page .transport-buttons {
  gap: 22px;
}
.reader-page .reader-icon-btn .seek-icon,
.reader-page .reader-icon-btn .seek-arrow {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}
.reader-page .seek-seconds {
  top: 16px;
  left: 12px;
  font-size: 14px;
  font-weight: 600;
}
.reader-page .reader-play-btn .control-icon svg {
  width: 36px;
  height: 36px;
}
.reader-page .reader-icon-btn svg {
  width: 24px;
  height: 24px;
}
.reader-page .section-bookmark-tab {
  font-size: 18px;
}
.reader-page .reader-count-pill {
  min-width: 28px;
  height: 28px;
  font-size: 16px;
  background: var(--reader-primary-soft) !important;
  color: var(--reader-text) !important;
}
.reader-page .section-bookmark-row :is(input, button) {
  font-size: 17px;
}
.reader-page #addBookmarkBtn {
  background: var(--reader-surface);
  border: 1px solid var(--reader-line-strong);
}
.reader-page .segments-table-head,
.reader-page .segment-row {
  grid-template-columns: 64px minmax(0, 1fr) 170px 230px 44px;
}
.reader-page .segment-row {
  padding-block: 8px;
}
.reader-page .section-title {
  font-size: 18px;
  font-weight: 400;
}
.reader-page .segment-row[aria-current="true"] .section-title {
  font-weight: 600;
}
.reader-page :is(.section-duration, .section-index, .section-status) {
  font-size: 16px;
}
.reader-page .section-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.reader-page .section-status svg {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
}
.reader-page .outline-jump-list select {
  width: 200px;
}
.reader-page .document-list-head {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 60px 100px 124px;
  gap: 16px;
  padding-left: 58px;
}
.reader-page .library-list-large .book-select {
  grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 60px 100px 76px;
}
.reader-page .book-icon {
  width: 28px;
  height: 36px;
  border: 0 !important;
}
.reader-page .book-icon svg {
  width: 24px;
  height: 28px;
}
.reader-page .library-list-large .book-meta {
  display: none;
}
.reader-page .book-filename {
  overflow-wrap: anywhere;
  font-size: 13px;
  color: var(--reader-muted);
}
.reader-page .book-type {
  font-size: 13px;
  color: var(--reader-muted);
}
.reader-page .playlist-full-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}
.reader-page
  .playlist-full-panel
  > :is(.field, #addToPlaylistBtn, .playlist-manage-details, .playlist-items) {
  grid-column: 1 / -1;
}
.reader-page .reader-new-list {
  width: auto;
  justify-self: end;
}
.reader-page .reader-new-list > summary {
  background: var(--reader-primary);
  color: white;
  list-style: none;
}
.reader-page .reader-new-list > summary::before {
  content: "+";
  margin-right: 10px;
  font-size: 22px;
}
.reader-page .reader-new-list[open] {
  grid-column: 1 / -1;
  justify-self: stretch;
}
.reader-page .reader-mini-player .reader-return {
  color: var(--reader-primary);
  font-size: 16px;
}
.reader-page .page-topbar {
  width: 100%;
  max-width: none;
}
.reader-page .page-topbar .reader-tab-label {
  font-size: 17px;
}
.reader-page .page-topbar .reader-section-tabs {
  margin-left: 0;
}
.reader-page .player-doc-head {
  gap: 20px;
}
.reader-page .player-main {
  gap: 20px;
}
.reader-page .reader-narration-controls button {
  font-weight: 400;
}
.reader-page .section-bookmark-row {
  padding-bottom: 0;
}
.reader-page .section-panel {
  gap: 0;
}
.reader-page .outline-jump-list {
  margin: 16px 0 4px;
}
.reader-page .upload-panel {
  max-width: none;
}
.reader-page .library-list-large .book-row {
  min-height: 66px;
  padding-block: 6px;
}
.reader-page .book-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.reader-page .book-status {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.reader-page .book-status.ready::before {
  background: #267c36;
}
.reader-page .bookmark-table-head {
  display: none;
}
.reader-page .section-panel:has(#bookmarkList:not(.hidden)) .bookmark-table-head {
  display: grid;
}
.reader-page .bookmark-table-head,
.reader-page .bookmark-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 160px 90px 100px;
  gap: 16px;
}
.reader-page .bookmark-table-head {
  padding: 18px 10px;
  color: var(--reader-muted);
  border-bottom: 1px solid var(--reader-line);
  font-size: 14px;
}
.reader-page .bookmark-main {
  display: contents;
}
.reader-page .bookmark-row .small-btn:not(:disabled) {
  background: var(--reader-primary);
  color: white;
  border-color: transparent;
}
.reader-page .bookmark-row .status-badge {
  background: transparent;
  font-weight: 400;
}
.reader-page .bookmark-row .status-badge::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 8px;
}
.reader-page .reader-new-list > summary {
  font-weight: 500;
}
:root[data-theme="dark"]
  .reader-page
  :is(.reader-new-list > summary, .bookmark-row .small-btn:not(:disabled)) {
  color: #000;
}
/* Final reference details: thin active lines, quiet rows, compact secondary views. */
.reader-page .page-topbar .reader-tab.active,
.reader-page .section-bookmark-tab.active {
  border-bottom-color: var(--reader-accent);
}
.reader-page .section-bookmark-tab:not(.active) {
  border-bottom-color: transparent;
}
.reader-page .page-topbar .reader-tab.active .reader-tab-label,
.reader-page .section-bookmark-tab.active {
  font-weight: 600;
}
.reader-page .reader-tab-icon {
  stroke-width: 1.7;
  fill: none;
}
.reader-page :is(.book-title, .bookmark-label, .playlist-track-title) {
  font-weight: 600;
}
.reader-page :is(.book-meta, .book-filename, .book-type, .recent-book-type, .bookmark-meta) {
  font-weight: 400;
}
.reader-page .bookmark-row {
  padding-block: 12px;
  min-height: 62px;
}
.reader-page
  .reader-layout:has(#bookmarkList:not(.hidden))
  :is(.playback-strip, .player-head-actions, .document-meta) {
  display: none;
}
.reader-page .reader-layout:has(#bookmarkList:not(.hidden)) .player-doc-head {
  padding-inline: 0;
}
.reader-page .reader-layout:has(#bookmarkList:not(.hidden)) .selected-title {
  font-size: 28px;
}
.reader-page .reader-layout:has(#bookmarkList:not(.hidden)) #addBookmarkBtn {
  background: var(--reader-accent);
  color: var(--reader-surface);
  border-color: var(--reader-accent);
}
.reader-page .recent-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 28px;
  gap: 16px;
  padding: 4px 12px 10px 48px;
  border-bottom: 1px solid var(--reader-line);
  font-size: 13px;
  color: var(--reader-muted);
}
.reader-page .recent-documents-dialog .book-select {
  grid-template-columns: 28px minmax(0, 1fr) 64px 28px;
  gap: 16px;
}
.reader-page .recent-documents-dialog .book-meta {
  display: none;
}
.reader-page .recent-documents-dialog .book-row {
  min-height: 62px;
  padding: 8px 0;
}
.reader-page .recent-documents-dialog .book-open-label {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reader-page .recent-documents-dialog .book-open-label svg {
  width: 20px;
  height: 20px;
  fill: none;
}
.reader-page .recent-book-type {
  color: var(--reader-muted);
  font-size: 13px;
}
.reader-page .reader-dropzone {
  min-height: 260px;
  background: var(--reader-surface) !important;
}
.reader-page .reader-dropzone > span:first-of-type {
  font-weight: 600;
  font-size: 17px;
}
.reader-page .upload-picker-label {
  font-weight: 600;
  font-size: 16px;
  padding: 10px 24px;
}
.reader-page .reader-dropzone small {
  color: var(--reader-muted);
  font-size: 14px;
  font-weight: 400;
}
.reader-page .reader-upload-status {
  border: 1px solid var(--reader-line);
  border-radius: 4px;
  padding: 18px;
  background: var(--reader-surface);
}
@media (max-width: 1250px) {
  .reader-page .reader-layout {
    padding-inline: 32px;
  }
  .reader-page .playback-strip {
    grid-template-columns: minmax(0, 1fr);
  }
  .reader-page .transport {
    grid-column: 1;
    grid-row: 4;
  }
  .reader-page .player-time-row {
    grid-row: 5;
  }
  .reader-page .progress-field {
    grid-row: 5;
  }
}
@media (max-width: 700px) {
  .reader-page .page-topbar:has(.reader-section-tabs) {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .reader-page .page-topbar .page-topbar-title {
    grid-column: 2;
    grid-row: 1;
  }
  .reader-page .page-topbar .page-topbar-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
  }
  .reader-page .page-topbar .reader-section-tabs {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  .reader-page .page-topbar .reader-upload-btn {
    width: 100%;
  }
  .reader-page .bookmark-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .reader-page .bookmark-main {
    display: flex;
    flex-direction: column;
  }
  .reader-page .section-panel:has(#bookmarkList:not(.hidden)) .bookmark-table-head {
    display: none;
  }
  .reader-page .player-doc-head {
    padding-inline: 0;
  }
  .reader-page .page-topbar .reader-tab {
    padding: 10px 4px;
    font-size: 15px;
  }
  .reader-page .library-list-large .book-select {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .reader-page .library-list-large .book-meta {
    display: block;
  }
  .reader-page :is(.book-filename, .book-type) {
    display: none;
  }
  .reader-page .reader-new-list {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .reader-page .reader-layout {
    padding: 20px 16px;
  }
  .reader-page .page-topbar {
    padding: 10px 16px;
    gap: 12px;
  }
  .reader-page .reader-section-tabs {
    gap: 14px;
  }
  .reader-page .selected-title {
    font-size: 28px;
  }
  .reader-page .player-head-actions {
    flex-wrap: wrap;
    gap: 12px;
  }
  .reader-page .reader-narration-controls {
    gap: 12px;
  }
  .reader-page .reader-narration-controls .player-voice-field {
    flex-wrap: wrap;
  }
  .reader-page .reader-narration-controls select {
    width: 100%;
  }
  .reader-page .playback-strip {
    padding: 20px 14px;
  }
  .reader-page .playback-strip-title {
    font-size: 24px;
  }
  .reader-page .transport-buttons {
    gap: 4px;
  }
  .reader-page .reader-play-btn {
    width: 64px;
    height: 64px;
    min-height: 64px;
    flex-basis: 64px;
  }
  .reader-page .transport-extras {
    gap: 20px;
  }
  .reader-page .player-time-row {
    grid-row: 5;
  }
  .reader-page .progress-field {
    grid-row: 6;
    margin: 0;
    width: 100%;
  }
  .reader-page .segments-table-head,
  .reader-page .segment-row {
    grid-template-columns: 24px minmax(0, 1fr) 48px 40px;
    gap: 6px;
    padding: 12px 0;
  }
  .reader-page .section-title {
    font-size: 16px;
  }
  .reader-page .library-head-controls {
    width: 100%;
    flex-wrap: wrap;
    justify-content: stretch;
  }
  .reader-page .library-head-controls .search-field {
    flex-basis: 100%;
  }
  .reader-page .document-list-head {
    display: none;
  }
  .reader-page .book-select {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }
  .reader-page .book-icon {
    width: 34px;
  }
  .reader-page .book-status,
  .reader-page .book-open-label {
    display: none;
  }
  .reader-page .recent-documents-dialog .book-select {
    grid-template-columns: 28px minmax(0, 1fr) 40px;
    gap: 10px;
  }
  .reader-page .recent-list-head {
    grid-template-columns: minmax(0, 1fr) 40px;
    padding-left: 42px;
    gap: 10px;
  }
  .reader-page .recent-list-head > span:last-child,
  .reader-page .recent-documents-dialog .book-open-label {
    display: none;
  }
  .reader-page .reader-mini-player {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  .reader-page .mini-now-playing {
    grid-column: 1 / -1;
    padding: 0;
  }
  .reader-page .reader-return {
    padding-inline: 4px;
  }
}
