:root{
  --bg:#f6f7f9;
  --card:#ffffff;
  --text:#1c2430;
  --muted:#68707c;
  --line:#e4e7ec;
  --brand:#1f7a5a;
  --brand-dark:#175f46;
  --brand-soft:#e7f4ef;
  --warn:#b9541b;
  --radius:14px;
  --max:960px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic","Noto Sans KR",system-ui,sans-serif;
  font-size:16px;
  line-height:1.7;
}
a{color:var(--brand-dark)}
img{max-width:100%}
.wrap{max-width:var(--max);margin:0 auto;padding:0 16px}

/* header */
.site-header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.site-header .wrap{display:flex;align-items:center;gap:12px;min-height:58px;flex-wrap:wrap}
.logo{font-weight:700;font-size:18px;text-decoration:none;color:var(--text);letter-spacing:-.02em}
.logo span{color:var(--brand)}
.nav{margin-left:auto;display:flex;gap:14px;flex-wrap:wrap}
.nav a{font-size:14px;color:var(--muted);text-decoration:none;padding:6px 0}
.nav a:hover,.nav a[aria-current="page"]{color:var(--brand-dark);font-weight:600}

/* hero / sections */
.hero{padding:28px 0 8px}
.hero h1{font-size:26px;line-height:1.35;margin:0 0 8px;letter-spacing:-.03em}
.hero p{margin:0;color:var(--muted);font-size:15px}
main{padding-bottom:32px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;margin:16px 0}
h2{font-size:20px;margin:26px 0 10px;letter-spacing:-.02em}
h3{font-size:17px;margin:20px 0 8px}
p{margin:0 0 12px}
ul,ol{padding-left:20px;margin:0 0 12px}
li{margin:4px 0}
small,.muted{color:var(--muted);font-size:13px}

