/* ==========================================================================
   전자책 도서관 (.ebl) — easyclass 디자인
   · hubasestarter LMS-frontend-admin-hub 의 /library/ 진열 스킨(hb_library)을 복제해 이식
   · 라벤더 그레이 바탕 · 흰 카드(테두리 없이 그림자) · 대문자 회색 라벨 · 오렌지는 «읽기» 버튼과 추천 점에만
   · 표지는 UI 표면이 아니라 작품 — 깊고 차분한 양장본 색을 쓴다
   ========================================================================== */
.ebl {
    --l-bg: #EDEDF5; --l-card: #FFFFFF; --l-panel: #F0E7FB; --l-ink: #1C1C28; --l-sub: #6F7684; --l-mut: #9AA0AC;
    --l-accent: #F97316; --l-accent-soft: #FEEBDC; --l-ok: #2FC272; --l-danger: #F4506B;
    --l-blue: #D9E8F5; --l-purple: #E4D6F7; --l-pink: #F9D2DA; --l-mint: #D8F3E3; --l-yellow: #FCF0D4; --l-gray: #F1F1F6;
    --l-shelf: #DCD5EC; --l-shelf-edge: #BFB5D8; --l-case: #F6F3FB;
    --l-r: 22px; --l-sh: 0 8px 24px rgba(28, 28, 40, .06); --l-maxw: 1240px; --l-bw: 106px; --l-gap: 16px;
    font-family: 'Pretendard', 'Poppins', -apple-system, 'Noto Sans KR', sans-serif;
    width: min(var(--l-maxw), calc(100% - 48px)); margin: 24px auto 72px; color: var(--l-ink); line-height: 1.6;
    -webkit-font-smoothing: antialiased; word-break: keep-all;
}
.ebl *, .ebl *::before, .ebl *::after { box-sizing: border-box; }
.ebl--embed { width: 100%; margin: 0; }
.ebl :where(h1, h2, h3, p) { margin: 0; padding: 0; }
.ebl :where(a) { color: inherit; }
.ebl .eb-ic { display: block; flex-shrink: 0; }
.ebl .msbs-pl__sec[hidden], .ebl .ebl-none[hidden], .ebl [hidden] { display: none !important; }
.ebl-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--l-mut); margin-bottom: 8px; }
.ebl-chip { width: 34px; height: 34px; flex: none; border-radius: 12px; background: var(--tone, var(--l-gray)); display: grid; place-items: center; color: #4A4A5A; }
.ebl .t-blue { --tone: var(--l-blue); } .ebl .t-purple { --tone: var(--l-purple); } .ebl .t-mint { --tone: var(--l-mint); }
.ebl .t-yellow { --tone: var(--l-yellow); } .ebl .t-pink { --tone: var(--l-pink); } .ebl .t-orange { --tone: var(--l-accent-soft); }
.ebl-card { background: var(--l-card); border-radius: var(--l-r); padding: 22px 24px; box-shadow: var(--l-sh); margin: 0 0 20px; }

/* ── 버튼 ── */
.ebl .ebl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--l-gray); color: var(--l-ink); font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, transform .15s, box-shadow .15s; }
.ebl .ebl-btn:hover { background: #E7E7F0; transform: translateY(-1px); }
.ebl .ebl-btn--cta { height: 52px; padding: 0 28px; background: var(--l-accent); color: #fff; font-size: 15px; box-shadow: 0 8px 18px rgba(249, 115, 22, .32); }
.ebl .ebl-btn--cta:hover { background: #EA670C; color: #fff; }
.ebl .ebl-btn--ink { background: var(--l-ink); color: #fff; }
.ebl .ebl-btn--ink:hover { background: #2B2B3A; color: #fff; }
.ebl .ebl-btn--white { background: #fff; box-shadow: var(--l-sh); }
.ebl .ebl-btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.ebl .ebl-btn:disabled, .ebl .ebl-btn.is-off { opacity: .5; pointer-events: none; }
.ebl .ebl-btn:focus-visible { outline: 2px solid var(--l-accent); outline-offset: 2px; }

/* ── 히어로 — 어두운 배경 대신 연보라 패널 ── */
.ebl-hero { background: var(--l-panel); border-radius: var(--l-r); padding: 44px 32px; text-align: center; margin: 0 0 20px; }
.ebl-hero h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; letter-spacing: -.2px; line-height: 1.3; }
.ebl-hero .ebl-sub { font-size: 14px; color: var(--l-sub); margin-top: 8px; }

/* ── 숫자 막대 ── */
.ebl-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ebl-stats { display: flex; gap: 26px; flex-wrap: wrap; }
.ebl-stat { display: flex; align-items: center; gap: 9px; }
.ebl-stat b { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; }
.ebl-stat small { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--l-sub); }
.ebl-top-r { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ebl-tip { font-size: 12.5px; color: var(--l-sub); }
.ebl-views { display: inline-flex; gap: 3px; padding: 4px; border-radius: 14px; background: var(--l-gray); }
.ebl-views a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 10px; color: var(--l-sub); font-size: 13px; font-weight: 700; text-decoration: none; }
.ebl-views a:hover { color: var(--l-ink); }
.ebl-views a.is-on { background: #fff; color: var(--l-ink); box-shadow: 0 2px 8px rgba(28, 28, 40, .1); }
.ebl .ebl-mylink { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 999px; background: var(--l-ink); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.ebl .ebl-mylink:hover { background: #2B2B3A; }

/* ── 카테고리 칩 — 활성만 진하게 ── */
.ebl-tabs { margin: 0 0 22px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ebl .ebl-tab { display: inline-flex; align-items: center; gap: 7px; border: 0; cursor: pointer; background: var(--l-card); color: var(--l-sub); border-radius: 9999px; padding: 9px 17px; font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; box-shadow: var(--l-sh); transition: transform .18s, color .18s; }
.ebl .ebl-tab em { font-style: normal; font-size: 11px; font-weight: 700; background: var(--l-gray); color: var(--l-ink); border-radius: 9999px; padding: 1px 8px; }
.ebl .ebl-tab:hover { transform: translateY(-1px); color: var(--l-ink); }
.ebl .ebl-tab.is-on { background: var(--l-ink); color: #fff; box-shadow: 0 8px 18px rgba(28, 28, 40, .18); }
.ebl .ebl-tab.is-on em { background: rgba(255, 255, 255, .22); color: #fff; }
.ebl .ebl-tab:focus-visible { outline: 2px solid var(--l-accent); outline-offset: 2px; }

/* ══ 진열장 (layout page) — 책장 JS 가 그린 카테고리 섹션을 선반 여러 단으로 ══ */
.ebl .msbs-root { background: transparent; }
.ebl .msbs-page-layout { max-width: none; margin: 0; padding: 0; }
.ebl .msbs-pl__sec { background: var(--l-card); border-radius: var(--l-r); box-shadow: var(--l-sh); padding: 22px 24px 26px; margin-bottom: 20px; }
.ebl .msbs-pl__head { margin: 0 0 4px; gap: 12px; }
.ebl .msbs-pl__icon { width: 40px; height: 40px; border-radius: 13px; box-shadow: none; }
.ebl .msbs-pl__icon--txt { background: var(--l-purple); color: var(--l-ink); font-size: 15px; font-weight: 700; }
.ebl .msbs-pl__name { font-family: inherit; font-size: 17px; font-weight: 700; letter-spacing: -.2px; text-transform: none; color: var(--l-ink); }
.ebl .msbs-pl__count { font-size: 11.5px; font-weight: 700; color: var(--l-sub); background: var(--l-gray); border-radius: 9999px; padding: 3px 11px; }
.ebl .ebl-row { margin-top: 20px; }
.ebl .ebl-row:first-child { margin-top: 6px; }
/* 칸 안쪽을 한 톤 눌러 줘야 «꽂혀 있다»로 읽힌다 */
.ebl .ebl-case { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 0 var(--l-gap); background: var(--l-case); border-radius: 14px 14px 2px 2px; padding: 26px 18px 0; box-shadow: inset 0 10px 14px -10px rgba(28, 28, 40, .22); }
.ebl .msbs-pl__card, .ebl .msbs-pl__card:hover, .ebl .msbs-pl__card:focus, .ebl .msbs-pl__card:active {
    position: relative; flex: 0 0 var(--l-bw); width: var(--l-bw); display: block; padding: 0; margin: 0; border: 0; outline: 0;
    background: transparent; color: inherit; -webkit-appearance: none; appearance: none; transition: transform .22s cubic-bezier(.16, 1, .3, 1); }
.ebl .msbs-pl__card:focus-visible { outline: 2px solid var(--l-accent); outline-offset: 4px; border-radius: 4px; }
.ebl .msbs-pl__card:hover { transform: translateY(-14px); }
.ebl .msbs-pl__cover { width: 100%; height: var(--bh, 176px); aspect-ratio: auto; object-fit: cover; border-radius: 2px 9px 9px 2px;
    box-shadow: inset 6px 0 0 rgba(0, 0, 0, .20), inset -5px 0 0 #F3EEE4, inset -7px 0 0 rgba(0, 0, 0, .14), 0 10px 12px -6px rgba(28, 28, 40, .50); }
.ebl .msbs-pl__card:hover .msbs-pl__cover { box-shadow: inset 6px 0 0 rgba(0, 0, 0, .20), inset -5px 0 0 #F3EEE4, inset -7px 0 0 rgba(0, 0, 0, .14), 0 26px 30px -14px rgba(28, 28, 40, .52); }
.ebl img.msbs-pl__cover { box-shadow: inset 6px 0 0 rgba(0, 0, 0, .14), 0 10px 12px -6px rgba(28, 28, 40, .50); }
.ebl .msbs-pl__cover--txt { font-family: inherit; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; text-align: left; position: relative; padding: 15px 13px 13px; border-radius: 2px 9px 9px 2px; overflow: hidden; }
.ebl .msbs-pl__cover--txt::after { content: ""; position: absolute; inset: 8px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .20); pointer-events: none; }
.ebl .ebl-brand { font-size: 7.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ebl .msbs-pl__cover--txt i { display: block; width: 100%; min-width: 0; font-style: normal; margin-top: auto; font-size: 12.5px; font-weight: 700; line-height: 1.4; letter-spacing: -.2px; white-space: normal; word-break: keep-all; overflow-wrap: break-word; }
.ebl .ebl-au { display: block; margin-top: 8px; font-style: normal; font-size: 8.5px; font-weight: 600; letter-spacing: .06em; opacity: .66; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 추천 표시 — 이 화면의 오렌지 */
.ebl .msbs-pl__card.is-featured::after { background: var(--l-accent); box-shadow: 0 0 0 3px #fff; width: 10px; height: 10px; top: 8px; right: 8px; }
.ebl .ebl-badge { position: absolute; top: -9px; left: 10px; z-index: 2; font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: .04em; border-radius: 9999px; padding: 2px 7px; box-shadow: 0 2px 6px rgba(28, 28, 40, .18); background: #fff; color: var(--l-ink); }
.ebl .ebl-badge.is-free { color: #17864A; background: #E4F7EC; }
.ebl .ebl-badge.is-mine { color: #5B3FA6; background: var(--l-purple); }
.ebl .msbs-pl__ledge { display: block; min-width: 100%; height: 13px; margin: 0; border-radius: 0 0 4px 4px; background: var(--l-shelf); box-shadow: 0 7px 0 var(--l-shelf-edge), 0 18px 22px -12px rgba(28, 28, 40, .34); }
.ebl .ebl-labels { display: flex; flex-wrap: nowrap; gap: 0 var(--l-gap); margin-top: 26px; padding: 0 18px; }
.ebl .ebl-lab { flex: 0 0 var(--l-bw); width: var(--l-bw); }
.ebl .ebl-lab b { font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--l-ink); word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ebl .ebl-lab small { display: block; font-size: 11px; color: var(--l-sub); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ebl .ebl-lab small.is-price { color: var(--l-ink); font-weight: 700; }
.ebl .ebl-lab small.is-price s { color: var(--l-mut); font-weight: 500; margin-right: 3px; }
.ebl .ebl-pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.ebl .ebl-pg, .ebl .ebl-pg:hover, .ebl .ebl-pg:focus, .ebl .ebl-pg:active { border: 0; outline: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700; min-width: 32px; height: 32px; padding: 0 10px; border-radius: 9999px; background: var(--l-gray); color: var(--l-sub); }
.ebl .ebl-pg.is-on { background: var(--l-ink); color: #fff; }
.ebl .msbs-pl__empty, .ebl .msbs-empty { color: var(--l-sub); }
.ebl .ebl-none { text-align: center; color: var(--l-sub); padding: 44px 24px; background: var(--l-card); border-radius: var(--l-r); box-shadow: var(--l-sh); font-size: 13.5px; }

/* ══ 책장 (layout shelf) — 무대 · 선반을 밝게 ══ */
.ebl .msbs-stage { background: var(--l-case); border-radius: var(--l-r); box-shadow: inset 0 14px 22px -14px rgba(28, 28, 40, .24), var(--l-sh); }
.ebl .msbs-stage::before { display: none; }
.ebl .msbs-shelf::before, .ebl .msbs-shelf::after { background: none; }
.ebl .msbs-root .msbs-shelf-ledge, .ebl .msbs-root.shelf-minimal .msbs-shelf-ledge { background: var(--l-shelf); box-shadow: 0 7px 0 var(--l-shelf-edge), 0 18px 22px -12px rgba(28, 28, 40, .34); border: 0; }
.ebl .msbs-root .msbs-shelf-ledge::before, .ebl .msbs-root .msbs-shelf-ledge::after { display: none; }
.ebl .msbs-hint { background: #fff; border: 0; color: var(--l-sub); box-shadow: var(--l-sh); -webkit-backdrop-filter: none; backdrop-filter: none; font-weight: 600; }

/* ══ 펼친 책(상세 팝업) — body 에 붙으므로 .ebl 밖. 막(scrim)만 어둡게, 단추는 이 시스템 색으로 ══ */
.msbs-detail { font-family: 'Pretendard', 'Poppins', -apple-system, 'Noto Sans KR', sans-serif; }
.msbs-detail.is-active { background: rgba(28, 28, 40, .46); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.msbs-page__eyebrow { color: #9AA0AC; letter-spacing: .16em; font-weight: 600; }
.msbs-page__title { font-family: inherit; letter-spacing: -.02em; color: #1C1C28; }
.msbs-page__author { font-style: normal; color: #6F7684; }
.msbs-page__rule { background: #F97316; box-shadow: none; height: 3px; width: 40px; }
.msbs-page__summary { color: #3B3B4A; font-size: 14.5px; }
.msbs-openbook__page .msbs-page__ebook, .msbs-openbook__page button.msbs-page__ebook,
.msbs-openbook__page .msbs-page__ebook:hover, .msbs-openbook__page .msbs-page__ebook:focus, .msbs-openbook__page .msbs-page__ebook:active {
    background: #F97316 !important; color: #fff !important; border: 0 !important; box-shadow: 0 8px 18px rgba(249, 115, 22, .32) !important; font-weight: 700; }
.msbs-openbook__page .msbs-page__ebook:hover { background: #EA670C !important; }
.msbs-openbook__page .msbs-page__ebook:focus-visible { outline: 2px solid #1C1C28 !important; outline-offset: 3px; }
.msbs-page__ebook-price, .msbs-page__ebook-price--free { background: rgba(255, 255, 255, .22); color: #fff !important; font-weight: 700; }
.msbs-page__ebook-price s { opacity: .75; font-weight: 500; }
.msbs-page__ebook-note { color: #6F7684; }
.msbs-page__course { background: #1C1C28; border: 0; box-shadow: 0 8px 18px rgba(28, 28, 40, .18); font-weight: 700; }
.msbs-page__course:hover { box-shadow: 0 12px 24px rgba(28, 28, 40, .24); }
.msbs-detail__close { background: #fff; color: #1C1C28; border: 0; box-shadow: 0 10px 26px rgba(28, 28, 40, .25); -webkit-backdrop-filter: none; backdrop-filter: none; }
.msbs-detail__close:hover { background: #fff; }

/* ══ 책 소개 (/ebooks/{slug}) ══ */
.ebd-crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--l-mut); }
.ebd-crumb a { color: var(--l-sub); text-decoration: none; } .ebd-crumb a:hover { color: var(--l-ink); }
.ebd-hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: center; padding: 34px 40px; }
.ebd-book { position: relative; padding: 26px 26px 0; border-radius: 18px 18px 4px 4px; background: var(--l-case); box-shadow: inset 0 12px 18px -12px rgba(28, 28, 40, .24); }
.ebd-book::after { content: ""; display: block; height: 13px; margin: 0 -26px; background: var(--l-shelf); box-shadow: 0 7px 0 var(--l-shelf-edge), 0 18px 22px -12px rgba(28, 28, 40, .3); border-radius: 0 0 4px 4px; }
.ebd-cover { position: relative; display: flex; flex-direction: column; width: 100%; aspect-ratio: 3 / 4; padding: 26px 22px 22px; border-radius: 3px 14px 14px 3px; overflow: hidden; color: #fff; background: #33302E center / cover no-repeat;
    box-shadow: inset 9px 0 0 rgba(0, 0, 0, .2), inset -7px 0 0 #F3EEE4, inset -10px 0 0 rgba(0, 0, 0, .14), 0 22px 26px -14px rgba(28, 28, 40, .55); }
.ebd-cover.is-txt::after { content: ""; position: absolute; inset: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); pointer-events: none; }
.ebd-cover small { font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; opacity: .72; }
.ebd-cover b { margin-top: auto; font-size: 24px; font-weight: 700; line-height: 1.32; letter-spacing: -.02em; }
.ebd-cover em { margin-top: 12px; font-style: normal; font-size: 12.5px; opacity: .72; }
.ebd-cover.has-img > * { display: none; }
.ebd-info h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.ebd-sub { margin-top: 6px; font-size: 15px; color: var(--l-sub); }
.ebd-by { margin-top: 10px; font-size: 14px; font-weight: 600; }
.ebd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.ebd-tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--l-gray); color: var(--l-sub); font-size: 12px; font-weight: 700; text-decoration: none; }
.ebd-tag.is-blue { background: var(--l-blue); color: #1D5F99; } .ebd-tag.is-mint { background: var(--l-mint); color: #148A4C; }
.ebd-tag.is-purple { background: var(--l-purple); color: #5B3FA6; } .ebd-tag.is-pink { background: var(--l-pink); color: #A3304A; } .ebd-tag.is-yellow { background: var(--l-yellow); color: #96650A; }
.ebd-tag .eb-ic { width: 14px; height: 14px; }
.ebd-excerpt { margin-top: 16px; font-size: 15px; line-height: 1.75; color: #3B3B4A; }
.ebd-buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; padding: 16px 18px; border-radius: 18px; background: var(--l-gray); }
.ebd-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ebd-price b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.ebd-price s { color: var(--l-mut); font-size: 14px; }
.ebd-price .ebd-off { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--l-pink); color: #C2364F; font-size: 12px; font-weight: 800; }
.ebd-price .ebd-free { font-size: 22px; font-weight: 800; color: #148A4C; }
.ebd-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.ebd-note { flex-basis: 100%; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--l-sub); }
.ebd-note b { color: var(--l-ink); }
.ebd-note.is-warn { color: #B45309; }
.ebd-progress { flex-basis: 100%; }
.ebd-bar { height: 6px; border-radius: 999px; background: #fff; overflow: hidden; }
.ebd-bar i { display: block; height: 100%; border-radius: 999px; background: var(--l-ok); }
.ebd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.ebd-grid > .ebl-card { margin: 0; }
.ebd-aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 96px; }
.ebd-aside .ebl-card { margin: 0; }
.ebd-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ebd-h h2 { font-size: 17px; font-weight: 700; }
.ebd-h small { font-size: 12px; color: var(--l-mut); font-weight: 600; }
.ebd-body { font-size: 15px; line-height: 1.8; }
.ebd-body img { max-width: 100%; height: auto; border-radius: 14px; }
.ebd-body h2, .ebd-body h3 { margin: 1.4em 0 .5em; line-height: 1.4; }
.ebd-body p { margin: 0 0 1em; }
.ebd-empty { color: var(--l-mut); font-size: 14px; }
.ebd-toc { display: flex; flex-direction: column; gap: 4px; max-height: 520px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.ebd-toc-part { margin: 10px 2px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--l-mut); }
.ebd-toc-part:first-child { margin-top: 0; }
.ebd-toc-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--l-gray); font-size: 13.5px; font-weight: 600; }
.ebd-toc-row i { min-width: 24px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--l-sub); font-style: normal; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ebd-toc-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebd-toc-row em { font-style: normal; font-size: 11px; font-weight: 700; color: #C2410C; background: var(--l-accent-soft); border-radius: 999px; padding: 2px 8px; }
.ebd-toc-row .eb-ic { color: var(--l-mut); }
.ebd-facts { display: flex; flex-direction: column; gap: 10px; }
.ebd-fact { display: flex; align-items: flex-start; gap: 10px; }
.ebd-fact b { display: block; font-size: 13.5px; font-weight: 700; }
.ebd-fact small { display: block; font-size: 12px; color: var(--l-sub); line-height: 1.55; }
.ebd-related { display: flex; gap: var(--l-gap); align-items: flex-end; overflow-x: auto; padding: 24px 18px 0; background: var(--l-case); border-radius: 14px 14px 2px 2px; box-shadow: inset 0 10px 14px -10px rgba(28, 28, 40, .22); scrollbar-width: thin; }
.ebd-related a { flex: 0 0 var(--l-bw); text-decoration: none; transition: transform .22s cubic-bezier(.16, 1, .3, 1); }
.ebd-related a:hover { transform: translateY(-10px); }
.ebd-mini { display: flex; flex-direction: column; height: 160px; padding: 12px 11px; border-radius: 2px 9px 9px 2px; overflow: hidden; color: #fff; background: #33302E center / cover no-repeat; box-shadow: inset 5px 0 0 rgba(0, 0, 0, .2), inset -4px 0 0 #F3EEE4, inset -6px 0 0 rgba(0, 0, 0, .14), 0 10px 12px -6px rgba(28, 28, 40, .5); }
.ebd-mini b { margin-top: auto; font-size: 12px; font-weight: 700; line-height: 1.4; }
.ebd-mini.has-img b { display: none; }
.ebd-related-ledge { height: 13px; background: var(--l-shelf); box-shadow: 0 7px 0 var(--l-shelf-edge); border-radius: 0 0 4px 4px; margin-bottom: 14px; }

/* ══ 내 전자책 ══ */
.ebm { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.ebm-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding: 18px; border-radius: var(--l-r); background: var(--l-card); box-shadow: var(--l-sh); }
.ebm-cover { display: flex; flex-direction: column; width: 84px; aspect-ratio: 3 / 4; padding: 9px 8px; border-radius: 2px 8px 8px 2px; overflow: hidden; color: #fff; background: #33302E center / cover no-repeat; font-size: 10px; font-weight: 700; line-height: 1.35; text-decoration: none;
    box-shadow: inset 4px 0 0 rgba(0, 0, 0, .2), inset -3px 0 0 #F3EEE4, inset -5px 0 0 rgba(0, 0, 0, .14), 0 10px 12px -6px rgba(28, 28, 40, .5); }
.ebm-cover span { margin-top: auto; }
.ebm-cover.has-img span { display: none; }
.ebm-main { min-width: 0; display: flex; flex-direction: column; }
.ebm-main h3 { font-size: 15px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ebm-main h3 a { text-decoration: none; }
.ebm-main h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ebm-by { font-size: 12px; color: var(--l-sub); margin-top: 2px; }
.ebm-state { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; height: 24px; margin-top: 8px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--l-mint); color: #148A4C; }
.ebm-state.is-soon { background: var(--l-yellow); color: #96650A; }
.ebm-state.is-exp { background: #FDECEF; color: #C2364F; }
.ebm-state.is-free { background: var(--l-blue); color: #1D5F99; }
.ebm-prog { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--l-sub); font-weight: 600; }
.ebm-prog .ebd-bar { flex: 1; background: var(--l-gray); }
.ebm-acts { display: flex; gap: 6px; margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
.ebm-empty { padding: 44px 20px; border-radius: var(--l-r); background: var(--l-card); box-shadow: var(--l-sh); text-align: center; }
.ebm-empty .ebl-chip { margin: 0 auto 10px; width: 44px; height: 44px; border-radius: 14px; }
.ebm-empty b { display: block; font-size: 16px; }
.ebm-empty p { margin: 4px 0 16px; font-size: 13px; color: var(--l-sub); }
.ebl--compact { width: 100%; margin: 0; }

@media (max-width: 960px) {
    .ebd-hero { grid-template-columns: 220px minmax(0, 1fr); gap: 26px; padding: 26px; }
    .ebd-grid { grid-template-columns: 1fr; }
    .ebd-aside { position: static; }
}
@media (max-width: 900px) {
    .ebl { width: calc(100% - 32px); margin-top: 16px; --l-bw: 92px; --l-gap: 12px; }
    .ebl-hero { padding: 32px 20px; }
    .ebl-top { align-items: flex-start; }
    .ebl-stats { gap: 16px 20px; }
    .ebl-top-r { margin-left: 0; width: 100%; }
    .ebl .msbs-pl__sec { padding: 18px 16px 22px; }
}
@media (max-width: 640px) {
    .ebd-hero { grid-template-columns: 1fr; padding: 22px 18px; }
    .ebd-book { max-width: 240px; margin: 0 auto; }
    .ebd-acts { margin-left: 0; width: 100%; }
    .ebd-acts .ebl-btn { flex: 1; }
    .ebl-card { padding: 18px; }
    .ebm { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ebl *, .msbs-detail * { transition: none !important; animation: none !important; } }
