.desktop-reading-width { display: none; }

/* Only wide, pointer-driven browsers opt in; native shells retain the mobile rules. */
@media (min-width: 1100px) and (min-height: 560px) and (hover: hover) and (pointer: fine) {
  html.desktop-reader {
    --desktop-context-width: min(43vw, 720px);
    --desktop-reader-gutter: 24px;
    --desktop-context-space: 0px;
  }
  html.desktop-reader.desktop-context-open {
    --desktop-context-space: calc(var(--desktop-context-width) + 16px);
  }
  html.desktop-reader body.view-bible .bible-toolbar { max-width: none; }
  html.desktop-reader body.view-bible #bibleView {
    width: calc(100% - var(--desktop-context-space));
    max-width: none;
    margin: 0;
    padding-inline: var(--desktop-reader-gutter);
    padding-bottom: 24px;
    scrollbar-gutter: stable;
  }
  html.desktop-reader body.view-bible #bibleView > :is(.verses, .translation-attribution, .reading-plan-return) {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-inline: auto;
    box-sizing: border-box;
  }
  html.desktop-reader[data-reading-width="comfortable"] body.view-bible #bibleView > :is(.verses, .translation-attribution, .reading-plan-return) {
    max-width: 88ch;
  }
  html.desktop-reader body.view-bible #bibleView .verses { padding-bottom: 32px; }
  html.desktop-reader body.view-bible #readingPlanReturnBanner[hidden] { display: none; }
  html.desktop-reader body.view-bible #bibleView .verse { min-width: 0; padding: 10px 12px; }
  html.desktop-reader body.view-bible #bibleView .verse-text { min-width: 0; }
  html.desktop-reader body.view-bible #translationAttribution { padding-bottom: 32px; }
  html.desktop-reader body.view-bible #sheetBackdrop { display: none !important; }
  html.desktop-reader body.view-bible #panelSheet.sheet {
    inset: calc(var(--topbar-space, 64px) + 12px) 16px calc(var(--nav-space) + 12px) auto;
    width: var(--desktop-context-width);
    max-width: calc(100% - 32px);
    height: auto;
    min-height: 0;
    max-height: none;
    padding-bottom: 0;
    border-radius: 8px;
    transform: none;
    transition: none;
    will-change: auto;
    box-sizing: border-box;
    box-shadow: 0 3px 16px rgba(15, 23, 42, .10);
  }
  html.desktop-reader body.view-bible #panelSheet .sheet-header {
    cursor: default;
    touch-action: auto;
  }
  html.desktop-reader body.view-bible #panelSheet.sheet.collapsed {
    bottom: auto;
    max-height: calc(100dvh - var(--topbar-space, 64px) - var(--nav-space) - 24px);
  }
  html.desktop-reader body.view-bible #panelSheet .sheet-drag-handle { display: none; }
  html.desktop-reader body.view-bible #panelSheet .panel-content {
    padding-bottom: 24px;
    border-radius: 0;
    scrollbar-gutter: stable;
  }
  html.desktop-reader body.view-bible #chapterFlipper .chapter-caret { bottom: calc(var(--nav-space) + 20px); }
  html.desktop-reader body.view-bible #chapterFlipper .chapter-caret.right { right: calc(var(--desktop-context-space) + 4px); }
  html.desktop-reader[dir="rtl"] body.view-bible #panelSheet.sheet { right: auto; left: 16px; }
  html.desktop-reader[dir="rtl"] body.view-bible #chapterFlipper .chapter-caret.right { right: 4px; }
  html.desktop-reader[dir="rtl"] body.view-bible #chapterFlipper .chapter-caret.left { left: calc(var(--desktop-context-space) + 4px); }
  html.desktop-reader body.view-bible .desktop-reading-width:not([hidden]) {
    display: inline-flex;
    align-items: stretch;
    flex: 0 0 auto;
    gap: 2px;
    margin-inline-end: 12px;
    padding: 3px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    font: 600 14px/1.2 system-ui, sans-serif;
    letter-spacing: 0;
  }
  html.desktop-reader .desktop-reading-width button {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: inherit;
    font: inherit;
    box-shadow: none;
    cursor: pointer;
  }
  html.desktop-reader .desktop-reading-width button[aria-pressed="true"] {
    background: #fff;
    color: #075985;
    border-color: #cbd5e1;
  }
  html.desktop-reader .desktop-reading-width button:focus-visible { outline: 2px solid #0284c7; outline-offset: 2px; }
  html.desktop-reader body.view-bible:is(.dark, .theme-dark, .theme-dusk, .theme-contrast) .desktop-reading-width {
    background: #1f2937;
    color: #e5e7eb;
    border-color: #64748b;
  }
  html.desktop-reader body.view-bible:is(.dark, .theme-dark, .theme-dusk, .theme-contrast) .desktop-reading-width button[aria-pressed="true"] {
    background: #334155;
    color: #f8fafc;
    border-color: #94a3b8;
  }
}
