/* Shared paper treatments: the composer is the actual note, not a separate mock-up. */
#memoModal {z-index:200; padding:24px; overflow-y:auto; overscroll-behavior:contain}
#memoModal>div {max-width:820px!important; max-height:calc(100dvh - 48px); overflow-y:auto; padding:28px!important; border:1px solid #d4cec2!important; border-radius:22px!important; background:#fffcf5!important; box-shadow:0 28px 100px #233b5238!important}
#memoModal>div>.absolute {display:none}
#memoModal h3 {font-size:29px; font-weight:500}
#closeModalBtn {width:40px;height:40px;font-size:27px;border-radius:50%;background:#eee9de;color:#344c61}
.memo-composer {display:grid;grid-template-columns:1fr 1fr;gap:34px;margin-top:24px;color:#344c61}
.memo-compose-left {min-width:0;align-self:start}
.memo-compose-right {min-width:0;display:flex;flex-direction:column;gap:12px}
.memo-label {display:block;font-size:11px;font-weight:600;letter-spacing:.04em;margin-bottom:8px;color:#536476}
.memo-label small {font-size:10px;font-weight:400;color:#8a9299;margin-left:5px}
.memo-composer fieldset {border:0;padding:0;margin:0;min-width:0}
.memo-paper {position:relative;min-height:320px;padding:40px 25px 25px;box-shadow:3px 12px 24px #79634018;isolation:isolate;transition:background-color .22s; margin-top:18px}
.memo-paper textarea {position:relative;z-index:1;display:block;width:100%;height:225px;resize:vertical;max-height:420px;border:0;background:transparent!important;box-shadow:none;font-family:var(--message-font)!important;font-size:23px;line-height:1.7;color:#31465a;padding:0;border-radius:0;outline-offset:7px}
.memo-paper textarea::placeholder {color:#6c7784;opacity:.7}
#memoSignature {position:relative;display:block;text-align:right;font-family:var(--message-font);font-size:20px;overflow-wrap:anywhere;margin-top:18px}
.memo-preview-meta {display:flex;justify-content:space-between;color:#8a9299;font-size:10px;margin-top:17px;letter-spacing:.07em}
.memo-style-picker {display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.memo-style-picker button {border:1px solid transparent;border-radius:9px;padding:7px 4px;color:#77818a;font-size:10px;transition:background .2s,border-color .2s}
.memo-style-picker button[aria-pressed=true] {background:#eaf0f6;border-color:#94b0c9;color:#315572}
.memo-swatch {position:relative;display:block;width:36px;height:39px;margin:2px auto 7px;background-color:#f5dfab;box-shadow:1px 3px 4px #53647620;pointer-events:none}
.memo-swatch i {position:absolute;top:14px;left:8px;width:20px;height:1px;background:#75808b66;box-shadow:0 5px #75808b66,0 10px #75808b66}
.memo-colors {display:flex;gap:11px;flex-wrap:wrap;padding:4px 0}
.memo-colors .color-opt {width:25px;height:25px;border-radius:50%;border:1px solid #79838b26;box-shadow:none;transform:none!important;outline:none;--tw-ring-shadow:0 0 transparent!important}
.memo-colors .color-opt[aria-pressed=true] {outline:1.5px solid #426d91;outline-offset:3px}
#memoFont,.memo-identity input {width:100%;min-height:37px;border:1px solid #d9d9d1;background:#ffffffa6;border-radius:8px;padding:7px 10px;font-size:12px;color:#344c61}
#memoFont {margin-top:-12px}
.memo-random {display:flex;align-items:center;justify-content:center;gap:9px;border:1px dashed #9ab0c4;border-radius:9px;padding:9px;background:#edf2f6;font-size:13px;color:#315572}
.memo-random>span:first-child {font-size:22px;line-height:1}
.memo-random>span:last-child {font-size:10px;opacity:.65}
.memo-identity {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:4px}
.memo-privacy {font-size:10px;color:#87919a;line-height:1.6;margin:0}
.memo-actions {display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:4px;font-size:12px}
.memo-actions button {padding:10px 14px;border-radius:8px}
.memo-submit {background:#ead391;border:1px solid #cfb76f;color:#34414b;box-shadow:0 3px 0 #c9ad67}
.memo-submit:active {transform:translateY(2px);box-shadow:none}
:is(.memo-paper,.memo-swatch,#notesContainer .draggable-note)[data-note-style=ruled] {background-image:repeating-linear-gradient(transparent 0,transparent 28px,#52739720 28px,#52739720 29px);background-position:0 13px}
:is(.memo-paper,.memo-swatch,#notesContainer .draggable-note)[data-note-style=grid] {background-image:linear-gradient(#52739719 1px,transparent 1px),linear-gradient(90deg,#52739719 1px,transparent 1px);background-size:19px 19px}
:is(.memo-paper,.memo-swatch,#notesContainer .draggable-note)[data-note-style=torn] {border-radius:0!important;clip-path:polygon(0 0,100% 0,100% 97%,96% 100%,92% 97%,88% 100%,84% 97%,80% 100%,76% 97%,72% 100%,68% 97%,64% 100%,60% 97%,56% 100%,52% 97%,48% 100%,44% 97%,40% 100%,36% 97%,32% 100%,28% 97%,24% 100%,20% 97%,16% 100%,12% 97%,8% 100%,4% 97%,0 100%);padding-bottom:30px!important}
:is(.memo-paper,.memo-swatch,#notesContainer .draggable-note)[data-note-style=fold] {border-radius:0 0 24px 0!important;background-image:linear-gradient(135deg,transparent 50%,#fffcf599 50%);background-size:23px 23px;background-repeat:no-repeat;background-position:bottom right}
:is(.memo-paper,.memo-swatch,#notesContainer .draggable-note)[data-note-style=postcard] {outline:1px solid #6d839038;outline-offset:-11px;background-image:repeating-linear-gradient(90deg,#faf7ee80 0 8px,transparent 8px 16px);background-size:100% 5px;background-repeat:no-repeat;background-position:0 10px}
:is(.memo-paper,#notesContainer .draggable-note)[data-note-style=plain]>.washi-tape {background:#c8a77880;transform:translateX(-50%) rotate(-6deg)}
:is(.memo-paper,#notesContainer .draggable-note)[data-note-style=ruled]>.washi-tape {background:#7198ad70;transform:translateX(-50%) rotate(4deg);width:65px}
:is(.memo-paper,#notesContainer .draggable-note)[data-note-style=grid]>.washi-tape {background:#a597b680;transform:translateX(-50%) rotate(-3deg)}
:is(.memo-paper,#notesContainer .draggable-note)[data-note-style=torn]>.washi-tape {display:none}
:is(.memo-paper,#notesContainer .draggable-note)[data-note-style=fold]>.washi-tape {left:20px;width:42px;transform:rotate(-35deg);background:#ca8f8970}
:is(.memo-paper,#notesContainer .draggable-note)[data-note-style=postcard]>.washi-tape {display:none}
#notesContainer .draggable-note p {white-space:pre-wrap}
@media(max-width:640px){#memoModal{padding:12px}#memoModal>div{padding:20px!important;max-height:calc(100dvh - 24px)}.memo-composer{grid-template-columns:1fr;gap:24px;margin-top:16px}.memo-paper{min-height:230px;padding:28px 23px 20px}.memo-paper textarea{height:150px;max-height:260px;font-size:21px}.memo-style-picker{grid-template-columns:repeat(6,1fr)}.memo-swatch{width:28px;height:32px}.memo-swatch i{width:15px;left:6px}.memo-identity{gap:9px}.memo-compose-right{gap:13px}}
@media(prefers-reduced-motion:reduce){.memo-paper,.memo-style-picker button{transition:none}}

:is(.memo-paper,#notesContainer .draggable-note)[data-note-style]:not([data-note-style=fold])>.washi-tape {left:50%}
