/* YEOKJU private customer-reading layout — original hanji-inspired book styling.
 * No third-party imagery or font files. Print defaults to A4, one story section
 * per new sheet, then flows across pages as needed.
 */
#resultView #result{max-width:910px;margin:0 auto;}
#resultView #result > .manseryeok-result{
  max-width:795px;margin:26px auto 48px!important;
  border:1px solid #d4be9e!important;border-radius:5px!important;
  padding:clamp(24px,5.5vw,54px)!important;
  background:linear-gradient(135deg,rgba(157,122,74,.042),transparent 39%),#f8f3e9!important;
  box-shadow:0 22px 54px #44352218,0 2px 0 #d0b99440!important;
}
.yeokju-customer-reading{
  display:grid;gap:36px;max-width:840px;width:100%;margin:0 auto 80px!important;
  padding:0!important;background:transparent!important;color:#25231e!important;
  border:0!important;box-shadow:none!important;border-radius:0!important;
}
.yeokju-customer-reading .yeokju-paper-sheet{
  position:relative;overflow:hidden;isolation:isolate;
  max-width:840px;min-width:0;min-height:790px;
  border:1px solid #d0bea4;border-radius:3px;
  padding:clamp(29px,6vw,74px) clamp(25px,6vw,78px) 72px;
  color:#2d2923;
  background-color:#f7f1e6;
  background-image:
   radial-gradient(ellipse at 10% 13%,rgba(132,100,54,.055),transparent 44%),
   radial-gradient(ellipse at 89% 85%,rgba(132,100,54,.06),transparent 52%),
   repeating-linear-gradient(19deg,transparent 0 7px,rgba(145,114,76,.008) 8px 9px,transparent 10px 24px),
   repeating-linear-gradient(96deg,transparent 0 13px,rgba(145,114,76,.013) 14px 15px,transparent 16px 38px),
   linear-gradient(145deg,#fdfaf3 0%,#f8f3e9 49%,#f2e9da 100%);
  box-shadow:0 19px 40px #3623191c,0 3px 8px #3623190d;
}
.yeokju-customer-reading .yeokju-paper-sheet::before{
  content:"";position:absolute;pointer-events:none;inset:14px;
  border:1px solid rgba(147,106,58,.22);z-index:-1;
}
.yeokju-customer-reading .yeokju-paper-sheet::after{
  content:"YEOKJU  •  命";display:block;position:relative;
  margin-top:55px;padding-top:16px;border-top:1px solid #ba9e775c;
  font:500 10px/1.6 Georgia,'Noto Serif KR',serif!important;
  letter-spacing:.24em;color:#9a8265!important;text-align:center;
}
.yeokju-customer-reading .yeokju-sheet-kicker{
  display:block;width:max-content;max-width:100%;
  padding:0 0 10px;margin:0 0 24px;
  border-bottom:1px solid #a47d49;color:#a23832!important;
  font:700 12px/1.7 'Noto Serif KR',serif!important;letter-spacing:.18em;
}
.yeokju-customer-reading h2,
.yeokju-customer-reading h3{
  font-family:'Noto Serif KR','Nanum Myeongjo',Georgia,serif!important;
  font-weight:750!important;color:#30271f!important;letter-spacing:-.058em!important;
}
.yeokju-customer-reading h2{
  font-size:clamp(37px,6vw,59px)!important;
  line-height:1.38!important;margin:15px 0 27px!important;
}
.yeokju-customer-reading h3{
  font-size:clamp(27px,4.1vw,40px)!important;
  line-height:1.44!important;margin:0 0 23px!important;
}
.yeokju-customer-reading h4{
  font-family:'Noto Serif KR',serif!important;
  font-size:clamp(18px,2.4vw,23px)!important;
  font-weight:700!important;line-height:1.62!important;
  color:#4b2b26!important;margin:0 0 18px!important;
}
.yeokju-customer-reading p,
.yeokju-customer-reading .yeokju-story-line{
  color:#39342e!important;
  font-family:'Noto Serif KR','Nanum Myeongjo',serif!important;
  font-size:clamp(15.5px,1.45vw,17px)!important;
  font-weight:430!important;line-height:2.05!important;
  letter-spacing:-.045em!important;word-break:keep-all;overflow-wrap:anywhere;
}
.yeokju-customer-reading .yeokju-sheet-desc{
  color:#6b5c4a!important;font-size:16px!important;margin:0 0 29px!important;
  line-height:1.85!important;padding-bottom:22px;border-bottom:1px solid #c7ae895c;
}
.yeokju-customer-reading .yeokju-story-line{margin:0 0 28px!important;}
.yeokju-customer-reading .yeokju-story-label{display:block;
  color:#b73530!important;font-family:Inter,'Noto Sans KR',sans-serif!important;
  font-size:12px!important;font-weight:800!important;line-height:1.5!important;
  letter-spacing:.055em!important;margin-bottom:9px;
}
.yeokju-customer-reading .yeokju-story-cover{
  display:flex;flex-direction:column;text-align:center;
  align-items:center;justify-content:center;min-height:880px!important;
  padding:75px!important;
  background:
   radial-gradient(circle at 50% 48%,#bb955318,transparent 43%),
   repeating-linear-gradient(22deg,transparent 0 14px,#895e3106 16px 18px,transparent 20px 47px),
   linear-gradient(150deg,#faf5eb,#f3e9d7)!important;
}
.yeokju-customer-reading .yeokju-story-cover .yeokju-sheet-kicker{
 border-bottom:none;font-size:14px!important;letter-spacing:.27em!important;
}
.yeokju-customer-reading .yeokju-story-cover h2{max-width:660px;}
.yeokju-customer-reading .yeokju-cover-subtitle{max-width:600px;line-height:1.9!important;color:#594a3e!important;}
.yeokju-customer-reading .yeokju-report-seal{
  display:grid;place-items:center;margin:38px 0;
  width:112px;height:112px;border:2px solid #a13930;border-radius:3px;
  font:650 58px/1 'Noto Serif KR',serif;color:#a13930!important;
  transform:rotate(-2deg);box-shadow:inset 0 0 0 7px #f7efe1,inset 0 0 0 9px #ae7e4c66;
}
.yeokju-customer-reading .yeokju-cover-desc{max-width:560px;color:#736550!important;}
.yeokju-customer-reading .yeokju-era{padding:26px 0 22px;border-top:1px solid #bba68799;break-inside:avoid-page;}
.yeokju-customer-reading .yeokju-era:first-of-type{border-top:0;}
.yeokju-customer-reading .yeokju-year-mini{
  padding:18px 0;border-top:1px solid #ccb99a91;
}
.yeokju-customer-reading .yeokju-year-mini .yeokju-story-line{margin-bottom:20px!important;}
.yeokju-customer-reading .yeokju-year-chooser{
  padding:26px 0;margin-top:24px;border-top:2px double #bca586;
}
.yeokju-customer-reading select{
  display:block;max-width:280px;width:100%;margin:18px 0 28px;
  border:1px solid #bca385;border-radius:3px;
  padding:13px 15px;color:#342820;background:#fff9ed;
  font-size:16px;cursor:pointer;
}
.yeokju-customer-reading .yeokju-story-year-output{
  background:#fffaf0;border:1px solid #d3bea3;
  border-left:3px solid #a23932;padding:clamp(16px,3vw,30px);
}
.yeokju-customer-reading .yeokju-story-disclaimer{
  margin-top:52px!important;padding-top:28px!important;
  border-top:1px solid #bda4818f;
  font-size:12px!important;line-height:1.9!important;color:#70645b!important;
}
@media (max-width:640px){
  .yeokju-customer-reading{gap:19px!important;margin-bottom:42px!important;}
  .yeokju-customer-reading .yeokju-paper-sheet{min-height:610px;padding:42px 26px 52px;border-radius:2px;}
  .yeokju-customer-reading .yeokju-paper-sheet::before{inset:8px;}
  .yeokju-customer-reading .yeokju-story-cover{min-height:680px!important;padding:45px 29px!important;}
  .yeokju-customer-reading .yeokju-story-cover h2{font-size:37px!important;}
  .yeokju-customer-reading p,.yeokju-customer-reading .yeokju-story-line{font-size:15.5px!important;line-height:1.94!important;}
  .yeokju-customer-reading .yeokju-sheet-desc{font-size:14.5px!important;}
  #resultView #result > .manseryeok-result{padding:28px 19px!important;}
}
@page{size:A4;margin:14mm 15mm 16mm}
@media print{
 html,body,main,#resultView,#result{width:100%!important;max-width:none!important;background:white!important;padding:0!important;margin:0!important;}
 #resultView .page-head,#resultView>.privacy-summary,
 #resultView .result-actions,.topbar,footer,.auth-modal{display:none!important;}
 #resultView #result>.manseryeok-result{max-width:none!important;border:0!important;
   min-height:250mm!important;break-before:page!important;break-after:page!important;
   padding:17mm 14mm!important;box-shadow:none!important;background:#faf7ef!important;}
 .yeokju-customer-reading{display:block!important;width:auto!important;max-width:none!important;gap:0!important;margin:0!important;}
 .yeokju-customer-reading .yeokju-paper-sheet{
   display:block!important;width:100%!important;max-width:none!important;min-height:246mm!important;
   border:0!important;border-radius:0!important;box-shadow:none!important;
   break-before:page!important;break-inside:auto!important;
   overflow:visible!important;padding:16mm 13mm 12mm!important;
   print-color-adjust:exact;-webkit-print-color-adjust:exact;
 }
 .yeokju-customer-reading .yeokju-story-cover{min-height:247mm!important;padding:25mm 13mm!important;}
 .yeokju-customer-reading .yeokju-paper-sheet::before{inset:4mm;}
 .yeokju-customer-reading .yeokju-paper-sheet::after{margin-top:22px!important;}
 .yeokju-customer-reading h2{font-size:30pt!important;}
 .yeokju-customer-reading h3{font-size:19pt!important;}
 .yeokju-customer-reading h4{font-size:13pt!important;}
 .yeokju-customer-reading p,.yeokju-customer-reading .yeokju-story-line{
   font-size:10.2pt!important;line-height:1.78!important;orphans:3;widows:3;}
 .yeokju-customer-reading .yeokju-era{break-inside:avoid-page!important;}
 .yeokju-customer-reading .yeokju-story-label{font-size:9pt!important;}
 .yeokju-customer-reading select{display:none!important;}
 .yeokju-customer-reading .yeokju-story-year-output{break-inside:avoid-page!important;}
}


/* Edition 2: distinct A4 leaves with deliberate topic density. */
.yeokju-customer-reading .yeokju-period-sheet,
.yeokju-customer-reading .yeokju-chapter-sheet,
.yeokju-customer-reading .yeokju-story-chapter-followup{
  background-color:#f7f1e7;
  border-color:#cbb08d;
}
.yeokju-customer-reading .yeokju-period-sheet .yeokju-era{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:0;
  border-top:2px solid #a24938;
  margin-top:22px;
  padding-top:12px;
}
.yeokju-customer-reading .yeokju-period-sheet .yeokju-story-line{
  border-bottom:1px solid #bfab8e65;
  padding:18px 0 22px;
  margin:0!important;
}
.yeokju-customer-reading .yeokju-period-sheet .yeokju-story-line:last-child{
  border-bottom:none;
}
.yeokju-customer-reading .yeokju-chapter-sheet .yeokju-story-line{
  padding:10px 0 15px;
  margin:0 0 14px!important;
  border-bottom:1px solid #c4ad8d52;
}
.yeokju-customer-reading .yeokju-chapter-sheet .yeokju-story-line:last-child{
  border-bottom:0;margin-bottom:0!important;
}
.yeokju-customer-reading .yeokju-story-action-letter{
  background-image:
   radial-gradient(circle at 93% 6%,#af4c3712,transparent 36%),
   repeating-linear-gradient(91deg,#79512a04 0 1px,transparent 2px 19px),
   linear-gradient(155deg,#faf6eb,#f3e8d8);
}
.yeokju-customer-reading .yeokju-paper-sheet{
  counter-increment:yeokju-paper;
}
.yeokju-customer-reading{counter-reset:yeokju-paper;}
.yeokju-customer-reading .yeokju-paper-sheet::after{
 content:"YEOKJU  ·  사주 기록  /  " counter(yeokju-paper);
 letter-spacing:.12em;
}
@media (min-width:900px){
  .yeokju-customer-reading .yeokju-paper-sheet{min-height:1110px;}
}
@media(max-width:640px){
 .yeokju-customer-reading .yeokju-period-sheet .yeokju-era{margin-top:11px;}
 .yeokju-customer-reading .yeokju-period-sheet .yeokju-story-line{padding:16px 0;}
 .yeokju-customer-reading .yeokju-chapter-sheet .yeokju-story-line{padding:13px 0;}
}
@media print{
 .yeokju-customer-reading .yeokju-paper-sheet{
   break-before:page!important;
   break-after:page!important;
   min-height:246mm!important;
   break-inside:avoid-page!important;
   padding:13mm 13mm 12mm!important;
 }
 .yeokju-customer-reading .yeokju-story-line{
   break-inside:avoid-page!important;
 }
 .yeokju-customer-reading .yeokju-period-sheet .yeokju-story-line{padding:12px 0 15px;}
 .yeokju-customer-reading .yeokju-chapter-sheet .yeokju-story-line{padding:7px 0 9px;}
 .yeokju-customer-reading .yeokju-paper-sheet::after{position:static;}
}


.report-image-status{
 max-width:840px;margin:14px auto 35px;padding:13px 17px;
 border-left:3px solid #a44334;background:#f7f1e7;
 font:500 13px/1.7 'Noto Sans KR',sans-serif;color:#65523e;
}
#downloadReportImages:disabled{opacity:.6;cursor:progress;}
@media print{
  /* Generic global .result-card avoids are unsafe for a 40+ page report. */
  #resultView #yeokjuCustomerReading{
    display:block!important;
    break-inside:auto!important;
    page-break-inside:auto!important;
    overflow:visible!important;
    box-shadow:none!important;
    border:none!important;
  }
  #resultView #yeokjuCustomerReading .yeokju-paper-sheet{
    box-sizing:border-box!important;
    max-width:none!important;
    break-inside:avoid-page!important;
    break-after:page!important;
    page-break-after:always!important;
    overflow:visible!important;
  }
  #resultView #yeokjuCustomerReading .yeokju-paper-sheet .yeokju-story-line{
    break-inside:avoid-page!important;
  }
  #resultView #yeokjuCustomerReading .yeokju-paper-sheet::before{
    pointer-events:none!important;
  }
  .report-image-status{display:none!important;}
}


/* Traditional-first interpretation is distinguished from, not substituted for,
 * the existing life-coaching prose. Both use the same restrained hanji palette. */
.yeokju-customer-reading .yeokju-classical-intro{
  border-color:#bfa07c;
  background-image:
   radial-gradient(circle at 88% 12%,rgba(153,57,49,.065),transparent 39%),
   repeating-linear-gradient(112deg,transparent 0 9px,rgba(146,110,65,.011) 10px 11px,transparent 12px 26px),
   linear-gradient(145deg,#fcf8ef,#f4eadc);
}
.yeokju-customer-reading .yeokju-classical-intro .yeokju-sheet-kicker{
  color:#a13b33!important;
  letter-spacing:.14em!important;
}
.yeokju-customer-reading .yeokju-chapter-sheet .yeokju-classical-story{
  border-left:2px solid #b18e6b;
  padding-left:18px;
  margin-left:-20px!important;
}
.yeokju-customer-reading .yeokju-classical-story .yeokju-story-label{
  color:#8f3430!important;
}
@media(max-width:640px){
 .yeokju-customer-reading .yeokju-chapter-sheet .yeokju-classical-story{
   margin-left:-6px!important;padding-left:13px;
 }
}
@media print{
 .yeokju-customer-reading .yeokju-chapter-sheet .yeokju-classical-story{
   padding-left:10px;margin-left:-10px!important;
 }
}

/* Canonical numbering for visible web sheets and temporary PDF sheets.
 * The PNG renderer uses the same data-page labels in its raster footer.
 */
#resultView #yeokjuCustomerReading .yeokju-paper-sheet{
 position:relative!important;
}
#resultView #yeokjuCustomerReading .yeokju-paper-sheet::after{
 content:"YEOKJU  •  命"!important;
}
#resultView #yeokjuCustomerReading .yeokju-page-marker{
 position:absolute!important;right:26px;bottom:15px;
 z-index:5;pointer-events:none;
 max-width:80%;
 color:#745b45!important;
 padding:4px 7px;
 background:rgba(250,245,235,.88);
 border:1px solid rgba(168,139,103,.25);
 border-radius:2px;
 text-align:right;
 font:600 12px/1.5 'Noto Sans KR',sans-serif!important;
 letter-spacing:.035em;
}
@media print {
 #resultView #yeokjuCustomerReading .yeokju-page-marker{
  position:absolute!important;right:12mm;bottom:4mm;
  font:600 8.5pt/1.4 'Noto Sans KR',sans-serif!important;
  background:rgba(250,245,235,.92)!important;
  print-color-adjust:exact;-webkit-print-color-adjust:exact;
 }
 #resultView #yeokjuCustomerReading .yeokju-paper-sheet{
  counter-increment:none!important;
 }
}
