/* ==== ebook/list.php ==== */
.content-section { padding:40px 16px 60px; }
.inner { max-width:1080px; margin:0 auto; }
.page-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.page-title { font-size:1.5rem; font-weight:700; }
.page-nav { display:flex; gap:16px; }
.page-nav a { font-size:.9rem; color:#888; text-decoration:none; padding-bottom:2px; }
.page-nav a.nav-active { color:#1a6b3c; font-weight:700; border-bottom:2px solid #1a6b3c; }
.info-banner { background:#fff8e1; border:1px solid #ffe082; padding:12px 16px; border-radius:6px; font-size:.875rem; margin-bottom:20px; }
.info-banner a { color:#1a6b3c; font-weight:600; text-decoration:none; margin-left:8px; }
.ebook-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
.ebook-card { display:block; text-decoration:none; color:inherit; position:relative; }
.ebook-card:hover .ebook-title { color:#1a6b3c; }
.ebook-cover { width:100%; aspect-ratio:3/4; object-fit:cover; border-radius:6px; display:block; border:1px solid #eee; }
.ebook-cover--empty { display:flex; align-items:center; justify-content:center; font-weight:700; color:#aaa; font-size:1.2rem; background:linear-gradient(135deg,#e3f2fd,#bbdefb); border-radius:6px; aspect-ratio:3/4; }
.ebook-info { padding:10px 2px 4px; }
.ebook-title { font-size:.9rem; font-weight:600; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.ebook-summary { font-size:.78rem; color:#888; margin-top:4px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.ebook-price { font-size:.85rem; margin-top:6px; }
.price-original { text-decoration:line-through; color:#bbb; font-size:.75rem; margin-right:6px; }
.price-discount { font-weight:700; color:#1a6b3c; }
.ebook-date { font-size:.75rem; color:#aaa; margin-top:4px; }
.empty-center { text-align:center; padding:60px 0; color:#aaa; }
.pagination { display:flex; justify-content:center; gap:6px; margin-top:40px; }
.pg-btn { display:inline-block; padding:6px 12px; border:1px solid #ddd; border-radius:4px; text-decoration:none; font-size:.85rem; color:#444; }
.pg-btn.on { background:#1a6b3c; color:#fff; border-color:#1a6b3c; }
@media(max-width:900px){ .ebook-grid { grid-template-columns:repeat(3,1fr); } }
@media(max-width:600px){ .ebook-grid { grid-template-columns:repeat(2,1fr); } }

/* ==== ebook/view.php ==== */
/* ── 페이지 ─────────────────────────────────── */
.ebv-page { background:#f4ede3; min-height:60vh; padding:32px 16px 64px; }
.ebv-inner { max-width:860px; margin:0 auto; display:flex; flex-direction:column; gap:20px; }

/* ── 도서 카드 ───────────────────────────────── */
.ebv-book-card {
  background:#fff; border-radius:14px; padding:28px;
  display:grid; grid-template-columns:180px 1fr; gap:28px;
  box-shadow:0 1px 6px rgba(0,0,0,.07);
}
.ebv-cover-img { width:100%; border-radius:6px; border:1px solid #e5ddd4; display:block; }
.ebv-cover-empty { width:100%; aspect-ratio:3/4; background:linear-gradient(135deg,#e8f5e9,#c8e6c9); border-radius:6px; display:flex; align-items:center; justify-content:center; font-weight:700; color:#999; font-size:1.1rem; }
.ebv-title { font-size:1.3rem; font-weight:800; color:#1a2a3a; line-height:1.4; margin-bottom:6px; }
.ebv-date { font-size:.78rem; color:#aaa; margin-bottom:10px; }
.ebv-summary { font-size:.875rem; color:#555; line-height:1.7; margin-bottom:14px; }
.ebv-price { margin-bottom:14px; }
.ebv-price-original { text-decoration:line-through; color:#bbb; font-size:.9rem; margin-right:8px; }
.ebv-price-sale { font-size:1.3rem; font-weight:800; color:#1a6b3c; }
.ebv-price-note { display:block; font-size:.7rem; color:#aaa; margin-top:2px; }
.ebv-versions { font-size:.78rem; background:#f8f5f0; padding:10px 14px; border-radius:6px; margin-bottom:14px; }
.ebv-versions ul { margin:5px 0 0 14px; }
.ebv-versions li { margin-bottom:3px; color:#666; }
.ebv-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.ebv-btn-buy { display:inline-block; padding:10px 20px; background:#1e3a5f; color:#fff; font-weight:700; border-radius:6px; text-decoration:none; font-size:.875rem; }
.ebv-btn-buy:hover { background:#2563eb; }
.ebv-buy-soon { font-size:.82rem; color:#aaa; background:#f4f4f4; padding:9px 16px; border-radius:6px; }
.ebv-btn-back { display:inline-block; padding:7px 14px; border:1px solid #d4ccc4; border-radius:4px; text-decoration:none; font-size:.8rem; color:#888; }

/* ── 저자 소개 ───────────────────────────────── */
.ebv-author-card { background:#fff; border-radius:14px; padding:24px 28px; box-shadow:0 1px 6px rgba(0,0,0,.07); }
.ebv-author-head { font-size:.95rem; font-weight:700; color:#1a2a3a; margin-bottom:10px; display:flex; align-items:center; gap:8px; }
.ebv-author-name { font-size:.9rem; font-weight:700; color:#1e3a5f; margin-bottom:8px; }
.ebv-author-body { font-size:.85rem; color:#555; line-height:1.85; }

/* ── 통계 ────────────────────────────────────── */
.ebv-stats-row { display:grid; grid-template-columns:repeat(6,1fr); gap:10px; }
.ebv-stat { background:#fff; border-radius:10px; padding:14px 12px; border-top:3px solid #ccc; box-shadow:0 1px 4px rgba(0,0,0,.05); display:flex; flex-direction:column; gap:4px; text-decoration:none; cursor:pointer; transition:box-shadow .15s,transform .15s; }
.ebv-stat:hover { box-shadow:0 4px 12px rgba(0,0,0,.1); transform:translateY(-1px); }
.ebv-stat-num { font-size:1.5rem; font-weight:800; line-height:1; }
.ebv-stat-label { font-size:.68rem; color:#888; line-height:1.3; }

/* ── 목차 카드 ───────────────────────────────── */
.ebv-toc-card { background:#fff; border-radius:14px; box-shadow:0 1px 6px rgba(0,0,0,.07); overflow:hidden; }
.ebv-toc-head { display:flex; align-items:flex-start; gap:14px; padding:20px 24px; border-bottom:1px solid #f0e8df; background:#fff; }
.ebv-toc-ico { font-size:1.5rem; line-height:1.2; flex-shrink:0; }
.ebv-toc-title { font-size:.95rem; font-weight:700; color:#1a2a3a; margin-bottom:3px; }
.ebv-toc-sub { font-size:.78rem; color:#aaa; }
.ebv-toc-part { display:flex; align-items:center; gap:10px; padding:10px 24px; background:#f7f3ee; border-bottom:1px solid #ede5da; }
.ebv-part-badge { font-size:.68rem; font-weight:700; color:#9ca3af; letter-spacing:.06em; text-transform:uppercase; min-width:56px; }
.ebv-part-name { font-size:.875rem; font-weight:700; color:#374151; }
.ebv-toc-chapter { display:flex; align-items:center; gap:10px; padding:9px 24px 9px 36px; background:#fcfaf7; border-bottom:1px solid #f4eee6; }
.ebv-ch-badge2 { font-size:.72rem; font-weight:700; color:#1e40af; min-width:52px; flex-shrink:0; }
.ebv-ch-name { font-size:.82rem; font-weight:700; color:#4b5563; }
.ebv-toc-item { padding:11px 24px 11px 52px; border-bottom:1px solid #f0ebe4; transition:background .15s; }
.ebv-toc-item:last-child { border-bottom:none; }
.ebv-toc-item:hover { background:#faf7f4; }
.ebv-item-row { display:flex; align-items:center; gap:12px; }
.ebv-item-title { font-size:.85rem; color:#374151; flex:1; line-height:1.4; }
button.ebv-item-title { background:none; border:none; padding:0; text-align:left; font-family:inherit; }
.ebv-item-title--clickable { cursor:pointer; color:#1e3a5f; }
.ebv-item-title--clickable:hover { color:#2563eb; text-decoration:underline; }
.ebv-item-toggle-ico { display:inline-block; width:16px; font-size:.75rem; color:#9ca3af; }
.ebv-item-summary { margin-top:8px; padding:12px 16px; background:#f7f3ee; border-left:3px solid #1e3a5f; border-radius:0 6px 6px 0; font-size:.8rem; color:#4b5563; line-height:1.7; }
.ebv-ch-btn { flex-shrink:0; padding:4px 12px; background:#1e3a5f; color:#fff; border:none; border-radius:20px; font-size:.72rem; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; gap:3px; white-space:nowrap; text-decoration:none; transition:background .15s; }
.ebv-ch-btn:hover { background:#2563eb; }
.ebv-simple-fb { text-align:center; padding:8px 0; }
.ebv-btn-simple-fb { padding:11px 28px; background:#1e3a5f; color:#fff; border:none; border-radius:8px; font-size:.9rem; font-weight:700; cursor:pointer; }
.ebv-btn-simple-fb:hover { background:#2563eb; }

/* ── 커뮤니티 링크 ──────────────────────────── */
.ebv-com-link { text-align:center; }
.ebv-btn-com { display:inline-block; padding:12px 28px; background:#fff; border:2px solid #1e3a5f; color:#1e3a5f; border-radius:8px; text-decoration:none; font-size:.875rem; font-weight:700; transition:all .2s; }
.ebv-btn-com:hover { background:#1e3a5f; color:#fff; }

/* ── 모달 ────────────────────────────────────── */
.ebvm-overlay { position:fixed; inset:0; background:rgba(20,15,5,.5); z-index:1000; display:flex; align-items:center; justify-content:center; padding:16px; }
.ebvm-box { background:#fff; border-radius:16px; width:100%; max-width:640px; max-height:92vh; overflow-y:auto; box-shadow:0 12px 48px rgba(0,0,0,.22); }
.ebvm-head { display:flex; align-items:flex-start; gap:12px; padding:20px 24px; border-bottom:1px solid #f0e8df; position:sticky; top:0; background:#fff; z-index:1; }
.ebvm-head-ico { font-size:1.4rem; flex-shrink:0; }
.ebvm-head-text h3 { font-size:.95rem; font-weight:700; color:#1a2a3a; }
.ebvm-head-text p { font-size:.78rem; color:#aaa; margin-top:2px; }
.ebvm-close { margin-left:auto; background:none; border:none; font-size:1.1rem; color:#bbb; cursor:pointer; padding:4px 8px; border-radius:4px; }
.ebvm-close:hover { color:#333; background:#f0f0f0; }
.ebvm-body { padding:24px; }
.ebvm-row2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.ebvm-field { margin-bottom:16px; }
.ebvm-field label { display:block; font-size:.8rem; font-weight:600; color:#374151; margin-bottom:5px; }
.ebvm-opt { font-weight:400; color:#9ca3af; }
.ebvm-req { color:#dc2626; }
.ebvm-field input[type=text],
.ebvm-field input[type=email],
.ebvm-field select,
.ebvm-field textarea {
  width:100%; padding:9px 12px; border:1px solid #d4ccc4; border-radius:7px;
  font-size:.875rem; font-family:inherit; background:#fff; box-sizing:border-box;
  transition:border-color .15s;
}
.ebvm-field input:focus,.ebvm-field select:focus,.ebvm-field textarea:focus { outline:none; border-color:#1e3a5f; box-shadow:0 0 0 2px rgba(30,58,95,.1); }
.ebvm-field textarea { resize:vertical; }
.ebvm-types { display:flex; flex-wrap:wrap; gap:8px; }
.ebvm-type-btn { padding:6px 14px; border-radius:20px; border:1.5px solid #d4ccc4; background:#f9f7f4; font-size:.75rem; font-weight:600; color:#6b7280; cursor:pointer; transition:all .15s; font-family:inherit; }
.ebvm-type-btn:hover { border-color:#1e3a5f; color:#1e3a5f; }
.ebvm-submit { width:100%; padding:13px; background:#d1d5db; color:#9ca3af; border:none; border-radius:8px; font-size:.95rem; font-weight:700; cursor:not-allowed; margin-top:4px; font-family:inherit; transition:all .2s; }
.ebvm-submit:not(:disabled) { background:#1e3a5f; color:#fff; cursor:pointer; }
.ebvm-submit:not(:disabled):hover { background:#2563eb; }
.ebvm-notice { font-size:.72rem; color:#aaa; text-align:center; margin-top:10px; }
.ebvm-toast { position:fixed; bottom:32px; left:50%; transform:translateX(-50%); background:#1e3a5f; color:#fff; padding:13px 28px; border-radius:8px; font-size:.875rem; font-weight:600; z-index:2000; box-shadow:0 4px 20px rgba(0,0,0,.2); white-space:nowrap; }

/* ── 반응형 ─────────────────────────────────── */
@media(max-width:680px){
  .ebv-book-card { grid-template-columns:1fr; }
  .ebv-cover { max-width:160px; }
  .ebv-stats-row { grid-template-columns:repeat(3,1fr); }
  .ebvm-row2 { grid-template-columns:1fr; }
  .ebv-toc-item { padding-left:24px; }
  .ebv-item-row { flex-wrap:wrap; gap:8px; }
  .ebv-toc-chapter { padding-left:24px; }
}
@media(max-width:400px){
  .ebv-stats-row { grid-template-columns:repeat(2,1fr); }
}
