/* Private purchase flow v0.0.1; keeps the existing white/orange product language. */
body.saju-active:has(.commerce) #main{max-width:1040px;padding:0}
body.saju-active:has(.commerce) .header{max-width:1040px}
body.saju-active .commerce{--commerce-ink:#29251f;--commerce-muted:#655e55;--commerce-orange:#ad3b0b;--commerce-line:#e8e2da;width:100%;max-width:1040px;margin:0 auto;background:#fff;color:var(--commerce-ink);font-family:inherit;font-size:16px;line-height:1.7;min-height:75vh;padding-bottom:env(safe-area-inset-bottom)}
body.saju-active .commerce *{box-sizing:border-box}
body.saju-active .commerce ::selection{background:#ffd6af;color:#29251f}
body.saju-active .commerce a{color:var(--commerce-orange);text-underline-offset:4px}
body.saju-active .commerce button,body.saju-active .commerce input,body.saju-active .commerce textarea{font:inherit}
body.saju-active .commerce :is(button,a,input,textarea,summary):focus-visible{outline:3px solid #b94b10;outline-offset:4px}
body.saju-active .commerce-nav{display:flex;justify-content:space-between;gap:24px;align-items:center;padding:8px 24px;border-bottom:1px solid var(--commerce-line)}
body.saju-active .commerce-nav a{display:inline-flex;align-items:center;min-height:44px;font-weight:750;text-decoration:none}
body.saju-active .commerce-nav a:first-child{color:var(--commerce-ink)}
body.saju-active .commerce-content{max-width:900px;margin:0 auto;padding:32px 24px 40px}
body.saju-active .commerce h1{font-size:clamp(28px,5vw,36px);font-weight:800;letter-spacing:-.025em;line-height:1.35;margin:0 0 16px;text-wrap:balance}
body.saju-active .commerce :is(h1,h2,h3){font-family:inherit}
body.saju-active .commerce h2{font-size:24px;line-height:1.4;margin:0 0 16px;font-weight:800;letter-spacing:-.02em}
body.saju-active .commerce h3{font-size:19px;line-height:1.5;margin:28px 0 10px}
body.saju-active .commerce p{margin:0 0 16px;word-break:keep-all;overflow-wrap:anywhere}
body.saju-active .commerce-hero{padding:4px 0 30px}
body.saju-active .commerce-book{margin:0 0 24px;max-width:420px;background:#fff3e6;border-radius:16px;overflow:hidden}
body.saju-active .commerce-book img{display:block;width:100%;height:210px;object-fit:cover}
body.saju-active .commerce-book figcaption{padding:10px 16px;text-align:center;font-size:14px;font-weight:700;color:#76442c}
body.saju-active .commerce-hero>p{color:var(--commerce-muted)}
body.saju-active .commerce-price{display:flex;flex-wrap:wrap;gap:4px 18px;align-items:baseline;margin-top:24px}
body.saju-active .commerce-price strong{font-size:28px;font-weight:850;letter-spacing:-.025em}
body.saju-active .commerce-price span{color:var(--commerce-muted);font-size:15px}
body.saju-active .commerce-notice{background:#fff1e3;border-radius:12px;padding:20px;margin:0 0 28px;color:#723209}
body.saju-active .commerce-notice strong{font-size:18px}
body.saju-active .commerce-notice p{margin:6px 0 0}
body.saju-active .commerce-product-layout{display:grid;gap:36px}
body.saju-active .commerce-sample{padding:26px 24px;background:#fff6eb;border-radius:16px}
body.saju-active .commerce-sample blockquote{font-size:clamp(23px,4.5vw,30px);font-weight:800;letter-spacing:-.025em;line-height:1.55;margin:26px 0 20px}
body.saju-active .commerce-sample-end{color:#79502d;font-size:14px;margin-bottom:0!important}
body.saju-active .commerce-note,body.saju-active .commerce-help{color:var(--commerce-muted);font-size:14px;line-height:1.7}
body.saju-active .commerce-includes dl{margin:0 0 22px}
body.saju-active .commerce-includes dl>div{padding:15px 0;border-bottom:1px solid var(--commerce-line)}
body.saju-active .commerce-includes dt{font-weight:800;font-size:17px}
body.saju-active .commerce-includes dd{margin:3px 0 0;color:var(--commerce-muted)}
body.saju-active .commerce-next{margin-top:36px;padding-top:30px;border-top:1px solid var(--commerce-line)}
body.saju-active .commerce-next>p{max-width:46ch;color:var(--commerce-muted)}
body.saju-active .commerce-button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:54px;padding:13px 20px;margin:0;border:1px solid transparent;border-radius:12px;background:var(--commerce-orange);color:#fff!important;text-decoration:none!important;font-weight:750!important;line-height:1.5;cursor:pointer;transition:background .16s ease-out}
body.saju-active .commerce-button:hover:not(:disabled){background:#8e2d05}
body.saju-active .commerce-button:active:not(:disabled){background:#762400}
body.saju-active .commerce-button:disabled{background:#eae5df;color:#655e55!important;cursor:not-allowed;opacity:1}
body.saju-active .commerce-button.secondary,body.saju-active .commerce-account-links .commerce-button{background:#fff;color:var(--commerce-orange)!important;border-color:#d8cdc2}
body.saju-active .commerce-button.secondary:hover:not(:disabled),body.saju-active .commerce-account-links .commerce-button:hover:not(:disabled){background:#fff3e7}
body.saju-active .commerce-link{display:inline-flex;min-height:48px;align-items:center;margin-top:12px;font-weight:700}
body.saju-active .commerce-terms{margin-top:32px;border-top:1px solid var(--commerce-line);padding-top:12px}
body.saju-active .commerce summary{padding:14px 0;min-height:48px;cursor:pointer;font-weight:750}
body.saju-active .commerce-terms p{color:var(--commerce-muted);font-size:15px}
body.saju-active .commerce-form{margin-top:28px;max-width:560px}
body.saju-active .commerce-form fieldset{border:0;padding:0;margin:0 0 24px;min-width:0}
body.saju-active .commerce-form legend{font-size:21px;font-weight:800;margin-bottom:12px}
body.saju-active .commerce-form label,body.saju-active .commerce-refund label{display:block;margin:20px 0 8px;font-weight:750}
body.saju-active .commerce :is(input:not([type=checkbox],[type=radio]),textarea){display:block;width:100%;min-width:0;min-height:54px;padding:13px 14px;border:1px solid #afa69b;border-radius:10px;background:#fff;color:var(--commerce-ink);font-size:16px;line-height:1.5;caret-color:var(--commerce-orange);scroll-margin-block:90px}
body.saju-active .commerce input[aria-invalid=true]{border-color:#ad2424}
body.saju-active .commerce-form .commerce-help{margin:8px 0 20px}
body.saju-active .commerce-form>.commerce-button{margin-top:18px}
body.saju-active .commerce-order-summary{display:grid;grid-template-columns:1fr auto;gap:8px 16px;padding:20px 0;margin:22px 0;border-block:1px solid var(--commerce-line)}
body.saju-active .commerce-order-summary>span:last-child{grid-column:1/-1;font-size:14px;color:var(--commerce-muted)}
body.saju-active .commerce-form .commerce-checkbox{display:flex;align-items:flex-start;gap:12px;font-weight:400;font-size:15px;line-height:1.7;margin:24px 0 12px;cursor:pointer}
body.saju-active .commerce-checkbox input{flex:0 0 22px;width:22px;height:22px;accent-color:var(--commerce-orange);margin-top:3px}
body.saju-active .commerce-actions,body.saju-active .commerce-account-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}
body.saju-active .commerce-actions>*{flex:1 1 190px}
body.saju-active .commerce-account-links{max-width:560px;margin-top:24px}
body.saju-active .commerce-account-links>*{flex:1 1 220px}
body.saju-active .commerce-recovery{margin:28px 0;padding:24px;background:#fff1e3;border-radius:14px}
body.saju-active .commerce-recovery code{display:block;padding:14px;background:#fff;font-size:16px;overflow-wrap:anywhere;user-select:all}
body.saju-active .commerce-orders{margin-top:30px}
body.saju-active .commerce-order{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 20px;padding:26px 0;border-block-end:1px solid var(--commerce-line)}
body.saju-active .commerce-order h2{font-size:20px;margin:0 0 6px}
body.saju-active .commerce-order p{margin-bottom:6px}
body.saju-active .commerce-order>strong{font-variant-numeric:tabular-nums;white-space:nowrap}
body.saju-active .commerce-order-id{font-size:13px;color:var(--commerce-muted);word-break:break-all!important}
body.saju-active .commerce-order .commerce-actions,body.saju-active .commerce-order .commerce-refund{grid-column:1/-1;margin-top:0}
body.saju-active .commerce-refund{padding-top:10px}
body.saju-active .commerce-refund textarea{min-height:100px;resize:vertical}
body.saju-active .commerce-refund p{margin-top:10px;font-size:14px;color:var(--commerce-muted)}
body.saju-active .commerce-empty{padding:36px 0}
body.saju-active .commerce-report{max-width:650px;margin:auto}
body.saju-active .commerce-report p{white-space:pre-line;line-height:1.95}
body.saju-active .commerce-chapter-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:26px}
body.saju-active .commerce-chapter-tabs button{display:flex;flex-direction:column;gap:10px;padding:0 0 12px;border:2px solid transparent;border-radius:12px;overflow:hidden;background:#f5f2ed;color:var(--commerce-ink);font-size:16px;font-weight:750;line-height:1.5}
body.saju-active .commerce-chapter-tabs button[aria-selected=true]{border-color:var(--commerce-orange);background:#fff0df}
body.saju-active .commerce-chapter-tabs button:hover{background:#fff0df}
body.saju-active .commerce-chapter-tabs img{width:100%;height:88px;object-fit:cover}
body.saju-active .commerce-paid-card{margin-top:32px;padding-top:18px;border-top:1px solid var(--commerce-line)}
body.saju-active .commerce-paid-card .commerce-help{margin-top:14px}
body.saju-active .commerce-card-dialog{border:0;border-radius:16px;padding:0;width:min(480px,calc(100% - 28px));max-height:calc(100dvh - 32px);color:var(--commerce-ink);background:white}
body.saju-active .commerce-card-dialog::backdrop{background:rgb(25 20 15 / .6)}
body.saju-active .commerce-card-preview{padding:24px;overflow:auto}
body.saju-active .commerce-card-preview img{display:block;max-height:52dvh;width:100%;object-fit:contain;background:#fff3e6;border-radius:10px}
body.saju-active .commerce-card-preview .commerce-actions{gap:10px}
body.saju-active .commerce-card-preview .commerce-actions>*{flex-basis:100%}
body.saju-active .commerce-card-preview .commerce-help{margin-top:14px}
body.saju-active .commerce-chapter{margin-top:42px;padding-top:26px;border-top:1px solid var(--commerce-line)}
body.saju-active .commerce-chapter blockquote{margin:14px 0 28px;padding:20px;background:#fff2e5;border-radius:12px;font-size:20px;line-height:1.65}
body.saju-active .commerce-basis{margin:32px 0}
body.saju-active .commerce-basis pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;max-width:100%;padding:16px;background:#f4f2ef}
body.saju-active .commerce-download{margin:36px auto 10px;max-width:650px}
body.saju-active .commerce-download p{margin-top:14px;color:var(--commerce-muted);font-size:14px}
body.saju-active .commerce-error{margin-top:24px!important;padding:18px;border:1px solid #d3a1a1;border-radius:10px;color:#892323;background:#fff4f4;scroll-margin-block:90px}
body.saju-active .commerce [hidden]{display:none!important}
body.saju-active .commerce-footer{display:block;width:100%;max-width:none;margin:0;padding:24px 24px max(24px,env(safe-area-inset-bottom));border-top:1px solid var(--commerce-line);text-align:center}
body.saju-active .commerce-seller{max-width:650px;margin:16px auto 0}
body.saju-active .commerce-footer>a{display:inline-flex;min-height:48px;align-items:center;font-weight:700}
body.saju-active .commerce-footer p{margin:8px 0 0;font-size:14px;color:var(--commerce-muted)}
@media(min-width:760px){body.saju-active .commerce-content{padding:46px 40px 56px}body.saju-active .commerce-nav{padding-inline:40px}body.saju-active .commerce-product-layout{grid-template-columns:1.15fr 1fr;gap:40px;align-items:start}body.saju-active .commerce-next .commerce-button{max-width:420px}body.saju-active .commerce-next .commerce-link{display:flex;width:fit-content}body.saju-active .commerce-sample{padding:30px}body.saju-active .commerce-order .commerce-actions{max-width:360px}}
@media(min-width:760px){body.saju-active .commerce-hero{display:grid;grid-template-columns:1fr 340px;column-gap:36px;align-content:center}body.saju-active .commerce-book{grid-column:2;grid-row:1/4;margin:0}body.saju-active .commerce-hero h1,body.saju-active .commerce-hero>p,body.saju-active .commerce-price{grid-column:1}body.saju-active .commerce-book img{height:230px}}
@media(max-width:380px){body.saju-active .commerce-content{padding-inline:18px}body.saju-active .commerce-nav{padding-inline:18px}body.saju-active .commerce-sample{padding:22px 18px}body.saju-active .commerce-order{grid-template-columns:1fr}body.saju-active .commerce-order>strong{grid-row:2}}
@media(prefers-reduced-motion:reduce){body.saju-active .commerce-button{transition:none}}
body.saju-active .kept-shelf{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:20px;margin:20px 0 28px}
body.saju-active .kept-book{display:flex;flex-direction:column;align-items:start;gap:10px;border-bottom:1px solid #dbd1bc;padding-bottom:14px}
body.saju-active .kept-book>a{display:flex;align-items:center;gap:12px;width:100%;text-decoration:none;color:#304735}
body.saju-active .kept-book img{width:75px;height:89px;object-fit:contain;background:#f3ead7;border-left:4px solid #516548;box-shadow:2px 3px #cebea4}
body.saju-active .kept-book small{display:block;color:#625a4a}
body.saju-active .kept-book button{background:#fff7eb;color:#4c4136;border:1px solid #a89981;min-height:42px;font-size:14px}
body.saju-active .commerce .commerce-button{box-shadow:0 3px 0 #694528;transition:transform .12s,box-shadow .12s}
body.saju-active .commerce .commerce-button:active{transform:translateY(2px);box-shadow:0 1px 0 #694528}
body.saju-active .commerce label:has(input[type=radio]){cursor:pointer}
@media(prefers-reduced-motion:reduce){body.saju-active .commerce .commerce-button{transition:none}}

/* v0.3.4 그림책 만들기 양식: 라디오는 고르는 칩, 범례는 다른 입력 이름과 같은 크기. */
body.saju-active .commerce-form fieldset{display:flex;flex-wrap:wrap;gap:10px}
body.saju-active .commerce-form fieldset legend{float:left;width:100%;margin:20px 0 8px;font-size:inherit;font-weight:750}
body.saju-active .commerce-form label:has(>input[type=radio]){display:flex;flex:1 1 140px;align-items:center;gap:10px;margin:0;min-height:52px;padding:0 16px;border:1px solid #afa69b;border-radius:10px;background:#fff;font-weight:700}
body.saju-active .commerce-form label:has(>input[type=radio]:checked){border-color:var(--commerce-orange);background:#fff6ee;box-shadow:inset 0 0 0 1px var(--commerce-orange)}
body.saju-active .commerce-form label:has(>input[type=radio]:focus-visible){outline:3px solid #b94b10;outline-offset:3px}
body.saju-active .commerce input[type=radio]{flex:0 0 20px;width:20px;height:20px;margin:0;accent-color:var(--commerce-orange)}
body.saju-active .commerce input[type=radio]:focus-visible{outline:0}
/* 유료 기능: 선물·인쇄가 주 행동, 나머지는 보조 단추. */
body.saju-active .commerce-download :is([data-commerce=preview-cover],[data-commerce=keep-book],[data-commerce=download]){background:#fff;color:var(--commerce-orange)!important;border-color:#d8cdc2;box-shadow:0 2px 0 #e3d6c8}
body.saju-active .commerce-download :is([data-commerce=preview-cover],[data-commerce=keep-book],[data-commerce=download]):hover:not(:disabled){background:#fff3e7}
body.saju-active .commerce-paid-note{margin:0 0 4px;font-size:15px;color:var(--commerce-muted)}
body.saju-active .commerce-paid-note strong{color:var(--commerce-orange)}
body.saju-active .commerce-gift-url{margin:4px 0 0;font-size:15px!important}
body.saju-active .commerce-form fieldset{margin:0}
body.saju-active .commerce-actions:has(>.commerce-link){gap:0 22px}
body.saju-active .commerce-actions>.commerce-link{flex:0 0 auto;margin-top:0}
body.saju-active .commerce .commerce-button[data-commerce=another-book]{margin-top:12px;background:#fff;color:var(--commerce-orange)!important;border-color:#d8cdc2;box-shadow:0 2px 0 #e3d6c8}
body.saju-active .trial-promise{margin:4px 0 0;padding-left:1.2em;display:grid;gap:2px;font-size:15px;color:var(--commerce-ink)}
body.saju-active .trial-promise li::marker{color:var(--commerce-orange)}
