:root{--ink:#173e33;--green:#205d46;--muted:#627067;--line:#d9e1db;--paper:#fff;--background:#f2f5f1;font-family:'Malgun Gothic','Apple SD Gothic Neo',sans-serif;color:var(--ink);font-size:15px}
*{box-sizing:border-box}body{margin:0;background:var(--background);word-break:keep-all}a{color:inherit;text-underline-offset:4px}button,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,textarea:focus-visible{outline:3px solid #3b8462;outline-offset:4px}h1,h2,h3,p,dl,dd{margin:0}.toolbar{min-height:76px;padding:18px 32px;display:flex;align-items:center;justify-content:space-between;gap:24px;background:white;border-bottom:1px solid var(--line)}.wordmark{font-size:14px;letter-spacing:-.04em;font-weight:800;text-decoration:none}.wordmark span{display:block;font-weight:400;font-size:11px;letter-spacing:0;margin-top:4px}.toolbar>a:last-child{font-size:12px}.sample-badge{font-size:11px;padding:7px 10px;border:1px solid #cadbce;border-radius:4px;color:#53735e}.workspace{max-width:1480px;margin:0 auto;display:grid;grid-template-columns:320px minmax(0,1fr);gap:34px;padding:30px 32px 50px;align-items:start}.editor{padding:24px;background:white;border:1px solid var(--line);border-radius:10px}.eyebrow{font-size:11px;color:var(--green);font-weight:700;margin-bottom:18px}.editor h1{font-size:27px;line-height:1.4;letter-spacing:-.06em}.editor-intro{font-size:13px;color:var(--muted);line-height:1.8;margin-top:16px}.editor label{display:block;font-size:12px;font-weight:700;margin:25px 0 9px}.editor textarea{display:block;width:100%;resize:vertical;min-height:175px;line-height:1.8;padding:13px 14px;border:1px solid #c9d5cb;background:#f8faf7;border-radius:6px;font-size:14px}.editor button{width:100%;border-radius:5px;min-height:45px;padding:12px 10px;font-size:12px;font-weight:700;line-height:1.5}.secondary{margin-top:10px;border:1px solid #aabfaf;background:white;color:var(--green)}.primary{margin-top:8px;background:var(--green);color:white;border:1px solid var(--green)}.status{font-size:11px;line-height:1.8;color:#42634d;min-height:40px;margin-top:12px}.catalog,.file-links{border-top:1px solid var(--line);margin-top:20px;padding-top:19px}.catalog h2,.file-links h2{font-size:12px;margin-bottom:13px}.catalog dl>div{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px;font-size:10px;line-height:1.7}.catalog dd{white-space:nowrap}.catalog>p{font-size:10px;line-height:1.8;color:var(--muted);margin-top:12px}.file-links a{display:block;margin-top:11px;font-size:12px}.preview{min-width:0}.preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:14px;font-size:12px;font-weight:700}.preview-toolbar button{border:1px solid #809d88;color:var(--green);background:white;padding:9px 15px;border-radius:5px;min-height:40px;font-size:12px}.paper{background:white;max-width:900px;margin:0 auto;padding:42px 38px 24px;border:1px solid #dbe3dc;box-shadow:0 12px 35px #1f3e2610;min-height:1020px}.document-top{display:flex;justify-content:space-between;align-items:flex-end;gap:22px;border-bottom:3px solid var(--ink);padding-bottom:23px}.document-kicker{font-size:10px;letter-spacing:.02em;color:var(--muted);margin-bottom:13px}.document-top h2{font-size:35px;font-weight:800;letter-spacing:-.04em;color:#183b2d}.document-meta{font-size:10px;line-height:2}.document-meta>div{display:flex;justify-content:space-between;gap:17px}.document-meta dt{color:var(--muted)}.document-meta dd{font-variant-numeric:tabular-nums;font-weight:600}.document-sample{font-size:9px;color:#62786b;text-align:right;margin-top:9px}.parties{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin:24px 0 30px}.parties section{border-bottom:1px solid var(--line);padding-bottom:20px}.parties h3{font-size:10px;color:#61796b;font-weight:600;margin-bottom:12px}.parties strong{font-size:21px;letter-spacing:-.04em;display:block;margin-bottom:12px}.parties p{font-size:10px;color:#5b665f;line-height:1.9}.item-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:10px;color:#273a2f;font-variant-numeric:tabular-nums}.item-table caption{text-align:left;font-size:10px;color:var(--muted);padding-bottom:10px}.item-table th{padding:13px 4px;background:#eef3ef;border-top:1px solid #587963;border-bottom:1px solid #b6c9ba;font-size:9px;font-weight:600;white-space:nowrap}.item-table td{padding:16px 5px;border-bottom:1px solid #e2e8e2;text-align:right;vertical-align:middle;overflow-wrap:anywhere;line-height:1.6}.item-table td:nth-child(1),.item-table td:nth-child(3),.item-table td:nth-child(4),.item-table td:nth-child(8){text-align:center}.item-table td:nth-child(2){text-align:left}.item-table td small{display:block;font-size:9px;color:#687970}.item-table .empty td{height:180px;text-align:center;color:#849187;font-size:12px;line-height:2}.tax-free{color:#607568}.amounts{display:grid;grid-template-columns:1fr 1.15fr;gap:30px;margin-top:30px;align-items:center}.amount-details p{display:flex;justify-content:space-between;gap:10px;font-size:11px;margin:9px 0}.amount-details p span{color:var(--muted)}.amount-details strong{font-weight:600;font-variant-numeric:tabular-nums}.grand-total{display:flex;justify-content:space-between;align-items:center;gap:15px;border:1px solid #527b62;background:#f2f6f0;padding:22px 17px}.grand-total>span{font-size:11px}.grand-total strong{font-size:28px;font-weight:800;letter-spacing:-.05em;font-variant-numeric:tabular-nums}.grand-total small{font-size:12px;margin-left:4px;font-weight:600}.payment{display:flex;justify-content:flex-end;gap:28px;border-bottom:1px solid var(--line);padding:20px 0 24px}.payment p{display:flex;gap:18px;font-size:10px}.payment span{color:var(--muted)}.memo{padding:24px 0 27px}.memo h3{font-size:10px;margin-bottom:12px}.memo p{font-size:10px;line-height:1.9;color:#66766c}.signatures{display:flex;gap:40px;justify-content:flex-end;margin-top:25px;padding-bottom:30px;border-bottom:1px solid var(--line);font-size:10px}.signatures span{display:inline-block;margin-left:40px;color:#809086}.paper-footer{margin-top:17px;display:flex;justify-content:space-between;gap:16px;font-size:8px;color:#7b8980}
@media(max-width:1000px){.workspace{grid-template-columns:270px minmax(0,1fr);gap:22px;padding:24px 22px}.editor{padding:20px}.paper{padding:30px 22px;min-height:950px}.document-top{display:block}.document-meta{margin-top:14px;max-width:250px}.parties{gap:20px}.grand-total{display:block;padding:14px}.grand-total strong{display:block;margin-top:10px;font-size:26px}.item-table{font-size:9px}.item-table th{font-size:8px}.document-top h2{font-size:31px}}
@media(max-width:720px){.toolbar{padding:16px 20px;gap:12px;flex-wrap:wrap}.toolbar>a:last-child{font-size:11px}.sample-badge{display:none}.workspace{display:block;padding:20px 16px}.editor{margin-bottom:25px}.editor-intro br{display:none}.editor textarea{min-height:150px}.editor h1{font-size:26px}.editor h1 br{display:none}.preview-toolbar{font-size:11px}.preview-toolbar button{font-size:11px}.paper{padding:25px 18px;min-height:850px}.document-top h2{font-size:29px}.document-kicker{font-size:9px}.parties{gap:17px;margin:22px 0}.parties strong{font-size:18px}.parties p{font-size:9px}.amounts{gap:18px;grid-template-columns:1fr}.amount-details p{font-size:12px}.grand-total{display:flex}.grand-total strong{margin:0}.payment{gap:20px}.signatures{gap:20px}.signatures span{margin-left:15px}.item-table-wrap{overflow-x:auto}.item-table{min-width:520px}.paper-footer{font-size:7px}.memo p{font-size:9px}}
@page{size:A4 portrait;margin:14mm}
@media print{html,body{background:white;margin:0;color:black}.toolbar,.editor,.preview-toolbar{display:none!important}.workspace{display:block;margin:0;padding:0;max-width:none}.paper{border:0;box-shadow:none;min-height:0;max-width:none;padding:0;overflow:visible}.document-top{display:flex}.document-meta{margin:0;max-width:none}.document-top h2{font-size:26pt}.document-kicker{font-size:8pt}.parties{break-inside:avoid;margin:8mm 0}.parties strong{font-size:16pt}.parties p{font-size:9pt}.item-table-wrap{overflow:visible}.item-table{min-width:0;font-size:9pt}.item-table th{font-size:8pt;padding:4mm 1mm}.item-table td{padding:4mm 1mm}.item-table thead{display:table-header-group}.item-table tr{break-inside:avoid}.amounts{grid-template-columns:1fr 1.15fr;break-inside:avoid}.grand-total strong{display:inline;font-size:23pt}.memo,.signatures{break-inside:avoid}.memo p{font-size:8pt}.paper-footer{font-size:7pt}.payment{break-inside:avoid}*{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* 표준 거래명세서 (도매정산 도우미 실제 출력 양식과 같은 구성 · FORM_SPEC) */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.paper.std{min-height:0;padding:0 28px 22px;border-top:5px solid #1f3a5f;color:#222;font-family:'Malgun Gothic','Apple SD Gothic Neo',sans-serif}
.std-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:18px 0 4px}
.std-no{font-size:11px;font-weight:700;color:#6b7280}
.std-head h2{font-size:26px;font-weight:800;letter-spacing:10px;color:#1f3a5f}
.std-copy{justify-self:end;border:1px solid #1f3a5f;color:#1f3a5f;font-size:11px;font-weight:700;padding:3px 8px}
.std-info{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:700;padding:8px 0}
.std-sample{font-size:10px;font-weight:500;color:#6b7280}
.std-parties{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.std table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.std td,.std th{border:1px solid #b8c2cc;padding:5px 7px;font-size:12px}
.std-who{border:1.5px solid #1f3a5f}
.std-who th{width:24px;background:#e8eef5;color:#1f3a5f;writing-mode:vertical-rl;letter-spacing:3px;font-size:11px}
.std-who td.l{width:66px;white-space:nowrap;background:#f7f9fb;color:#6b7280;font-weight:700;font-size:11px;text-align:center}
.std-amount{margin-top:10px;border:1.5px solid #1f3a5f;display:grid;grid-template-columns:110px 1fr auto;align-items:center}
.std-amount b{background:#1f3a5f;color:#fff;text-align:center;padding:9px 0;font-size:13px}
.std-amount span{padding:0 12px;font-weight:700;font-size:13px}
.std-amount strong{padding:0 12px;color:#1f3a5f;font-size:16px}
.std-items{margin-top:10px}
.std-items th{background:#1f3a5f;color:#fff;border-color:#1f3a5f;font-size:11px;padding:7px 4px}
.std-items td{height:28px;border-left:0;border-right:0}
.std-items tbody tr:nth-child(even) td{background:#f7f9fb}
.std-items td.n,.std-items td.c{text-align:center}.std-items td.n{color:#6b7280}
.std-items td.r{text-align:right}.std-items td.free{text-align:right;color:#2e7d5b;font-weight:700}
.std-sum td{font-weight:700;text-align:right;padding:7px 5px;white-space:nowrap}
.std-sum td.l{background:#e8eef5;color:#1f3a5f;text-align:center;font-size:11px;white-space:nowrap}
.std-sum td.k{background:#1f3a5f;color:#fff;text-align:center;font-size:11px}
.std-sum td.big{color:#1f3a5f;font-size:14px}
.std-foot{display:flex;justify-content:space-between;color:#6b7280;font-size:11px;padding:10px 0 4px}
.std-note{font-size:10px;line-height:1.8;color:#6b7280;margin-top:8px}
.std .paper-footer{display:flex;justify-content:space-between;margin-top:14px;padding-top:10px;border-top:1px solid #e2e8f0;font-size:10px;color:#6b7280}
@media(max-width:760px){.std-parties{grid-template-columns:1fr}.std-amount{grid-template-columns:90px 1fr}.std-amount strong{grid-column:1/-1;padding:8px 12px}.std td,.std th{font-size:10.5px;padding:4px}.paper.std{padding:0 12px 16px}.std-head h2{font-size:20px;letter-spacing:5px}}
@media print{.toolbar,.editor,.preview-toolbar{display:none}.workspace{display:block;padding:0}.paper.std{border:0;box-shadow:none;max-width:none}}
