.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.main-content.reader-route { padding-top: calc(var(--header) + 18px); padding-right: 20px; padding-bottom: 16px; padding-left: calc(var(--sidebar) + 20px); }
.akhri-reader { --reader-surface: #0b1118; --reader-paper-surround: #101820; --reader-toolbar: rgba(12, 19, 27, .96); --reader-text: #f3f7fb; --reader-muted: #aab6c2; --reader-line: rgba(160,180,200,.2); --reader-panel: #111b24; --reader-panel-soft: #18232e; --reader-accent: #6ea3ff; --reader-control-surface: #18222d; --reader-search-hit: rgba(77, 151, 255, .34); --reader-search-hit-current: rgba(73, 146, 255, .52); position: relative; display: flex; flex-direction: column; height: calc(100vh - var(--header) - 34px); height: calc(100dvh - var(--header) - 34px); min-height: 620px; max-width: 1440px; margin: 0 auto; overflow: hidden; color: var(--reader-text); background: var(--reader-surface); border: 1px solid var(--reader-line); border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .24); }
.akhri-reader[data-appearance="light"] { --reader-surface: #0b1118; --reader-paper-surround: #101820; --reader-toolbar: rgba(12, 19, 27, .96); --reader-text: #f3f7fb; --reader-muted: #aab6c2; --reader-line: rgba(160,180,200,.2); --reader-panel: #111b24; --reader-panel-soft: #18232e; --reader-accent: #6ea3ff; --reader-control-surface: #18222d; --reader-search-hit: rgba(42, 119, 235, .26); --reader-search-hit-current: rgba(32, 105, 224, .42); }
.akhri-reader[data-appearance="sepia"] { --reader-search-hit: rgba(49, 119, 211, .25); --reader-search-hit-current: rgba(38, 104, 204, .4); }
.akhri-reader[data-appearance="sepia"] { --reader-surface: #d8ceba; --reader-paper-surround: #e8deca; --reader-toolbar: rgba(244,237,221,.97); --reader-text: #342d24; --reader-muted: #705d49; --reader-line: rgba(75,50,30,.22); --reader-panel: #f2e8d2; --reader-panel-soft: #e3d5bc; --reader-accent: #784d20; --reader-control-surface: #f2e8d2; }
.akhri-reader:fullscreen, .akhri-reader.is-focus-mode { position: fixed; z-index: 100; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; border: 0; border-radius: 0; }
.akhri-reader-header { position: relative; z-index: 7; display: grid; grid-template-columns: minmax(130px,1fr) auto minmax(130px,1fr); align-items: center; min-height: calc(66px + env(safe-area-inset-top)); padding: calc(9px + env(safe-area-inset-top)) 14px 9px; background: var(--reader-toolbar); border-bottom: 1px solid var(--reader-line); backdrop-filter: blur(18px); transition: opacity .25s ease, transform .25s ease; }
.reader-back { display: inline-flex; align-items: center; gap: 8px; width: max-content; padding: 9px 10px; border-radius: 10px; color: currentColor; font-size: 14px; }
.reader-back:hover { background: rgba(128,150,175,.12); }
.reader-back svg { width: 20px; }
.reader-book-heading { min-width: 0; text-align: center; }
.reader-book-heading h1 { overflow: hidden; margin: 0; font-size: 17px; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.reader-book-heading span { display: block; margin-top: 3px; color: var(--reader-muted); font-size: 11px; }
.reader-representation-switch { display: inline-flex; gap: 2px; padding: 3px; margin-top: 5px; border: 1px solid var(--reader-line); border-radius: 999px; background: rgba(125,145,165,.1); }
.reader-representation-switch button { min-width: 58px; min-height: 25px; padding: 3px 9px; border: 0; border-radius: 999px; color: var(--reader-muted); background: transparent; font-size: 11px; font-weight: 650; cursor: pointer; }
.reader-representation-switch button:hover, .reader-representation-switch button:focus-visible { color: var(--reader-text); outline: 2px solid var(--reader-accent); outline-offset: 1px; }
.reader-representation-switch button.is-selected { color: var(--reader-text); background: var(--reader-panel-soft); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.reader-representation-switch button:disabled { cursor: wait; opacity: .55; }
.reader-actions { display: flex; justify-content: flex-end; gap: 4px; }
.reader-icon-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; color: currentColor; background: transparent; }
.reader-icon-button:hover, .reader-icon-button:focus-visible, .reader-icon-button.is-active { color: var(--reader-accent); background: rgba(75, 133, 229, .13); outline: 0; }
.reader-icon-button svg { width: 20px; height: 20px; }
.reader-search { position: absolute; z-index: 12; top: calc(74px + env(safe-area-inset-top)); right: 18px; display: flex; align-items: center; gap: 7px; width: min(520px, calc(100% - 36px)); min-height: 48px; padding: 5px 7px 5px 14px; background: var(--reader-panel); border: 1px solid var(--reader-line); border-radius: 13px; box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.reader-search[hidden], .reader-settings[hidden], .reader-side-panel[hidden] { display: none; }
.reader-search > svg { flex: 0 0 auto; width: 18px; color: var(--reader-muted); }
.reader-search input { min-width: 0; flex: 1; padding: 8px 4px; border: 0; outline: 0; color: var(--reader-text); background: transparent; }
.reader-search [data-search-count] { color: var(--reader-muted); font-size: 12px; white-space: nowrap; }
.reader-settings { position: absolute; z-index: 13; top: calc(74px + env(safe-area-inset-top)); right: 18px; width: min(370px, calc(100% - 36px)); max-height: calc(100% - 94px); overflow: auto; padding: 15px; background: var(--reader-panel); border: 1px solid var(--reader-line); border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.4); animation: reader-pop .18s ease both; }
.reader-popover-heading, .reader-side-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reader-settings fieldset { padding: 0; margin: 17px 0 0; border: 0; }
.reader-settings legend { margin-bottom: 8px; color: var(--reader-muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.reader-audio-sync-setting { padding-top: 13px !important; border-top: 1px solid var(--reader-line) !important; }
.reader-sync-unavailable { margin: 0 0 10px; padding: 8px 10px; color: var(--reader-muted); background: var(--reader-panel-soft); border: 1px solid var(--reader-line); border-radius: 9px; font-size: 11px; line-height: 1.45; }
.reader-sync-unavailable[hidden] { display: none; }
.reader-sync-help { display: grid; gap: 10px; }
.reader-sync-help-row { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: start; gap: 10px; }
.reader-sync-option { grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; cursor: pointer; }
.reader-sync-option-switch { flex: none; }
.reader-sync-help-icon { display: grid; width: 32px; height: 32px; place-items: center; color: var(--reader-accent); background: rgba(70,130,220,.13); border-radius: 10px; }
.reader-sync-help-icon svg { width: 20px; height: 20px; }
.page-sync-icon-audio { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.page-sync-icon-document { fill: currentColor; stroke: none; }
.reader-sync-help-row strong, .reader-sync-help-row small { display: block; }
.reader-sync-help-row strong { color: var(--reader-text); font-size: 12px; }
.reader-sync-help-row small { margin-top: 3px; color: var(--reader-muted); font-size: 11px; line-height: 1.45; }
.reader-auto-follow-toggle { margin-top: 13px; }
.reader-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; color: var(--reader-text); font-size: 13px; cursor: pointer; }
.reader-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.reader-toggle i { position: relative; width: 42px; height: 24px; border-radius: 999px; background: rgba(125,145,165,.28); transition: background .18s ease; }
.reader-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.32); transition: transform .18s ease; }
.reader-toggle input:checked + i { background: var(--reader-accent); }
.reader-toggle input:checked + i::after { transform: translateX(18px); }
.reader-toggle input:focus-visible + i { outline: 2px solid var(--reader-accent); outline-offset: 3px; }
.reader-segmented, .reader-themes { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: rgba(125,145,165,.1); border-radius: 11px; }
.reader-segmented button, .reader-themes button { min-height: 37px; padding: 6px 8px; border: 0; border-radius: 8px; color: var(--reader-muted); background: transparent; font-size: 12px; }
.reader-segmented button.is-selected, .reader-themes button.is-selected { color: var(--reader-text); background: var(--reader-panel-soft); box-shadow: 0 2px 8px rgba(0,0,0,.13); }
.reader-themes button { display: grid; grid-template-columns: 14px auto; align-items: center; justify-content: center; gap: 6px; }
.reader-themes i { width: 14px; height: 14px; border: 1px solid rgba(120,130,140,.3); border-radius: 50%; }
.theme-light { background: #f4f5f6; }.theme-sepia { background: #d8c7a6; }.theme-dark { background: #111820; }
.reader-stepper { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; overflow: hidden; border: 1px solid var(--reader-line); border-radius: 11px; }
.reader-stepper button { display: grid; place-items: center; height: 40px; border: 0; color: currentColor; background: transparent; }
.reader-stepper button:hover { background: rgba(125,145,165,.12); }
.reader-stepper output { text-align: center; color: var(--reader-muted); font-size: 13px; }
.reader-side-panel { position: absolute; z-index: 10; top: calc(66px + env(safe-area-inset-top)); bottom: 0; left: 0; width: min(300px, 82vw); display: flex; flex-direction: column; background: var(--reader-panel); border-right: 1px solid var(--reader-line); box-shadow: 18px 0 40px rgba(0,0,0,.2); animation: reader-drawer .22s ease both; }
.reader-side-heading { min-height: 58px; padding: 8px 12px 8px 17px; border-bottom: 1px solid var(--reader-line); }
.reader-side-content { min-height: 0; flex: 1; overflow: auto; padding: 14px; }
.thumbnail-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.thumbnail-list button { display: grid; gap: 6px; padding: 8px; border: 1px solid transparent; border-radius: 10px; color: var(--reader-muted); background: var(--reader-panel-soft); font-size: 11px; }
.thumbnail-list button:hover { border-color: rgba(73,139,255,.45); color: var(--reader-text); }
.thumbnail-list canvas { width: 100%; min-height: 120px; background: white; border-radius: 3px; }
.bookmark-list { display: grid; gap: 7px; }
.bookmark-list button { display: flex; align-items: center; gap: 10px; min-height: 45px; padding: 0 12px; border: 1px solid var(--reader-line); border-radius: 10px; color: currentColor; background: var(--reader-panel-soft); }
.bookmark-list svg { width: 18px; }
.reader-panel-empty { color: var(--reader-muted); text-align: center; }
.reader-workspace { min-height: 0; flex: 1; position: relative; }
.reader-document-scroll { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; background: var(--reader-paper-surround); scrollbar-color: rgba(120,140,160,.45) transparent; }
.akhri-reader.has-audio .reader-document-scroll { padding-bottom: 112px; }
.reader-spread-navigation { position: sticky; z-index: 6; top: 8px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: min(calc(100% - 24px), 1000px); min-height: 42px; margin: 8px auto 0; color: var(--reader-muted); pointer-events: none; }
.reader-spread-navigation[hidden] { display: none; }
.reader-spread-navigation [data-spread-previous] { justify-self: start; }
.reader-spread-navigation [data-spread-next] { justify-self: end; }
.reader-spread-navigation button { width: 38px; height: 38px; color: var(--reader-text); background: var(--reader-toolbar); border: 1px solid var(--reader-line); border-radius: 50%; box-shadow: 0 4px 14px rgba(0,0,0,.24); pointer-events: auto; }
.reader-spread-navigation button:disabled, .reader-navigation button:disabled { opacity: .4; cursor: not-allowed; }
.reader-spread-navigation [data-spread-status] { padding: 6px 10px; border: 1px solid var(--reader-line); border-radius: 999px; color: var(--reader-muted); background: var(--reader-toolbar); font-size: 11px; font-variant-numeric: tabular-nums; }
.reader-page-navigation { position: absolute; z-index: 8; inset: 0; display: flex; align-items: center; justify-content: space-between; padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right)); pointer-events: none; }
.reader-page-navigation[hidden] { display: none; }
.reader-page-arrow { display: grid; width: 46px; height: 52px; place-items: center; padding: 0; border: 1px solid var(--reader-line); border-radius: 14px; color: var(--reader-text); background: rgba(12,19,27,.8); box-shadow: 0 6px 18px rgba(0,0,0,.28); backdrop-filter: blur(12px); pointer-events: auto; }
.reader-page-arrow svg { width: 23px; height: 23px; }
.reader-page-arrow:focus-visible { outline: 2px solid var(--reader-accent); outline-offset: 2px; }
.reader-page-arrow:disabled { opacity: .38; cursor: not-allowed; }
.reader-pages { display: flex; min-height: 100%; align-items: flex-start; justify-content: center; padding: 28px; }
.reader-pages[data-mode="continuous"] { flex-direction: column; align-items: center; }
.reader-pages[data-mode="single"], .reader-pages[data-mode="spread"] { box-sizing: border-box; width: var(--reader-page-container-width, 100%); min-height: 100%; align-items: center; gap: 24px; }
.reader-pages[data-mode="single"] { height: var(--reader-page-container-height, 100%); min-height: 0; }
.reader-pages[data-mode="single"][data-zoom]:not([data-zoom="1"]), .reader-pages[data-mode="spread"][data-zoom]:not([data-zoom="1"]) { align-items: flex-start; justify-content: flex-start; }
.reader-pages[data-mode="single"][data-zoom]:not([data-zoom="1"]) .pdf-page-slot, .reader-pages[data-mode="single"][data-zoom]:not([data-zoom="1"]) .pdf-page-slot canvas { max-width: none; }
.reader-pages[data-spacing="compact"] { gap: 18px; }.reader-pages[data-spacing="normal"] { gap: 32px; }.reader-pages[data-spacing="comfortable"] { gap: 52px; }
.pdf-page-slot { position: relative; flex: 0 0 auto; max-width: 100%; min-height: 0; aspect-ratio: var(--page-ratio); overflow: hidden; background: white; border-radius: 3px; box-shadow: 0 15px 38px rgba(0,0,0,.24); }
.reader-pages[data-mode="continuous"] .pdf-page-slot { margin-inline: auto; }
.pdf-page-slot canvas { position: relative; z-index: 2; display: block; max-width: 100%; height: auto; background: white; opacity: 0; transition: opacity .2s ease; }
.akhri-reader[data-appearance="dark"] .pdf-page-slot[data-text-only="true"] canvas { filter: invert(1) hue-rotate(180deg); }
.akhri-reader[data-appearance="sepia"] .pdf-page-slot[data-text-only="true"] canvas { filter: sepia(.35) saturate(.88) brightness(.96); }
.pdf-page-slot.is-rendered canvas { opacity: 1; }
.pdf-page-slot .textLayer { --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size, 1)); --min-font-size-inv: calc(1 / var(--min-font-size, 1)); position: absolute; inset: 0; z-index: 3; overflow: hidden; opacity: 1; line-height: 1; letter-spacing: normal; word-spacing: normal; text-size-adjust: none; user-select: none; -webkit-user-select: none; pointer-events: none; }
.pdf-page-slot .textLayer span { position: absolute; color: transparent; white-space: pre; transform-origin: 0 0; user-select: none; -webkit-user-select: none; }
.pdf-page-slot .textLayer .markedContent { display: contents; }
.line-sync-highlight-layer { position: absolute; z-index: 4; inset: 0; overflow: hidden; pointer-events: none; }
.akhri-reader[data-line-sync-highlight="off"] .line-sync-highlight-layer { display: none; }
.line-sync-highlight { position: absolute; display: block; box-sizing: border-box; background: var(--line-sync-highlight-fill, rgba(255, 209, 102, .28)); border: 1px solid var(--line-sync-highlight-border, rgba(255, 209, 102, .67)); border-radius: 3px; animation: line-sync-highlight-in .18s ease both; }
.reader-line-highlight-colors { display: grid; gap: 8px; margin-top: 12px; color: var(--reader-muted); font-size: 12px; }
.reader-line-highlight-colors [role="group"] { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.reader-line-highlight-colors button { width: 30px; height: 30px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--highlight-swatch); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.reader-line-highlight-colors button.is-selected { outline: 2px solid var(--reader-accent); outline-offset: 2px; }
.reader-line-highlight-colors button:focus-visible { outline: 2px solid var(--reader-accent); outline-offset: 3px; }
.reader-range-setting { display: grid; gap: 8px; margin-top: 14px; color: var(--reader-text); font-size: 12px; }
.reader-range-setting span { display: flex; justify-content: space-between; gap: 12px; }
.reader-range-setting output { color: var(--reader-muted); }
.reader-range-setting input { width: 100%; accent-color: var(--reader-accent); }
@keyframes line-sync-highlight-in { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .line-sync-highlight { animation: none; } }
.pdf-page-slot .textLayer > :not(.markedContent), .pdf-page-slot .textLayer .markedContent span:not(.markedContent) { font-size: calc(var(--text-scale-factor) * var(--font-height)); transform: rotate(var(--rotate, 0deg)) scaleX(var(--scale-x, 1)) scale(var(--min-font-size-inv)); }
.pdf-page-slot .textLayer .pdf-search-highlight-fallback { position: absolute; z-index: 4; display: block; box-sizing: border-box; pointer-events: none; background-color: var(--reader-search-hit); border-radius: 1px; }
.pdf-page-slot .textLayer .pdf-search-highlight-fallback.is-current { background-color: var(--reader-search-hit-current); }
::highlight(akhri-pdf-search-passive) { background-color: var(--reader-search-hit); color: transparent; }
::highlight(akhri-pdf-search-active) { background-color: var(--reader-search-hit-current); color: transparent; }
.pdf-page-number { position: absolute; z-index: 3; right: 10px; bottom: 8px; color: rgba(20,30,40,.45); font-size: 10px; }
.pdf-page-loading { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; background: #f7f7f6; }
.pdf-page-loading span { width: 28px; height: 28px; border: 2px solid #d6dbe0; border-top-color: #2d78ff; border-radius: 50%; animation: reader-spin .8s linear infinite; }
.pdf-page-slot.is-rendered .pdf-page-loading { display: none; }
.pdf-page-slot.has-render-error::after { content: "Page could not be rendered"; position: absolute; inset: 0; display: grid; place-items: center; color: #712b2b; background: #f9e7e7; }
.reader-loading, .reader-error, .reader-audio-only { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; padding: 30px; text-align: center; background: var(--reader-paper-surround); }
.reader-loading[hidden], .reader-error[hidden] { display: none; }
.reader-loading img { width: 58px; height: 58px; border-radius: 15px; box-shadow: 0 8px 28px rgba(190,30,140,.23); }
.reader-loading span, .reader-audio-only p { color: var(--reader-muted); }
.reader-loading i { width: 110px; height: 3px; overflow: hidden; border-radius: 4px; background: rgba(125,145,165,.18); }
.reader-loading i::after { content: ""; display: block; width: 45%; height: 100%; background: var(--reader-accent); animation: reader-loading 1.2s ease-in-out infinite alternate; }
.reader-error strong { font-size: 18px; }
.audio-only-cover { width: min(270px, 55vw); aspect-ratio: .76; background: linear-gradient(145deg,#31475e,#111820), var(--audio-only-cover) center/cover; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.reader-audio-only h2 { margin: 7px 0 0; font-size: 28px; }
.reader-navigation { position: relative; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 50px; background: var(--reader-toolbar); border-top: 1px solid var(--reader-line); transition: opacity .25s ease, transform .25s ease; }
.reader-navigation label { width: 48px; }
.reader-navigation input { width: 100%; height: 32px; border: 1px solid var(--reader-line); border-radius: 8px; color: currentColor; text-align: center; background: rgba(125,145,165,.08); }
.reader-percentage { margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--reader-line); color: var(--reader-muted); font-size: 12px; }
.reader-audio-mount { position: absolute; z-index: 9; right: 16px; bottom: 62px; left: 16px; transition: width .3s cubic-bezier(.22,1,.36,1), right .3s cubic-bezier(.22,1,.36,1), opacity .25s ease, transform .25s ease; }
.reader-audio-stack { display: grid; gap: 8px; width: 100%; }
.audio-sync-utilities { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.audio-sync-utilities[hidden] { display: none; }
.akhri-reader.controls-hidden .reader-audio-mount { opacity: 0; transform: translateY(12px); pointer-events: none; }
.reader-audio-mount.is-minimized { right: 16px; left: auto; width: 310px; max-width: calc(100vw - 32px); }
.akhri-audio-player { position: relative; display: grid; grid-template-columns: minmax(160px, .8fr) auto minmax(240px, 1.4fr) auto; align-items: center; gap: 14px; min-height: 82px; padding: 10px 12px; color: var(--reader-text); background: var(--reader-toolbar); border: 1px solid var(--reader-line); border-radius: 16px; box-shadow: 0 16px 45px rgba(0,0,0,.4); backdrop-filter: blur(20px); transition: min-height .3s cubic-bezier(.22,1,.36,1), padding .3s cubic-bezier(.22,1,.36,1), border-radius .3s cubic-bezier(.22,1,.36,1); }
.audio-sync-controls { position: static; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.audio-sync-controls[hidden] { display: none; }
.audio-sync-button { display: grid; width: 42px; height: 42px; place-items: center; padding: 0; border: 1px solid var(--reader-line); border-radius: 50%; color: var(--reader-text); background: var(--reader-toolbar); box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.audio-sync-button[hidden] { display: none; }
.audio-sync-button:hover, .audio-sync-button:focus-visible { color: #fff; background: var(--reader-accent); outline: 0; }
.audio-sync-button[aria-disabled="true"] { color: var(--reader-muted); opacity: .62; }
.audio-sync-button svg { width: 21px; height: 21px; }
.audio-sync-feedback { position: static; max-width: min(300px, 100%); padding: 7px 10px; color: var(--reader-text); background: var(--reader-panel); border: 1px solid var(--reader-line); border-radius: 10px; font-size: 12px; }
.audio-sync-feedback[hidden] { display: none; }
.akhri-audio-player audio { display: none; }
.audio-book-meta { display: flex; align-items: center; gap: 10px; min-width: 0; transition: width .3s cubic-bezier(.22,1,.36,1), gap .3s cubic-bezier(.22,1,.36,1), opacity .2s ease; }
.audio-book-copy { min-width: 0; }
.audio-meta-actions { display: flex; align-items: center; margin-left: auto; }
.audio-book-meta strong, .audio-book-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-book-meta strong { font-size: 13px; }.audio-book-meta small { margin-top: 3px; color: var(--reader-muted); font-size: 11px; }
.audio-cover { flex: 0 0 auto; width: 43px; height: 53px; overflow: hidden; background: linear-gradient(145deg,#34495f,#131b25); border-radius: 6px; }
.audio-cover-image { display: block; width: 100%; height: 100%; object-fit: cover; visibility: hidden; }
.audio-cover-image.is-loaded { visibility: visible; }
.audio-primary-controls, .audio-secondary-controls, .audio-timeline { display: flex; align-items: center; gap: 6px; }
.audio-play-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: #256bdc; box-shadow: 0 5px 16px rgba(45,120,255,.35); }
.audio-play-button svg { width: 20px; fill: currentColor; stroke: currentColor; }
.audio-timeline { min-width: 0; transition: width .3s cubic-bezier(.22,1,.36,1), opacity .2s ease; }
.audio-timeline span { width: 42px; color: var(--reader-muted); font-variant-numeric: tabular-nums; font-size: 10px; }
.audio-timeline span:last-child { text-align: right; }
.audio-timeline input, .audio-volume { accent-color: var(--reader-accent); }
.audio-timeline input { min-width: 80px; flex: 1; }
.audio-speed select { height: 34px; padding: 0 6px; border: 1px solid var(--reader-line); border-radius: 8px; color: var(--reader-text); background: var(--reader-control-surface); }
.audio-volume { width: 65px; }
.audio-status { position: absolute; right: 18px; bottom: 4px; color: #d38888; font-size: 10px; }
.audio-chapters { position: absolute; right: 12px; bottom: calc(100% + 8px); display: grid; width: min(330px, calc(100vw - 40px)); max-height: 320px; overflow: auto; padding: 12px; color: var(--reader-text); background: var(--reader-panel); border: 1px solid var(--reader-line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.audio-chapters[hidden] { display: none; }
.audio-chapters > strong { padding: 4px 8px 10px; }
.audio-chapters button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 0 9px; border: 0; border-radius: 9px; color: var(--reader-muted); text-align: left; background: transparent; }
.audio-chapters button:hover, .audio-chapters button.is-current { color: var(--reader-text); background: rgba(70,130,220,.15); }
.audio-chapters small { white-space: nowrap; }
.akhri-audio-player.is-minimized { display: flex; align-items: center; justify-content: space-evenly; width: 100%; min-width: 0; height: 82px; min-height: 82px; padding: 8px 10px; border-radius: 20px; }
.akhri-audio-player.is-minimized .audio-book-copy, .akhri-audio-player.is-minimized .audio-timeline, .akhri-audio-player.is-minimized .audio-secondary-controls, .akhri-audio-player.is-minimized .audio-cover, .akhri-audio-player.is-minimized .audio-meta-actions > :not(.audio-collapse) { display: none; }
.akhri-audio-player.is-minimized .audio-primary-controls { gap: 2px; }
.akhri-audio-player.is-minimized .audio-primary-controls .reader-icon-button { width: 34px; height: 34px; }
.akhri-audio-player.is-minimized .audio-play-button { width: 40px; height: 40px; }
.akhri-audio-player.is-minimized .audio-collapse { width: 34px; height: 34px; }
.akhri-reader.controls-hidden .akhri-reader-header, .akhri-reader.controls-hidden .reader-navigation { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.akhri-reader.controls-hidden .reader-navigation { transform: translateY(8px); }
.akhri-reader.controls-hidden .reader-settings, .akhri-reader.controls-hidden .reader-search, .akhri-reader.controls-hidden .reader-side-panel, .akhri-reader.controls-hidden .reader-spread-navigation { display: none; }
.akhri-reader.controls-hidden .reader-page-navigation { visibility: hidden; opacity: 0; }

@keyframes reader-spin { to { transform: rotate(360deg); } }
@keyframes reader-loading { from { transform: translateX(-25%); } to { transform: translateX(140%); } }
@keyframes reader-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes reader-drawer { from { opacity: 0; transform: translateX(-18px); } }

@media (max-width: 1050px) {
  .audio-secondary-controls { display: none; }
}
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  .main-content.reader-route { padding: var(--header) 0 0; }
  .akhri-reader { height: calc(100vh - var(--header)); height: calc(100dvh - var(--header)); min-height: 0; border-radius: 0; border-right: 0; border-left: 0; }
  .akhri-reader-header { grid-template-columns: auto minmax(0,1fr) auto; min-height: calc(58px + env(safe-area-inset-top)); padding: calc(6px + env(safe-area-inset-top)) 8px 6px; }
  .reader-back span { display: none; }
  .reader-actions { gap: 0; }
  .reader-actions .reader-icon-button { width: 40px; height: 40px; }
  .reader-book-heading h1 { font-size: 14px; }
  .reader-representation-switch { margin-top: 3px; }
  .reader-representation-switch button { min-width: 48px; padding-inline: 7px; }
  .reader-search { top: calc(64px + env(safe-area-inset-top)); right: 8px; left: 8px; width: auto; }
  .reader-settings { top: auto; right: 8px; bottom: 8px; left: 8px; width: auto; max-height: 75%; border-radius: 20px; }
  .reader-settings [data-reader-set="mode"][data-value="spread"] { display: none; }
  .reader-side-panel { top: auto; right: 0; bottom: 0; width: 100%; height: 70%; border-top: 1px solid var(--reader-line); border-right: 0; border-radius: 20px 20px 0 0; animation-name: reader-sheet; }
  .reader-pages { padding: 14px 8px; }
  .reader-pages[data-mode="spread"] { grid-template-columns: 1fr; }
  .reader-pages[data-spacing="compact"] { gap: 12px; }.reader-pages[data-spacing="normal"] { gap: 20px; }.reader-pages[data-spacing="comfortable"] { gap: 30px; }
  .pdf-page-slot { box-shadow: 0 8px 24px rgba(0,0,0,.22); }
  .reader-navigation { min-height: calc(46px + env(safe-area-inset-bottom)); padding-bottom: calc(3px + env(safe-area-inset-bottom)); }
  .reader-navigation { flex-wrap: wrap; padding: 3px 8px calc(3px + env(safe-area-inset-bottom)); }
  .reader-percentage { margin-left: 3px; padding-left: 7px; }
  .reader-pages { min-width: 0; width: 100%; }
  .reader-audio-mount { right: 8px; bottom: calc(54px + env(safe-area-inset-bottom)); left: 8px; }
  .audio-sync-utilities { justify-content: center; }
  .audio-sync-controls { gap: 8px; }
  .audio-sync-button { width: 44px; height: 44px; }
  .audio-sync-feedback { right: 2px; }
  .akhri-audio-player { box-sizing: border-box; display: grid; grid-template-columns: 40px 40px 40px minmax(70px, 1fr) 88px; grid-template-rows: 36px 40px; grid-template-areas: "meta meta meta meta meta" "back play forward timeline secondary"; align-content: center; gap: 4px; width: 100%; height: 96px; min-height: 96px; padding: 6px 8px; border-radius: 13px; }
  .akhri-audio-player.is-minimized { height: 56px; min-height: 56px; padding: 4px 8px; border-radius: 28px; }
  .reader-audio-mount.is-minimized { right: 8px; left: auto; width: min(300px, calc(100vw - 16px)); max-width: calc(100vw - 16px); }
  .audio-book-meta { grid-area: meta; gap: 8px; }
  .audio-book-meta small { display: block; }
  .audio-book-copy { flex: 1; }
  .audio-meta-actions .reader-icon-button { width: 34px; height: 34px; }
  .audio-primary-controls { display: contents; }
  .audio-primary-controls [data-audio-action="back"] { grid-area: back; }
  .audio-primary-controls [data-audio-action="play"] { grid-area: play; }
  .audio-primary-controls [data-audio-action="forward"] { grid-area: forward; }
  .audio-primary-controls .reader-icon-button { width: 40px; height: 40px; }
  .audio-play-button { width: 40px; height: 40px; }
  .audio-timeline { grid-area: timeline; display: flex; width: 100%; gap: 3px; }
  .audio-timeline span { width: 30px; font-size: 9px; }
  .audio-timeline input { min-width: 16px; height: 28px; }
  .audio-secondary-controls { grid-area: secondary; display: flex; justify-content: flex-end; gap: 2px; }
  .audio-secondary-controls .reader-icon-button { width: 30px; height: 34px; }
  .audio-speed select { min-width: 48px; height: 34px; }
  .audio-volume { display: none; }
  .audio-cover { width: 27px; height: 34px; }
  .akhri-reader.has-audio .reader-document-scroll { padding-bottom: 200px; }
  .akhri-reader.has-audio[data-view-mode="single"] .reader-document-scroll { padding-bottom: 0; }
  .akhri-reader.controls-hidden .reader-document-scroll { padding-bottom: 0; }
  .akhri-reader:fullscreen, .akhri-reader.is-focus-mode { height: 100vh; height: 100dvh; }
}
@media (max-width: 420px) {
  .reader-book-heading { max-width: 86px; }
  .reader-book-heading span { font-size: 10px; }
  .audio-primary-controls [data-audio-action="back"], .audio-primary-controls [data-audio-action="forward"] { display: inline-flex; }
}
@media (max-height: 500px) and (pointer: coarse) {
  .main-content.reader-route { padding-top: var(--header); padding-bottom: 0; }
  .akhri-reader { height: calc(100vh - var(--header)); height: calc(100dvh - var(--header)); }
  .akhri-reader-header { min-height: 38px; padding: 0 max(6px, env(safe-area-inset-right)) 0 max(6px, env(safe-area-inset-left)); }
  .reader-back { padding: 2px 6px; }
  .reader-book-heading span, .reader-representation-switch { display: none; }
  .reader-actions .reader-icon-button { width: 32px; height: 32px; }
  .reader-navigation { min-height: 34px; flex-wrap: nowrap; gap: 4px; padding: 0 max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left)); }
  .reader-navigation .reader-icon-button { width: 32px; height: 32px; }
  .reader-navigation label { width: 42px; }
  .reader-navigation input { height: 28px; }
  .reader-percentage { display: none; }
  .reader-pages { padding: 6px 4px; }
  .reader-audio-mount { right: max(8px, env(safe-area-inset-right)); bottom: calc(38px + env(safe-area-inset-bottom)); left: max(8px, env(safe-area-inset-left)); }
  .reader-audio-mount.is-minimized { right: max(8px, env(safe-area-inset-right)); left: auto; width: min(300px, calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 16px)); max-width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 16px); }
  .reader-page-arrow { width: 42px; height: 46px; }
  .audio-sync-controls { bottom: calc(100% + 4px); gap: 4px; }
  .audio-sync-button { width: 40px; height: 40px; }
  .akhri-reader.has-audio[data-view-mode="single"] .reader-document-scroll { padding-bottom: 0; }
  .akhri-audio-player { box-sizing: border-box; grid-template-columns: minmax(100px, 1fr) 36px 38px 36px minmax(100px, 1.4fr) 82px; grid-template-rows: 38px; grid-template-areas: "meta back play forward timeline secondary"; gap: 3px; height: 50px; min-height: 50px; padding: 3px 6px; }
  .akhri-audio-player.is-minimized { height: 46px; min-height: 46px; }
  .audio-book-meta { gap: 6px; }
  .audio-cover { width: 22px; height: 30px; }
  .audio-meta-actions .reader-icon-button { width: 28px; height: 32px; }
  .audio-primary-controls .reader-icon-button, .audio-play-button { width: 36px; height: 36px; }
  .audio-secondary-controls { gap: 1px; }
  .audio-secondary-controls .reader-icon-button { width: 26px; }
  .audio-speed select { min-width: 44px; }
  .audio-timeline span { width: 34px; }
  .audio-volume { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .akhri-reader *, .akhri-reader *::before, .akhri-reader *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@keyframes reader-sheet { from { opacity: 0; transform: translateY(30px); } }

.pdf-debug-panel { position: fixed; z-index: 1000; right: 8px; bottom: 8px; left: 8px; max-height: min(72vh, 620px); overflow: auto; padding: 8px 10px; border: 1px solid rgba(112,160,220,.55); border-radius: 10px; color: #eaf2fb; background: rgba(7,14,22,.94); box-shadow: 0 10px 35px rgba(0,0,0,.45); font: 12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; }
.pdf-debug-panel summary { cursor: pointer; color: #8fc0ff; font: 600 13px/1.4 "DM Sans", system-ui, sans-serif; }
.pdf-debug-stages { display: grid; gap: 3px; margin-top: 8px; }
.pdf-debug-row { display: grid; grid-template-columns: minmax(145px, 1fr) minmax(0, 2fr); gap: 8px; padding: 2px 0; border-bottom: 1px solid rgba(160,180,200,.1); }
.pdf-debug-row span { color: #c5d1df; }
.pdf-debug-row code { overflow-wrap: anywhere; color: #f3f7fb; white-space: normal; }
.pdf-debug-events { margin-top: 9px; color: #b8c8d9; }
.pdf-debug-events ol { margin: 4px 0 0; padding-left: 21px; }
.pdf-debug-render-error { margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(236,112,112,.55); color: #ffd5d5; }
.pdf-debug-render-error[hidden] { display: none; }

/* Compact and touch readers are a viewport-level screen, with PDF scrolling
   confined to the bounded workspace between the reader chrome rows. */
@media (max-width: 1100px), (pointer: coarse) {
  html.reader-viewport-locked,
  html.reader-viewport-locked body { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
  body.reader-immersive .main-content.reader-route { width: 100%; height: 100%; min-height: 0; padding: 0; }
  body.reader-immersive .topbar,
  body.reader-immersive .sidebar,
  body.reader-immersive .sidebar-backdrop { visibility: hidden; }
  .akhri-reader.reader-immersive {
    position: fixed; z-index: 30; top: var(--reader-vv-top, 0px); left: var(--reader-vv-left, 0px);
    display: block;
    width: var(--reader-vv-width, 100vw); height: var(--reader-vv-height, 100dvh);
    min-width: 0; min-height: 0; max-width: none; margin: 0; overflow: hidden;
    border: 0; border-radius: 0; box-shadow: none; overscroll-behavior: none; overflow-anchor: none;
  }
  .akhri-reader.reader-immersive .akhri-reader-header {
    position: absolute; z-index: 16; top: 0; right: 0; left: 0;
    grid-template-columns: 36px minmax(0, 1fr);
    min-width: 0; min-height: calc(54px + env(safe-area-inset-top));
    padding: calc(4px + env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) 4px max(6px, env(safe-area-inset-left));
    gap: 4px; overflow: hidden;
    pointer-events: none;
  }
  .akhri-reader.reader-immersive .reader-back,
  .akhri-reader.reader-immersive .reader-actions { pointer-events: auto; }
  .akhri-reader.reader-immersive .reader-back { width: 36px; height: 42px; justify-content: center; padding: 0; }
  .akhri-reader.reader-immersive .reader-back span { display: none; }
  .akhri-reader.reader-immersive .reader-book-heading { display: none; }
  .akhri-reader.reader-immersive .reader-representation-switch { display: none; }
  .akhri-reader.reader-immersive .reader-actions { grid-column: 2; min-width: 0; gap: 0; }
  .akhri-reader.reader-immersive .reader-actions .reader-icon-button { width: clamp(32px, 9vw, 40px); height: 40px; }
  .akhri-reader.reader-immersive .reader-workspace { position: absolute; inset: 0; z-index: 1; min-width: 0; min-height: 0; width: 100%; height: 100%; overflow: hidden; }
  .akhri-reader.reader-immersive .reader-document-scroll { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; overflow: auto; overscroll-behavior: contain; overflow-anchor: none; -webkit-overflow-scrolling: touch; }
  .akhri-reader.reader-immersive.has-audio .reader-document-scroll { padding-bottom: 0; }
  .akhri-reader.reader-immersive .reader-pages { box-sizing: border-box; min-width: 100%; width: 100%; min-height: 100%; padding: 10px max(8px, env(safe-area-inset-right)) 10px max(8px, env(safe-area-inset-left)); }
  .akhri-reader.reader-immersive .reader-pages[data-mode="single"] { height: var(--reader-page-container-height, 100%); min-height: 0; align-items: center; justify-content: center; }
  .akhri-reader.reader-immersive .reader-pages[data-mode="single"][data-zoom]:not([data-zoom="1"]) { align-items: flex-start; justify-content: flex-start; }
  .akhri-reader.reader-immersive .reader-pages[data-mode="single"][data-zoom]:not([data-zoom="1"]) .pdf-page-slot,
  .akhri-reader.reader-immersive .reader-pages[data-mode="single"][data-zoom]:not([data-zoom="1"]) .pdf-page-slot canvas { max-width: none; }
  .akhri-reader.reader-immersive .reader-page-navigation { inset: 0; align-items: center; padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right)); }
  .akhri-reader.reader-immersive .reader-page-arrow { width: 44px; height: 48px; }
  .akhri-reader.reader-immersive .reader-bottom-chrome { position: absolute; z-index: 16; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding-bottom: env(safe-area-inset-bottom); background: transparent; pointer-events: none; }
  .akhri-reader.reader-immersive .reader-navigation { flex: 0 0 auto; min-height: 50px; flex-wrap: nowrap; gap: 5px; padding: 2px 8px; transform: none; }
  .akhri-reader.reader-immersive .reader-navigation { pointer-events: auto; background: var(--reader-toolbar); backdrop-filter: blur(18px); }
  .akhri-reader.reader-immersive .reader-navigation .reader-icon-button { width: 38px; height: 38px; }
  .akhri-reader.reader-immersive .reader-navigation label { width: 46px; }
  .akhri-reader.reader-immersive .reader-navigation input { height: 34px; }
  .akhri-reader.reader-immersive .reader-percentage { margin-left: 4px; padding-left: 8px; }
  .akhri-reader.reader-immersive .reader-audio-mount,
  .akhri-reader.reader-immersive .reader-audio-mount.is-minimized {
    position: relative; inset: auto; align-self: center; width: min(100% - 16px, 640px); max-width: calc(100% - 16px); pointer-events: auto;
    margin: 8px max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left));
    padding-top: 0; transition: opacity .2s ease;
  }
  .akhri-reader.reader-immersive .reader-audio-stack { gap: 6px; }
  .akhri-reader.reader-immersive .audio-sync-utilities { justify-content: center; }
  .akhri-reader.reader-immersive .akhri-audio-player {
    box-sizing: border-box; display: grid; grid-template-columns: 38px 40px 38px minmax(35px, 1fr) 50px 34px;
    grid-template-rows: 48px; grid-template-areas: "back play forward timeline speed collapse";
    align-items: center; justify-items: center; gap: 3px; width: 100%; height: 54px; min-height: 54px; padding: 3px 6px; border-radius: 16px;
  }
  .akhri-reader.reader-immersive .audio-book-meta,
  .akhri-reader.reader-immersive .audio-book-meta .audio-meta-actions,
  .akhri-reader.reader-immersive .audio-primary-controls,
  .akhri-reader.reader-immersive .audio-secondary-controls { display: contents; }
  .akhri-reader.reader-immersive .audio-book-copy,
  .akhri-reader.reader-immersive .audio-cover,
  .akhri-reader.reader-immersive .audio-secondary-controls [data-audio-action="mute"],
  .akhri-reader.reader-immersive .audio-volume,
  .akhri-reader.reader-immersive .audio-chapters,
  .akhri-reader.reader-immersive .audio-status { display: none; }
  .akhri-reader.reader-immersive .akhri-audio-player [data-audio-action="back"] { grid-area: back; }
  .akhri-reader.reader-immersive .akhri-audio-player [data-audio-action="play"] { grid-area: play; }
  .akhri-reader.reader-immersive .akhri-audio-player [data-audio-action="forward"] { grid-area: forward; }
  .akhri-reader.reader-immersive .akhri-audio-player .audio-timeline { grid-area: timeline; display: flex; width: 100%; min-width: 0; gap: 2px; }
  .akhri-reader.reader-immersive .akhri-audio-player .audio-timeline span { width: 29px; font-size: 9px; }
  .akhri-reader.reader-immersive .akhri-audio-player .audio-timeline input { min-width: 12px; width: 100%; height: 26px; }
  .akhri-reader.reader-immersive .akhri-audio-player .audio-secondary-controls .audio-speed { grid-area: speed; }
  .akhri-reader.reader-immersive .akhri-audio-player .audio-speed select { min-width: 46px; max-width: 50px; height: 34px; padding-inline: 2px; }
  .akhri-reader.reader-immersive .akhri-audio-player .audio-collapse { grid-area: collapse; width: 32px; height: 34px; }
  .akhri-reader.reader-immersive .audio-sync-controls { justify-content: center; gap: 8px; }
  .akhri-reader.reader-immersive .audio-sync-button { width: 40px; height: 40px; }
  .akhri-reader.reader-immersive .audio-sync-feedback { right: 0; bottom: calc(100% + 5px); }
  .akhri-reader.reader-immersive .reader-audio-mount.is-minimized { width: max-content; max-width: calc(100% - 16px); }
  .akhri-reader.reader-immersive .akhri-audio-player.is-minimized { display: flex; justify-content: center; gap: 4px; width: max-content; min-width: 156px; max-width: 100%; height: 50px; min-height: 50px; padding: 4px 8px; border-radius: 999px; }
  .akhri-reader.reader-immersive .akhri-audio-player.is-minimized .audio-book-meta { display: contents; }
  .akhri-reader.reader-immersive .akhri-audio-player.is-minimized .audio-primary-controls { display: contents; }
  .akhri-reader.reader-immersive .akhri-audio-player.is-minimized .audio-primary-controls .reader-icon-button { width: 36px; height: 36px; }
  .akhri-reader.reader-immersive .akhri-audio-player.is-minimized .audio-play-button { width: 40px; height: 40px; }
  .akhri-reader.reader-immersive .akhri-audio-player.is-minimized .audio-collapse { display: inline-flex; width: 32px; height: 34px; }
  .akhri-reader.reader-immersive .akhri-audio-player.is-minimized .audio-timeline,
  .akhri-reader.reader-immersive .akhri-audio-player.is-minimized .audio-secondary-controls { display: none; }
  .akhri-reader.reader-immersive .reader-page-navigation { z-index: 8; }
  .akhri-reader.reader-immersive.controls-hidden .akhri-reader-header,
  .akhri-reader.reader-immersive.controls-hidden .reader-bottom-chrome { visibility: hidden; opacity: 0; pointer-events: none; }
  .akhri-reader.reader-immersive.controls-hidden .reader-navigation { visibility: hidden; }
  .akhri-reader.reader-immersive .reader-settings { top: auto; right: max(8px, env(safe-area-inset-right)); bottom: calc(100px + env(safe-area-inset-bottom)); left: max(8px, env(safe-area-inset-left)); width: auto; max-height: min(72%, 640px); overflow: auto; }
  .akhri-reader.reader-immersive .reader-search { top: calc(58px + env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); left: max(8px, env(safe-area-inset-left)); width: auto; }
  .akhri-reader.reader-immersive .reader-side-panel { top: calc(54px + env(safe-area-inset-top)); bottom: 0; left: 0; width: min(360px, 88vw); height: auto; }
  .akhri-reader.reader-immersive .reader-settings,
  .akhri-reader.reader-immersive .reader-search,
  .akhri-reader.reader-immersive .reader-side-panel,
  .akhri-reader.reader-immersive .reader-page-navigation { z-index: 14; }
  .akhri-reader.reader-immersive .reader-navigation,
  .akhri-reader.reader-immersive .reader-bottom-chrome,
  .akhri-reader.reader-immersive .reader-workspace { overflow-anchor: none; }
}
@media (max-height: 500px) and (pointer: coarse) {
  .akhri-reader.reader-immersive .akhri-reader-header { min-height: calc(42px + env(safe-area-inset-top)); padding-top: calc(2px + env(safe-area-inset-top)); padding-bottom: 2px; }
  .akhri-reader.reader-immersive .reader-back,
  .akhri-reader.reader-immersive .reader-actions .reader-icon-button { height: 34px; }
  .akhri-reader.reader-immersive .reader-audio-mount,
  .akhri-reader.reader-immersive .reader-audio-mount.is-minimized { margin-top: 5px; margin-bottom: 4px; }
  .akhri-reader.reader-immersive .reader-audio-mount:not(.is-minimized) { width: min(calc(100% - 16px), 520px); max-width: min(calc(100% - 16px), 520px); }
  .akhri-reader.reader-immersive .akhri-audio-player { grid-template-rows: 42px; height: 48px; min-height: 48px; padding-block: 2px; }
  .akhri-reader.reader-immersive .akhri-audio-player .audio-primary-controls .reader-icon-button { width: 34px; height: 34px; }
  .akhri-reader.reader-immersive .akhri-audio-player .audio-play-button { width: 36px; height: 36px; }
  .akhri-reader.reader-immersive .akhri-audio-player .audio-collapse { height: 30px; }
  .akhri-reader.reader-immersive .akhri-audio-player .audio-cover { flex-basis: 30px; width: 30px; min-width: 30px; max-width: 30px; height: 30px; min-height: 30px; max-height: 30px; }
  .akhri-reader.reader-immersive .reader-navigation { min-height: 44px; padding-block: 1px; }
  .akhri-reader.reader-immersive .reader-navigation .reader-icon-button { width: 34px; height: 34px; }
  .akhri-reader.reader-immersive .reader-navigation input { height: 30px; }
  .akhri-reader.reader-immersive .akhri-audio-player.is-minimized { height: 44px; min-height: 44px; padding-block: 2px; }
  .akhri-reader.reader-immersive .akhri-audio-player.is-minimized .audio-play-button { width: 36px; height: 36px; }
}
.pdf-debug-error-rows { display: grid; gap: 3px; margin-top: 5px; }
