/* Physical page furniture stays outside selectable text and printed editions. */
@media screen {
  .book-view { padding-top: 0; }
  .book-view .book-navigation {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; max-width: 1180px; margin: 0 auto; padding: 13px 0;
    border: 0; color: var(--muted);
  }
  .book-navigation--top { position: sticky; top: var(--header-height); z-index: 9; background: var(--canvas); scroll-margin-top: calc(var(--header-height) + 6px); }
  .book-navigation--bottom { margin-top: 22px !important; }
  .book-navigation .button-secondary { min-height: 44px; white-space: nowrap; margin: 0; font-size: 11px; padding: 8px 14px; }
  .book-navigation .button-secondary:disabled { opacity: .32; cursor: default; }
  .book-page-picker { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 11px; min-width: 0; }
  .book-page-picker select { width: 155px; max-width: 20vw; min-height: 44px; font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 5px 20px 5px 8px; text-overflow: ellipsis; cursor: pointer; }
  .book-page-picker select:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
  .book-page-total { white-space: nowrap; font-variant-numeric: tabular-nums; }
  #reading-view .book-shell { --leaf-paper: #eae4d5; --leaf-line: #c9c2b1; --binding-shade: #8c82613d; position: relative; isolation: isolate; width: calc(100% - 26px); max-width: 1154px; margin: 12px auto 0; perspective: 1600px; }
  #reading-view .book-shell > .book-sheet {
    position: relative; z-index: 1; width: 100%; max-width: none; margin: 0;
    min-height: 660px; padding: 36px 53px 30px 62px;
    border: 1px solid #d9d2c1; border-radius: 3px 8px 8px 3px;
    background: linear-gradient(90deg, #8c826116 0, #fff0 38px, #fff0 calc(100% - 16px), #a99a7510 100%), var(--paper, #fbf9f2);
    box-shadow: -8px 3px 18px #3d39200d, 1px 8px 22px #39362116;
  }
  #reading-view .book-shell > .book-sheet::before { display: none; }
  .book-binding { position: absolute; z-index: 3; top: 1px; bottom: 1px; left: 0; width: 28px; border-left: 1px solid #92856b55; border-radius: 3px 0 0 3px; background: linear-gradient(90deg, #66593c2b 0, #66593c0a 9px, #fff8 15px, #8f79591c 22px, #fff0 100%); pointer-events: none; }
  .book-leaves { position: absolute; z-index: -1; top: 7px; right: -13px; bottom: -6px; width: calc(100% - 4px); border: 1px solid var(--leaf-line); border-radius: 3px 7px 8px 2px; background: repeating-linear-gradient(90deg, var(--leaf-paper) 0 2px, var(--leaf-line) 2px 3px, #f8f5e9 3px 5px); transform: skewY(.15deg); box-shadow: 2px 3px 0 #687052, 3px 7px 0 #4e593f, 9px 12px 22px #3234221a; pointer-events: none; }
  .book-shell::after { content: ''; position: absolute; z-index: -1; left: 5px; right: -12px; bottom: -10px; height: 12px; border: 1px solid var(--leaf-line); border-radius: 0 0 7px 2px; background: repeating-linear-gradient(0deg, var(--leaf-paper) 0 2px, var(--leaf-line) 2px 3px); box-shadow: 1px 4px 0 #596347; pointer-events: none; }
  .book-edge { position: absolute; z-index: 4; top: 0; bottom: 0; display: flex; align-items: flex-start; justify-content: center; width: 31px; padding: 0; border: 0; background: transparent; color: var(--olive); cursor: pointer; border-radius: 3px; touch-action: manipulation; }
  .book-edge-previous { left: -4px; }
  .book-edge-next { right: -15px; width: 32px; }
  .book-edge > span { position: sticky; top: calc(var(--header-height) + 100px); display: grid; place-items: center; height: 44px; margin: 100px 0; font: 25px/1 Georgia, serif; opacity: .38; transition: opacity .16s, background .16s; }
  .book-edge:hover > span, .book-edge:focus-visible > span { opacity: 1; background: #7a82551a; }
  .book-edge:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
  .book-edge:disabled { cursor: default; }
  .book-edge:disabled > span { opacity: .1; }
  .book-edge:disabled:hover > span { background: transparent; }
  .book-view .book-sheet .passage-rail { position: static; display: flex; flex-direction: row; grid-column: 1/-1; gap: 8px; width: auto; margin: 0 0 6px; padding: 0; }
  .book-view .book-sheet .passage-rail .bookmark-button { opacity: .5; }
  .book-view .book-sheet .passage-rail .bookmark-button.saved, .book-view .book-sheet .passage-rail .bookmark-button:focus-visible { opacity: 1; }
  .book-view .book-running-head { font-size: 10px; outline-offset: 5px; }
  .book-turn-next > .book-sheet { animation: book-leaf-next .2s ease-out; }
  .book-turn-previous > .book-sheet { animation: book-leaf-previous .2s ease-out; }
  @keyframes book-leaf-next { from { opacity: .65; transform: translateX(7px); } to { opacity: 1; transform: translateX(0); } }
  @keyframes book-leaf-previous { from { opacity: .65; transform: translateX(-7px); } to { opacity: 1; transform: translateX(0); } }
  [data-theme="dusk"] #reading-view .book-shell { --leaf-paper: #414638; --leaf-line: #292f24; }
  [data-theme="dusk"] #reading-view .book-shell > .book-sheet { border-color: #4b5140; background: linear-gradient(90deg, #0003, #0000 40px, #0000 calc(100% - 16px), #0002), #2e3629; }
  [data-theme="dusk"] .book-leaves { background: repeating-linear-gradient(90deg, #414638 0 2px, #292f24 2px 3px, #555946 3px 5px); }
  [data-theme="dusk"] .book-binding { background: linear-gradient(90deg, #0006, #0001 9px, #b0b79212 15px, #0002 22px, #0000); }
  @media (max-width: 760px) {
    #reading-view .book-shell { width: calc(100% - 17px); margin-left: 0; margin-right: 17px; }
    #reading-view .book-shell > .book-sheet { padding: 24px 26px 25px 36px; min-height: 560px; }
    .book-binding { width: 22px; }
    .book-edge-previous { width: 25px; }
    .book-edge-next { width: 27px; right: -15px; }
    .book-view .book-navigation { gap: 8px; }
    .book-navigation .button-secondary { padding: 7px 9px; font-size: 10px; }
    .book-page-picker { gap: 4px; font-size: 10px; }
    .book-page-picker select { width: 74px; max-width: 21vw; padding-left: 3px; }
    .book-view .book-running-head { font-size: 8px; gap: 12px; }
  }
  @media (prefers-reduced-motion: reduce) { .book-turn-next > .book-sheet, .book-turn-previous > .book-sheet { animation: none; } }
}
@media print { .book-navigation, .book-edge, .book-leaves, .book-binding { display: none !important; } .book-shell::after { display: none !important; } }
