@font-face{font-family:LetterSerif;src:url('/static/fonts/DejaVuSerif.ttf')}@font-face{font-family:LetterSerif;src:url('/static/fonts/DejaVuSerif-Bold.ttf');font-weight:700}@font-face{font-family:LetterSerif;src:url('/static/fonts/DejaVuSerif-Italic.ttf');font-style:italic}@font-face{font-family:LetterSans;src:url('/static/fonts/DejaVuSans.ttf')}@font-face{font-family:LetterSans;src:url('/static/fonts/DejaVuSans-Bold.ttf');font-weight:700}@font-face{font-family:LetterSans;src:url('/static/fonts/DejaVuSans-Oblique.ttf');font-style:italic}
.editing.composing{background:#eae1cb}.editing.composing main{padding:0;max-width:none;height:var(--visual-height,100dvh);overflow:hidden}.composing .editor-bar{position:relative;height:60px;margin:0;padding:6px 18px;background:#eae1cb;gap:10px}.composing .editor-context{flex:1;font-size:16px;font-weight:550;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compose-send{min-height:44px;padding:8px 18px;font-size:16px;border-radius:0;gap:8px}.compose-send .icon{width:20px;height:20px}.composing .editor-menu{top:56px;right:18px;background:#eae1cb}.composition{position:relative;height:calc(var(--visual-height,100dvh) - 60px);overflow:hidden}.composition-scroll{height:100%;overflow-y:auto;overscroll-behavior:contain;padding:8px 20px 158px;scroll-padding:22px 0 160px;touch-action:pan-y}.letter-pages,.proof-pages{max-width:816px;margin:auto;display:flex;flex-direction:column;gap:24px}.letter-sheet{position:relative;min-height:770px;padding:70px 72px;background:#fffdf8;border-radius:0;overflow-wrap:anywhere;font:20px/1.56 LetterSerif,Georgia,serif;color:#242323}.letter-sheet.sans{font-family:LetterSans,Arial,sans-serif}.letter-sheet.typewriter{font-family:Courier,'Courier New',monospace}.letter-sheet.handwritten{font-family:cursive;font-size:24px}.page-write{min-height:625px;outline:none!important;white-space:pre-wrap;overflow-wrap:anywhere;cursor:text}.page-write:empty:before{content:attr(data-placeholder);color:#7a7165;pointer-events:none}.page-write h1{font-size:1.5em;letter-spacing:0;line-height:1.35;margin:0 0 .5em}.page-write h2{font-size:1.25em;letter-spacing:0;line-height:1.35;margin:0 0 .5em}.page-write h3{font-size:1.1em;letter-spacing:0;line-height:1.35;margin:0 0 .5em}.page-write p,.page-write div{margin:0 0 .5em}.page-write ul,.page-write ol{padding-left:1.5em;margin:0 0 .5em}.page-write a{text-decoration:underline;text-decoration-thickness:2px}.add-page{display:flex;gap:10px;align-items:center;justify-content:center;min-height:52px;margin:20px auto 0;padding:12px 20px;border-radius:0;background:#ddd2b8;color:var(--blue);font-size:16px;font-weight:600}.compose-float{position:absolute;z-index:9;bottom:max(14px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:calc(100% - 24px);width:max-content;display:flex;align-items:center;flex-direction:column;gap:10px}.compose-tools{display:flex;gap:3px;align-items:center;background:var(--blue);color:#fffdf8;padding:5px;border-radius:0}.compose-tools button,.format-panel button,.art-tools button{display:flex;align-items:center;justify-content:center;width:48px;height:48px;min-width:48px;border-radius:0;color:inherit}.compose-tools button[aria-expanded=true],.compose-tools button[aria-pressed=true],.compose-tools button:hover:not(:disabled){background:#4a423a}.compose-tools button:disabled{background:transparent!important;color:#8a8174!important}.compose-tools button:focus-visible{outline:3px solid #fffdf8;outline-offset:-5px}.compose-panel{background:#eae1cb;color:var(--ink);border-radius:0;padding:10px;max-height:min(50vh,400px);overflow:auto;width:350px;max-width:calc(100vw - 24px);animation:compose-panel-in 180ms cubic-bezier(.2,.8,.2,1)}.format-panel{display:flex;width:max-content;gap:4px;padding:5px;color:var(--blue)}.format-panel button:hover{background:#d3c7aa}.compose-fonts{display:flex;gap:8px;overflow-x:auto}.compose-fonts button{position:relative;flex:0 0 106px;display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding:12px;background:#f5eedc;border-radius:0;font-size:16px}.compose-fonts img{height:32px;max-width:80px;object-fit:contain}.compose-fonts button.active{background:var(--blue);color:#fffdf8}.compose-fonts button.active img{filter:brightness(0) invert(1)}.compose-fonts button>.icon{position:absolute;width:18px;height:18px;right:8px;bottom:12px}.compose-materials{display:grid;gap:14px;padding:16px 3px 3px}.compose-materials>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.compose-materials>div>span{width:100%;font-size:16px;font-weight:600}.compose-materials button{display:flex;align-items:center;gap:8px;min-height:46px;padding:8px 12px;border-radius:0;background:#f5eedc;font-size:16px}.compose-materials button[aria-pressed=true]{background:var(--blue);color:#fffdf8}.material-dot{width:24px;height:24px;border-radius:0;background:#fffdf8}.material-dot.ivory{background:#f7f0d9}.material-dot.kraft{background:#a9753d}.compose-materials .icon{width:18px;height:18px}.add-panel{display:grid;grid-template-columns:1fr 1fr;gap:8px}.add-panel>button,.editor-upload{display:flex;align-items:center;justify-content:flex-start;gap:10px;position:relative;min-height:56px;padding:10px 12px;background:#f5eedc;border-radius:0;font-size:16px;font-weight:550;margin:0;cursor:pointer}.editor-upload input{position:absolute;width:100%;height:100%;inset:0;opacity:0;cursor:pointer;padding:0}.editor-upload:focus-within{outline:3px solid var(--blue);outline-offset:2px}.add-stamp img{width:32px;height:36px;object-fit:contain}.compose-proof{position:relative;background:#fffdf8;border-radius:0;overflow:hidden;touch-action:pan-y}.compose-proof-base{display:block;width:100%;height:100%;object-fit:fill;user-select:none;pointer-events:none}.compose-art-layer{position:absolute;inset:0;touch-action:pan-y}.compose-art{position:absolute;padding:0;min-height:0;background:transparent;border-radius:0;touch-action:none;cursor:grab}.compose-art:active{transform:none!important;cursor:grabbing}.compose-art:before{content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(44px,100%);height:max(44px,100%)}.compose-art img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}.compose-art.selected{outline:3px solid var(--blue);outline-offset:4px}.compose-art:focus-visible{outline:4px solid var(--red)}.art-tools{display:flex;align-items:center;gap:10px;width:320px;padding:8px 12px}.art-tools label{font-size:16px;margin:0}.art-tools input{height:44px;min-height:44px;padding:0;background:transparent;accent-color:var(--blue);flex:1;min-width:80px}.art-tools button{color:var(--red)}.art-tools input::-webkit-slider-runnable-track{height:8px;background:#cfc3a6;border-radius:0}.art-tools input::-webkit-slider-thumb{width:26px;height:26px;margin-top:-9px}.compose-loading{min-height:50vh;display:flex;align-items:center;justify-content:center;font-size:18px;color:var(--muted)}.composition[aria-busy=true] .compose-tools{opacity:.7}.composition[aria-busy=true] .page-write{pointer-events:none}.composing .notice{position:absolute;top:60px;z-index:20;left:20px;right:20px;margin:0}.composing #toast{bottom:170px}@keyframes compose-panel-in{from{transform:translateY(12px) scale(.97);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}
@media(max-width:700px){.composing .editor-bar{height:56px;padding:4px 10px}.composition{height:calc(var(--visual-height,100dvh) - 56px)}.composition-scroll{padding:0 10px 145px;scroll-padding-top:10px}.letter-pages,.proof-pages{gap:18px}.letter-sheet{padding:28px 23px;min-height:calc(var(--visual-height,100dvh) - 152px);border-radius:0;font-size:18px;line-height:1.55}.page-write{min-height:calc(var(--visual-height,100dvh) - 208px)}.letter-sheet.handwritten{font-size:22px}.compose-tools{gap:0}.compose-tools button{width:48px;min-width:48px}.compose-tools .icon{width:23px;height:23px}.compose-float{bottom:max(10px,env(safe-area-inset-bottom))}.compose-panel{max-height:calc(var(--visual-height,100dvh) - 145px)}.compose-proof{border-radius:0}.compose-send{padding:8px 14px}.composing .editor-context{font-size:16px}.composing .notice{top:56px}.compose-tools button:active{transform:scale(.92)}.composition.mode-write .composition-scroll{scroll-padding-bottom:170px}}
@media(prefers-reduced-motion:reduce){.compose-panel{animation:none}.composition *{scroll-behavior:auto!important}}
.compose-orphan{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#eae1cb;padding:14px;border-radius:0;font-size:16px}.compose-orphan>span{width:100%}.compose-orphan>button{min-height:48px;padding:10px 14px;background:#fffdf8;border-radius:0;color:var(--blue)}
.page-write[data-format=markdown]{white-space:normal}.page-write[data-format=text] p,.page-write[data-format=text] div{margin:0}
.composition-scroll,.compose-proof,.compose-art-layer{touch-action:pan-x pan-y pinch-zoom}.composition.zoomed .proof-pages{width:calc(min(816px,calc(100vw - 40px))*2);max-width:none}.composition.zoomed .composition-scroll{overflow-x:auto}.compose-art{touch-action:none}
.compose-files{grid-column:1/-1;display:flex;flex-direction:column;gap:8px}.compose-files>div{display:flex;align-items:center;gap:10px;background:#f5eedc;border-radius:0;padding:6px 10px 6px 14px}.compose-files span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:16px}.compose-files button{display:flex;align-items:center;justify-content:center;min-width:48px;height:48px;color:var(--red);border-radius:0}
.compose-question{width:360px;max-width:calc(100vw - 32px);padding:24px;border-radius:0}.compose-question h2{font-size:24px;margin:0 0 18px}.compose-question p{margin:12px 0;overflow-wrap:anywhere;font-size:16px}.compose-question input{margin:6px 0 18px;font-size:18px}.compose-question form>div{display:flex;gap:12px;margin-top:22px}.compose-question .button{flex:1;min-height:50px;font-size:16px;padding:10px 16px}.letter-sheet:has(.page-write:focus-visible){outline:3px solid var(--blue);outline-offset:3px}
.letter-sheet.original_hand,.paper.original_hand,.rich-letter.original_hand,.letter-input.original_hand{font-family:PostscriptOriginal,LetterSerif,serif;font-size:26px;line-height:1.6;font-kerning:none;font-variant-ligatures:common-ligatures}.letter-sheet.original_hand.source-font-unavailable{font-family:LetterSerif,serif;font-size:20px}.compose-fonts button:has(.style-badge){flex-basis:144px}.compose-fonts .style-badge{font-size:16px;font-weight:450}.compose-fonts button:has(.style-badge)>.icon{top:14px;bottom:auto}.compose-issue{max-width:816px;margin:0 auto 14px;padding:14px 16px;border-radius:0;background:#f6e0d6;color:#952718;font:16px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.page-write::selection,.page-write *::selection{background:#f3cbbf;color:#28231f}@media(max-width:700px){.letter-sheet.original_hand{font-size:24px}.letter-sheet.original_hand.source-font-unavailable{font-size:18px}}

.compose-tools .compose-mode-switch{display:flex;gap:2px;margin-right:4px;padding:3px;background:#ffffff20;border-radius:0}
.compose-tools .compose-mode-switch button{width:auto;min-width:67px;min-height:44px;height:44px;padding:8px 10px;font-size:15px;font-weight:600;border-radius:0}
.compose-tools .compose-mode-switch button[aria-pressed=true]{background:#fffdf8;color:var(--blue)}
.compose-tools .compose-mode-switch button:focus-visible{outline-color:#f5eedc}
.compose-edit-tools{display:flex;gap:6px;margin-bottom:12px}
.compose-edit-tools button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;flex:1;padding:8px;border-radius:0;background:#f5eedc;font-size:15px;color:var(--blue)}
.compose-edit-tools button:disabled{opacity:.45}
.compose-edit-tools .icon{width:20px;height:20px}
.compose-pdf-entry{max-width:816px;margin:0 auto 10px;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:4px 10px;font-size:14px;color:#686055}
.compose-pdf-upload{position:relative;display:flex;align-items:center;gap:6px;min-height:44px;padding:8px 12px;margin:0;font-size:14px;font-weight:600;color:var(--blue);border-radius:0;cursor:pointer}
.compose-pdf-upload:hover{background:#eae1cb}
.compose-pdf-upload input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;padding:0}
.compose-pdf-upload:focus-within{outline:3px solid var(--blue);outline-offset:2px}
.compose-pdf-upload .icon{width:20px;height:20px}
@media(max-width:700px){.compose-tools>button{width:44px;min-width:44px;height:44px}.compose-tools .compose-mode-switch button{min-width:65px;padding:8px}.compose-pdf-entry{justify-content:center;margin-bottom:6px}}
