/* 나날서가 하위 페이지 공통 (로그인·가입·내 서재·약관) */
:root{
  --paper:#F5F1E8; --surface:#FFFDF8; --ink:#2A2F3A; --muted:#645E52; --line:#E2D9C6;
  --navy:#34507A; --navy-deep:#253B5C; --navy-soft:#DCE6F0; --sun:#E0702F; --stamp:#B5523B;
  --olive:#58602F; --olive-soft:#E6E9D3; --mustard-soft:#F5E7BE;
  --serif:"Gowun Batang","Nanum Myeongjo","AppleMyungjo",serif;
  --sans:"IBM Plex Sans KR","Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;
  --hand:"Nanum Pen Script","Gowun Batang",cursive;
  --mono:"IBM Plex Mono",ui-monospace,monospace;
  color-scheme:light;
}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:17px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word;min-height:100vh;display:flex;flex-direction:column}
a{color:var(--navy)}
a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--sun);outline-offset:3px;border-radius:6px}
h1,h2,h3{font-family:var(--serif);font-weight:700;line-height:1.3;letter-spacing:-.02em;text-wrap:balance;margin:0}
p{margin:0}
.top{border-bottom:1px solid var(--line);background:var(--paper)}
.top .in{max-width:1120px;margin:0 auto;padding:0 20px;min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink)}
.brand svg{width:34px;height:34px}
.brand b{font-family:var(--serif);font-size:1.25rem;color:var(--navy);letter-spacing:-.04em;line-height:1}
.brand small{display:block;font-size:.68rem;letter-spacing:.2em;color:var(--muted);margin-top:2px}
main{flex:1;width:100%;max-width:520px;margin:0 auto;padding:40px 20px 64px;display:flex;flex-direction:column;gap:22px}
main.wide{max-width:760px}
.hand{font-family:var(--hand);color:var(--stamp);font-size:1.5rem;line-height:1.2}
.sub{color:var(--muted);font-size:.97rem}
.card{background:var(--surface);border:1.5px solid var(--line);border-radius:18px;padding:22px;display:flex;flex-direction:column;gap:14px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:0 20px;border-radius:12px;font:600 1rem var(--sans);text-decoration:none;cursor:pointer;border:1.5px solid var(--navy);background:transparent;color:var(--navy)}
.btn.pri{background:var(--navy);color:#FFFDF8}
.btn.pri:hover{background:var(--navy-deep)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.sm{min-height:42px;padding:0 14px;font-size:.92rem}
.btn.danger{border-color:var(--stamp);color:var(--stamp)}
.social{position:relative;display:flex;align-items:center;justify-content:center;min-height:56px;border-radius:12px;font:600 1.02rem var(--sans);text-decoration:none;padding:0 54px}
.social .lg{position:absolute;left:18px;top:50%;transform:translateY(-50%);width:22px;height:22px;display:flex}
.social .lg svg{width:100%;height:100%}
.social.kakao{background:#FEE500;color:rgba(0,0,0,.85)}
.social.naver{background:#03C75A;color:#fff}
.social.google{background:#fff;color:#1F1F1F;border:1px solid #747775}
.social .recent{position:absolute;right:10px;top:-10px;background:var(--ink);color:var(--paper);font-size:.72rem;font-weight:500;padding:2px 8px;border-radius:999px}
.notice{border-radius:12px;padding:12px 14px;font-size:.95rem;background:var(--mustard-soft)}
.notice.ok{background:var(--olive-soft)}
.notice.err{background:#F6DCD5}
.field{display:flex;flex-direction:column;gap:6px;font-weight:500;font-size:.95rem}
.field input{font:inherit;font-weight:400;min-height:52px;padding:0 14px;border:1.5px solid var(--line);border-radius:12px;background:#FFFDF8;color:var(--ink)}
.field input:focus{border-color:var(--navy);outline:none}
.agree{display:flex;flex-direction:column;border:1.5px solid var(--line);border-radius:14px;overflow:hidden;background:#FFFDF8}
.agree label{display:flex;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid var(--line);min-height:52px;cursor:pointer}
.agree label:first-child{border-top:none;background:var(--paper);font-weight:600}
.agree input{width:22px;height:22px;accent-color:var(--navy);flex:none}
.agree .tag{font-size:.8rem;font-weight:600;color:var(--stamp);flex:none}
.agree .tag.opt{color:var(--muted)}
.agree .t{flex:1}
.agree a{font-size:.85rem;flex:none}
.prov{display:inline-flex;align-items:center;gap:6px;font-size:.85rem;font-weight:600;padding:3px 10px 3px 7px;border-radius:999px}
.prov svg{width:16px;height:16px}
.prov.kakao{background:#FEE500;color:#191600}.prov.naver{background:#03C75A;color:#fff}.prov.google{background:#fff;border:1px solid #747775;color:#1F1F1F}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-size:.97rem}
.kv dt{color:var(--muted)}.kv dd{margin:0}
.switch{display:flex;align-items:center;justify-content:space-between;gap:12px}
.switch input{width:48px;height:28px;accent-color:var(--navy)}
.doc h2{font-size:1.15rem;margin-top:10px}
.doc p,.doc li{color:var(--ink);font-size:.97rem}
.doc ul,.doc ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:4px}
.doc table{width:100%;border-collapse:collapse;font-size:.92rem}
.doc th,.doc td{border:1px solid var(--line);padding:8px 10px;text-align:left;vertical-align:top}
.doc th{background:var(--paper)}
.tbl{overflow-x:auto}
.draft{border:2px dashed var(--stamp);color:var(--stamp);border-radius:12px;padding:10px 14px;font-size:.92rem}
footer{border-top:1px solid var(--line);padding:22px 20px;text-align:center;font-size:.85rem;color:var(--muted)}
footer a{color:var(--muted);margin:0 8px}
[hidden]{display:none!important}

/* ---------- 머리 메뉴 ---------- */
.topnav{display:flex;align-items:center;gap:4px}
.topnav a:not(.btn){color:var(--ink);text-decoration:none;font-size:.95rem;padding:8px 10px;border-radius:8px}
.topnav a:not(.btn):hover{background:var(--line)}
@media (max-width:520px){ .brand small{display:none} .topnav a:not(.btn){padding:8px 6px;font-size:.9rem} .topnav .btn.sm{padding:0 10px} .brand b{font-size:1.1rem} .brand svg{width:30px;height:30px} }
@media (max-width:400px){ .topnav a[href="write.html"]{display:none} }
@media (max-width:340px){ .topnav a[href="shop.html"]{display:none} }
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.small{font-size:.87rem}
.chip{display:inline-block;font-size:.76rem;font-weight:600;padding:2px 9px;border-radius:999px;background:var(--mustard-soft);color:#5F4A10;vertical-align:middle;font-family:var(--sans);letter-spacing:0}
.linkbtn{background:none;border:0;padding:6px 0;color:var(--navy);text-decoration:underline;font:inherit;font-size:.95rem;cursor:pointer;align-self:flex-start}
.row.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.row.two .field input{width:100%;min-width:0}
.row .grow,.btn.grow{flex:1}
.field textarea,.storyedit textarea,#qa{font:inherit;font-weight:400;padding:12px 14px;border:1.5px solid var(--line);border-radius:12px;background:#FFFDF8;color:var(--ink);resize:vertical;line-height:1.75;width:100%}
.field textarea:focus,.storyedit textarea:focus,#qa:focus{border-color:var(--navy);outline:none}
.check{display:flex;gap:12px;align-items:flex-start;cursor:pointer;font-size:.97rem}
.check input{width:22px;height:22px;accent-color:var(--navy);flex:none;margin-top:3px}
.toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:50;max-width:calc(100% - 32px);width:max-content;padding:12px 18px;border-radius:12px;background:var(--ink);color:var(--paper);font-size:.95rem;box-shadow:0 8px 24px rgba(42,47,58,.25)}
.toast.err{background:var(--stamp)} .toast.warn{background:#5F4A10}
.cardtitle{font-size:1.15rem}

/* ---------- 이야기 남기기 ---------- */
.tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;background:var(--line);padding:4px;border-radius:14px;position:sticky;top:8px;z-index:5}
.tabs button{min-height:46px;border:0;border-radius:10px;background:transparent;font:600 .95rem var(--sans);color:var(--muted);cursor:pointer;padding:0 6px}
.tabs button.on{background:var(--surface);color:var(--navy);box-shadow:0 1px 3px rgba(42,47,58,.12)}
.tabs .cnt{display:inline-block;min-width:22px;padding:0 6px;border-radius:999px;background:var(--navy-soft);color:var(--navy);font:500 .8rem var(--mono)}
.pane{display:flex;flex-direction:column;gap:16px}
.askhead{display:flex;flex-direction:column;gap:10px}
.stagepick summary{cursor:pointer;color:var(--navy);font-weight:500;padding:6px 0}
.stagebar{list-style:none;margin:8px 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px}
.stagebar button{position:relative;overflow:hidden;width:100%;min-height:56px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;font:inherit;color:var(--ink)}
.stagebar button .fill{position:absolute;left:0;bottom:0;height:5px;width:calc(var(--p) * 100%);background:var(--sun)}
.stagebar button b{font-size:.92rem;font-weight:600}.stagebar button small{font:.78rem var(--mono);color:var(--muted)}
.stagebar button.on{border-color:var(--navy);background:var(--navy-soft)}
.qcard{gap:16px}
.qcard .why{font-size:.88rem;color:var(--stamp);font-weight:600;margin:0}
.qcard .q{font-size:1.45rem;line-height:1.45;color:var(--ink)}
#qa{min-height:200px;font-size:1.05rem}
.qmeta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px}
.yearin{display:flex;align-items:center;gap:10px;font-size:.95rem;flex-wrap:wrap}
.yearin span{display:inline-flex;align-items:center;gap:6px}
.yearin input{width:110px;min-height:46px;padding:0 12px;border:1.5px solid var(--line);border-radius:10px;font:1rem var(--mono);background:#FFFDF8;color:var(--ink)}
.qbtns .btn{min-height:56px}
.jobs{border:0;padding:0;margin:0;min-width:0;display:flex;flex-direction:column;gap:12px}
.jobs legend{font-weight:600;margin-bottom:8px;padding:0}
.jobgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}
.jobtile{position:relative;display:flex;flex-direction:column;gap:2px;padding:12px 14px;border:1.5px solid var(--line);border-radius:12px;background:#FFFDF8;cursor:pointer;min-height:64px}
.jobtile input{position:absolute;opacity:0;pointer-events:none}
.jobtile b{font-size:.98rem}.jobtile small{font-size:.8rem;color:var(--muted);line-height:1.4}
.jobtile.on{border-color:var(--navy);background:var(--navy-soft)}
.jobtile:focus-within{outline:3px solid var(--sun);outline-offset:2px}
.jobtile .ord{position:absolute;top:8px;right:10px;width:22px;height:22px;border-radius:50%;background:var(--navy);color:#fff;font:600 .8rem/22px var(--mono);text-align:center;font-style:normal}
.jobrow{min-width:0;border:1.5px solid var(--line);border-radius:14px;padding:14px;margin:0;display:flex;flex-direction:column;gap:10px;background:var(--paper)}
.jobrow legend{font-weight:600;padding:0 6px}
.storylist{display:flex;flex-direction:column;gap:8px}
.stagehead{font-size:1.05rem;margin:14px 0 2px;color:var(--navy)}
.story{background:var(--surface);border:1.5px solid var(--line);border-radius:14px}
.story summary{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;cursor:pointer;list-style:none}
.story summary::-webkit-details-marker{display:none}
.story .yr{font:.85rem var(--mono);color:var(--stamp);flex:none;padding-top:2px}
.story .st{flex:1;min-width:0;display:flex;flex-direction:column}
.story .st b{font-weight:600;font-size:.97rem}.story .st small{color:var(--muted);font-size:.88rem}
.story.hidden-story{opacity:.65}
.storyedit{padding:0 16px 16px;display:flex;flex-direction:column;gap:10px}
.checklist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px;font-size:.95rem;color:var(--muted)}
.checklist li.ok{color:var(--olive);font-weight:500}
.steps{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:6px}
.steps b{margin-right:6px}

/* ---------- 도서관 ---------- */
main.lib{max-width:1040px}
.libhead{display:flex;flex-direction:column;gap:10px}
.search input{width:100%;min-height:54px;padding:0 16px;border:1.5px solid var(--line);border-radius:14px;background:#FFFDF8;font:inherit;color:var(--ink)}
.search input:focus{border-color:var(--navy);outline:none}
.shelfgrid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.bookcard{display:flex;gap:16px;padding:16px;background:var(--surface);border:1.5px solid var(--line);border-radius:16px;text-decoration:none;color:var(--ink);height:100%}
.bookcard:hover{border-color:var(--navy)}
.bookcard .info{display:flex;flex-direction:column;gap:3px;min-width:0}
.bookcard .t{font-family:var(--serif);font-size:1.12rem;line-height:1.35}
.bookcard .a{font-size:.93rem}
.bookcard .m{font-size:.84rem;color:var(--muted)}
.bookcard .f{font-size:.88rem;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:4px}
.bookcard .n{font:.8rem var(--mono);color:var(--stamp);margin-top:auto;padding-top:4px}
.bookcard .chip{align-self:flex-start}
.bookcover{flex:none;position:relative;width:88px;height:124px;border-radius:3px 7px 7px 3px;background:var(--bg);color:var(--fg);padding:8px 8px 7px 11px;display:flex;flex-direction:column;justify-content:space-between;box-shadow:inset 4px 0 0 rgba(0,0,0,.16),0 4px 10px rgba(42,47,58,.18);overflow:hidden;font-size:8px;box-sizing:border-box}
.bookcover>*:not(.bc-photo){position:relative;z-index:1}
.bookcover .bc-photo{position:absolute;left:0;right:0;width:100%;object-fit:cover;pointer-events:none}
.bookcover .bc-photo.full{top:0;height:100%;-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,.55),#000 45%);mask-image:linear-gradient(to bottom,rgba(0,0,0,.55),#000 45%)}
.bookcover .bc-photo.bottom{bottom:0;height:58%;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 35%);mask-image:linear-gradient(to bottom,transparent,#000 35%)}
.bookcover .bc-photo.top{top:0;height:55%;-webkit-mask-image:linear-gradient(to top,transparent,#000 35%);mask-image:linear-gradient(to top,transparent,#000 35%)}
.bookcover .bc-photo.mono{filter:grayscale(1)}
.bookcover .bc-top{display:flex;justify-content:space-between;align-items:center;gap:4px}
.bookcover .bc-brand{font-size:.72em;letter-spacing:.2em;opacity:.8;font-family:var(--sans);white-space:nowrap}
.bookcover .bc-badge{width:2.6em;height:2.6em;flex:none}
.bookcover .bc-mid{display:flex;flex-direction:column;gap:.35em;text-shadow:0 1px 2px rgba(0,0,0,.18)}
.bookcover .bc-years{font-size:.68em;opacity:.85;font-family:var(--sans);line-height:1.3;word-break:keep-all}
.bookcover b{font-size:1.4em;line-height:1.25;word-break:keep-all;color:var(--fg)}
.bookcover small{font-size:.85em;opacity:.9;font-family:var(--sans)}
.bookcover .bc-band{font-size:.66em;font-family:var(--sans);border-top:1px solid currentColor;padding-top:.4em;opacity:.85;line-height:1.3;max-height:2.7em;overflow:hidden;word-break:keep-all}
.bookcover.big{width:170px;height:240px;padding:16px 14px 12px 20px;font-size:13px}
.empty{align-items:flex-start}
.exsec{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.exsec h2{font-size:1.3rem}
.cta-card{align-items:flex-start;background:var(--navy-soft);border-color:transparent}

/* ---------- 책 읽기 ---------- */
.bookpage{display:flex;flex-direction:column;gap:26px}
.bookhead{display:flex;gap:26px;align-items:flex-end;flex-wrap:wrap}
.bookhead .bh{flex:1;min-width:220px;display:flex;flex-direction:column;gap:8px}
.bookhead h1{font-size:2rem}
.bookhead .by{font-size:1.05rem}
.bookhead .intro{font-family:var(--serif);font-size:1.05rem;color:var(--ink);border-left:3px solid var(--sun);padding-left:12px}
.toc h2{font-size:1.1rem}
.toc ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.toc a{display:flex;justify-content:space-between;gap:10px;padding:10px 2px;border-top:1px dashed var(--line);text-decoration:none;color:var(--ink)}
.toc li:first-child a{border-top:0}
.toc small{font:.82rem var(--mono);color:var(--muted)}
.chapter{display:flex;flex-direction:column;gap:22px;scroll-margin-top:20px}
.chapter h2{font-size:1.6rem;display:flex;flex-direction:column;gap:2px;padding-bottom:10px;border-bottom:2px solid var(--ink)}
.chapter h2 small{font:500 .85rem var(--mono);color:var(--stamp);letter-spacing:.05em}
.tale{display:flex;flex-direction:column;gap:10px}
.tale .tq{font-size:.93rem;color:var(--muted);display:flex;gap:10px;align-items:baseline}
.tale .yr{font:600 .85rem var(--mono);color:var(--stamp);flex:none}
.tale .ta{font-family:var(--serif);font-size:1.13rem;line-height:1.95;display:flex;flex-direction:column;gap:.8em}
.bookend{display:flex;flex-direction:column;align-items:center;gap:14px;padding:20px 0;border-top:1px solid var(--line);text-align:center}
@media (max-width:520px){ .bookhead{gap:18px} .bookcover.big{width:130px;height:184px;font-size:10px} .bookhead h1{font-size:1.6rem} .shelfgrid{grid-template-columns:1fr} .qcard .q{font-size:1.25rem} .tabs button{font-size:.88rem} }

/* ---------- 책방 ---------- */
.shopcard .pr{font:600 1rem var(--mono);color:var(--ink);margin-top:auto;padding-top:6px}
.bigprice{font-family:var(--serif);font-size:1.8rem;font-weight:700;line-height:1.1;margin-top:4px}
.pull{margin:0;padding:12px 16px;border-left:3px solid var(--sun);background:var(--paper);font-family:var(--serif);font-size:1.05rem;border-radius:0 10px 10px 0}
.card .intro{font-size:1.02rem}
.sum{font:600 1.05rem var(--mono);min-height:52px;display:flex;align-items:center}

/* ---------- 운영자 ---------- */
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.tile{background:var(--surface);border:1.5px solid var(--line);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:2px;min-width:0}
.tile .k{font-size:.85rem;color:var(--muted)}
.tile b{font-family:var(--serif);font-size:1.9rem;line-height:1.1}
.tile small{font-size:.8rem;color:var(--muted)}
.tile.hot{border-color:var(--sun);background:#FBEFE6}
@media (max-width:640px){ .tiles{grid-template-columns:repeat(2,minmax(0,1fr))} }
.chips-row{display:flex;gap:6px;flex-wrap:wrap}
.fchip{min-height:40px;padding:0 14px;border-radius:999px;border:1.5px solid var(--line);background:var(--surface);font:500 .92rem var(--sans);color:var(--ink);cursor:pointer}
.fchip span{font-family:var(--mono);font-size:.82rem;color:var(--muted)}
.fchip.on{background:var(--ink);border-color:var(--ink);color:var(--paper)}.fchip.on span{color:var(--paper)}
.ords,.mems{display:flex;flex-direction:column;gap:10px}
.ord,.mem{background:var(--surface);border:1.5px solid var(--line);border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:8px;min-width:0}
.ord.st-new{border-color:var(--sun);border-left-width:5px}
.ord.st-done,.ord.st-cancel{opacity:.7}
.ord header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ord header b{flex:1;min-width:0}
.ord .when{font:.82rem var(--mono);color:var(--muted)}
.ord .chip.sun{background:#F8E0CF;color:#8A3E14}.ord .chip.bm{background:var(--navy-soft);color:var(--navy)}
.ord .who{font-size:.95rem;overflow-wrap:anywhere}
.ord .memo{font-family:var(--serif);color:var(--muted);font-size:.95rem}
.ordedit{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center}
.ordedit select,.ordedit input{min-height:42px;border:1.5px solid var(--line);border-radius:10px;background:#FFFDF8;font:inherit;font-size:.92rem;padding:0 10px;color:var(--ink);min-width:0}
@media (max-width:520px){ .ordedit{grid-template-columns:minmax(0,1fr) auto} .ordedit input{grid-column:1/-1;grid-row:2} }
.mem .mtop{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mem .meta{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:.85rem;color:var(--muted)}
.mem .uid{font:.75rem var(--mono);color:var(--muted);overflow-wrap:anywhere}
.uidbox code{display:block;font:600 1.05rem var(--mono);background:var(--paper);border:1.5px dashed var(--navy);border-radius:10px;padding:12px;overflow-wrap:anywhere;user-select:all}
.steps code{font-family:var(--mono);background:var(--paper);padding:1px 6px;border-radius:6px}

/* 운영자: 한눈에 · 주문 고치기 · 배송 */
.tabs.t5{grid-template-columns:repeat(5,minmax(0,1fr))}
.tabs.t5 button{padding:0 2px;font-size:.9rem}
.asec{display:flex;flex-direction:column;gap:10px}
.asec h2{font-size:1.2rem}.asec h2 small{font:400 .82rem var(--sans);color:var(--muted);margin-left:6px}
.tbl{overflow-x:auto;background:var(--surface);border:1.5px solid var(--line);border-radius:14px}
table.grid{width:100%;border-collapse:collapse;font-size:.9rem;white-space:nowrap}
table.grid th,table.grid td{padding:9px 12px;border-bottom:1px solid var(--line);text-align:left}
table.grid th{font-weight:600;color:var(--muted);font-size:.82rem;background:var(--paper)}
table.grid td.num{text-align:right;font-family:var(--mono);font-size:.86rem}
table.grid tr:last-child td{border-bottom:0}
.ordedit{grid-template-columns:repeat(3,minmax(0,1fr)) auto;align-items:end}
.ordedit .f,.shipedit .f{display:flex;flex-direction:column;gap:3px;font-size:.78rem;color:var(--muted);min-width:0}
.ordedit .f.wide{grid-column:1/-2}
.shipedit{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.shipedit .f.wide{grid-column:1/-1}
.shipedit input,.shipedit select{min-height:42px;border:1.5px solid var(--line);border-radius:10px;background:#FFFDF8;font:inherit;font-size:.92rem;padding:0 10px;color:var(--ink);min-width:0}
@media (max-width:520px){ .ordedit{grid-template-columns:repeat(2,minmax(0,1fr))} .ordedit .f.wide{grid-column:1/-1} .ordedit .btn{grid-column:1/-1} .ordedit input{grid-row:auto} }
.seg3{display:inline-flex;border:1.5px solid var(--line);border-radius:10px;overflow:hidden}
.seg3 button{min-height:40px;padding:0 12px;border:0;border-left:1px solid var(--line);background:var(--surface);font:500 .88rem var(--sans);color:var(--muted);cursor:pointer}
.seg3 button:first-child{border-left:0}
.seg3 button.on{background:var(--navy);color:#fff}
.chip.ok{background:var(--olive-soft);color:var(--olive)}.chip.go{background:var(--navy-soft);color:var(--navy)}.chip.wait{background:var(--mustard-soft);color:#5F4A10}
.ord.ship-none,.ord.ship-ready{border-left:5px solid var(--sun)}
.myords{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.myords li{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-top:1px dashed var(--line);flex-wrap:wrap}
.myords li:first-child{border-top:0}
.myords small{display:block;color:var(--muted);font-size:.84rem}
.myords .st{display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-size:.88rem}

/* AI 원고 */
.tabs.t4{grid-template-columns:repeat(4,minmax(0,1fr))}
.tabs.t4 button{padding:0 2px;font-size:.9rem}
.mono{font-family:var(--mono);font-size:.8rem;color:var(--stamp)}
.dhead{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.dbody{display:flex;flex-direction:column;gap:14px;border-top:1px dashed var(--line);padding-top:12px}
.dpara p{font-family:var(--serif);font-size:1.04rem;line-height:1.9}
.dpara textarea{width:100%;font:inherit;font-family:var(--serif);line-height:1.8;padding:10px 12px;border:1.5px solid var(--navy);border-radius:10px;background:#FFFDF8;margin-bottom:8px}
.dtools{display:flex;gap:14px;justify-content:flex-end}
.dtools .linkbtn{font-size:.85rem;color:var(--muted);padding:2px 0}
mark.ask{background:#F6E0DA;color:#7A2E1F;border-radius:4px;padding:1px 4px}
.holdsent{border-bottom:1px dotted #B5523B}
.chip.warn{background:#F6E0DA;color:#7A2E1F}
.fnrefs{white-space:nowrap}
sup.fn{font-family:var(--mono,monospace);font-size:.7rem;color:var(--navy,#34507A);margin-left:2px;cursor:help}
.voicebar{align-items:center;gap:10px;margin:2px 0 8px;flex-wrap:wrap}
#qmic[aria-pressed=true]{background:#B5523B;color:#fff;border-color:#B5523B}
.seglist{margin:8px 0;padding-left:20px;display:flex;flex-direction:column;gap:4px;font-size:.92rem}
mark.hole{background:var(--mustard-soft);color:#5F4A10;border-radius:4px;padding:1px 5px;font-family:var(--sans);font-size:.86rem}
.writing{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;background:var(--navy-soft);color:var(--navy);font-size:.95rem}
.writing .dots{display:inline-flex;gap:5px}
.writing .dots i{width:8px;height:8px;border-radius:50%;background:var(--navy);animation:wblink 1s infinite}
.writing .dots i:nth-child(2){animation-delay:.2s}.writing .dots i:nth-child(3){animation-delay:.4s}
@keyframes wblink{0%,100%{opacity:.25}50%{opacity:1}}
@media (prefers-reduced-motion:reduce){ .writing .dots i{animation:none} }
.chapter .cht{display:block;font-size:.62em;color:var(--muted);font-weight:400;margin-top:4px}
.prose{font-family:var(--serif);font-size:1.13rem;line-height:1.95;display:flex;flex-direction:column;gap:.9em}
.prose p{text-indent:1em}
details.qa{border:1px solid var(--line);border-radius:12px;padding:6px 14px;background:var(--surface)}
details.qa summary{cursor:pointer;color:var(--muted);font-size:.92rem;min-height:40px;display:flex;align-items:center}
details.qa[open]{display:flex;flex-direction:column;gap:16px;padding-bottom:14px}
.seg{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.seg label{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border:1.5px solid var(--line);border-radius:999px;background:var(--surface);cursor:pointer;font-weight:400;font-size:.93rem}
.seg label:has(input:checked){border-color:var(--navy);background:var(--navy-soft);color:var(--navy);font-weight:600}
.seg input{accent-color:var(--navy);margin:0}

/* 책 원고 쓰기 준비 상태 · 설계 */
.ready{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.ready li{display:grid;grid-template-columns:88px minmax(0,1fr) auto;gap:10px;align-items:center;font-size:.92rem}
.ready li i{display:block;height:8px;border-radius:4px;background:var(--line);overflow:hidden;position:relative}
.ready li i::after{content:"";position:absolute;left:0;top:0;bottom:0;width:calc(var(--p) * 100%);background:var(--sun);border-radius:4px}
.ready li.ok i::after{background:var(--olive)}
.ready li small{color:var(--muted);font-size:.82rem;white-space:nowrap}
.ready li.ok small{color:var(--olive)}
.plancard .opening{font-family:var(--serif);font-size:1.05rem;line-height:1.9;border-left:3px solid var(--sun);padding-left:12px;margin:4px 0 0}
.threads{margin:4px 0 0;padding-left:18px;font-size:.95rem;display:flex;flex-direction:column;gap:2px}
.threads small{color:var(--muted)}
.opening-sec{display:flex;flex-direction:column;gap:8px;padding:18px 20px;border:1.5px solid var(--line);border-radius:16px;background:var(--surface)}
.opening-sec p{font-family:var(--serif);font-size:1.1rem;line-height:1.95;margin:0}

/* 라벨 안의 작은 설명(선택·한두 문장)은 글자 옆에 */
.field .lbl{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.field .lbl small{font-weight:400;color:var(--muted)}
/* 긴 표는 좁은 화면에서 옆으로 넘겨 보기 */
.doc .tbl{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:12px;margin:12px 0}
.doc .tbl table{min-width:560px;margin:0}
/* 책 읽기: 글자 크기 */
.fontsize{display:inline-flex;align-items:center;gap:6px;margin-top:4px}
.fontsize span{font-size:.82rem;color:var(--muted);margin-right:4px}
.fontsize button{min-width:44px;min-height:40px;border:1.5px solid var(--line);border-radius:10px;background:var(--surface);font:600 1rem var(--serif);color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:1px}
.fontsize button small{font:600 .8rem var(--sans);color:var(--navy)}
.fontsize button:disabled{opacity:.4;cursor:default}
#book.fs-s .prose p,#book.fs-s .tale .ta{font-size:1.02rem}
#book.fs-l .prose p,#book.fs-l .tale .ta,#book.fs-l .opening-sec p{font-size:1.32rem;line-height:2}
#book.fs-l .chapter h2{font-size:1.8rem}
#book.fs-xl .prose p,#book.fs-xl .tale .ta,#book.fs-xl .opening-sec p{font-size:1.55rem;line-height:2.05}
#book.fs-xl .chapter h2{font-size:2rem}
#book.fs-xl .tale .tq{font-size:1.1rem}
/* 이야기 남기기(write.html): 글자 크기 */
#main.fs-s #qtext,#main.fs-s .q,#main.fs-s #qa,#main.fs-s .storylist .ta p{font-size:.95rem}
#main.fs-l #qtext,#main.fs-l .q,#main.fs-l #qa{font-size:1.3rem;line-height:1.6}
#main.fs-l .storylist .st b{font-size:1.1rem}
#main.fs-l .storylist .st small{font-size:1rem}
#main.fs-xl #qtext,#main.fs-xl .q,#main.fs-xl #qa{font-size:1.55rem;line-height:1.65}
#main.fs-xl .storylist .st b{font-size:1.25rem}
#main.fs-xl .storylist .st small{font-size:1.1rem}
/* 이야기 사진 */
.photos{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.pthumb{position:relative;width:72px;height:72px;border-radius:10px;overflow:hidden;border:1.5px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:.78rem;color:var(--muted);background:var(--surface);cursor:pointer;flex-shrink:0}
.pthumb img{width:100%;height:100%;object-fit:cover;display:block}
.pthumb.padd{border-style:dashed;font-weight:600}
.pthumb.padd input{display:none}
.pthumb .pdel{position:absolute;top:2px;right:2px;width:20px;height:20px;border-radius:50%;border:none;background:rgba(0,0,0,.55);color:#fff;font-size:.95rem;line-height:1;cursor:pointer;padding:0}
.tphotos{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.tphotos img{width:120px;height:120px;object-fit:cover;border-radius:10px;border:1px solid var(--line)}
/* 인쇄: 책 본문만 */
@media print{
  header.top,footer,.notice,.bookhead .row,.fontsize,.bookend .row,details.qa>summary{display:none!important}
  body{background:#fff;color:#000;font-size:12pt}
  main,.wrap{max-width:none;padding:0}
  .chapter{break-before:page}
  .card,.toc{border:none;box-shadow:none}
  details.qa{display:none}
  a{color:inherit;text-decoration:none}
}
/* 결제 */
.paybox{background:var(--surface);border:1.5px solid var(--line);border-radius:16px;padding:18px 16px;display:flex;flex-direction:column;gap:10px;margin-top:12px}
.paysum{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:0;font-size:1.05rem}
.paysum b{font-family:var(--mono);font-size:1.3rem;color:var(--navy)}
.paybox .btn{width:100%}
.ord .payinfo{font-size:.9rem;color:var(--muted);display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0}
.ord .chip.warn{background:#F5E7BE;color:#7A5A12}
.ord [data-refund] input{flex:1;min-width:160px;font:inherit;padding:8px 10px;border:1.5px solid var(--line);border-radius:8px}
.myords .va{display:block;color:var(--stamp)}
.plancard-my .chip.ok{background:var(--navy);color:#fff}
.bigprice .list{font-size:.55em;color:var(--muted);font-weight:400;margin-right:6px}
/* 이용권 안내·권유 카드 */
.gate{background:var(--navy-soft,#E6ECF5);border:1.5px solid var(--navy);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:10px;margin-top:6px}
.gate p{margin:0}
.upsell{background:#FBF3E8;border:1.5px solid #E8C9A4;border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:8px;margin-top:10px}
.upsell p{margin:0}
.opts{display:flex;flex-direction:column;gap:8px;margin:4px 0}
.opts label{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:8px 12px;padding:12px 14px;border:1.5px solid var(--line);border-radius:12px;background:#FFFDF8;cursor:pointer}
.opts label:has(input:checked){border-color:var(--navy);background:var(--navy-soft,#E6ECF5)}
.opts input[type=checkbox]{width:22px;height:22px;flex:none}
.opts .ot{min-width:0;display:flex;flex-direction:column;word-break:keep-all}
.opts .ot small{display:block;font-size:.85rem}
.opts .oside{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.opts .ot small{color:var(--muted)}
.opts .op{font-family:var(--mono);font-weight:600;white-space:nowrap}
.opts .oq{width:64px;min-height:40px;font:inherit;text-align:center;border:1.5px solid var(--line);border-radius:8px}
.sumline{display:flex;justify-content:space-between;align-items:baseline;border-top:1px dashed var(--line);padding-top:10px;margin-top:4px}
.sumline b{font-family:var(--mono);font-size:1.25rem;color:var(--navy)}
.sumline .off{color:var(--stamp);font-size:.9rem}
.ladder{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:8px 0}
.ladder div{border:1.5px solid var(--line);border-radius:12px;padding:12px;background:var(--surface);display:flex;flex-direction:column;gap:4px}
.ladder b{font-family:var(--mono);color:var(--navy)}
.ladder small{color:var(--muted)}
/* ===== 최종본 인쇄·PDF (print.html) ===== */
.printbar{position:sticky;top:0;z-index:20;background:var(--surface);border:1.5px solid var(--line);border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:10px;margin-bottom:18px;box-shadow:0 6px 18px rgba(42,47,58,.08)}
.printbar .sub{display:block;font-size:.9rem}
.printbar .howto summary{cursor:pointer;color:var(--navy);font-size:.92rem}
.printbar .howto p{font-size:.9rem;color:var(--muted);line-height:1.7;margin:8px 0 0}
.bookprint{display:flex;flex-direction:column;gap:24px;max-width:148mm;margin:0 auto}
.bookprint .pg{background:#fff;border:1px solid var(--line);box-shadow:0 8px 24px rgba(42,47,58,.08);padding:18mm 16mm;min-height:120mm;font-family:var(--serif);color:#1f232c}
.bookprint .cover{display:flex;flex-direction:column;justify-content:space-between;min-height:200mm;background:var(--cv,var(--navy));color:#F5F1E8;border:none;position:relative}
.bookprint .cv-top{display:flex;justify-content:space-between;align-items:center}
.bookprint .cover{overflow:hidden}
.bookprint .cover>*:not(.cv-photo){position:relative;z-index:1}
.bookprint .cv-photo{position:absolute;left:0;right:0;width:100%;object-fit:cover;z-index:0;pointer-events:none;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.bookprint .cv-photo.full{top:0;height:100%;-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,.55),#000 45%,#000);mask-image:linear-gradient(to bottom,rgba(0,0,0,.55),#000 45%,#000)}
.bookprint .cv-photo.bottom{bottom:0;height:58%;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 35%);mask-image:linear-gradient(to bottom,transparent,#000 35%)}
.bookprint .cv-photo.top{top:0;height:55%;-webkit-mask-image:linear-gradient(to top,transparent,#000 35%);mask-image:linear-gradient(to top,transparent,#000 35%)}
.bookprint .cv-photo.mono{filter:grayscale(1) contrast(1.05)}
.bookprint .cv-years{font:500 .82rem var(--sans);letter-spacing:.06em;opacity:.85;display:block;margin-bottom:10px}
.bookprint .cv-intro{font-family:var(--sans);font-size:.88rem;line-height:1.7;opacity:.88;margin:14px 0 0;max-width:34em}
.bookprint .cv-band{display:flex;justify-content:space-between;gap:10px;align-items:baseline;border-top:1px solid rgba(245,241,232,.45);padding-top:10px;font-family:var(--sans);font-size:.82rem}
.bookprint .back{display:flex;flex-direction:column;justify-content:space-between;background:var(--cvsoft,#DCE6F0);border:none;min-height:200mm}
.bookprint .bk-box{font-family:var(--serif)}
.bookprint .bk-intro{margin:0 0 12px;line-height:1.9}
.bookprint .bk-quote{margin:0;color:inherit;opacity:.85;font-size:1.05rem;line-height:1.8}
.bookprint .back{position:relative;overflow:hidden}
.bookprint .back>*:not(.cv-photo){position:relative;z-index:1}
.bookprint .back.hasphoto .bk-box{margin-top:auto}
.bookprint .back.hasphoto{justify-content:flex-end;gap:10px}
.bookprint .back.hasphoto .bk-box,.bookprint .back.hasphoto .bk-words{text-shadow:0 1px 2px rgba(0,0,0,.18)}
.bookprint .bk-bot{display:flex;gap:12px;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;font-family:var(--sans)}
.bookprint .bk-brand{display:flex;gap:10px;align-items:center;min-width:0;flex:1 1 0}
.bookprint .bk-brand small{opacity:.78;font-size:.72rem;line-height:1.5;display:inline-block;word-break:keep-all}
.bookprint .nn-badge{flex:none;display:block}
.bookprint .bk-words{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0;font-family:var(--sans);font-size:.78rem}
.bookprint .bk-words span{border:1px solid currentColor;border-radius:999px;padding:3px 10px;opacity:.85}
.bookprint .bk-isbn{background:#fff;color:#000;padding:6px 8px 4px;border-radius:3px;display:flex;flex-direction:column;align-items:center;gap:2px;font-family:var(--mono)}
.bookprint .bk-isbn small{font-size:.62rem;letter-spacing:.04em}
.bookprint .bk-isbn .ean{display:block;max-width:38mm;height:auto}
.bookprint .bk-isbn.slot{width:38mm;height:24mm;box-sizing:border-box;border:1.5px dashed #9a9a9a;justify-content:center;text-align:center;color:#666;font-family:var(--sans)}
.bookprint .bk-isbn.slot b{font-size:.72rem}.bookprint .bk-isbn.slot small{font-size:.6rem;line-height:1.4}
.bookprint .end.life{display:block;text-align:left}
.bookprint .gal{margin:0 0 16px;break-inside:avoid;page-break-inside:avoid}
.bookprint .gal-img{height:150mm;display:flex;align-items:center;justify-content:center;background:#F7F4EC;border-radius:2px;overflow:hidden}
.bookprint .gal.half .gal-img{height:72mm}
.bookprint .gal img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block}
.bookprint .gal figcaption{font-family:var(--hand);font-size:1.15rem;color:#444;text-align:center;margin-top:5px;line-height:1.3;height:1.5rem;overflow:hidden}
.bookprint .letter{background:#FBF8F0}
.bookprint .lt-paper{font-family:var(--hand);color:#2b3550;font-size:1.2rem;line-height:1.78rem;background-image:repeating-linear-gradient(to bottom,transparent 0,transparent calc(1.78rem - 1px),#E2D9C6 calc(1.78rem - 1px),#E2D9C6 1.78rem);padding-top:.2rem;min-height:150mm;box-sizing:border-box}
.bookprint .lt-paper p{margin:0}
.bookprint .lt-to{margin-bottom:1.78rem!important}
.bookprint .lt-body p{text-indent:.6em;margin:0 0 0!important}
.bookprint .lt-from{text-align:right;margin-top:1.78rem!important;break-before:avoid;break-inside:avoid}
.bookprint .lf-sum p{line-height:1.9;font-size:.98rem;margin:0 0 .6em}
.bookprint .lf-words{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 14px;font-family:var(--sans);font-size:.8rem}
.bookprint .lf-words span{background:#F5F1E8;border:1px solid #E2D9C6;color:#34507A;border-radius:999px;padding:3px 10px}
.bookprint .lf-line{list-style:none;padding:0 0 0 2px;margin:0;border-left:2px solid #E2D9C6}
.bookprint .lf-line li{display:flex;gap:10px;align-items:baseline;padding:3px 0 3px 12px;position:relative;font-family:var(--sans);font-size:.85rem;line-height:1.45;break-inside:avoid}
.bookprint .lf-line li::before{content:"";position:absolute;left:-6px;top:.55em;width:8px;height:8px;border-radius:50%;background:#E0702F}
.bookprint .lf-y{font:600 .78rem var(--mono);color:var(--stamp);flex:none;width:2.8em}
.bookprint .lf-end{text-align:center;margin-top:18px}
.bookprint .lf-end .hand{font-size:1.25rem;color:var(--stamp);margin:0 0 4px}
.bookprint .cv-brand{font-family:var(--sans);font-size:.8rem;letter-spacing:.25em;opacity:.8}
.bookprint .cover h1{font-size:2rem;line-height:1.35;margin:0 0 14px;color:#F5F1E8}
.bookprint .cv-by{font-size:1.1rem;margin:0}
.bookprint .cv-bot p{margin:4px 0;font-family:var(--sans);font-size:.9rem;opacity:.85}
.bookprint .cv-small{font-family:var(--mono)!important;font-size:.78rem!important}
.bookprint .half{display:flex;flex-direction:column;justify-content:center;text-align:center;gap:10px}
.bookprint .ht{font-size:1.5rem;margin:0}
.bookprint .hb{margin:0;color:#555}
.bookprint .hintro{margin:18px 0 0;line-height:1.9;font-size:1rem}
.bookprint .hfoot{margin-top:auto;font-family:var(--sans);font-size:.78rem;color:#777;line-height:1.7}
.bookprint .sec{font-size:1.3rem;border-bottom:2px solid #1f232c;padding-bottom:8px;margin:0 0 16px}
.bookprint .toc{list-style:none;padding:0;margin:0}
.bookprint .toc li{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px dashed var(--line)}
.bookprint .toc small{font-family:var(--mono);color:#777}
.bookprint .chap header{margin-bottom:16px;border-bottom:2px solid #1f232c;padding-bottom:10px}
.bookprint .chap header small{font:500 .78rem var(--mono);color:var(--stamp);letter-spacing:.06em}
.bookprint .chap h2{font-size:1.5rem;margin:2px 0 0}
.bookprint .cht{margin:4px 0 0;color:#555;font-size:1rem}
.bookprint .prose p{text-indent:1em;line-height:1.95;font-size:1rem;margin:0 0 .8em}
.bookprint .qah{font-family:var(--sans);font-size:.85rem;color:#777;margin:18px 0 10px;border-top:1px solid var(--line);padding-top:10px}
.bookprint .tale{margin:0 0 16px;page-break-inside:avoid;break-inside:avoid}
.bookprint .tq{font-family:var(--sans);font-size:.88rem;color:#666;margin:0 0 6px;display:flex;gap:8px;align-items:baseline}
.bookprint .yr{font:600 .8rem var(--mono);color:var(--stamp);flex:none}
.bookprint .ta p{line-height:1.9;font-size:1rem;margin:0 0 .6em}
.bookprint .end{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px}
.bookprint .end .hand{font-size:1.4rem;color:var(--stamp)}
.bookprint .endsmall{font-family:var(--sans);font-size:.8rem;color:#777}
@media (max-width:520px){.bookprint .pg{padding:12mm 9mm;min-height:0}.bookprint .cover{min-height:150mm}.bookprint .cover h1{font-size:1.6rem}}
@media print{
  @page{size:A5;margin:16mm 14mm}
  body.printpage{background:#fff!important;display:block!important}
  body.printpage main{display:block!important}
  body.printpage header.top,body.printpage footer,body.printpage .printbar,body.printpage .noprint{display:none!important}
  body.printpage main,body.printpage .wrap{max-width:none!important;padding:0!important;margin:0!important}
  .bookprint{gap:0;max-width:none;display:block}
  .bookprint .pg{border:none;box-shadow:none;padding:0;min-height:0;page-break-after:always;break-after:page}
  .bookprint .pg:last-child{page-break-after:auto;break-after:auto}
  .bookprint .cover{min-height:0;height:174mm;box-sizing:border-box;background:var(--cv,var(--navy))!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;padding:14mm 12mm;margin:0;width:auto;overflow:hidden}
  .bookprint .half{min-height:0;height:174mm;box-sizing:border-box;overflow:hidden}
  .bookprint .back{min-height:0;height:174mm;box-sizing:border-box;overflow:hidden;background:var(--cvsoft)!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;padding:14mm 12mm}
  .bookprint .end{min-height:0;height:150mm;box-sizing:border-box}
  .bookprint .end.life{height:auto}
  .bookprint .gal{margin:0 0 4mm}
  .bookprint .gal.full{break-before:page;page-break-before:always}
  .bookprint .gal.full .gal-img{height:162mm}
  .bookprint .gal.full:not(:has(figcaption)) .gal-img{height:170mm}
  .bookprint .gal.half .gal-img{height:73mm}
  .bookprint .gallery .sec+.gal.full{break-before:auto;page-break-before:auto}
  .bookprint .gallery .sec+.gal.full .gal-img{height:140mm}
  @page bleed{margin:0}
  .bookprint .cover,.bookprint .back{--bleed:1;page:bleed;width:148mm!important;height:210mm!important;padding:18mm 16mm!important;margin:0!important;box-sizing:border-box!important}
  .bookprint .letter{background:#FBF8F0!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;padding:8mm 7mm!important;box-sizing:border-box;min-height:174mm!important}
  .bookprint .prose p,.bookprint .ta p{font-size:10.5pt;line-height:1.85;orphans:3;widows:3}
}
/* 쪽수 어림 */
.pagemeter{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.pagemeter .pm-row{display:flex;justify-content:space-between;font-size:.92rem;color:var(--muted)}
.pagemeter i{display:block;height:10px;border-radius:5px;background:var(--line);overflow:hidden;position:relative}
.pagemeter i::after{content:"";position:absolute;inset:0;width:var(--p,0%);background:var(--sun);border-radius:5px;transition:width .4s}
.pagemeter.ok i::after{background:var(--navy)}
.pagesline{margin:-4px 0 10px;color:var(--muted)}
@media print{
  .bookprint .chap header{height:150mm;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;border:none;page-break-after:always;break-after:page;margin:0}
  .bookprint .chap header h2{font-size:2rem}
  .bookprint .chap header *{text-align:center;width:100%}
  .bookprint .chap .prose{margin-bottom:6mm}
  .bookprint .qah{display:none}
  .bookprint .tale{page-break-inside:auto;margin:0 0 6mm;padding-top:4mm;border-top:1px solid #d9d2c3;min-height:0}
  .bookprint .tales .tale:first-child,.bookprint .appx-st+.tale{border-top:none;padding-top:0}
  .bookprint .appx-st{font-family:var(--sans);font-size:9.5pt;color:#8a8275;letter-spacing:.08em;margin:8mm 0 3mm;break-after:avoid;page-break-after:avoid}
  .bookprint .appx .tale .ta p{font-size:10pt;line-height:1.85}
  .bookprint .appx .tale .tq{font-size:.95rem}
  .bookprint .appx-note{font-family:var(--sans);font-size:9pt;color:#8a8275;margin:0 0 4mm}
  .bookprint .tale .tq{font-size:1.05rem;color:#1f232c;font-family:var(--serif);border-bottom:1px solid #1f232c;padding-bottom:8px;margin-bottom:14px}
  .bookprint .tale .ta p{font-size:11pt;line-height:2}
  .bookprint .blank{page-break-before:always;break-before:page;height:150mm;display:flex;flex-direction:column;justify-content:flex-start}
  .bookprint .blank h3{font-family:var(--sans);font-size:.9rem;color:#777;font-weight:500;margin:0 0 12px}
  .bookprint .blank .lines{flex:1;background:repeating-linear-gradient(to bottom,transparent 0,transparent 9mm,#ddd 9mm,#ddd calc(9mm + 1px))}
}
.bookprint .blankpg{display:none}
@media print{.bookprint .blankpg{display:block}}

/* 홈 화면에 추가 안내 */
.pwa{border-color:var(--navy,#34507A);background:#fff}
.pwa .x{border:0;background:none;font-size:1rem;color:var(--ink,#2A2F3A);opacity:.6;cursor:pointer;padding:2px 6px}
.pwa-steps{margin:10px 0 0;padding-left:20px;display:flex;flex-direction:column;gap:4px;font-size:.95rem}

/* 책 읽기 각주 → 근거 이야기 */
.prose a.fn{font-family:var(--mono,monospace);font-size:.68em;vertical-align:super;line-height:0;margin-left:2px;padding:0 3px;border-radius:4px;color:var(--navy,#34507A);background:rgba(52,80,122,.08);text-decoration:none}
.tale.flash{outline:2px solid var(--sun,#E0702F);outline-offset:4px;transition:outline-color .6s}
@media print{.prose a.fn{background:none}}

/* AI 글 다듬기 */
.polishbox{border-color:var(--navy,#34507A)}
.pcols{display:grid;grid-template-columns:1fr;gap:12px;margin:8px 0}
@media (min-width:720px){.pcols{grid-template-columns:1fr 1fr}}
.pcols>div{background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px 14px;min-width:0}
.pcols p{margin:6px 0 0;line-height:1.8;overflow-wrap:anywhere}
.porig{color:var(--muted)}
mark.pflag{background:#FBE7A1;color:inherit;border-radius:3px;padding:0 2px}
.pasks{margin:8px 0}
.pasks ul{margin:6px 0 0;padding-left:1.1em}
.pasks li{margin:4px 0;line-height:1.6}
.ppolish:not(:empty){margin-top:10px;border-top:1px dashed var(--line);padding-top:10px}
.check.small{font-size:.92rem;margin-top:6px}

/* 인터뷰 대화 */
.asker{display:flex;align-items:center;gap:8px;font-size:.92rem;color:var(--navy,#34507A);margin-bottom:6px}
.convo{display:flex;flex-direction:column;gap:8px;margin:0 0 12px}
.convo .msg{max-width:88%;border-radius:16px;padding:10px 14px;line-height:1.7}
.convo .msg p{margin:0;overflow-wrap:anywhere}
.convo .msg.me{align-self:flex-end;background:#E9E2D2;border-bottom-right-radius:4px;color:#3b3f48;font-size:.95rem}
.convo .msg.nn{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:4px}
.convo .who{display:flex;align-items:center;gap:6px;font-size:.85rem;color:var(--navy,#34507A);margin-bottom:4px}
.convo .typing{color:var(--muted)}
details.polishbox>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px}
details.polishbox>summary::-webkit-details-marker{display:none}
details.polishbox[open]>summary{margin-bottom:10px}

/* 책 화면 (쪽 넘기기) */
.bv{position:relative;outline:none;margin:8px 0 18px}
.bv-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;flex-wrap:wrap}
.bv-pos{font-family:var(--mono);font-size:.9rem;color:var(--muted)}
.bv-fs{display:flex;gap:6px}
.bv-tocbox{position:absolute;z-index:6;left:0;top:44px;max-width:min(420px,100%);max-height:60vh;overflow:auto;box-shadow:0 12px 30px rgba(42,47,58,.18)}
.bv-toc{list-style:none;margin:0;padding:0}
.bv-toc li button{display:flex;justify-content:space-between;gap:12px;width:100%;text-align:left;padding:8px 2px;border-bottom:1px dashed var(--line)}
.bv-toc small{font-family:var(--mono);color:var(--muted)}
.bv-stage{position:relative;display:flex;justify-content:center;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.bv-scaler{position:relative}
.bv-book{position:absolute;left:0;top:0;transform-origin:0 0}
.bv-paper{position:absolute;top:0;background:#fffdf8;box-shadow:0 10px 28px rgba(42,47,58,.14)}
.bv.spread .bv-l{border-radius:6px 0 0 6px;background:linear-gradient(to left,#efe9dc 0,#fffdf8 22px)}
.bv.spread .bv-r{border-radius:0 6px 6px 0;background:linear-gradient(to right,#efe9dc 0,#fffdf8 22px)}
.bv.reflow .bv-l{border-radius:8px}
.bv-num{position:absolute;bottom:10px;left:0;right:0;text-align:center;font:500 11px var(--mono);color:#9a9286}
.bv-window{position:absolute;overflow:hidden}
.bv-nav{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:64px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.88);font-size:1.6rem;color:var(--navy,#34507A);cursor:pointer;z-index:3}
.bv-nav:disabled{opacity:.3;cursor:default}
.bv-prev{left:0}.bv-next{right:0}
.bv.reflow .bv-nav{width:34px;height:52px;background:rgba(255,255,255,.7)}
.bv-foot{display:flex;flex-direction:column;align-items:center;gap:4px;margin-top:12px}
.bv-range{width:min(520px,100%)}
.bv .bookprint .toc li[data-go]{cursor:pointer}
.bv .bookprint sup.fn{font:600 .62em var(--mono);color:var(--stamp,#B5523B);cursor:pointer;margin-left:1px}
.bv-flash{animation:bvflash 1.6s ease}
@keyframes bvflash{0%,60%{background:#FBE7A1}100%{background:transparent}}
.bv-edit .bookprint [data-st][data-pi],.bv-edit .bookprint [data-sid]{cursor:text;border-radius:4px;transition:background .15s}
.bv-edit .bookprint [data-st][data-pi]:hover,.bv-edit .bookprint [data-sid]:hover,.bv-edit .bookprint [data-st][data-pi]:focus,.bv-edit .bookprint [data-sid]:focus{background:#FFF6DA;outline:1px dashed #E0B24A;outline-offset:2px}
.bookhead2{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap;margin-bottom:6px}
.bookhead2 h1{margin:0;font-family:var(--serif);font-size:1.6rem}
.bookhead2 .by{margin:2px 0 0;color:var(--muted)}
.editsheet{position:fixed;left:0;right:0;bottom:0;z-index:50;background:#fff;border-top:1px solid var(--line);box-shadow:0 -12px 30px rgba(42,47,58,.18);padding:16px max(16px,env(safe-area-inset-left)) calc(16px + env(safe-area-inset-bottom));max-height:80vh;overflow:auto}
.editsheet .inner{max-width:760px;margin:0 auto}
.editsheet textarea{width:100%;min-height:9em;font-family:var(--serif);font-size:1.05rem;line-height:1.8}
/* 책 화면은 본문 폭을 벗어나 화면 가운데로 넓게 (펼친 두 쪽) */
#reader{position:relative;width:min(1240px,calc(100vw - 32px));left:50%;margin-left:calc(min(1240px,calc(100vw - 32px)) / -2)}
.bv .bookprint .pg:not(.cover):not(.back){background:transparent}
.bookprint .tale .tn{font:600 .72rem var(--mono);color:#9a9286;margin-right:6px}

/* 표지 꾸미기 */
.cvwrap{display:flex;gap:18px;flex-wrap:wrap;align-items:flex-start}
.cvprev{position:relative;width:156px;aspect-ratio:148/210;border-radius:4px 10px 10px 4px;padding:14px 12px;display:flex;flex-direction:column;justify-content:center;gap:8px;box-shadow:0 10px 24px rgba(42,47,58,.2), inset 6px 0 0 rgba(0,0,0,.12);overflow:hidden;flex:none}
.cvp-brand{position:absolute;top:12px;left:12px;right:44px;white-space:nowrap;overflow:hidden;font:500 9px var(--sans);letter-spacing:.12em;opacity:.8}
.cvp-title{font-size:1.35rem;line-height:1.3;word-break:keep-all}
.cvp-by{font-size:.85rem;opacity:.9}
.cvp-sun{position:absolute;right:12px;top:10px;width:14px;height:14px;border-radius:50%;background:#E0702F}
.cvp-badge{position:absolute;right:9px;top:7px;line-height:0}
.cvprev .cvp-photo{position:absolute;left:0;right:0;width:100%;object-fit:cover;pointer-events:none}
.cvprev .cvp-photo.full{top:0;height:100%;-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,.55),#000 45%);mask-image:linear-gradient(to bottom,rgba(0,0,0,.55),#000 45%)}
.cvprev .cvp-photo.bottom{bottom:0;height:58%;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 35%);mask-image:linear-gradient(to bottom,transparent,#000 35%)}
.cvprev .cvp-photo.top{top:0;height:55%;-webkit-mask-image:linear-gradient(to top,transparent,#000 35%);mask-image:linear-gradient(to top,transparent,#000 35%)}
.cvprev .cvp-photo.mono{filter:grayscale(1)}
.cvprev>*:not(.cvp-photo){position:relative;z-index:1}.cvprev>.cvp-brand,.cvprev>.cvp-badge,.cvprev>.cvp-words{position:absolute}
.cvphoto-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.cvphoto-row input[type=range]{flex:1;min-width:120px}
.cvp-words{position:absolute;left:12px;right:12px;bottom:10px;font:500 8px/1.4 var(--sans);opacity:.85;border-top:1px solid currentColor;padding-top:4px;word-break:keep-all}
.swatch.ring{background:transparent!important;border-color:transparent;padding:0;display:inline-flex;align-items:center;justify-content:center}
.swatch.ring svg{display:block}
.seg.wrap{flex-wrap:wrap}
.bkprev{position:relative;width:156px;aspect-ratio:148/210;border-radius:10px 4px 4px 10px;padding:12px 11px;display:flex;flex-direction:column;justify-content:space-between;gap:6px;box-shadow:0 10px 24px rgba(42,47,58,.2), inset -6px 0 0 rgba(0,0,0,.1);overflow:hidden;flex:none;font-family:var(--sans)}
.bkp-box{font:400 10px/1.6 var(--serif);max-height:50%;overflow:hidden;position:relative;z-index:1}
.bkprev .bkp-photo{position:absolute;left:0;right:0;top:0;width:100%;height:55%;object-fit:cover;-webkit-mask-image:linear-gradient(to top,transparent,#000 35%);mask-image:linear-gradient(to top,transparent,#000 35%)}
.bkprev .bkp-photo.mono{filter:grayscale(1)}
.bkprev.hasphoto{justify-content:flex-end}.bkprev>*:not(.bkp-photo){position:relative;z-index:1}
.bkp-words{display:flex;flex-wrap:wrap;gap:3px}.bkp-words span{border:1px solid currentColor;border-radius:99px;padding:0 5px;font-size:8px;opacity:.85}
.bkp-bot{display:flex;justify-content:space-between;align-items:flex-end}
.bkp-bar{background:#fff;color:#333;font:600 7px/1.3 var(--mono);padding:4px 6px;text-align:center;border-radius:2px;background-image:repeating-linear-gradient(90deg,#000 0 1px,#fff 1px 3px);color:transparent;width:44px;height:26px;box-sizing:border-box}
.bkp-bar.slot{background:#fff;border:1px dashed #999;color:#777}
.cvopts{flex:1;min-width:220px;display:flex;flex-direction:column;gap:10px}
.swatches{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.swatch{width:30px;height:30px;border-radius:50%;border:1px solid rgba(0,0,0,.18);cursor:pointer;padding:0;position:relative}
.swatch.on{outline:3px solid var(--sun,#E0702F);outline-offset:2px}
.swatch.custom{display:inline-flex;align-items:center;justify-content:center;background:conic-gradient(#e0702f,#d9a441,#4f6b3a,#2f5b7a,#5b4a7a,#b5523b,#e0702f);color:#fff;font-weight:700;overflow:hidden}
.swatch.custom input{position:absolute;inset:0;opacity:0;cursor:pointer}
.grow{border:1px dashed var(--line);border-radius:12px;padding:10px 14px;margin:6px 0 10px;background:#fffdf6}
.grow p{margin:0 0 8px;line-height:1.7}

.handta{font-family:var(--hand);font-size:1.45rem;line-height:1.6;background:#FBF8F0 repeating-linear-gradient(to bottom,transparent 0,transparent calc(1.6em - 1px),#E2D9C6 calc(1.6em - 1px),#E2D9C6 1.6em);background-attachment:local}
.bookprint .cover.hasphoto .cv-band,.bookprint .cover.hasphoto .cv-mid{text-shadow:0 1px 3px rgba(0,0,0,.35)}
.galgrid{list-style:none;padding:0;margin:10px 0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.galitem{border:1px solid var(--line);border-radius:10px;padding:8px;display:flex;flex-direction:column;gap:6px;background:#fff;min-width:0}
.galitem img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:6px;background:#F5F1E8}
.galitem input{width:100%;box-sizing:border-box;font-size:.9rem;min-height:38px}
.galbtns{display:flex;gap:4px;flex-wrap:wrap;align-items:center}.galbtns select{flex:1;min-width:0;font-size:.85rem;min-height:36px}
.galbtns .btn.sm{padding:4px 8px;min-width:0}
