body.niczuk-reader-open { overflow: hidden; }
dialog.npr { width: min(1500px, 98vw); height: 96vh; height: 96dvh; max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 14px; color: #153443; background: #fff; box-shadow: 0 20px 80px #0005; }
.npr[open] { display: flex; flex-direction: column; }
.npr::backdrop { background: #0c263bbb; }
.npr *, .npr *::before, .npr *::after { box-sizing: border-box; }
.npr [hidden] { display: none !important; }
.npr button, .npr input, .npr select { font: inherit; }
.npr button { cursor: pointer; width: auto; }
.npr button:disabled { cursor: default; opacity: .5; }
.npr button:focus-visible, .npr a:focus-visible, .npr input:focus-visible, .npr select:focus-visible { outline: 3px solid #e5a000; outline-offset: 2px; }
.npr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: #103b48; color: white; }
.npr-head h2 { font-size: 21px; margin: 0; }
.npr-head p { font-size: 12px; margin: 3px 0 0; color: #d4e6ea; }
.npr-head button { border-color: #b9d6dd; color: white; background: transparent; padding: 9px 14px; }
.npr-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 18px 5px; }
.npr-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; min-width: 0; }
.npr-filters input, .npr-filters select { width: 100%; min-width: 0; height: 40px; padding: 6px 10px; background: white; }
.npr-nav { display: flex; align-items: center; gap: 7px; padding: 5px 18px; font-size: 13px; }
.npr-nav label { display: flex; align-items: center; gap: 6px; }
.npr-nav button, .npr-nav select { height: 34px; min-height: 34px; padding: 3px 8px; }
.npr-nav button { font-size: 24px; min-width: 35px; line-height: 1; }
.npr-nav a { color: #126e7a; margin-left: auto; white-space: nowrap; }
.npr-instruction { margin: 3px 18px 9px; font-size: 12px; color: #536b76; }
.npr-instruction b { color: #007683; }
.npr-search-results { display: flex; align-items: center; gap: 6px; overflow: auto; padding: 6px 18px; flex-shrink: 0; border-top: 1px solid #d5e1e6; }
.npr-search-results > span { font-size: 12px; min-width: 90px; }
.npr-search-results button { text-align: left; flex-shrink: 0; padding: 6px 10px; }
.npr-search-results small { display: block; font-size: 11px; color: #617782; }
.npr-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 285px; position: relative; border-block: 1px solid #d5e1e6; }
.npr-viewport { background: #dce4e7; overflow: auto; position: relative; overscroll-behavior: contain; padding: 12px; }
.npr-loading { margin: 20px; }
.npr-page { position: relative; margin: 0 auto; background: white; box-shadow: 0 3px 10px #152f4025; flex: none; container-type: inline-size; }
.npr-page img { width: 100%; height: 100%; max-width: none; display: block; pointer-events: none; }
.npr-markers { position: absolute; inset: 0; }
.npr .npr-pick { position: absolute; min-width: 0; min-height: 0; padding: 0; margin: 0; border: 1px solid #127989; border-radius: 3px; background: #e9f9fcf5; color: #006878; font-size: clamp(6px, 1.2cqw, 22px); font-weight: 700; line-height: 1; box-shadow: none; overflow: visible; touch-action: manipulation; }
.npr .npr-pick:hover, .npr .npr-pick:focus { z-index: 2; outline: 2px solid #da8c00; }
.npr .npr-pick.selected { background: #006f7e; color: #fff; }
.npr-side { padding: 14px; overflow: auto; background: white; }
.npr-side h3 { font-size: 15px; margin: 12px 0; }
.npr-side h3 span { border-radius: 15px; padding: 2px 7px; background: #e2f2f3; }
.npr-side-close { display: none; }
.npr-page-items { display: none; }
.npr-page-items p { font-size: 12px; }
.npr-show-page:not(.npr-editing) .npr-page-items { display: block; }
.npr-show-page:not(.npr-editing) .npr-side > h3, .npr-show-page .npr-side > .npr-basket, .npr-show-page .npr-empty { display: none; }
.npr-empty { font-size: 13px; line-height: 1.5; color: #677983; }
.npr-editor { display: grid; grid-template-columns: 1fr; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid #d5e1e6; }
.npr-editor strong { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.npr-editor > span, .npr-editor p { font-size: 12px; color: #526d79; margin: 0; }
.npr-editor label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.npr-editor label span { display: inline; }
.npr-editor input { width: 100%; font-size: 20px; padding: 9px; min-height: 44px; }
.npr-editor button { min-height: 40px; padding: 8px; }
.npr-basket { padding: 0; list-style: none; margin: 0; }
.npr-basket li { display: flex; border-bottom: 1px solid #e1e8eb; }
.npr-basket li > button { border: 0; background: transparent; text-align: left; padding: 10px 3px; min-width: 0; }
.npr-basket li > button:first-child { flex: 1; }
.npr-basket li > button:last-child { width: 32px; text-align: center; }
.npr-basket strong, .npr-basket span, .npr-basket b { display: block; font-size: 12px; overflow-wrap: anywhere; }
.npr-basket span { color: #71818a; }
.npr-basket b { color: #007885; margin-top: 4px; }
.npr-footer { display: flex; align-items: center; gap: 10px; padding: 10px 18px; }
.npr-footer > div { flex: 1; min-width: 0; font-size: 12px; }
.npr-footer p { margin: 3px 0 0; color: #187369; }
.npr-footer .npr-error { color: #b12121; }
.npr-footer button { min-height: 44px; padding: 9px 14px; flex-shrink: 0; }
.npr-footer [data-show-basket] { display: none; }
.npr-busy .npr-main, .npr-busy .npr-filters, .npr-busy .npr-nav, .npr-busy .npr-search-results { pointer-events: none; opacity: .65; }
@media (max-width: 760px) {
  dialog.npr { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; }
  .npr-head { padding: max(8px, env(safe-area-inset-top)) 12px 8px; }
  .npr-head h2 { font-size: 18px; }
  .npr-head p { font-size: 10px; }
  .npr-filters { padding: 8px 12px 4px; gap: 7px; }
  .npr-filters input, .npr-filters select { font-size: 16px; }
  .npr-nav { padding-inline: 12px; gap: 5px; }
  .npr-nav label { font-size: 0; gap: 0; }
  .npr-nav select { font-size: 12px; max-width: 122px; }
  .npr-nav a { font-size: 11px; }
  .npr-instruction { margin-inline: 12px; font-size: 11px; }
  .npr-main { grid-template-columns: minmax(0, 1fr); }
  .npr-viewport { padding: 12px; }
  .npr-side { display: none; position: absolute; z-index: 4; inset: auto 0 0; max-height: 85%; box-shadow: 0 -8px 22px #103b4829; border-radius: 14px 14px 0 0; padding: 10px 14px; }
  .npr-editing .npr-side, .npr-show-basket .npr-side, .npr-show-page .npr-side { display: block; }
  .npr-side-close { display: block; margin: 0 0 10px auto; padding: 6px 10px; min-height: 36px; font-size: 12px; }
  .npr-editor { grid-template-columns: 1fr 1fr; gap: 7px; }
  .npr-editor strong, .npr-editor > span, .npr-editor p { grid-column: 1 / -1; }
  .npr-editor label { grid-column: 1; grid-row: span 2; }
  .npr-editor label span { display: inline; }
  .npr-editor button { grid-column: 2; font-size: 13px; }
  .npr-editing:not(.npr-show-basket) .npr-side h3, .npr-editing:not(.npr-show-basket) .npr-basket, .npr-editing .npr-empty { display: none; }
  .npr-footer { display: grid; grid-template-columns: auto 1fr; padding: 8px 12px max(8px, env(safe-area-inset-bottom)); gap: 6px; }
  .npr-footer > div { grid-column: 1 / -1; }
  .npr-footer [data-show-basket] { display: block; }
  .npr-footer [data-add] { grid-column: 1 / -1; }
  .npr-footer button { font-size: 13px; padding: 8px; }
}
