/* LETTERLY 편지지/문서 템플릿 — 10개 레이아웃 × 10개 팔레트(CSS 변수) */
.lt-page{position:relative;box-sizing:border-box;overflow:hidden;background:var(--bg,#fff);color:var(--ink,#222);
  font-family:var(--font,serif);font-size:var(--fs,12pt);line-height:var(--lh,1.9);word-break:keep-all;overflow-wrap:break-word;text-align:left}
.lt-page *{box-sizing:border-box}
.lt-inner{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--my,24mm) var(--mx,22mm);display:flex;flex-direction:column;z-index:2}
.lt-deco{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:1}
.lt-deco i{display:none;position:absolute}
.lt-head{display:flex;align-items:center;gap:3mm;min-height:0}
.lt-logo{height:var(--logo-h,14mm);width:auto;max-width:60mm;object-fit:contain}
.lt-logo[hidden]{display:none}
.lt-headtxt{font-weight:700;letter-spacing:.08em;color:var(--accent);outline:none}
.lt-headtxt:empty{display:none}
.lt-title{font-family:inherit;font-size:1.5em;font-weight:700;margin:0 0 1.1em;line-height:1.4;text-align:var(--tta,left);outline:none;color:var(--ink)}
.lt-title[hidden]{display:none}
.lt-body{flex:1;min-height:0;overflow:hidden;text-align:var(--ta,left);outline:none}
.lt-body p,.lt-body div{margin:0 0 .55em;min-height:1em}
.lt-body h2{font-size:1.2em;margin:.8em 0 .4em}.lt-body h3{font-size:1.05em;margin:.7em 0 .3em}
.lt-body ul,.lt-body ol{margin:.3em 0 .6em;padding-left:1.4em}
.lt-foot{margin-top:6mm;text-align:right;font-size:.95em;outline:none;white-space:pre-line}
.lt-foot:empty{display:none}