/* form */
.field{margin-bottom:14px}
.field label{display:block;font-size:14px;font-weight:600;margin-bottom:6px}
.field .hint{display:block;font-size:12px;color:var(--muted);font-weight:400;margin-top:2px}
.input-row{display:flex;align-items:stretch}
input[type="number"],select{
  width:100%;padding:12px 14px;font-size:16px;border:1px solid var(--line);
  border-radius:10px;background:#fff;color:var(--text);appearance:none;
}
input[type="number"]:focus,select:focus{outline:2px solid var(--brand-soft);border-color:var(--brand)}
.suffix{
  display:flex;align-items:center;padding:0 12px;background:#f2f4f6;border:1px solid var(--line);
  border-left:0;border-radius:0 10px 10px 0;font-size:14px;color:var(--muted);white-space:nowrap
}
.input-row input{border-radius:10px 0 0 10px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.actions{display:flex;gap:10px;margin-top:6px;flex-wrap:wrap}
button{
  font:inherit;font-weight:700;border:0;border-radius:10px;padding:13px 18px;cursor:pointer;
}
.btn-primary{background:var(--brand);color:#fff;flex:1}
.btn-primary:hover{background:var(--brand-dark)}
.btn-ghost{background:#fff;color:var(--muted);border:1px solid var(--line)}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.chip{background:#fff;border:1px solid var(--line);border-radius:999px;padding:7px 12px;font-size:13px;color:var(--muted);cursor:pointer}
.chip:hover{border-color:var(--brand);color:var(--brand-dark)}

/* result */
.result{background:var(--brand-soft);border:1px solid #cfe6dd}
.result .big{font-size:30px;font-weight:800;letter-spacing:-.03em;color:var(--brand-dark);margin:2px 0 2px}
.rows{margin-top:12px;border-top:1px dashed #bfdbd0}
.row{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px dashed #bfdbd0;font-size:15px}
.row span:first-child{color:#4a6a5e}
.row span:last-child{font-weight:700;font-variant-numeric:tabular-nums}
table{width:100%;border-collapse:collapse;font-size:14px;margin:0 0 12px}
th,td{border-bottom:1px solid var(--line);padding:9px 6px;text-align:right}
th:first-child,td:first-child{text-align:left}
thead th{background:#f2f4f6;font-size:13px;color:var(--muted)}
.scroll{overflow-x:auto}

/* ads */
.ad-slot{
  margin:20px 0;min-height:100px;display:flex;align-items:center;justify-content:center;
  background:#fff;border:1px dashed var(--line);border-radius:12px;color:#aeb4bd;font-size:12px;
  letter-spacing:.04em;text-align:center;padding:10px;overflow:hidden
}
.ad-slot ins{display:block;width:100%}
.ad-label{display:block;font-size:11px;color:#aeb4bd;margin:0 0 -12px 2px}

/* footer */
.site-footer{background:#fff;border-top:1px solid var(--line);padding:22px 0 34px;font-size:13px;color:var(--muted)}
.site-footer .links{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:10px}
.site-footer a{color:var(--muted);text-decoration:none}
.site-footer a:hover{text-decoration:underline}
.notice{background:#fff8f1;border:1px solid #f0dcc6;color:#7a4a1c;border-radius:12px;padding:12px 14px;font-size:13px}

@media (max-width:640px){
  .hero h1{font-size:22px}
  .grid2{grid-template-columns:1fr}
  .result .big{font-size:26px}
  .nav{width:100%;margin-left:0;gap:12px;border-top:1px solid var(--line);padding-top:6px}
}

/* ---------- multi-slot ---------- */
.total{background:linear-gradient(180deg,#eaf6f1,#ffffff);border:1px solid #cfe6dd}
.total-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.total .big{font-size:30px;font-weight:800;letter-spacing:-.03em;color:var(--brand-dark);margin:2px 0}
.total-meta{font-size:12px;color:var(--muted);background:#fff;border:1px solid var(--line);border-radius:999px;padding:5px 11px;white-space:nowrap}
.total .rows{margin-top:12px;border-top:1px dashed #bfdbd0}
.total-note{display:block;margin-top:10px}

.slot-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:26px}
.slot-bar h2{margin:0}
.btn-sm{padding:8px 13px;font-size:13px;border-radius:9px;flex:0 0 auto}
.btn-danger{background:#fff;color:#b5372c;border:1px solid #f0cdc8}
.btn-danger:hover{background:#fdf3f2}

.slot-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:12px 0 8px}
.slot{
  display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;
  background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:14px;
  font:inherit;font-weight:400;color:var(--text);cursor:pointer;transition:border-color .15s,box-shadow .15s;
}
.slot:hover{border-color:var(--brand);box-shadow:0 2px 10px rgba(31,122,90,.09)}
.slot.active{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}
.slot.empty{background:#fbfcfc;border-style:dashed}
.slot-top{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%}
.slot-name{font-weight:700;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.badge{font-size:11px;font-weight:700;color:var(--brand-dark);background:var(--brand-soft);border-radius:999px;padding:2px 8px}
.slot-amt{font-size:20px;font-weight:800;letter-spacing:-.02em;color:var(--brand-dark);font-variant-numeric:tabular-nums}
.slot.empty .slot-amt{color:#aeb4bd;font-size:15px;font-weight:600}
.slot-sub{font-size:12px;color:var(--muted);line-height:1.5}
.slot-add{align-items:center;justify-content:center;text-align:center;color:var(--muted);border-style:dashed;min-height:104px}
.slot-add .plus{font-size:26px;font-weight:300;line-height:1;color:var(--brand)}

/* slot editor modal */
.modal-backdrop{
  position:fixed;inset:0;z-index:900;background:rgba(20,30,26,.5);
  display:flex;align-items:flex-end;justify-content:center;padding:0;
  -webkit-overflow-scrolling:touch;
}
.modal-backdrop[hidden]{display:none}
.modal{
  background:var(--bg);width:100%;max-width:640px;max-height:92vh;overflow-y:auto;
  border-radius:18px 18px 0 0;box-shadow:0 -6px 40px rgba(0,0,0,.22);
  animation:slotUp .18s ease-out;
}
@keyframes slotUp{from{transform:translateY(24px);opacity:.6}to{transform:translateY(0);opacity:1}}
.modal-body{padding:0 16px}
.modal-body .card:first-child{margin-top:8px}
.modal-foot{position:sticky;bottom:0;background:var(--bg);border-top:1px solid var(--line);padding:12px 16px 16px}
.modal-foot .btn-primary{width:100%}
body.modal-open{overflow:hidden}
.editor-head{
  position:sticky;top:0;z-index:2;background:var(--bg);
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:14px 16px 10px;border-bottom:1px solid var(--line);
}
.editor-head h2{margin:0;font-size:18px}
@media (min-width:641px){
  .modal-backdrop{align-items:center;padding:24px}
  .modal{border-radius:18px;max-height:86vh}
}
input[type="text"]{width:100%;padding:12px 14px;font-size:16px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text)}
input[type="text"]:focus{outline:2px solid var(--brand-soft);border-color:var(--brand)}
.input-row input[type="text"]{border-radius:10px}
.taxinfo{margin-top:10px;background:#f7f9fa;border:1px solid var(--line);border-radius:10px;padding:11px 13px;font-size:12.5px;color:var(--muted);line-height:1.65}
.taxinfo strong{color:var(--text)}
tr.sum td{background:#f7faf9}

@media (max-width:640px){
  .slot-grid{grid-template-columns:1fr 1fr}
  .total .big{font-size:24px}
  .slot-amt{font-size:17px}
}

/* ---------- guide course ---------- */
.course{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  font-size:12.5px;color:var(--muted);margin:18px 0 -6px;
}
.course a{color:var(--brand-dark);text-decoration:none;font-weight:600}
.course a:hover{text-decoration:underline}
.course .stage{background:var(--brand-soft);color:var(--brand-dark);border-radius:999px;padding:3px 10px;font-weight:700}
.course .pos{margin-left:auto;font-variant-numeric:tabular-nums}

.course-block{margin:22px 0}
.course-block h2{font-size:18px;margin:0 0 10px;padding-left:10px;border-left:4px solid var(--brand)}
.course-list{list-style:none;padding:0;margin:0;counter-reset:c}
.course-list li{counter-increment:c;margin:0 0 10px}
.course-list a{
  display:block;background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:13px 15px 13px 52px;position:relative;text-decoration:none;color:var(--text);
  transition:border-color .15s,box-shadow .15s;
}
.course-list a:hover{border-color:var(--brand);box-shadow:0 2px 10px rgba(31,122,90,.09)}
.course-list a::before{
  content:counter(c);position:absolute;left:14px;top:50%;transform:translateY(-50%);
  width:26px;height:26px;border-radius:50%;background:var(--brand-soft);color:var(--brand-dark);
  font-size:13px;font-weight:800;display:flex;align-items:center;justify-content:center;
}
.course-list strong{display:block;font-size:15.5px;margin-bottom:3px}
.course-list span{display:block;font-size:12.5px;color:var(--muted);line-height:1.55}

.pager{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:26px 0 8px}
.pager .pg{
  display:block;background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:12px 14px;text-decoration:none;color:var(--text);
}
.pager .pg:hover{border-color:var(--brand)}
.pager .pg span{display:block;font-size:11.5px;color:var(--muted);margin-bottom:3px}
.pager .pg strong{font-size:14px;line-height:1.45}
.pager .pg-next{text-align:right}
@media (max-width:640px){
  .pager{grid-template-columns:1fr}
  .pager .pg-next{text-align:left}
  .course .pos{display:none}
}

/* ================= 배당 노트 ================= */
.post-list{list-style:none;padding:0;margin:0}
.post-list li{margin:0 0 10px}
.post-list a{
  display:block;background:var(--card);border:1px solid var(--line);border-radius:12px;
  padding:14px 16px;text-decoration:none;color:inherit;
}
.post-list a:hover{border-color:var(--brand);box-shadow:0 2px 10px rgba(31,122,90,.09)}
.post-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);margin-bottom:6px}
.post-cat{background:var(--brand-soft);color:var(--brand-dark);border-radius:999px;padding:2px 9px;font-weight:700}
.post-list strong{display:block;font-size:15.5px;line-height:1.42;margin-bottom:4px}
.post-list .lead{display:block;font-size:12.5px;color:var(--muted);line-height:1.55}

.latest{margin:26px 0 8px;border-top:1px solid var(--line);padding-top:18px}
.latest h2{font-size:18px;margin:0 0 10px}
.latest ul{list-style:none;padding:0;margin:0}
.latest li{border-bottom:1px dashed var(--line);padding:9px 0;font-size:14px}
.latest li:last-child{border-bottom:0}
.latest a{color:inherit;text-decoration:none;display:flex;gap:10px;align-items:baseline}
.latest a:hover strong,.latest a:hover{color:var(--brand-dark)}
.latest time{color:var(--muted);font-size:12.5px;flex:0 0 auto;font-variant-numeric:tabular-nums}
.latest p{margin:10px 0 0;font-size:13.5px}

@media (max-width:640px){
  .post-list a{padding:13px 14px}
  .latest a{flex-direction:column;gap:3px}
}

/* ================= 추천 배당도서 ================= */
.books-hero-note{background:#fffdf7;border:1px solid #ecdfc6;border-radius:12px;padding:12px 14px;font-size:13px;color:#6b5a3a;margin:14px 0 4px}

.shelf-wrap{margin:18px auto 6px;max-width:660px}
.shelf{position:relative;width:100%;aspect-ratio:1/1;margin:0 auto;isolation:isolate;z-index:1}
.shelf[hidden]{display:none}
.shelf::before{ /* 나무 원형 책장 */
  content:"";position:absolute;inset:2%;border-radius:50%;
  background:
    conic-gradient(from -12deg,#b07b45,#d8b084,#b8874f,#cfa877,#a9743f,#d3ab7d,#b07b45);
  -webkit-mask:radial-gradient(closest-side,transparent 63.5%,#000 64.5%);
  mask:radial-gradient(closest-side,transparent 63.5%,#000 64.5%);
  filter:drop-shadow(0 14px 24px rgba(120,85,40,.30));
}
.shelf::after{ /* 안쪽 그림자 */
  content:"";position:absolute;inset:22%;border-radius:50%;
  background:radial-gradient(closest-side,rgba(255,255,255,.85),rgba(255,251,242,.4) 70%,rgba(160,120,70,.10));
  box-shadow:inset 0 0 40px rgba(150,110,60,.14);
}
.shelf-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);text-align:center;z-index:5;color:#7a6444}
.shelf-center strong{display:block;font-size:15px;color:#5d4a2e}
.shelf-center span{display:block;font-size:26px;font-weight:800;color:#8a6a3a;letter-spacing:-.02em}
.shelf-center small{font-size:11.5px;color:#9c8663}

.book{
  position:absolute;width:var(--bw,92px);height:var(--bh,130px);
  transform:translate(-50%,-50%) rotate(var(--tilt,0deg));
  background:none;border:0;padding:0;cursor:pointer;
  transition:transform .18s ease, filter .18s ease;
}
.book:hover,.book:focus-visible{transform:translate(-50%,-50%) rotate(0deg) scale(1.12);z-index:999!important;outline:none}
.book-face{
  display:block;width:100%;height:100%;border-radius:3px 7px 7px 3px;overflow:hidden;
  box-shadow:0 8px 16px rgba(90,60,25,.30), inset -5px 0 10px rgba(0,0,0,.18);
  background:#fff;
}
.book-cover-img{width:100%;height:100%;object-fit:cover;display:block}
.book-cover-gen{
  position:relative;display:flex;flex-direction:column;justify-content:space-between;
  width:100%;height:100%;padding:9px 8px 8px 11px;
  background:linear-gradient(150deg,var(--c,#1f7a5a),#00000033),var(--c,#1f7a5a);
  color:#fff;text-align:left;
}
.book-cover-gen::before{content:"";position:absolute;left:5px;top:0;bottom:0;width:2px;background:rgba(255,255,255,.35)}
.book-cover-title{font-size:11px;font-weight:800;line-height:1.32;letter-spacing:-.02em;overflow:hidden;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical}
.book-cover-author{font-size:9px;opacity:.85;margin-top:4px;line-height:1.2;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.book-no{
  position:absolute;left:-6px;top:-6px;z-index:2;width:22px;height:22px;border-radius:50%;
  background:#fff;color:#8a6a3a;border:2px solid #d8b084;font-size:11px;font-weight:800;
  display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(90,60,25,.25)
}
.book-name{display:none}

/* 좁은 화면: 그리드 */
.book-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px 12px;margin:16px 0;isolation:isolate;z-index:1}
.book-grid[hidden]{display:none}
.book-grid .book{position:static;width:auto;height:auto;transform:none;display:block;text-align:left}
.book-grid .book-face{width:100%;aspect-ratio:1/1.42;height:auto}
.book-grid .book-name{display:block;margin-top:8px;font-size:13.5px;font-weight:700;line-height:1.4;color:var(--text)}
.book-grid .book-no{position:static;display:inline-flex;margin:0 0 6px;border-color:var(--line);color:var(--brand-dark);background:var(--brand-soft)}
.book-grid .book-cover-title{font-size:13px;-webkit-line-clamp:6}
.book-grid .book:hover{transform:none}

/* 팝업 */
.book-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px;
  background:rgba(20,30,26,.5);opacity:0;transition:opacity .18s ease}
.book-modal[hidden]{display:none}
.book-modal.is-open{opacity:1}
.book-panel{background:var(--bg);width:100%;max-width:600px;max-height:88vh;overflow-y:auto;border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);transform:translateY(14px) scale(.98);transition:transform .22s cubic-bezier(.2,.8,.3,1)}
.book-modal.is-open .book-panel{transform:none}
.bm-head{display:flex;gap:16px;padding:20px 20px 14px;border-bottom:1px solid var(--line);position:relative}
.bm-cover{flex:0 0 96px}
.bm-cover .book-cover-gen,.bm-cover .book-cover-img{width:96px;height:136px;border-radius:3px 7px 7px 3px;box-shadow:0 8px 18px rgba(90,60,25,.28);overflow:hidden;display:flex}
.bm-head h2{margin:0 0 4px;font-size:19px;line-height:1.35;letter-spacing:-.02em;padding-right:34px}
.bm-author{margin:0;font-size:13px;color:var(--muted)}
.bm-no{display:inline-block;font-size:11.5px;font-weight:800;color:var(--brand-dark);background:var(--brand-soft);border-radius:999px;padding:2px 9px;margin-bottom:7px}
.bm-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
.bm-tags span{font-size:11.5px;color:var(--muted);background:#fff;border:1px solid var(--line);border-radius:999px;padding:3px 9px}
.bm-close{position:absolute;right:12px;top:12px;width:30px;height:30px;border-radius:50%;border:1px solid var(--line);
  background:#fff;color:var(--muted);font-size:16px;line-height:1;cursor:pointer;padding:0}
.bm-close:hover{border-color:var(--brand);color:var(--brand-dark)}
.bm-body{padding:16px 20px 8px}
.bm-body p{margin:0 0 14px;font-size:14.5px;line-height:1.8}
.bm-points{list-style:none;padding:0;margin:0 0 14px}
.bm-points li{position:relative;padding-left:22px;font-size:13.5px;color:#40514a;margin:0 0 7px}
.bm-points li::before{content:"✓";position:absolute;left:0;top:0;color:var(--brand);font-weight:800}
.bm-foot{padding:0 20px 20px}
.bm-foot .btn-primary{width:100%}
@media (max-width:640px){
  .bm-head{flex-direction:column;gap:12px}
  .bm-cover{flex:none}
  .bm-head h2{font-size:17px}
}

/* ================= 배당 왕가 섹션 ================= */
.royal{margin:34px 0 10px}
.royal h2{margin-top:0}
.royal-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(228px,1fr));margin:14px 0 6px}
.royal-card{background:#fff;border:1px solid var(--line);border-left:4px solid var(--brand);border-radius:12px;padding:14px 15px}
.royal-card h3{margin:0 0 5px;font-size:15.5px}
.royal-card .req{display:inline-block;font-size:11.5px;font-weight:800;color:var(--brand-dark);background:var(--brand-soft);border-radius:999px;padding:2px 9px;margin-bottom:7px}
.royal-card p{margin:0;font-size:13px;color:var(--muted);line-height:1.65}
.royal-card.queen{border-left-color:#b07b45}
.royal-card.queen .req{color:#8a5f2c;background:#fbf1e2}
@media (max-width:640px){ .royal-grid{grid-template-columns:1fr} }

/* 책 팝업 좌우 이동 화살표 */
.bm-nav{
  flex:0 0 auto;width:46px;height:46px;border-radius:50%;border:0;padding:0;cursor:pointer;
  background:rgba(255,255,255,.94);color:#1c2430;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 18px rgba(0,0,0,.28);transition:transform .15s ease, background .15s ease;
}
.bm-nav:hover{background:#fff;transform:scale(1.09)}
.bm-nav:focus-visible{outline:2px solid #fff;outline-offset:2px}
.book-panel.slide-l{animation:bmSlideL .26s cubic-bezier(.2,.8,.3,1)}
.book-panel.slide-r{animation:bmSlideR .26s cubic-bezier(.2,.8,.3,1)}
@keyframes bmSlideL{from{opacity:.35;transform:translateX(18px)}to{opacity:1;transform:none}}
@keyframes bmSlideR{from{opacity:.35;transform:translateX(-18px)}to{opacity:1;transform:none}}
@media (max-width:719px){
  .book-modal{gap:0}
  .bm-nav{position:absolute;top:50%;transform:translateY(-50%);width:38px;height:38px;z-index:6;background:rgba(255,255,255,.95)}
  .bm-nav:hover{transform:translateY(-50%) scale(1.06)}
  .bm-prev{left:7px}
  .bm-next{right:7px}
}

/* 클릭 가능한 왕가 카드 */
.royal-link{display:block;text-decoration:none;color:inherit;cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease}
.royal-link:hover,.royal-link:focus-visible{border-color:var(--brand);box-shadow:0 8px 20px rgba(31,122,90,.13);transform:translateY(-2px);outline:none}
.royal-link .go{display:inline-block;margin-top:10px;font-size:12.5px;font-weight:800;color:var(--brand-dark)}
.royal-link .go::after{content:" ›"}

/* 휴대폰(좁은 화면) 안전장치: aspect-ratio 미지원 브라우저에서도 표지 높이 유지 */
.book-grid .book-face{width:100%;height:0;padding-bottom:142%;position:relative;aspect-ratio:auto}
.book-grid .book-cover-img,.book-grid .book-cover-gen{position:absolute;inset:0;width:100%;height:100%}

/* 팝업 열림을 애니메이션으로 처리(자바스크립트 프레임에 의존하지 않음) */
@keyframes bmFadeIn{from{opacity:0}to{opacity:1}}
.book-modal.is-open{opacity:1;animation:bmFadeIn .2s ease}
