/* 장별로 넘기는 결과 화면(청월당 방식). mock.css 위에 얹는다. */
@import url('https://fonts.googleapis.com/css2?family=Gowun+Batang:wght@400;700&family=Nanum+Myeongjo:wght@400;700;800&family=Nanum+Brush+Script&family=Gaegu:wght@700&display=swap');
:root{--paper:#f6f1e7;--frame:#26324a;--hl-g:#d8f2a6;--hl-p:#ffd0d8;--hl-b:#cfe6ff}
body{background:#0e0b0a}
#page{background:#fff;padding:56px 0 76px;min-height:100vh}
/* 위·아래 막대 */
.topbar{position:fixed;top:0;left:50%;transform:translateX(-50%);width:min(430px,100%);z-index:20;background:#fff;border-bottom:1px solid #eee;display:flex;align-items:center;gap:10px;padding:8px 12px;height:52px}
.topbar .seal{flex:none;width:30px;height:30px;border-radius:5px;background:var(--rose);color:#fff;font-family:"Nanum Myeongjo",serif;font-weight:800;font-size:11px;line-height:13px;display:flex;align-items:center;justify-content:center;text-align:center}
.topbar .tt{flex:1;min-width:0}
.topbar .tt b{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar .tt small{display:block;font-size:11px;color:#8a7f72}
.topbar .ic{font-size:18px;color:#555;padding:4px}
.botbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(430px,100%);z-index:20;background:#fff;border-top:1px solid #eee;display:flex;align-items:center;padding:8px 14px;height:58px}
.botbar button{border:0;background:none;font:inherit;color:#333;cursor:pointer}
.botbar .toc-btn{display:flex;flex-direction:column;align-items:center;font-size:10.5px;gap:1px}
.botbar .toc-btn i{font-style:normal;font-size:18px;line-height:1}
.botbar .cnt{flex:1;text-align:center;font-size:12.5px;color:#8a7f72}
.botbar .nv{font-size:22px;padding:4px 12px}
.botbar .nv:disabled{opacity:.25}
.tocpanel{position:fixed;inset:0;z-index:30;background:rgba(20,12,12,.5);display:flex;justify-content:center;align-items:flex-end}
.tocpanel>div{width:min(430px,100%);background:#fff;border-radius:18px 18px 0 0;padding:18px 18px 24px;max-height:80vh;overflow:auto}
.tocpanel h3{font-family:"Nanum Myeongjo",serif;font-size:18px;margin-bottom:10px}
.tocpanel a{display:block;padding:12px 4px;border-bottom:1px solid #f0ebe2;font-size:15px;cursor:pointer}
.tocpanel a.on{color:var(--rose);font-weight:700}
.sec{display:none}.sec.on{display:block}
/* 장 표지 */
.cover{position:relative;overflow:hidden}
.cover img{display:block;width:100%;aspect-ratio:3/4;object-fit:cover;object-position:50% 20%}
.cover:after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(20,12,12,.55),rgba(20,12,12,.05) 34%,rgba(20,12,12,0) 60%,rgba(255,255,255,.95) 100%)}
.cover .ct{position:absolute;left:0;right:0;top:24px;z-index:2;text-align:center;color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.45)}
.cover .ct small{display:block;font-family:"Nanum Myeongjo",serif;font-size:15px;letter-spacing:.3em}
.cover .ct small:after{content:"";display:block;width:56px;height:1px;background:rgba(255,255,255,.8);margin:8px auto 10px}
.cover .ct b{display:block;font-family:"Nanum Myeongjo",serif;font-weight:800;font-size:25px;line-height:1.35;padding:0 24px;text-wrap:balance}
/* 웹툰 칸 */
.strip{display:flex;flex-direction:column;gap:10px;padding:10px 0}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 10px}
.pn{position:relative;overflow:hidden}
.pn img{display:block;width:100%;height:100%;object-fit:cover}
.pn.box{margin:0 10px;border:2px solid #1d1614}
.pn.s1{clip-path:polygon(0 0,100% 0,100% 88%,0 100%)}
.pn.s2{clip-path:polygon(0 10%,100% 0,100% 100%,0 100%)}
.pn.s3{clip-path:polygon(0 0,100% 8%,100% 100%,0 92%)}
.pn.sd{background:#fff;display:flex;justify-content:center}
.pn.sd img{width:58%;height:auto;border-radius:50%;box-shadow:0 0 0 6px #fff,0 0 0 8px #f1e3e6}
.pb{position:absolute;background:#fff;border:1.6px solid #3d3530;border-radius:50%;padding:15px 20px 17px;font-family:"Gowun Batang",serif;font-weight:700;font-size:14.5px;line-height:1.48;text-align:center;letter-spacing:-.02em;color:#1d1614;box-shadow:0 2px 8px rgba(0,0,0,.08);z-index:3}
.pb:after{content:"";position:absolute;bottom:-12px;left:42%;width:16px;height:16px;background:#fff;border-right:1.6px solid #3d3530;border-bottom:1.6px solid #3d3530;transform:skew(-28deg) rotate(40deg);border-radius:0 0 4px 0}
.pb.tr:after{left:auto;right:30%;transform:skew(28deg) rotate(50deg)}
.pb.tl:after{left:24%}
.pb.up:after{bottom:auto;top:-12px;transform:skew(-28deg) rotate(-140deg)}
.pb.no:after{display:none}
.pb b{color:var(--rose)}
.pb.hush{border-style:dashed;color:#5a4f47;font-size:13.5px;box-shadow:none}
.nb{position:absolute;z-index:3;background:#fff;border:1.5px solid #1d1614;padding:8px 13px;font-family:"Gowun Batang",serif;font-weight:700;font-size:13.5px;line-height:1.5;text-align:center;box-shadow:3px 3px 0 rgba(29,22,20,.85)}
.fx{position:absolute;z-index:3;font-family:"Nanum Brush Script","Gaegu",cursive;font-size:44px;line-height:1;color:#f0587a;-webkit-text-stroke:5px #fff;paint-order:stroke fill;transform:rotate(-14deg);pointer-events:none}
.fx.s{font-size:32px}.fx.gold{color:#e7a93a}
/* 종이 카드 글 */
.paperwrap{background:var(--cream);padding:18px 12px 6px}
.paper{position:relative;background:var(--paper);border:1px solid var(--frame);outline:3px double var(--frame);outline-offset:3px;margin:8px 4px 22px;padding:26px 18px 22px}
.paper:before,.paper:after{content:"";position:absolute;top:10px;width:46px;height:20px;opacity:.55;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 20'%3E%3Cg fill='none' stroke='%23c9a45c' stroke-width='1.4'%3E%3Cpath d='M2 18a8 8 0 0 1 16 0M6 18a4 4 0 0 1 8 0M14 18a10 10 0 0 1 20 0M19 18a5 5 0 0 1 10 0M30 18h14'/%3E%3C/g%3E%3C/svg%3E") no-repeat}
.paper:before{left:10px}.paper:after{right:10px;transform:scaleX(-1)}
.paper h3{font-family:"Nanum Myeongjo",serif;font-weight:800;font-size:19px;text-align:center;line-height:1.4;margin-bottom:16px;text-wrap:balance}
.paper h4{font-family:"Nanum Myeongjo",serif;font-weight:800;font-size:15.5px;margin:16px 0 8px}
.paper p{font-family:"Nanum Myeongjo",serif;font-size:15.5px;line-height:1.95;color:#2c2622;word-break:keep-all}
.paper p+p{margin-top:12px}
.paper strong{font-weight:800;background:linear-gradient(transparent 52%,var(--hl-g) 52%)}
.paper mark{background:linear-gradient(transparent 52%,var(--hl-p) 52%);color:inherit}
.paper .num{margin:10px 0 0}
.paper .num div{background:#fff}
.say1{display:flex;gap:10px;align-items:center;margin:4px 6px 20px;background:#fff;border-radius:14px;padding:10px 12px;border:1px solid #efe2d0}
.say1 img{width:52px;height:52px;border-radius:50%;object-fit:cover;object-position:50% 15%;flex:none}
.say1 p{font-family:"Gowun Batang",serif;font-weight:700;font-size:14.5px;line-height:1.55}
.say1 small{display:block;color:var(--rose);font-size:11.5px;font-family:"Pretendard",sans-serif}
/* 명식표 */
.myeong{width:100%;border-collapse:collapse;table-layout:fixed;font-size:11.5px;text-align:center}
.myeong th{font-weight:600;color:#8a7f72;padding:5px 2px;font-size:11px;width:44px}
.myeong td{padding:4px 2px;border-top:1px solid #eee5d6;font-family:"Nanum Myeongjo",serif;line-height:1.3}
.myeong thead td{font-weight:800;font-size:13px;color:#1d1614}
.myeong .gz i{display:block;font-style:normal;color:#fff;border-radius:8px;font-size:24px;font-weight:800;line-height:1.5;margin:1px 2px;position:relative}
.myeong .gz i em{display:block;font-style:normal;font-size:9.5px;font-weight:600;line-height:1;padding-bottom:5px;font-family:"Pretendard",sans-serif}
.myeong .me i{box-shadow:0 0 0 3px #1d1614 inset}
.myeong .sp:after{content:"인연";position:absolute;right:-3px;top:-7px;background:var(--rose);color:#fff;font-size:9px;padding:1px 4px;border-radius:5px;font-family:"Pretendard",sans-serif}
.myeong small{display:block;color:#8a7f72;font-size:10px}
.ohl{display:inline-block;font-size:10.5px;border-radius:999px;padding:1px 7px;margin-left:4px;color:#fff;background:#8f8a99}
.ohl.hi{background:var(--rose)}.ohl.mid{background:#c49a4c}.ohl.ok{background:#5b9e63}.ohl.no{background:#3d3530}
.legend{margin-top:12px;background:#fbf7f0;border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.9}
.legend div{display:flex;justify-content:space-between;border-bottom:1px dotted #e3d6c2}
.legend div:last-child{border:0}
.legend b{color:var(--ink)}
/* 그림 카드(운성·신살) */
.cards{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:6px 4px 18px}
.cardp{position:relative;border-radius:14px;overflow:hidden;aspect-ratio:3/4;box-shadow:0 6px 14px rgba(29,22,20,.18)}
.cardp img{width:100%;height:100%;object-fit:cover;display:block}
.cardp:after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,0) 45%,rgba(20,12,12,.72))}
.cardp .hz{position:absolute;left:0;right:0;top:auto;bottom:24%;z-index:2;text-align:center;font-family:"Nanum Myeongjo",serif;font-weight:800;font-size:46px;line-height:1.05;color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.55);letter-spacing:.05em}
.cardp .cap2{position:absolute;left:8px;right:8px;bottom:10px;z-index:2;text-align:center;color:#fff;font-size:12.5px;line-height:1.45}
.cardp .cap2 b{display:block;font-size:14px}
.cardp .when{position:absolute;left:8px;top:8px;z-index:2;background:rgba(255,255,255,.9);color:var(--ink);border-radius:999px;padding:2px 9px;font-size:11px;font-weight:700}
/* 상대 스케치 */
.mate{background:#eef4fb;border-radius:16px;padding:16px;margin:6px 4px 20px}
.mate small{display:block;text-align:center;font-size:12px;color:#6b7a90}
.mate h3{font-family:"Nanum Myeongjo",serif;font-weight:800;font-size:19px;text-align:center;margin:2px 0 12px}
.mate .face{border-radius:12px;overflow:hidden;background:#e9dccb}
.mate .face img{display:block;width:100%;aspect-ratio:3/4;object-fit:cover}
.mate .q{text-align:center;font-family:"Nanum Myeongjo",serif;font-size:16px;line-height:1.6;padding:16px 8px;border-bottom:1px solid #d6e2ef}
.mate .q:before,.mate .q:after{content:"“";display:block;color:#9fb3cc;font-size:22px;line-height:1}
.mate .q:after{content:"”"}
.mate dl{margin-top:12px}
.mate dt{font-weight:800;font-size:14.5px;margin-top:14px}
.mate dd{font-size:13.5px;color:#4a5566;line-height:1.7;margin-top:4px}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.chips span{border:1px solid #9fb3cc;color:#3b4d66;background:#fff;border-radius:999px;padding:4px 10px;font-size:12.5px}
.chips em{font-style:normal;font-weight:700;color:#6b7a90;margin-right:3px}
/* 편지 */
.envelope{position:relative;margin:10px 18px 22px;background:#fffdf8;border:1px solid #e8dcc6;border-radius:6px;padding:22px 18px 30px;box-shadow:0 8px 20px rgba(29,22,20,.12)}
.envelope h4{font-family:"Nanum Myeongjo",serif;font-weight:800;text-align:center;font-size:16px;margin-bottom:12px}
.envelope p{font-size:14px;color:#5a4f47;text-align:center;border-top:1px solid #efe5d3;padding-top:12px}
.envelope .wax{position:absolute;right:16px;bottom:-16px;width:48px;height:48px;border-radius:50%;background:radial-gradient(circle at 40% 35%,#e0485f,#9c1733 70%);box-shadow:0 3px 6px rgba(0,0,0,.25);color:#ffd9de;font-family:"Nanum Myeongjo",serif;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:18px}
.rate{margin:6px 14px 20px;display:flex;align-items:center;gap:12px;background:#fff6f0;border-radius:14px;padding:14px}
.rate img{width:64px;height:64px;border-radius:50%;object-fit:cover;flex:none;background:#fff}
.rate div{flex:1;font-size:12.5px;color:#8a7f72}
.rate b{display:block;font-size:16px;color:var(--ink);margin:2px 0 8px}
.rate span{display:inline-block;background:var(--rose);color:#fff;border-radius:999px;padding:6px 14px;font-size:13px;font-weight:700}
.pagenext{display:block;margin:6px 18px 10px;background:var(--ink);color:#fff;border-radius:12px;padding:15px;text-align:center;font-size:15.5px;font-weight:700;cursor:pointer}
.tocpanel[hidden]{display:none}
[hidden]{display:none!important}
/* 장 가운데 사이 컷(2026-11-18): 그림은 화면 폭 가득, 풍선은 그림 아래 빈 종이에 */
.dmid{background:var(--cream);padding:6px 0 4px}
.dmid img{display:block;width:100%;border-top:2.5px solid #26221f;border-bottom:2.5px solid #26221f}
.dmid .bub{position:relative;left:auto;top:auto;display:block;width:fit-content;max-width:80%;margin:20px auto 6px;padding:17px 30px 19px}
.dmid .bub:after{top:-19.5px;bottom:auto;left:50%;transform:scaleY(-1)}
/* 세로 장 표지(2026-11-18): 그림을 자르지 않고 화면 가득 세로로, 아래쪽 흰 번짐은 맨 끝에만 */
.cover.tall img{aspect-ratio:9/16;object-position:50% 50%}
.cover.tall:after{background:linear-gradient(to bottom,rgba(20,12,12,.5),rgba(20,12,12,0) 30%,rgba(20,12,12,0) 90%,rgba(255,255,255,.92) 100%)}
/* 보관(2026-11-19): 그림 저장 단추, PDF 단추, 알림 */
.savebtn{display:block;margin:10px auto 2px;padding:9px 18px;border:1px solid #e3c9cf;border-radius:999px;background:#fff;color:var(--rose);font-weight:700;font-size:13.5px;font-family:inherit;cursor:pointer}
.savebtn:disabled{opacity:.5}
.keepbox{margin:18px 18px 6px;padding:16px;border:1px solid #efe2d0;border-radius:16px;background:#fff;text-align:center}
.keepbox button{width:100%;padding:14px;border:0;border-radius:12px;background:#1d1614;color:#fff;font-weight:800;font-size:16px;font-family:inherit;cursor:pointer}
.keepbox button:disabled{opacity:.6}.keepbox p{margin-top:9px;font-size:12.5px;color:#9a8f82;line-height:1.5}
#sayBox{position:fixed;left:50%;bottom:92px;transform:translateX(-50%);z-index:40;background:rgba(29,22,20,.92);color:#fff;font-size:14px;padding:10px 16px;border-radius:999px;opacity:0;pointer-events:none;transition:opacity .2s;white-space:nowrap}
#sayBox.on{opacity:1}
.saveov{position:fixed;inset:0;z-index:50;background:rgba(20,12,12,.72);display:flex;align-items:center;justify-content:center;padding:18px}
.saveov>div{background:#fff;border-radius:18px;padding:16px;max-width:380px;max-height:90vh;overflow:auto;text-align:center}
.saveov img{display:block;width:100%;margin:10px 0;border-radius:10px}.saveov p{font-size:14px;line-height:1.5}
.saveov button{padding:11px 26px;border:0;border-radius:10px;background:#1d1614;color:#fff;font-weight:700;font-size:15px}
/* PDF로 찍는 화면(?print=1): 모든 쪽을 이어서, 막대와 단추 없이 */
body.print{background:#fff}
body.print .topbar,body.print .botbar,body.print .pagenext,body.print .savebtn,body.print .keepbox,body.print #wait{display:none!important}
body.print #page{padding:0;max-width:384px;margin:0 auto;min-height:0;box-shadow:none}
body.print .sec+.sec{break-before:page}
body.print .strip{display:block}body.print .strip>*{margin-bottom:10px}
body.print .pn,body.print .cover,body.print .dmid,body.print .cardp,body.print .mate,body.print .say1{break-inside:avoid}
@page{size:A4;margin:8mm 0}
/* 유료 장부 글·카드 다듬기(2026-11-19 대표 3번: "텍스트 디자인 및 레이아웃, 전체적으로 더 깔끔하고 퀄리티 있게")
   이 파일(reader.css)은 유료 장부 화면에서만 읽으므로 무료·판매 화면은 바뀌지 않는다 */
#page .sum,#page .blk,#page .box{margin:16px 14px 0;border:1px solid #efe3d2;border-radius:20px;box-shadow:0 8px 22px rgba(120,84,60,.07)}
#page .blk,#page .box{padding:20px 18px 18px}
#page .sum{padding:6px 18px}
#page .blk h4,#page .box h4{font-family:"Nanum Myeongjo",serif;font-weight:800;font-size:16.5px;color:var(--ink);letter-spacing:0;margin-bottom:14px;padding-bottom:11px;border-bottom:1px solid #f3eadc;display:flex;align-items:center;gap:8px}
#page .blk h4:before,#page .box h4:before{content:"";flex:none;width:5px;height:16px;border-radius:3px;background:var(--rose)}
#page .sum div{padding:14px 0;align-items:baseline}
#page .sum div+div{border-top:1px solid #f3eadc}
#page .sum em{font-size:13px;color:#9a8f82}
#page .sum b{font-family:"Nanum Myeongjo",serif;font-weight:800;font-size:16px;line-height:1.45;color:var(--ink)}
#page .gauge{width:230px;height:126px;margin-top:8px}
#page .gauge .v b{font-family:"Nanum Myeongjo",serif;font-size:46px}
#page .gauge .v small{font-size:13px;color:#9a8f82}
#page .legend{margin-top:16px;background:#fcf8f1;border:1px solid #f3eadc;border-radius:14px;padding:6px 14px;font-size:13px;line-height:1.5}
#page .legend div{padding:9px 0;border-bottom:1px solid #f1e8da}
#page .legend b{font-weight:700}
#page .blk .sub2{font-size:13px;line-height:1.7;color:#8a7f72;margin-top:14px}
#page .myeong{font-size:12.5px}
#page .myeong th{font-size:12px;width:46px}
#page .myeong td{padding:6px 3px;border-top:1px solid #f3eadc}
#page .myeong thead td{font-size:15px;padding-bottom:8px}
#page .myeong .gz i{border-radius:12px;font-size:26px;margin:2px 3px;box-shadow:0 3px 8px rgba(29,22,20,.12)}
#page .myeong .gz i em{font-size:10.5px;padding-bottom:6px}
#page .myeong .me i{box-shadow:0 0 0 3px #1d1614 inset,0 3px 8px rgba(29,22,20,.12)}
#page .ohb div{font-size:14px;margin-top:10px}
#page .ohb span{height:10px;border-radius:5px}
#page .orbs b{font-size:14px}#page .orbs small{font-size:12px}
#page .bdg p{font-size:13px}#page .bdg .hx b{font-family:"Nanum Myeongjo",serif;font-size:20px}
/* 풀이 글 상자 */
#page .paper{margin:10px 6px 24px;padding:30px 20px 24px}
#page .paper h3{font-size:20px;margin-bottom:18px}
#page .paper p{font-size:16px;line-height:2;color:#2a2420}
#page .paper p+p{margin-top:14px}
#page .paper .num div{font-family:"Nanum Myeongjo",serif;font-size:15px;line-height:1.8}
/* 인연 카드: 파란 바탕을 장부 색에 맞춘다 */
#page .mate{background:#fffaf3;border:1px solid #efe3d2;border-radius:20px;padding:20px 18px;box-shadow:0 8px 22px rgba(120,84,60,.07)}
#page .mate small{color:#9a8f82}
#page .mate h3{font-size:20px;margin:4px 0 14px}
#page .mate .face{border-radius:16px}
#page .mate .q{border-bottom:1px solid #f1e6d6;font-size:16.5px}
#page .mate .q:before,#page .mate .q:after{color:#d9bfa6}
#page .mate dt{font-family:"Nanum Myeongjo",serif;font-size:15.5px;color:var(--rose)}
#page .mate dd{font-size:14px;color:#4d443d;line-height:1.75}
#page .say1{border-radius:18px;padding:14px 16px;border:1px solid #efe3d2;box-shadow:0 6px 16px rgba(120,84,60,.06)}