/* 편집 중 placeholder (내보내기 클론에는 .exporting 이 붙어 제외) */
.is-editor .lt-page:not(.exporting) .lt-headtxt:empty,.is-editor .lt-page:not(.exporting) .lt-foot:empty{display:block;min-width:30mm;min-height:1.2em}
.is-editor .lt-page:not(.exporting) .lt-headtxt:empty::before,.is-editor .lt-page:not(.exporting) .lt-foot:empty::before{content:attr(data-ph);color:#9a9a9a;font-weight:400;letter-spacing:0;font-size:.85em}
.is-editor .lt-page:not(.exporting) .lt-foot:empty{margin-left:auto}

/* 1 단선 프레임 */
.lay-frame::before{content:"";position:absolute;top:8mm;right:8mm;bottom:8mm;left:8mm;border:.35mm solid var(--accent);z-index:1}
/* 2 더블 프레임 */
.lay-double::before{content:"";position:absolute;top:7mm;right:7mm;bottom:7mm;left:7mm;border:1.2mm double var(--accent);z-index:1}
.lay-double::after{content:"";position:absolute;top:12mm;right:12mm;bottom:12mm;left:12mm;border:.2mm solid var(--accent);opacity:.55;z-index:1}
.lay-double .lt-inner{padding:calc(var(--my) + 3mm) calc(var(--mx) + 3mm)}
/* 3 상단 밴드 */
.lay-band::before{content:"";position:absolute;left:0;right:0;top:0;height:15mm;background:var(--accent);z-index:1}
.lay-band::after{content:"";position:absolute;left:var(--mx);right:var(--mx);bottom:12mm;height:.3mm;background:var(--accent);opacity:.5;z-index:1}
.lay-band .lt-inner{padding-top:calc(var(--my) + 6mm)}
/* 4 사이드 바 */
.lay-sidebar::before{content:"";position:absolute;left:0;top:0;bottom:0;width:11mm;background:var(--accent);z-index:1}
.lay-sidebar::after{content:"";position:absolute;left:14mm;top:0;bottom:0;width:.4mm;background:var(--accent);opacity:.5;z-index:1}
.lay-sidebar .lt-inner{padding-left:calc(var(--mx) + 10mm)}
/* 5 코너 장식 */
.lay-corners .lt-deco i{display:block;width:17mm;height:17mm;border:0 solid var(--accent)}
.lay-corners .lt-deco i:nth-child(1){left:9mm;top:9mm;border-top-width:.7mm;border-left-width:.7mm}
.lay-corners .lt-deco i:nth-child(2){right:9mm;top:9mm;border-top-width:.7mm;border-right-width:.7mm}
.lay-corners .lt-deco i:nth-child(3){left:9mm;bottom:9mm;border-bottom-width:.7mm;border-left-width:.7mm}
.lay-corners .lt-deco i:nth-child(4){right:9mm;bottom:9mm;border-bottom-width:.7mm;border-right-width:.7mm}
.lay-corners .lt-title{--tta:center}
/* 6 레터헤드 */
.lay-letterhead::before{content:"";position:absolute;left:0;right:0;top:0;height:3mm;background:var(--accent);z-index:1}
.lay-letterhead .lt-head{padding-bottom:4mm;margin-bottom:9mm;border-bottom:.35mm solid var(--accent)}
.lay-letterhead .lt-foot{border-top:.25mm solid var(--accent);padding-top:3mm;margin-top:5mm}
.lay-letterhead .lt-title{font-size:1.25em}
/* 7 증서형 */
.lay-certificate{--ta:center;--tta:center}
.lay-certificate::before{content:"";position:absolute;top:6mm;right:6mm;bottom:6mm;left:6mm;border:2.4mm double var(--accent);z-index:1}
.lay-certificate::after{content:"";position:absolute;top:13mm;right:13mm;bottom:13mm;left:13mm;border:.25mm solid var(--accent);z-index:1}
.lay-certificate .lt-inner{padding:calc(var(--my) + 6mm) calc(var(--mx) + 6mm)}
.lay-certificate .lt-head{justify-content:center}
.lay-certificate .lt-title{font-size:2.1em;letter-spacing:.35em;margin:6mm 0 10mm}
.lay-certificate .lt-foot{text-align:center}
/* 8 초청장형 */
.lay-invitation{--ta:center;--tta:center}
.lay-invitation::before{content:"";position:absolute;top:10mm;right:10mm;bottom:10mm;left:10mm;border:.25mm solid var(--accent);z-index:1}
.lay-invitation .lt-head{justify-content:center}
.lay-invitation .lt-title{font-size:1.9em;font-weight:400;letter-spacing:.12em;margin:8mm 0 12mm}
.lay-invitation .lt-title::after{content:"";display:block;width:22mm;height:.4mm;background:var(--accent);margin:5mm auto 0}
.lay-invitation .lt-foot{text-align:center}
/* 9 공문형 */
.lay-notice{--ta:justify}
.lay-notice::before{content:"";position:absolute;left:var(--mx);right:var(--mx);top:12mm;height:.8mm;background:var(--accent);z-index:1}
.lay-notice .lt-head{justify-content:center;margin-bottom:8mm}
.lay-notice .lt-headtxt{font-size:1.3em;letter-spacing:.3em}
.lay-notice .lt-title{--tta:center;border-top:.3mm solid var(--ink);border-bottom:.3mm solid var(--ink);padding:3mm 0;font-size:1.35em;letter-spacing:.2em}
/* 10 소프트 도트 */
.lay-dots::after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;opacity:.16;
  background-image:radial-gradient(circle,var(--accent) 1.1px,transparent 1.5px);background-size:5mm 5mm}
.lay-dots::before{content:"";position:absolute;top:9mm;right:9mm;bottom:9mm;left:9mm;border:.4mm dashed var(--accent);border-radius:3mm;z-index:1}
.lay-dots .lt-title{--tta:center}
.lay-dots .lt-inner{padding:calc(var(--my) + 2mm) calc(var(--mx) + 2mm)}

/* 머리말 간격 / 비어 있으면 숨김 */
.lt-head{margin-bottom:6mm}
.lt-head:not(:has(.lt-logo:not([hidden]))):not(:has(.lt-headtxt:not(:empty))){display:none}
.is-editor .lt-page:not(.exporting) .lt-head{display:flex!important}
.lay-letterhead .lt-head,.lay-notice .lt-head{margin-bottom:9mm}
