/* 『나만의 사주 명첩(命帖)』 화면 조판 및 A5 소책자 인쇄(@media print) 전용 스타일 */
.fortune-book-wrap{display:grid;gap:16px;margin:14px 0}
.fortune-book-sheet{
  position:relative;
  padding:22px 20px 20px;
  border:1px solid #d9ceb4;
  border-radius:18px;
  background:linear-gradient(170deg,#fffdf7 0%,#f7f0df 100%);
  color:#213126;
  box-shadow:0 10px 26px -10px rgba(42,34,18,.14),inset 0 0 0 4px rgba(255,253,246,.75),inset 0 0 0 5px rgba(182,156,104,.24);
  min-width:0;
}
.book-sheet-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding-bottom:10px;
  margin-bottom:14px;
  border-bottom:1px solid rgba(138,114,68,.22);
  font:700 10.5px/1.2 var(--font-ui,sans-serif);
  letter-spacing:.08em;
  color:#7a643b;
}
.book-cover-sheet{
  padding:28px 22px 22px;
  background:linear-gradient(165deg,#fdfaf0 0%,#f3e7cb 60%,#ead9b5 100%);
  border-color:#cdb483;
}
.book-cover-center{
  display:grid;
  justify-items:center;
  text-align:center;
  gap:8px;
  padding:14px 4px 18px;
}
.book-seal-svg{width:62px;height:62px;display:block;margin-bottom:4px;filter:drop-shadow(0 4px 10px rgba(158,52,43,.22))}
.book-chapter-tag{
  display:inline-flex;
  padding:3.5px 10px;
  border-radius:999px;
  background:#233a2c;
  color:#f5e4b8;
  font:700 10.5px/1.2 var(--font-ui,sans-serif);
  letter-spacing:.08em;
}
.book-cover-title{
  margin:4px 0 0;
  font:700 24px/1.3 var(--font-display,"Gowun Batang",serif);
  color:#1d2f23;
  letter-spacing:-.03em;
}
.book-cover-sub{margin:0;font-size:12.5px;color:#685838;font-weight:600}
.book-cover-chips{justify-content:center;margin:4px 0}
.book-cover-opening{
  margin:6px 0 0!important;
  max-width:32ch;
  font:400 13.5px/1.68 var(--font-display,"Gowun Batang",serif)!important;
  color:#354236!important;
  word-break:keep-all;
}
.book-sheet-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:6px;
  padding-top:11px;
  border-top:1px solid rgba(138,114,68,.22);
  font-size:11px;
  color:#6e5e3f;
}
.book-page-title{
  margin:0 0 4px;
  font:700 19px/1.34 var(--font-display,"Gowun Batang",serif);
  color:#1e3225;
  letter-spacing:-.025em;
}
.book-page-sub{margin:0 0 12px!important;font-size:12px!important;color:#6c7268!important}
.book-lead-quote{
  margin:0 0 12px!important;
  padding:11px 13px;
  border-left:3px solid #9e7b3e;
  border-radius:0 11px 11px 0;
  background:rgba(255,253,247,.82);
  font:600 13.5px/1.62 var(--font-display,"Gowun Batang",serif)!important;
  color:#26392c!important;
}
.book-kv-list{display:grid;gap:9px}
.book-two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:9px}
@media(max-width:380px){.book-two-col{grid-template-columns:1fr}}
.book-kv-item{
  padding:11px 13px;
  border:1px solid #e4dbc6;
  border-radius:12px;
  background:rgba(255,254,250,.86);
  min-width:0;
}
.book-kv-item strong{display:block;margin-bottom:3px;font-size:12.5px;color:#274030}
.book-kv-item p{margin:0!important;font-size:12.8px!important;line-height:1.58!important;color:#3d493f!important;word-break:keep-all}
.book-landscape-frame{margin:6px 0 12px}
.book-body-note{margin:8px 0 0!important;font-size:12.5px!important;line-height:1.58!important;color:#5c6359!important}

.book-daeun-rows{display:grid;gap:7px;margin-bottom:12px}
.book-daeun-row{
  display:grid;
  grid-template-columns:76px minmax(0,1fr);
  align-items:center;
  gap:10px;
  padding:8px 11px;
  border:1px solid #e5decb;
  border-radius:11px;
  background:rgba(255,254,250,.84);
}
.book-daeun-row.is-current{border-color:#2b4c39;background:#eef4ec}
.book-daeun-age strong{display:block;font-size:12px;color:#223729}
.book-daeun-age small{font-size:10.5px;color:#72786f}
.book-daeun-label{display:flex;justify-content:space-between;gap:6px;margin-bottom:4px;font-size:11.5px;color:#38483c}
.book-daeun-label b{color:#254130}
.book-highlight-box{padding:11px 13px;border-radius:12px;background:#eef3ea;border:1px solid #CFD9C9}
.book-highlight-box strong{display:block;font-size:12px;color:#243e2e;margin-bottom:3px}
.book-highlight-box p{margin:0!important;font-size:12.8px!important;color:#334538!important}
.book-month-pills{margin-top:10px}

.book-letter-paragraphs{display:grid;gap:10px;margin:8px 0 16px}
.book-letter-paragraphs p{
  margin:0!important;
  font:400 13.8px/1.76 var(--font-display,"Gowun Batang",serif)!important;
  color:#2b392e!important;
  word-break:keep-all;
}
.book-letter-sign{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  padding-top:12px;
  border-top:1px dashed rgba(138,114,68,.3);
  font:600 12.5px/1.4 var(--font-display,"Gowun Batang",serif);
  color:#5b4d32;
}
.book-mini-stamp{
  display:inline-grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:7px;
  background:#9e342b;
  color:#fff6ea;
  font-style:normal;
  font-size:11px;
  font-weight:700;
}

.book-locked-gate{
  border:1px dashed #c8b07c!important;
  background:linear-gradient(160deg,#fffdf7,#f5ecd7)!important;
}
.book-locked-gate h3{margin:4px 0 6px;font-size:16px;color:#26392c}
.book-locked-list{margin:8px 0 12px;padding-left:18px;display:grid;gap:4px;font-size:12.5px;color:#4a544b}

.moonlight-letter-card{
  position:relative;
  padding:18px 18px 16px;
  border:1px solid #d5decb;
  border-radius:18px;
  background:linear-gradient(160deg,#1c2e24 0%,#263f31 100%);
  color:#f7f1e1;
  margin:12px 0;
}
.moonlight-letter-card .story-overline{color:#dec278}
.moonlight-letter-card h2{margin:4px 0 8px;color:#fff9ec;font-size:18px}
.moonlight-letter-card p{margin:0 0 8px!important;color:#e6ece4!important;font-size:13.2px!important;line-height:1.68!important}
.moonlight-letter-ritual{
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,250,235,.1);
  border:1px solid rgba(235,214,158,.24);
  font-size:12.5px;
  color:#f7e8be;
  margin:10px 0;
}

@page{
  size:A5 portrait;
  margin:11mm;
}
@media print{
  html,body{background:#fff!important;margin:0!important;padding:0!important}
  .floating-header,.screen:not(#book),#book>.result-cover,#book>.result-home,.book-no-print,.reading-top-tools,.share-sheet,.pwa-install-banner{
    display:none!important;
  }
  main.app{max-width:none!important;padding:0!important;margin:0!important}
  #book{display:block!important;padding:0!important;margin:0!important}
  .fortune-book-wrap{display:block!important;margin:0!important}
  .fortune-book-sheet{
    box-shadow:none!important;
    border:1px solid #cbb994!important;
    border-radius:10px!important;
    margin:0 0 8mm 0!important;
    padding:12mm 10mm!important;
    break-inside:avoid;
    page-break-inside:avoid;
    break-after:page;
    page-break-after:always;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  .fortune-book-sheet:last-of-type{
    break-after:auto;
    page-break-after:auto;
  }
}
