/* ===== ThirdHub comic-reader.css — 漫画阅读器 ===== */
.cr-overlay { background: #000; }
.cr-ui { transition: opacity .25s, transform .25s; z-index: 20; }
.ui-hidden .cr-ui { opacity: 0; pointer-events: none; }
.ui-hidden .cr-top { transform: translateY(-100%); }
.ui-hidden .cr-bottom { transform: translateY(100%); }
.cr-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(rgba(0,0,0,.65), transparent);
}
.cr-top .icon-btn { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }
.cr-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.65));
}
.cr-bottom .nr-nav { background: rgba(255,255,255,.14); color: #fff; }
.cr-page-hint { color: rgba(255,255,255,.8); font-size: 12px; }
.cr-body { position: absolute; inset: 0; overflow: hidden; }
.cr-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cr-scroll .cr-img { width: 100%; display: block; background: #111; min-height: 120px; }
.cr-gallery { display: grid; place-items: center; }
.cr-page-wrap { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.cr-page-img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .2s; transform-origin: center; }
.cr-tap { position: absolute; top: 0; bottom: 0; }
.cr-tap.left { left: 0; width: 30%; }
.cr-tap.center { left: 30%; width: 40%; }
.cr-tap.right { right: 0; width: 30%; }

/* ================= v1.5 ================= */
/* 双页模式 */
.cr-double .cr-page-wrap { display: flex; align-items: center; justify-content: center; gap: 2px; }
.cr-double .cr-page-img { max-width: 50%; max-height: 100%; }

/* 图片适配 */
.cr-body[data-fit="width"] .cr-page-img { width: 100%; max-height: 100%; object-fit: contain; }
.cr-body[data-fit="height"] .cr-page-img { height: 100%; max-width: 100%; object-fit: contain; }
.cr-body[data-fit="original"] { overflow: auto; }
.cr-body[data-fit="original"] .cr-page-wrap { display: block; overflow: auto; }
.cr-body[data-fit="original"] .cr-page-img { max-width: none; max-height: none; }
.cr-body[data-fit="width"].cr-scroll .cr-img { width: 100%; height: auto; }
.cr-body[data-fit="original"].cr-scroll .cr-img { width: auto; max-width: none; }

/* 条漫留白开关 */
.cr-scroll .cr-img { margin-bottom: 4px; }
.cr-scroll.cr-nogap .cr-img { margin-bottom: 0; }

/* 切白边 */
.cr-crop .cr-page-img, .cr-crop .cr-img { clip-path: inset(2% 2%); }

/* 设置面板 chips（复用小说阅读器样式） */
