/* ============================================================
 * DX_EBOOK 게시판 스킨 — ebook.css  v1.0.0
 * Copyright © DesignOneX — designonex.com · All Rights Reserved.
 * License: DesignOneX License 1.0 (LICENSE.md)
 * style.css(NEW GALLARY 기반 공통 틀) 위에 PDF 전용 부분만 얹습니다.
 * 색·선·글자는 모두 style.css 의 --nb-* 값을 그대로 씁니다. 그림자 없음.
 * ============================================================ */

/* ── 목록 카드 : PDF 첫 쪽이 잘리지 않게 세로형 ── */
.gl55-grid.dxeb-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dxeb-grid .gl55-thumb-wrap { aspect-ratio: 4 / 5; background: var(--nb-hover); }
.dxeb-grid .gl55-thumb { object-fit: cover; object-position: top center; background: #fff; }
.dxeb-badge { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 3px; background: #20231f; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.dxeb-badge i { font-size: 10px; }
.dxeb-pages { position: absolute; right: 10px; bottom: 10px; padding: 4px 9px; border-radius: 99px; background: rgba(255,255,255,.94); color: #20231f; font-size: 10px; font-weight: 800; }
.dxeb-grid .gl55-foot-stats-right .fa-download { color: var(--nb-mute); }
.dxeb-grid .gl55-card-wrap.is-notice .gl55-card { border-color: var(--nb-ink); }
html body.dark .dxeb-pages { background: rgba(255,255,255,.92); color: #20231f; }
html body.dark .dxeb-badge { background: #000; }

/* ── 상세 : 뷰어 ── */
.dxeb-viewer { border-bottom: 1px solid var(--nb-line); background: transparent; }
.dxeb-vtool { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--nb-line); }
.dxeb-vtool .grp { display: flex; align-items: center; gap: 8px; }
.dxeb-pg { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--nb-mute); font-weight: 600; }
.dxeb-pg input { width: 56px; height: 36px; padding: 0; border: 1px solid var(--nb-line); border-radius: 4px; background: var(--nb-card); color: var(--nb-ink); text-align: center; font: inherit; font-size: 14px; font-weight: 800; outline: none; -moz-appearance: textfield; }
.dxeb-pg input:focus { border-color: var(--nb-ink); }
.dxeb-pg input::-webkit-outer-spin-button, .dxeb-pg input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dxeb-zoom { min-width: 50px; text-align: center; font-size: 12px; font-weight: 800; color: var(--nb-mute); }
.dxeb-vtool .nb-icon-btn { width: 36px; height: 36px; font-size: 12px; }
.dxeb-vmain { display: flex; background: var(--nb-hover); min-height: 320px; }
.dxeb-thumbs { flex: 0 0 112px; border-right: 1px solid var(--nb-line); padding: 14px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 760px; overflow-y: auto; }
.dxeb-th { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: var(--nb-mute); font-size: 11px; font-weight: 700; }
.dxeb-th .im { display: flex; align-items: center; justify-content: center; width: 70px; min-height: 90px; border: 1.5px solid var(--nb-line); border-radius: 3px; background: #fff; overflow: hidden; }
.dxeb-th .im canvas { display: block; width: 100%; height: auto; }
.dxeb-th.on { color: var(--nb-ink); font-weight: 900; }
.dxeb-th.on .im { border-color: var(--nb-ink); }
.dxeb-pagebox { position: relative; flex: 1; min-width: 0; max-height: 860px; padding: 24px 20px 32px; display: flex; justify-content: center; align-items: flex-start; overflow: auto; }
.dxeb-pagebox canvas { display: block; flex: none; max-width: none; }
.dxeb-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; font-size: 13px; line-height: 1.7; color: var(--nb-mute); pointer-events: none; }
.dxeb-load a { pointer-events: auto; }
.dxeb-spin { width: 26px; height: 26px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--nb-line); border-top-color: var(--nb-ink); animation: dxebspin .8s linear infinite; }
@keyframes dxebspin { to { transform: rotate(360deg); } }
.dxeb-empty-view { display: flex; align-items: center; justify-content: center; min-height: 220px; text-align: center; color: var(--nb-mute); font-size: 13px; line-height: 1.8; background: var(--nb-hover); border-bottom: 1px solid var(--nb-line); }
.dxeb-empty-view i { display: block; margin-bottom: 10px; font-size: 28px; opacity: .5; }
.dxeb-viewer.is-full { position: fixed; inset: 0; z-index: 99990; display: flex; flex-direction: column; padding: 0 20px; background: var(--nb-card); border: 0; }
.dxeb-viewer.is-full .dxeb-vmain { flex: 1; min-height: 0; }
.dxeb-viewer.is-full .dxeb-pagebox, .dxeb-viewer.is-full .dxeb-thumbs { max-height: none; }
.dxeb-dl { background: var(--nb-btn) !important; border-color: var(--nb-btn) !important; color: var(--nb-on-btn) !important; }
.dxeb-dl:hover { background: var(--nb-acid) !important; border-color: var(--nb-acid) !important; color: #20231f !important; }
html body.dark .nb .dxeb-dl, html body.dark .nb .dxeb-dl * { background: var(--nb-btn) !important; border-color: var(--nb-btn) !important; color: var(--nb-on-btn) !important; }


/* ── 글쓰기 : PDF 올리기 ── */
.dxeb-up { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--nb-line); border-radius: 4px; background: var(--nb-card); }
.dxeb-up .ic { flex: none; width: 48px; height: 64px; border: 1px solid var(--nb-line); border-radius: 3px; background: #fff; overflow: hidden; }
.dxeb-up .ic canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.dxeb-up .bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.dxeb-up .l1 { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.dxeb-up .l1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.dxeb-up .l1 span { flex: none; color: var(--nb-mute); font-size: 12px; }
.dxeb-up .bar { height: 4px; border-radius: 99px; background: var(--nb-line); overflow: hidden; }
.dxeb-up .bar i { display: block; width: 0; height: 100%; background: var(--nb-ink); transition: width .2s; }
.dxeb-up .st { font-size: 12px; font-weight: 700; color: var(--nb-mute); }
.dxeb-up .st.err { color: var(--nb-danger); }
.dxeb-covers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.dxeb-covers > p { flex-basis: 100%; margin: 0 0 2px; font-size: 12px; color: var(--nb-mute); }
.dxeb-cv { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: var(--nb-mute); font-size: 11px; font-weight: 700; }
.dxeb-cv .im { display: flex; align-items: center; justify-content: center; width: 76px; min-height: 100px; border: 1.5px solid var(--nb-line); border-radius: 3px; background: #fff; overflow: hidden; }
.dxeb-cv .im canvas { display: block; width: 100%; height: auto; }
.dxeb-cv.on { color: var(--nb-ink); font-weight: 900; }
.dxeb-cv.on .im { border-color: var(--nb-ink); border-width: 2px; }
.dxeb-extra { margin-top: 14px; font-size: 13px; }
.dxeb-extra summary { cursor: pointer; font-weight: 800; }
.dxeb-extra input[type=file] { display: block; max-width: 100%; margin: 10px 0 4px; font-size: 12px; }
.dxeb-curfile { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--nb-line); border-radius: 4px; background: var(--nb-hover); font-size: 13px; }
.dxeb-curfile > i { font-size: 18px; color: var(--nb-mute); width: 28px; text-align: center; }
.dxeb-curfile b { display: block; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dxeb-curfile small { color: var(--nb-mute); font-size: 11px; }
.dxeb-exrow { display: flex; margin-top: 8px; }

@media (max-width: 900px) { .dxeb-thumbs { display: none; } .dxeb-pagebox { padding: 16px 12px 22px; } }
@media (max-width: 767px) {
  .dxeb-vtool .zm { display: none; }
  .dxeb-vtool { justify-content: center; }
  .dxeb-vmain { min-height: 260px; }
  .dxeb-pagebox { padding: 12px 8px 16px; max-height: none; }
  .dxeb-grid .gl55-thumb-wrap { aspect-ratio: 3 / 4; }
}
@media (prefers-reduced-motion: reduce) { .dxeb-spin { animation: none; } }

/* ── 상세 : 뷰어 카드 + 오른쪽 정보 ── */
.dxeb-split { display: block; margin-top: 20px; }
.dxeb-split .dxeb-viewer { border: 1px solid var(--nb-line); border-radius: 16px; background: var(--nb-card); overflow: hidden; }
.dxeb-split .dxeb-vtool { padding: 14px 16px; }
.dxeb-split .dxeb-thumbs { padding: 14px 10px; }
.dxeb-side { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.dxeb-card { border: 1px solid var(--nb-line); border-radius: 16px; background: var(--nb-card); padding: 22px 22px 20px; min-width: 0; }
.dxeb-card h3 { margin: 0 0 16px; font-size: 15px; font-weight: 800; color: var(--nb-ink); }
.dxeb-file { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--nb-hover); }
.dxeb-file .ic { flex: none; width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(224, 60, 90, .1); color: #e03c5a; font-size: 18px; }
.dxeb-file .tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dxeb-file b { font-size: 14px; font-weight: 800; color: var(--nb-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dxeb-file em { font-style: normal; font-size: 12px; color: var(--nb-mute); }
.dxeb-dl2 { margin: 10px 0 0; }
.dxeb-dl2 > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 13px; }
.dxeb-dl2 dt { color: var(--nb-mute); }
.dxeb-dl2 dd { margin: 0; font-weight: 800; color: var(--nb-ink); }
.dxeb-desc .dx-post-body { padding: 0; margin: 0; border: 0; min-height: 0; font-size: 14px; line-height: 1.8; }
.dxeb-desc.dxeb-nobody { display: none; }
.dx-action-bar { margin-top: 20px; }
.dxeb-del { color: #d63a3a !important; }
.dxeb-del i { color: #d63a3a; }
@media (min-width: 1000px) {
  .dxeb-split.has-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 20px; align-items: start; }
  .dxeb-split.has-side .dxeb-side { margin-top: 0; }
}
@media (max-width: 767px) { .dxeb-card { padding: 18px 16px; border-radius: 14px; } .dxeb-split .dxeb-viewer { border-radius: 14px; } }
.dx-action-bar { border-top: 0 !important; padding-top: 0 !important; margin-top: 24px; }

/* 글 아래 목록도 같은 세로형 PDF 카드 */
.dx-gl-lt-grid.dxeb-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dxeb-grid .dx-gl-lt-thumb-wrap { aspect-ratio: 4 / 5; background: var(--nb-hover); }
.dxeb-grid .dx-gl-lt-thumb { object-fit: cover; object-position: top center; background: #fff; }
.dxeb-grid .dx-gl-lt-empty-img { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 30px; color: var(--nb-mute); opacity: .5; }
.dxeb-grid .dx-gl-lt-now { top: auto !important; bottom: 44px !important; left: 10px !important; }
.dxeb-grid .dx-gl-lt-cat { top: 10px; bottom: auto; }

/* 위 도구 줄 · 아래 버튼 줄 · 첨부파일 간격 */
.dxeb-topbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.dx-file-box { margin-top: 32px !important; }
.dx-action-bar { margin-top: 28px !important; }

/* ============================================================
 * v1.0 전자책 : 책 보기 · 효과 · 읽어주기 · 번역 · 목록 5종
 * ============================================================ */
.dxeb-chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border: 1px solid var(--nb-line); border-radius: 99px; background: var(--nb-card); color: var(--nb-ink); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.dxeb-chip i { font-size: 12px; }
.dxeb-chip .cv { font-size: 9px; color: var(--nb-mute); }
.dxeb-chip:hover { border-color: var(--nb-ink); }
.dxeb-chip.on { background: var(--nb-acid); border-color: var(--nb-acid); color: #20231f; }
.dxeb-vtool .tl { flex-wrap: wrap; justify-content: center; }
.dxeb-viewer { position: relative; }

.dxeb-pagebox { padding: 28px 56px 36px; background: var(--nb-hover); align-items: center; }
.dxeb-stage { position: relative; flex: none; margin: 0 auto; }
.dxeb-layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; backface-visibility: hidden; }
.dxeb-slot { position: absolute; top: 0; left: 0; background: #fff; overflow: visible; border: 1px solid var(--nb-line); box-sizing: border-box; }
.dxeb-slot.blank { background: transparent; border-color: transparent; }
.dxeb-slot .dxeb-pcv { position: absolute; inset: 0; width: 100%; height: 100%; background: #fff; }
.dxeb-slot.leaf { transform-style: preserve-3d; }
.dxeb-slot.leaf .dxeb-pcv { backface-visibility: hidden; }
.dxeb-face.back { position: absolute; inset: 0; transform: rotateY(180deg); backface-visibility: hidden; background: #fff; }
.dxeb-face.back .dxeb-pcv { position: absolute; inset: 0; width: 100%; height: 100%; }
.dxeb-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,0)); opacity: 0; }
.dxeb-spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 30px; margin-left: -15px; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,.14) 50%, rgba(0,0,0,0)); }
.dxeb-ov { position: absolute; inset: 0; pointer-events: none; }
.dxeb-hl { position: absolute; background: rgba(215,246,79,.55); border-radius: 2px; mix-blend-mode: multiply; }
.dxeb-tapz { position: absolute; pointer-events: auto; cursor: pointer; border-bottom: 2px solid rgba(32,35,31,.35); }
.dxeb-tapz:hover { background: rgba(215,246,79,.45); }
.dxeb-layer.clone { pointer-events: none; }

.dxeb-edge { position: absolute; top: 50%; z-index: 6; width: 44px; height: 44px; margin-top: -22px; border: 1px solid var(--nb-line); border-radius: 50%; background: var(--nb-card); color: var(--nb-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; }
.dxeb-edge.prev { left: 8px; } .dxeb-edge.next { right: 8px; }
.dxeb-edge:hover:not(:disabled) { background: var(--nb-acid); border-color: var(--nb-acid); color: #20231f; }
.dxeb-edge:disabled { opacity: .3; cursor: default; }
.dxeb-toast { position: absolute; left: 50%; bottom: 14px; z-index: 8; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px); padding: 10px 14px; border-radius: 99px; background: var(--nb-ink); color: var(--nb-card); font-size: 12px; font-weight: 700; transition: .25s; }
.dxeb-toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.dxeb-toast button { border: 0; padding: 5px 11px; border-radius: 99px; background: var(--nb-acid); color: #20231f; font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; }

/* 팝업 */
.dxeb-pop { position: absolute; z-index: 40; top: 62px; right: 16px; width: 340px; max-width: calc(100% - 24px); max-height: calc(100% - 80px); overflow-y: auto; padding: 16px 16px 14px; border: 1px solid var(--nb-ink); border-radius: 16px; background: var(--nb-card); color: var(--nb-ink); }
.dxeb-pop[hidden] { display: none; }
.dxeb-pop.fx { right: auto; left: 50%; margin-left: -170px; }
.dxeb-pop-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 14px; }
.dxeb-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--nb-hover); color: var(--nb-ink); font-size: 18px; line-height: 1; cursor: pointer; }
.dxeb-fxgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.dxeb-fxb { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--nb-line); border-radius: 10px; background: var(--nb-card); color: var(--nb-ink); font: inherit; font-size: 12px; font-weight: 800; text-align: left; cursor: pointer; }
.dxeb-fxb .n { min-width: 16px; font-size: 10px; color: var(--nb-mute); }
.dxeb-fxb.on { background: var(--nb-ink); border-color: var(--nb-ink); color: var(--nb-card); }
.dxeb-fxb.on .n { color: var(--nb-acid); }
.dxeb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.dxeb-row.col { flex-direction: column; align-items: stretch; gap: 7px; }
.dxeb-row .lb { font-size: 12px; font-weight: 800; color: var(--nb-mute); display: flex; justify-content: space-between; }
.dxeb-row .lb b { color: var(--nb-ink); }
.dxeb-seg { display: flex; padding: 3px; border-radius: 10px; background: var(--nb-hover); gap: 2px; }
.dxeb-seg button { flex: 1; height: 32px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--nb-mute); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.dxeb-seg button.on { background: var(--nb-card); color: var(--nb-ink); outline: 1px solid var(--nb-ink); }
.dxeb-sel { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--nb-line); border-radius: 10px; background: var(--nb-card); color: var(--nb-ink); font: inherit; font-size: 13px; }
.dxeb-rng { width: 100%; accent-color: #20231f; }
html body.dark .dxeb-rng { accent-color: #d7f64f; }
.dxeb-sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; cursor: pointer; }
.dxeb-sw span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.dxeb-sw em { font-style: normal; font-size: 11px; color: var(--nb-mute); }
.dxeb-sw input { position: absolute; opacity: 0; pointer-events: none; }
.dxeb-sw i { position: relative; flex: none; width: 42px; height: 24px; border-radius: 99px; background: var(--nb-line); transition: .2s; }
.dxeb-sw i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.dxeb-sw input:checked + i { background: var(--nb-ink); }
html body.dark .dxeb-sw input:checked + i { background: #d7f64f; }
.dxeb-sw input:checked + i::after { transform: translateX(18px); }
.dxeb-act { display: flex; gap: 8px; margin-top: 16px; }
.dxeb-btn { flex: 1; height: 40px; border: 1px solid var(--nb-line); border-radius: 10px; background: var(--nb-card); color: var(--nb-ink); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.dxeb-btn.dark { background: var(--nb-ink); border-color: var(--nb-ink); color: var(--nb-card); }
.dxeb-now { min-height: 54px; padding: 12px; border-radius: 12px; background: var(--nb-hover); font-size: 13px; line-height: 1.65; font-family: 'Noto Serif KR', serif; }
.dxeb-tp { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.dxeb-rb { width: 40px; height: 40px; border: 1px solid var(--nb-line); border-radius: 50%; background: var(--nb-card); color: var(--nb-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.dxeb-rb.big { width: 56px; height: 56px; border: 0; background: var(--nb-acid); color: #20231f; }
.dxeb-help { margin: 12px 0 0; font-size: 11px; line-height: 1.6; color: var(--nb-mute); }

/* 번역 상자 */
.dxeb-trbox { border-top: 1px solid var(--nb-line); background: var(--nb-card); max-height: 300px; overflow-y: auto; padding: 14px 18px 16px; }
.dxeb-trbox[hidden] { display: none; }
.dxeb-trh { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.dxeb-trh .st { color: var(--nb-mute); font-size: 11px; margin-right: auto; }
.dxeb-trh b { }
.dxeb-trr { padding: 9px 0; border-top: 1px solid var(--nb-line); font-size: 13px; line-height: 1.7; }
.dxeb-trr .o { color: var(--nb-mute); font-size: 12px; }
.dxeb-trr .t { font-weight: 700; color: var(--nb-ink); }
.dxeb-trr .t.bad { color: var(--nb-danger); font-weight: 600; }
.dxeb-trbox.mode-side .dxeb-trr { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dxeb-trn { margin: 0; font-size: 13px; color: var(--nb-mute); }
.dxeb-bubble { position: absolute; z-index: 30; width: 260px; padding: 11px 13px; border-radius: 12px; background: var(--nb-ink); color: var(--nb-card); font-size: 13px; line-height: 1.6; font-weight: 600; }

/* 읽는 중 막대 */
.dxeb-mini { position: absolute; left: 50%; bottom: 66px; z-index: 35; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; width: min(560px, calc(100% - 24px)); padding: 8px 10px 8px 14px; border-radius: 14px; background: #20231f; color: #fff; }
.dxeb-mini[hidden] { display: none; }
.dxeb-mini .dot { flex: none; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #d7f64f; }
.dxeb-mini .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.dxeb-mini button { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.dxeb-mini button.main { width: 38px; height: 38px; background: #d7f64f; color: #20231f; }
.dxeb-viewer:not(.is-full) .dxeb-mini { bottom: 14px; }
.dxeb-mbar { display: none; }
.dxeb-viewer.is-full .dxeb-pagebox { padding: 16px 56px; }
.dxeb-viewer.is-full .dxeb-pop { top: 70px; }

/* ── 목록 5종 ── */
.dxeb-types { display: inline-flex; flex: none; padding: 3px; border: 1px solid var(--nb-line); border-radius: 12px; background: var(--nb-card); gap: 2px; }
.dxeb-types button { width: 36px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--nb-mute); font-size: 14px; cursor: pointer; }
.dxeb-types button.on { background: var(--nb-ink); color: var(--nb-card); }
html body.dark .dxeb-types button.on { background: #d7f64f; color: #20231f; }
.dxeb-sub { margin: 0 0 6px; font-size: 11px; font-weight: 700; color: var(--nb-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dxeb-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.12); display: none; }
.dxeb-prog i { display: block; height: 100%; background: #d7f64f; }
.dxeb-prog.on { display: block; }

/* B 책장 */
.gl55-grid.dxeb-grid.t-b { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 18px; padding-bottom: 0; }
.t-b .gl55-card-wrap { position: relative; padding-bottom: 26px; }
.t-b .gl55-card-wrap::after { content: ''; position: absolute; left: -9px; right: -9px; bottom: 0; height: 12px; border-radius: 3px; background: var(--nb-ink); }
.t-b .gl55-card { border: 0; background: transparent; border-radius: 0; }
.t-b .gl55-thumb-wrap { border-radius: 3px 3px 0 0; border: 1px solid var(--nb-line); }
.t-b .gl55-body, .t-b .gl55-foot { display: none; }
.t-b .gl55-card-wrap:hover .gl55-body { display: block; position: absolute; left: 0; right: 0; bottom: 30px; z-index: 3; padding: 10px; border-radius: 10px; background: var(--nb-ink); color: var(--nb-card); }
.t-b .gl55-card-wrap:hover .gl55-title, .t-b .gl55-card-wrap:hover .gl55-title a { color: var(--nb-card); font-size: 12px; }
.t-b .gl55-excerpt, .t-b .gl55-tags, .t-b .dxeb-sub { display: none; }
/* C 가로 카드 */
.gl55-grid.dxeb-grid.t-c { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.t-c .gl55-card { flex-direction: row; align-items: stretch; }
.t-c .gl55-thumb-wrap { flex: none; width: 104px; aspect-ratio: auto; height: auto; min-height: 140px; border-radius: 0; }
.t-c .gl55-body { flex: 1; min-width: 0; }
.t-c .gl55-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-c .dxeb-pages, .t-c .dxeb-badge { display: none; }
/* D 표 */
.gl55-grid.dxeb-grid.t-d { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--nb-line); border-radius: 16px; background: var(--nb-card); overflow: hidden; }
.t-d .gl55-card-wrap + .gl55-card-wrap { border-top: 1px solid var(--nb-line); }
.t-d .gl55-card { flex-direction: row; align-items: center; gap: 14px; padding: 10px 16px; border: 0; border-radius: 0; background: transparent; }
.t-d .gl55-thumb-wrap { flex: none; width: 40px; height: 54px; aspect-ratio: auto; border-radius: 3px; }
.t-d .gl55-body { flex: 1; min-width: 0; padding: 0; }
.t-d .gl55-excerpt, .t-d .gl55-tags, .t-d .dxeb-pages, .t-d .dxeb-badge { display: none; }
.t-d .dxeb-sub { margin: 2px 0 0; }
.t-d .gl55-foot { flex: none; padding: 0; border: 0; }
/* E 매거진 */
.gl55-grid.dxeb-grid.t-e { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; }
.t-e .gl55-card-wrap:first-child { grid-column: span 2; grid-row: span 2; }
.t-e .gl55-card-wrap:first-child .gl55-title { font-size: 20px; }
.t-e .gl55-card-wrap:not(:first-child) .gl55-card { flex-direction: row; }
.t-e .gl55-card-wrap:not(:first-child) .gl55-thumb-wrap { flex: none; width: 76px; aspect-ratio: auto; min-height: 100px; border-radius: 0; }
.t-e .gl55-card-wrap:not(:first-child) .gl55-excerpt, .t-e .gl55-card-wrap:not(:first-child) .gl55-tags, .t-e .gl55-card-wrap:not(:first-child) .dxeb-badge, .t-e .gl55-card-wrap:not(:first-child) .dxeb-pages { display: none; }
.t-e .gl55-card-wrap:not(:first-child) .gl55-body { min-width: 0; }
@media (max-width: 1000px) { .gl55-grid.dxeb-grid.t-e { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gl55-grid.dxeb-grid.t-c { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .gl55-grid.dxeb-grid.t-b { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; } .t-e .gl55-card-wrap:first-child { grid-column: span 2; grid-row: auto; } .t-d .gl55-foot { display: none; } }

/* 모바일 보기 : 큰 버튼 줄 + 아래 시트 */
@media (max-width: 767px) {
  .dxeb-vtool .tl, .dxeb-vtool .zm { display: none; }
  .dxeb-pagebox { padding: 14px 10px 18px; }
  .dxeb-edge { display: none; }
  .dxeb-mbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px 12px 12px; border-top: 1px solid var(--nb-line); }
  .dxeb-mbar button { height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--nb-line); border-radius: 12px; background: var(--nb-card); color: var(--nb-ink); font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
  .dxeb-mbar button i { font-size: 16px; }
  .dxeb-pop, .dxeb-pop.fx { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; margin: 0; max-height: 78vh; border-radius: 20px 20px 0 0; border-width: 1px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 99995; }
  .dxeb-mini { position: fixed; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 99994; }
  .dxeb-viewer.is-full .dxeb-mbar { background: var(--nb-card); }
}
@media (prefers-reduced-motion: reduce) { .dxeb-toast { transition: none; } }

/* 목록 5종 보정 : 작은 표지는 칸을 꽉 채우고 잘리지 않게 */
.t-c .gl55-thumb-wrap, .t-d .gl55-thumb-wrap, .t-e .gl55-card-wrap:not(:first-child) .gl55-thumb-wrap { position: relative; overflow: hidden; }
.t-c .gl55-thumb, .t-d .gl55-thumb, .t-e .gl55-card-wrap:not(:first-child) .gl55-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.t-c .gl55-card { min-height: 148px; }
.t-d .gl55-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.t-d .gl55-foot-author { display: none; }
.t-d .gl55-foot-stats { display: flex; gap: 16px; align-items: center; }
.gl55-grid.dxeb-grid.t-e { align-items: start; }
.t-e .gl55-card-wrap:not(:first-child) .gl55-card { min-height: 100px; }
.t-d .gl55-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 20px; align-items: center; }
.t-d .gl55-title { grid-column: 1; margin: 0; }
.t-d .dxeb-sub { grid-column: 1; }
.t-d .gl55-foot { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.t-d .gl55-foot-stats { white-space: nowrap; }
.dx-lh-right2 .dx-sort-btn { white-space: nowrap; }
@media (max-width: 640px) {
  .dx-lh-row2 { flex-wrap: wrap; gap: 10px; }
  .dx-lh-right2 { flex-wrap: wrap; justify-content: flex-start; gap: 8px; width: 100%; }
  .dxeb-types button { width: 32px; height: 32px; font-size: 13px; }
}
