/* Write modal — warm translucent stationery. */
.write-modal{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;padding:22px 16px calc(22px + env(safe-area-inset-bottom));visibility:hidden;opacity:0;transition:opacity .22s ease,visibility .22s ease}
.write-modal.is-open,.write-modal:target{visibility:visible;opacity:1}
.write-shade{position:absolute;inset:0;border:0;background:rgba(73,54,48,.38);backdrop-filter:blur(4px) saturate(.84);-webkit-backdrop-filter:blur(4px) saturate(.84)}
.write-paper{position:relative;width:min(calc(100vw - 32px),430px);max-height:calc(100svh - 38px);padding:48px 25px 25px;overflow:hidden;border:1.2px solid rgba(155,113,91,.58);border-radius:25px;color:#6b4b40;background-color:rgba(255,249,238,.86);background-image:linear-gradient(135deg,rgba(255,255,255,.34),rgba(250,232,220,.09)),repeating-linear-gradient(45deg,rgba(198,144,132,.075) 0 1px,transparent 1px 17px),repeating-linear-gradient(-45deg,rgba(198,144,132,.055) 0 1px,transparent 1px 17px);box-shadow:0 22px 60px rgba(58,38,30,.20),inset 0 0 30px rgba(255,255,255,.38);backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);isolation:isolate}
.write-paper:before{content:"";position:absolute;z-index:-1;inset:9px;border:1px dashed rgba(177,130,110,.48);border-radius:19px;pointer-events:none}
.write-paper:after{content:"";position:absolute;z-index:-2;inset:0;opacity:.19;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.17'/%3E%3C/svg%3E")}
.write-decor-top{position:absolute;z-index:3;right:-11px;top:-13px;width:148px;height:auto;pointer-events:none;filter:drop-shadow(0 4px 5px rgba(92,62,48,.07))}
.write-head{position:relative;z-index:4;padding-right:92px}.write-head h2{display:flex;align-items:center;gap:8px;margin:0;color:#815443;font:600 28px/1.18 "Songti SC","STSong","Noto Serif CJK SC",serif;letter-spacing:.04em}.write-head p{margin:13px 0 20px;color:#997a6d;font-size:13px;line-height:1.55;letter-spacing:.035em}
.write-heart-line{width:43px;height:30px;overflow:visible;flex:0 0 auto}.write-heart-line path{fill:none;stroke:#b47d6d;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}.write-heart-line .heart-dash{stroke-dasharray:2 5;opacity:.7}
.write-field{position:relative;z-index:2;height:min(39svh,300px);min-height:226px;border:1px solid rgba(171,124,103,.36);border-radius:20px;background:rgba(255,252,240,.60);box-shadow:inset 0 1px 0 rgba(255,255,255,.76),0 5px 20px rgba(112,78,62,.045);overflow:hidden}
.write-field textarea{display:block;width:100%;height:100%;resize:none;border:0;outline:0;padding:22px 19px 42px;background:transparent;color:#6a4d42;font:15px/1.72 "PingFang SC","Noto Sans SC",sans-serif;letter-spacing:.025em}.write-field textarea::placeholder{color:rgba(136,111,101,.53)}
.write-count{position:absolute;right:17px;bottom:14px;color:#9e8174;font:11px/1 Georgia,serif;letter-spacing:.04em}
.write-actions{position:relative;z-index:5;display:flex;justify-content:flex-end;align-items:center;gap:21px;margin-top:20px;padding-left:95px}.write-later,.write-stick{appearance:none;border:0;cursor:pointer}.write-later{padding:10px 3px;background:transparent;color:#886e62;font-size:13px;letter-spacing:.05em;text-decoration:none}.write-stick{position:relative;min-width:137px;padding:13px 19px 13px;border-radius:999px;background:#a87764;color:#fffaf2;box-shadow:0 7px 14px rgba(107,73,59,.14),inset 0 0 0 1px rgba(255,255,255,.30);font-size:14px;letter-spacing:.05em}
.write-stick:before,.write-stick:after{content:"";position:absolute;right:-3px;top:-7px;width:17px;height:11px;border-radius:70% 30% 60% 40%;border:1px solid rgba(145,102,81,.28);background:#f5e5cb;transform:rotate(31deg);box-shadow:0 1px 2px rgba(90,56,42,.06)}.write-stick:after{right:8px;transform:rotate(-32deg)}
.write-bow-knot{position:absolute;right:4px;top:-4px;width:8px;height:8px;border-radius:50%;background:#ead3b3;border:1px solid rgba(145,102,81,.24)}
.write-decor-bottom{position:absolute;z-index:4;left:-14px;bottom:-6px;width:119px;height:auto;pointer-events:none;filter:drop-shadow(0 3px 4px rgba(92,62,48,.06))}
.write-doodle{position:absolute;z-index:2;left:102px;bottom:10px;width:64px;height:47px;overflow:visible;pointer-events:none}.write-doodle path{fill:none;stroke:#c18b7b;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round;opacity:.8}.write-doodle .dash{stroke-dasharray:2 5;opacity:.55}
#writeDialog{padding:0;width:min(calc(100vw - 54px),390px);max-height:none;background:none;border:0;border-radius:0;overflow:visible;box-shadow:none}#writeDialog::backdrop{background:rgba(73,54,48,.38);backdrop-filter:blur(4px) saturate(.84)}#writeDialog .write-paper{width:100%;padding:42px 22px 24px;overflow:visible;border:0;border-radius:25px;background:transparent url('assets/f2e19733102ec62d29b6.png') center/100% 100% no-repeat;backdrop-filter:none;box-shadow:0 18px 50px #3a261e2e}#writeDialog .write-paper:before,#writeDialog .write-paper:after{display:none}#writeDialog .write-decor-top{top:-43px;right:2px;width:144px}#writeDialog .write-head{padding-right:0}#writeDialog .write-head h2{font-size:25px;font-weight:500;display:block}#writeDialog .write-head p{font-size:12px;margin:13px 0 18px}#writeDialog .write-fields{position:relative;z-index:4;max-height:51svh;overflow-y:auto}.draft-meta{display:flex;gap:8px;margin-bottom:10px}.draft-meta select{width:72px;flex-shrink:0;padding:8px;font-size:12px;border:1px dashed #a0776366;background:#fffcf099}.draft-meta input{min-width:0;font-size:13px;background:#fffcf099;border:1px dashed #a0776366}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}#writeDialog .write-field{height:min(32svh,230px);min-height:170px;border:1px dashed #a0776370;background:#fffffcad;border-radius:18px}#writeDialog .write-field textarea{font-size:15px;line-height:1.85;padding:17px;border:0;height:100%;min-height:170px;resize:none}#writeDialog .write-actions{padding-left:53px;gap:11px;margin-top:15px}#writeDialog .write-later{padding:9px 12px;border:1px dashed #9b6f5d7a;border-radius:999px;font-size:12px;white-space:nowrap;background:none}#writeDialog .write-stick{min-width:118px;padding:13px 12px;font-size:12px;white-space:nowrap;background:#aa7d6a}#writeDialog .write-stick:before{content:"";inset:4px;width:auto;height:auto;border:1px dashed #fff6e5a6;border-radius:999px;background:none;transform:none;box-shadow:none}#writeDialog .write-decor-bottom{width:100px;bottom:-8px;left:-18px}#writeDialog .hint{margin:10px 0 0;text-align:center}@media(max-width:360px){#writeDialog .write-paper{padding-inline:17px}.draft-meta select{width:65px}#writeDialog .write-actions{padding-left:44px;gap:7px}#writeDialog .write-stick{min-width:109px}}

#writeDialog .write-stick:after{display:none}#writeDialog .write-bow-knot{right:-4px;top:-12px;width:43px;height:32px;border:0;border-radius:0;background:transparent url('assets/0394e4be60bf09f06ed0.webp') center/contain no-repeat;pointer-events:none}

#writeDialog .writer-choice{display:flex;flex-shrink:0;gap:3px;align-items:center;padding:3px;border:1px dashed #c3a38d99;border-radius:11px;background:#fff9ee99}#writeDialog .writer-choice button{padding:7px 6px;border-radius:8px;font-size:11px;color:#a38472}#writeDialog .writer-choice button[aria-pressed=true]{background:#efd5d8b3;color:#9e6c75}#writeDialog .draft-meta{gap:6px}
