/* Keep the existing reader and controls; the pass lane has its own space. */
#libraryReader.tm-museum-open > :not(#tmMuseumSurface) { visibility: hidden !important; }
#libraryReader.reader-sales-reserved {
    --reader-sales-height: calc(58px + env(safe-area-inset-bottom, 0px));
    bottom: var(--reader-sales-height);
}
#libraryReader #readerSalesBar {
    position: fixed;
    inset: auto 0 0;
    z-index: 200001;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    min-height: 58px;
    padding: 9px max(16px, env(safe-area-inset-right, 0px)) calc(9px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    border-top: 1px solid #b7964f;
    background: linear-gradient(100deg, #201b10, #100f0d 65%);
    color: #e7ce8e;
    font: 500 12px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.reader-sales-copy { min-width: 0; }
.reader-sales-title { display: block; letter-spacing: .025em; }
#readerPassStatus { display: block; color: #c7c1b1; font-size: 11px; }
.reader-sales-actions { display: flex; gap: 8px; flex-shrink: 0; }
#readerSalesBar button {
    border: 1px solid #a88b50;
    border-radius: 6px;
    padding: 9px 12px;
    min-height: 36px;
    background: #d5b56d;
    color: #18140c;
    cursor: pointer;
    font: 650 12px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#readerSalesBar #readerEnterPass { background: transparent; color: #ead39c; }
#readerSalesBar button:hover { filter: brightness(1.12); }
#readerSalesBar button:focus-visible, #libraryReader #lwDock button:focus-visible {
    outline: 2px solid #ffe8ad;
    outline-offset: 3px;
}
#libraryReader.reader-sales-reserved #lwMuseum { bottom: var(--reader-sales-height); }
#libraryReader #lwDockBtn { display: block; }
#libraryReader #lwDock {
    max-width: calc(100vw - 24px);
    max-height: calc(100% - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    visibility: hidden;
}
#libraryReader #lwDock.show { visibility: visible; }
#libraryReader #lwDock button[hidden] { display: none; }
#libraryReader #obChoice, #libraryReader #obHand, #libraryReader #lwDockHint,
#libraryReader #lrLibTip, #libraryReader #lrHelpHome,
#libraryReader #lrHandAgain, #libraryReader #lrHandNever, #libraryReader #lrHelpBack {
    display: none !important;
}
#libraryReader #lrHelpCard { max-height: calc(100% - 32px); }
#libraryReader #mcNav select {
    max-width: 100%;
    border: 1px solid #a88b50;
    border-radius: 8px;
    padding: 8px;
    background: #161820;
    color: #f3dfac;
    font: inherit;
}
@media (max-width: 900px) {
    #libraryReader.reader-sales-reserved { --reader-sales-height: calc(92px + env(safe-area-inset-bottom, 0px)); }
    #libraryReader #readerSalesBar { flex-direction: column; gap: 6px; padding-top: 7px; padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px)); }
    .reader-sales-copy { text-align: center; }
    .reader-sales-actions { width: 100%; justify-content: center; flex-shrink: 1; }
    #readerSalesBar button { min-width: 0; padding: 8px 10px; }
}
@media (max-width: 420px) {
    #libraryReader #readerSalesBar { padding-left: 8px; padding-right: 8px; font-size: 11px; }
    #readerSalesBar button { font-size: 11px; padding: 8px; }
    #libraryReader #lwDockBtn { font-size: 9px; letter-spacing: .035em; padding: 10px; }
}
@media print { #readerSalesBar { display: none !important; } }
/* Reader title: long titles (e.g. ROMEO AND JULIET) wrap inside the page column
   instead of being clipped by the paged column box. Width/flow only; paging untouched. */
#libraryReader .lr-body-head { box-sizing: border-box; max-width: min(680px, 100%); break-inside: avoid; }
#libraryReader .lr-title {
    display: block; box-sizing: border-box; max-width: 100%;
    white-space: normal; overflow: visible; text-overflow: clip;
    overflow-wrap: break-word; word-break: normal; hyphens: manual; text-wrap: balance;
    font-size: clamp(22px, 3.2vw, 34px); letter-spacing: 0.04em;
}
#libraryReader #readerSalesBar[hidden]{display:none!important}
#libraryReader.reader-open-access{bottom:0}
/* Shared reading face: tools above one quiet, non-clickable company credit. */
html #libraryReader #readerSalesBar.reader-company-only {
    display:flex!important; justify-content:center; min-height:0;
    padding:4px 12px calc(4px + env(safe-area-inset-bottom, 0px));
    border:0; background:#050910; color:#cfc3a5; font:11px/1.4 Georgia,serif;
}
html.qr-reading #libraryReader.reader-sales-reserved {bottom:0}
html.qr-reading #libraryReader .lr-scroll {margin-bottom:calc(var(--reader-sales-height, 30px) + 54px)!important}
html.qr-reading #qrReaderBar {bottom:var(--reader-sales-height, calc(30px + env(safe-area-inset-bottom)))}
