@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');
:root{--ink:#251a38;--purple:#6438de;--paper:#faf8ff;--line:#ddd2f0;--pink:#ffadd2;--yellow:#ffe68f;--lav:#e9dcff;--body:"Noto Sans Thai",system-ui,sans-serif;--title:"Kanit",var(--body);--mono:"Space Grotesk",system-ui,sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--body)}button,input,textarea,select{font:inherit}a{color:inherit;text-decoration:none}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #8d55ff;outline-offset:4px}[hidden]{display:none!important}.wrap{width:min(1180px,calc(100% - 80px));margin:auto}.top{border-bottom:1px solid var(--line);background:#fffdfd}.nav{min-height:73px;display:flex;align-items:center;justify-content:space-between}.logo{display:flex;align-items:center;gap:5px;font:700 37px/.9 var(--mono);letter-spacing:-3px}.logo>span:first-child{font-size:28px;color:var(--purple);margin-right:3px}.logo .bang{color:var(--purple);margin-left:-5px}.logo small{font:700 10px/1 var(--mono);letter-spacing:.12em;margin:8px 0 0 8px}.nav nav{display:flex;align-items:center;gap:28px;font-size:14px;font-weight:700}.pill{background:var(--purple);border:1.5px solid var(--ink);border-radius:99px;color:white;padding:13px 23px;font-weight:700;box-shadow:3px 4px var(--ink);transition:transform .15s,box-shadow .15s}.pill:hover{transform:translate(-2px,-2px);box-shadow:5px 6px var(--ink)}.pill.small{padding:8px 16px}.pill span{padding-left:8px}.text-button{display:inline-block;background:transparent;border:0;padding:9px 0;color:var(--ink);font-weight:700}.text-button:hover{text-decoration:underline}.hero{padding:62px 0 60px;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:46px}.kicker{font:700 11px/1.3 var(--mono);letter-spacing:.14em;color:#5126ac;display:inline-flex;align-items:center;gap:7px}.intro .kicker,.label{background:#eee4ff;border:1px solid #dccafc;border-radius:99px;padding:7px 11px}.kicker i{width:7px;height:7px;background:#844cf9;border-radius:50%}h1,h2{font-family:var(--title);line-height:1.09;margin:0;font-weight:600}.intro h1{font-size:clamp(42px,5.4vw,79px);letter-spacing:-.035em;margin:17px 0 19px}.intro em{color:var(--purple);font-style:normal}.intro p{color:#554565;font-size:clamp(15px,1.45vw,19px);line-height:1.8;margin:0 0 25px}.actions{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.note{margin-top:23px;font-size:12px;color:#5c4c72}.stage{position:relative;overflow:hidden;min-height:400px;background-color:#e7d8ff;background-image:radial-gradient(#9979cd62 1px,transparent 1px);background-size:16px 16px;border:2px solid var(--ink);border-radius:26px;box-shadow:7px 7px var(--ink);display:grid;grid-template-rows:auto 1fr auto}.stage-top,.stage-bottom{padding:15px 20px;display:flex;justify-content:space-between;font:700 10px var(--mono);letter-spacing:.13em}.stage-top span{font-size:17px}.art{position:relative;min-height:310px;display:grid;place-items:center}.envelope{width:56%;height:49%;position:absolute;top:42%;border:2px solid var(--ink);border-radius:13px;background:#d45f9e;transform:rotate(-10deg);box-shadow:6px 7px #261937}.letter{position:absolute;left:11%;top:-68%;width:78%;height:124%;border:2px solid var(--ink);border-radius:10px;background:#fff5d5;transform:rotate(8deg);padding:12px 16px;color:#5b2cc5}.letter span{font:700 clamp(7px,1vw,11px) var(--mono);letter-spacing:.13em}.letter strong{display:block;font:700 clamp(39px,5vw,73px)/.81 var(--mono);letter-spacing:-.08em;margin-top:4px}.letter i{position:absolute;right:12%;top:27%;color:#f183b3;font-size:40px;font-style:normal}.fold{position:absolute;inset:0;border-radius:10px;background:linear-gradient(32deg,#ffadd2 49.5%,#5c2753 50%,transparent 51%) left/51% 100% no-repeat,linear-gradient(-32deg,#ffadd2 49.5%,#5c2753 50%,transparent 51%) right/51% 100% no-repeat,linear-gradient(150deg,#f38cbd,#ffa6ce)}.seal{position:absolute;left:50%;top:54%;transform:translate(-50%,-50%);display:grid;place-items:center;width:49px;height:49px;background:#ffdf6d;border:2px solid var(--ink);border-radius:50%;font-size:25px;color:#48203f}.spark{position:absolute;font-size:43px;line-height:1;color:#6d3ade}.s1{left:12%;top:20%}.s2{right:11%;top:22%;color:#a64b91}.s3{left:9%;bottom:17%;color:#ff9ec8;-webkit-text-stroke:1px #402853}.s4{right:10%;bottom:13%;font-size:26px}.sticker,.ribbon{position:absolute;background:#ffe88e;border:1.5px solid var(--ink);box-shadow:2px 3px var(--ink);font:700 13px/1 var(--mono);text-align:center}.sticker{right:7%;top:46%;border-radius:50%;padding:13px 15px;transform:rotate(14deg)}.sticker b{font-size:18px}.ribbon{bottom:9%;left:19%;transform:rotate(-9deg);background:#f7f1ff;padding:7px 12px;border-radius:5px}
.theme-area{background:#fffaf0;border-block:1px solid #e7dcbf;padding:43px 0 58px;scroll-margin-top:15px}.section-title{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:14px 0 23px}.section-title h2,.panel-page>h1{font-size:clamp(34px,4.5vw,56px)}.section-title span{color:#605171;font-size:14px}.theme-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.theme-card{padding:0;text-align:left;border:1.5px solid var(--ink);border-radius:16px;overflow:hidden;background:white;box-shadow:3px 4px var(--ink);color:var(--ink)}.theme-card:hover{transform:translateY(-3px)}.tile-art{display:grid;place-items:center;min-height:125px;font-size:58px;background-color:var(--theme);background-image:radial-gradient(#fff9 1.5px,transparent 1.5px);background-size:15px 15px;border-bottom:1.5px solid var(--ink)}.tile-art span{filter:drop-shadow(3px 3px #37224236);transform:rotate(-9deg)}.tile-label{padding:13px 16px;display:flex;justify-content:space-between;align-items:center;font-family:var(--title);font-size:21px}.tile-label small{font:700 11px var(--mono);color:#6133c6;letter-spacing:.07em;display:block;margin-bottom:3px}
footer .wrap{padding:23px 0;display:flex;justify-content:space-between;gap:10px;font-size:12px;color:#58456f}.panel-page{padding:24px 0 55px;min-height:75vh}.back{display:block;margin-bottom:18px}.panel-page>h1{margin:12px 0 20px}.editor-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:22px;align-items:start}.sheet{position:relative;padding:24px;background:white;border:1.5px solid var(--ink);border-radius:19px;box-shadow:4px 5px var(--ink)}.sheet h2{font-size:34px;margin:11px 0}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}label,legend{font-size:14px;font-weight:700}label{display:grid;gap:6px;margin:0 0 14px}input,textarea,select{width:100%;min-width:0;border:1px solid #cbbbdc;border-radius:9px;padding:10px;color:var(--ink);background:#fcfaff}textarea{resize:vertical}fieldset{border:0;margin:0 0 14px;padding:0}.stickers{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}.stickers button{border:1px solid var(--line);background:#fff;border-radius:9px;font-size:23px;padding:3px 8px}.stickers button[aria-pressed=true]{background:#e9dcff;border-color:var(--purple)}.upload{padding:12px;border:1px dashed var(--purple);border-radius:10px;background:#f8f3ff}.upload small{font-weight:400}.preview-sheet{background:#fffaf0}.preview-sheet .kicker{margin-bottom:14px}.gift-card{text-align:center;padding:25px clamp(15px,5vw,38px);background:var(--theme,#e9dcff);border:1.5px solid var(--ink);border-radius:19px;overflow-wrap:anywhere}.gift-card h2{font-size:clamp(30px,6vw,55px);margin:8px 0}.gift-card p{white-space:pre-wrap;line-height:1.8}.gift-icon{font-size:74px;line-height:1.25}.gift-card img,.gift-card video{display:block;max-width:100%;max-height:65vh;margin:12px auto;border-radius:12px}.recipient-page{max-width:700px}.recipient-page .gift-card{box-shadow:5px 6px var(--ink);padding-block:40px}.recipient-page .gift-icon{animation:pop .4s ease-out}@keyframes pop{from{transform:scale(.65) rotate(-12deg)}to{transform:scale(1)}}dialog{border:0;background:transparent;padding:6px 10px 12px;width:min(480px,100%);color:var(--ink)}dialog::backdrop{background:#2d174c80}.close{position:absolute;top:10px;right:12px;border:0;background:transparent;font-size:27px;color:var(--ink)}#file-list{padding-left:20px;overflow-wrap:anywhere;font-size:13px}#file-list button{border:0;background:transparent;color:#6633bb;text-decoration:underline}#editor-status,#checkout-status,#share-status{color:#6438a0;font-size:14px}
@media(max-width:800px){.wrap{width:calc(100% - 36px)}.hero{gap:25px;padding:35px 0}.stage{min-height:310px}.art{min-height:230px}.editor-grid{grid-template-columns:1fr}.wide{display:none}}
@media(max-width:590px){.nav{min-height:62px}.nav nav>a{display:none}.logo{font-size:31px}.logo small{font-size:8px}.hero{grid-template-columns:1fr;padding-bottom:38px}.intro h1{font-size:clamp(43px,12vw,65px)}.stage{min-height:330px}.art{min-height:245px}.letter strong{font-size:50px}.section-title{align-items:start;flex-direction:column}.theme-grid{grid-template-columns:1fr;gap:14px}.tile-art{min-height:95px}.theme-area{padding:30px 0}.sheet{padding:17px}.actions{gap:12px}.pill{padding:11px 16px}footer .wrap{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* The desk, envelope, and letter share one set of stationery colors. */
.look-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 10px;margin-top:6px}
.look-grid label{font-size:12px;margin-bottom:9px}
.look-grid select{font-size:14px}
.appearance,.layout{border-top:1px solid var(--line);padding-top:8px}
.appearance legend,.layout legend{padding-right:8px}
.layout small{color:#605171}
#file-list{list-style:none;padding:0;margin:8px 0 12px}
#file-list li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 8px;border:1px solid var(--line);border-radius:8px;background:var(--paper);margin-bottom:5px}
#file-list .layout-controls{display:flex;gap:4px;flex-shrink:0}
#file-list button{min-height:36px;min-width:34px;padding:3px 7px;border:1px solid var(--line);border-radius:6px;background:white;text-decoration:none;font-weight:700}
#file-list button:disabled{cursor:default;opacity:.35}
.letter-page{--stationery:#fff8e4;--letter-ink:#432956;position:relative;text-align:left;padding:clamp(20px,6vw,46px);border:1px solid #9c84ab;border-radius:3px 3px 14px 3px;color:var(--letter-ink);background-color:var(--stationery);box-shadow:3px 5px #32214337;overflow-wrap:anywhere}
.letter-page[data-paper=pink]{--stationery:#ffedf5}
.letter-page[data-paper=lilac]{--stationery:#f3eaff}
.letter-page[data-paper=mint]{--stationery:#e7f9ef}
.letter-page[data-ink=berry]{--letter-ink:#862452}
.letter-page[data-ink=navy]{--letter-ink:#253c78}
.letter-page[data-ink=green]{--letter-ink:#205a4b}
.letter-page[data-pattern=ruled]{background-image:repeating-linear-gradient(transparent 0 31px,#5532751b 31px 32px)}
.letter-page[data-pattern=grid]{background-image:linear-gradient(#55327515 1px,transparent 1px),linear-gradient(90deg,#55327515 1px,transparent 1px);background-size:18px 18px}
.letter-page[data-pattern=dots]{background-image:radial-gradient(#55327530 1px,transparent 1px);background-size:16px 16px}
.letter-page[data-align=center]{text-align:center}
.letter-page[data-type=classic] .letter-message{font-family:Georgia,"Leelawadee UI",serif}
.letter-page h2{color:inherit;font-size:clamp(24px,6vw,48px);line-height:1.28;margin:16px 0 14px;text-wrap:pretty}
.letter-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px dashed #55327565;padding-bottom:9px;font:700 .85rem/1.55 var(--body)}
.letter-meta span:last-child{font-size:23px}
.letter-message{white-space:pre-wrap;line-height:1.8;font-size:clamp(16px,3vw,19px);margin:0 0 18px}
.letter-frame{position:relative;margin:22px auto;width:fit-content;max-width:100%}
.letter-frame img,.letter-frame video{display:block;max-width:100%;max-height:64vh;object-fit:contain}
.letter-frame video{width:100%;min-width:min(240px,100%)}
.photo-flip{display:grid;justify-items:center;gap:8px;width:100%;padding:0;border:0;background:none;color:inherit;font:inherit;cursor:pointer}
.photo-flip-sides{display:grid;place-items:center;max-width:100%;min-height:110px;min-width:min(160px,100%)}
.photo-flip-sides>*{grid-area:1/1}
.photo-flip-sides.is-flipped>img{visibility:hidden}
.photo-flip-note{align-self:stretch;width:100%;display:grid;place-items:center;padding:16px;border:1px dashed #8a699e;border-radius:8px;background:#fff9eb;color:#432956;font-size:.95rem;white-space:pre-wrap;overflow-wrap:anywhere;text-align:center;animation:moment-flip .27s ease-out}
.photo-flip-hint{padding:4px 11px;border:1px solid #8a699e;border-radius:999px;background:#f4e9ff;color:#432956;font-size:.8rem;font-weight:700}
.photo-flip:focus-visible{outline:2px solid #68428c;outline-offset:4px;border-radius:6px}
.photo-note-field{display:grid;gap:5px;grid-column:1/-1;margin:4px 0 0;font-size:.85rem}
.photo-layout-frame{width:min(380px,100%)}
.photo-layout-image{display:block;width:100%;height:auto;max-height:60vh}
.moment-polaroid{width:min(280px,100%);margin:20px auto;padding:10px 10px 14px;background:#fffdf8;border:1px solid #795d87;box-shadow:3px 4px #432956;transform:rotate(-2deg)}
.moment-polaroid .photo-flip-sides{width:100%}
.photo-editor-preview{display:block;grid-column:1/-1;width:min(100%,240px);height:auto;max-height:320px;justify-self:center;background:#fff9f0;border-radius:8px}
#file-list .page-items>li:has(.photo-editor-preview){display:grid;grid-template-columns:minmax(0,1fr)}
#file-list li:has(.photo-editor-preview)>.layout-item-label{display:none}
#file-list li:has(.photo-editor-preview)>.layout-controls{max-width:100%}
.photo-layout-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;grid-column:1/-1;width:100%;margin:14px 0 0;padding:12px;border:1px solid #dac9e7;border-radius:10px;background:#faf6ff;min-inline-size:0}
.photo-layout-controls legend{font-size:.85rem;padding:0 5px}
.photo-layout-controls label{display:grid;gap:5px;margin:0;font-size:.8rem;min-width:0}
.photo-layout-controls select{width:100%;min-width:0}
.photo-position-controls{display:grid;grid-column:1/-1;gap:10px}
.photo-position-controls input[type=range]{width:100%;padding:0;min-height:30px;accent-color:#6438de}
#theme-moment{display:grid;gap:8px;margin:22px 0 12px;padding-top:18px;border-top:1px dashed #dac9e7}
#polaroid-layout{margin:16px 0 18px}
@media(max-width:380px){.photo-layout-controls{grid-template-columns:minmax(0,1fr)}}
.letter-page[data-frame=polaroid] .letter-frame{padding:8px 8px 23px;background:#fff;border:1px solid #37284a44;box-shadow:2px 4px #37284a35}
.letter-page[data-frame=tape] .letter-frame:before{content:"";position:absolute;top:-8px;left:calc(50% - 33px);width:66px;height:18px;background:#f7c967b8;transform:rotate(-7deg);pointer-events:none}
.letter-stickers{letter-spacing:.08em;font-size:26px;margin:14px 0}
.letter-sign{margin:23px 0 0;font-size:15px}
.letter-sign strong{display:block;font:600 clamp(19px,5vw,25px)/1.4 var(--title);margin-top:3px}
.mail-scene,.opened-mail{background-color:#eaddff;background-image:radial-gradient(#9675bf55 1px,transparent 1px);background-size:17px 17px;border:1.5px solid var(--ink);border-radius:21px;box-shadow:5px 6px var(--ink);padding:26px clamp(15px,6vw,45px);text-align:center}
.mail-caption{margin:0 0 25px;font:700 11px var(--mono);letter-spacing:.17em;color:#542b95}
.mail-envelope{position:relative;isolation:isolate;container-type:inline-size;perspective:820px;margin:40px auto 18px;width:min(100%,430px);border:2px solid var(--ink);border-radius:10px;background:var(--mail-theme);box-shadow:4px 5px var(--ink);transition:transform .3s;transform:rotate(-3deg)}
.mail-open .mail-envelope{transform:rotate(0);margin-top:63px}
.mail-envelope::before,.mail-envelope::after{content:"";position:absolute;inset:0;border-radius:8px;pointer-events:none;background:color-mix(in srgb,var(--mail-theme),white 25%);z-index:-1}
.mail-envelope::before{clip-path:polygon(0 0,55% 70%,0 100%)}
.mail-envelope::after{clip-path:polygon(100% 0,45% 70%,100% 100%)}
.mail-flap{position:absolute;inset:0 0 35%;clip-path:polygon(0 0,100% 0,50% 100%);background:color-mix(in srgb,var(--mail-theme),#6c335a 18%);transform-origin:top;transition:transform .5s ease;z-index:-1}
.mail-open .mail-flap{transform:rotateX(167deg)}
.mail-address{position:relative;margin-inline:8%;padding-block:clamp(49px,18cqi,77px) 112px;text-align:left;pointer-events:none}
.mail-address small{display:block;font:700 9px var(--mono);letter-spacing:.12em}
.mail-address strong,.mail-address span{display:block;overflow-wrap:anywhere}
.mail-address strong{font:600 clamp(23px,9cqi,39px)/1.22 var(--title);margin:3px 0 4px}
.mail-address-long strong{font-size:clamp(19px,6.5cqi,28px);line-height:1.3}
.mail-address span{font-size:12px;line-height:1.45}
.mail-seal{position:absolute;right:9%;bottom:12%;width:54px;height:54px;border:2px solid #722649;border-radius:50%;background:#e75e9c;color:#fff3fa;box-shadow:0 3px #722649,inset 0 0 0 4px #ffffff40;font-size:27px;transition:transform .2s,opacity .25s}
.mail-seal:hover{transform:scale(1.12) rotate(7deg)}
.mail-stamp{position:absolute;top:9%;right:6%;background:#fff7d6;border:2px dotted #795a96;border-radius:4px;padding:5px 7px;font-size:26px;transform:rotate(8deg);pointer-events:none}
.mail-envelope .mail-seal{left:50%;right:auto;bottom:45px;translate:-50% 0;z-index:1}
.mail-open .mail-seal{opacity:0;transform:scale(.7);pointer-events:none}
.mail-hint{min-height:46px;margin:24px 0 0;font-size:14px;color:#522f73}
.mail-open-arrow{display:grid;place-items:center;width:32px;height:32px;margin:10px auto 0;border:2px solid var(--ink);border-radius:50%;background:#ffe68f;color:var(--ink);font-size:23px;font-weight:700;line-height:1;pointer-events:none;animation:yay-float 1.25s ease-in-out infinite}
.mail-envelope>.mail-open-arrow{position:absolute;left:calc(50% - 16px);bottom:8px;margin:0;z-index:2}
.mail-open .mail-envelope>.mail-open-arrow{display:none}
.guide-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;list-style-position:inside;padding:0;margin:22px 0}
.guide-steps li::marker{font-weight:700;color:var(--purple)}
.guide-steps h2{font:600 24px var(--title);margin:8px 0}
.guide-steps p{margin:0;line-height:1.7}
.guide-steps>li{min-width:0}
.guide-art{display:grid;place-items:center;min-height:172px;margin:10px 0 15px;padding:16px;border:1px solid var(--ink);border-radius:16px;background:radial-gradient(#4b266025 1px,transparent 1px) 0 0/12px 12px,var(--guide-tint);overflow:hidden}
.guide-make{--guide-tint:#ffe0ed}.guide-preview{--guide-tint:#e9dcff}.guide-pay{--guide-tint:#fff0b8}.guide-send{--guide-tint:#dff4e8}
.guide-mock{position:relative;width:min(100%,250px);padding:12px;background:#fffdfa;border:1.5px solid var(--ink);border-radius:12px;box-shadow:3px 4px var(--ink);font-size:13px}
.guide-mock small{display:block;font-weight:700;margin-bottom:7px}
.guide-chips,.guide-pay-path{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:8px}
.guide-chips span,.guide-pay-path b{padding:4px 7px;border:1px solid #aa8ac9;border-radius:8px;background:#f4ebff}
.guide-paper{display:flex;flex-wrap:wrap;gap:4px 8px;padding:7px;border:1px dashed #aa8ac9;border-radius:8px}
.guide-action{display:block;width:fit-content;margin:8px auto 0;padding:5px 12px;border-radius:20px;background:var(--purple);color:#fff;font-weight:700}
.guide-preview .guide-mock{width:190px;text-align:center}
.guide-envelope{position:relative;display:grid;place-items:center;width:105px;height:57px;margin:auto;border:1.5px solid var(--ink);border-radius:6px;background:linear-gradient(150deg,#ffbedb 49%,#ee9fc5 50%);transform:rotate(-5deg)}
.guide-envelope span{border-radius:50%;padding:4px 8px;background:#a93372;color:#fff}
.guide-pay-path strong{font:700 22px var(--title)}
.guide-stamp{position:absolute;right:4px;bottom:5px;padding:3px 5px;transform:rotate(8deg);border:1px solid var(--ink);border-radius:5px;background:#ffe68f;font-size:11px;font-weight:700}
.home-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin:20px 0 10px;padding:9px 15px;width:fit-content;background:#fff1bc;border:1px solid var(--ink);border-radius:12px;box-shadow:3px 3px var(--ink)}
.home-price strong{font:700 29px/1.2 var(--title)}
.home-price span{font-size:14px}
footer a{text-decoration:underline;overflow-wrap:anywhere}
.help-page{max-width:700px}
.help-sheet{background:#fffcff}
.help-sheet details+details{border-top:1px solid var(--line)}
.help-sheet summary{padding:14px 0;font-weight:700;cursor:pointer}
.help-sheet summary::marker{color:var(--purple)}
.help-sheet details p{margin:0 0 14px;line-height:1.7}
.help-contact{margin:28px 0 0;padding:16px;border:1px dashed #aa8ac9;border-radius:14px;background:#f3eaff;overflow-wrap:anywhere}
.help-contact p{margin:0 0 10px}
.help-contact p:last-child{margin:8px 0 0;font-size:13px}
.help-contact .pill{display:inline-block}
.share-help{display:inline-block;margin-top:14px}
@media(max-width:650px){.guide-steps{grid-template-columns:1fr}}
.pull-letter{animation:letter-arrive .35s ease both}
.opened-mail .letter-page{animation:letter-arrive .45s ease both}
.opened-mail>.text-button{margin-top:14px}
@keyframes letter-arrive{from{transform:translateY(18px);opacity:0}to{transform:translateY(0);opacity:1}}
@media(min-width:801px){.preview-sheet{position:sticky;top:18px;max-height:calc(100vh - 36px);overflow:auto}}
@media(max-width:380px){.mail-stamp{font-size:19px}.mail-seal{width:46px;height:46px}}
.reply-card{margin:24px 0 10px;padding:20px;background:#fff9e8;border:1px dashed #9565aa;border-radius:14px}
.reply-card h2,.reply-result h2{font-size:clamp(23px,5.8vw,40px);line-height:1.35;overflow-wrap:anywhere;text-wrap:pretty}
.reply-card .mail-caption{margin:0 0 10px}
.reply-card small{display:block;color:#604e70;margin-top:14px}
.reply-choices{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin-top:14px}
.sound-toggle{margin-right:14px}
#music-status{font-size:13px;color:#6438a0;margin:0 0 8px}

.ending-editor{margin:12px 0;padding:10px 12px 2px;border:1px dashed var(--line);border-radius:12px;background:#faf7ff}
.ending-editor legend{padding-inline:6px}
.reply-choices{--dodge-right:clamp(30px,10vw,70px);--dodge-left:-12px;position:relative;min-height:91px;align-items:flex-start;padding-bottom:30px}
.reply-choices .reply-no{padding-inline:12px;transform:translate(var(--no-x,0),var(--no-y,0));transition:transform .14s ease;touch-action:manipulation}
.reply-tease{position:absolute;bottom:0;left:0;right:0;margin:0;min-height:1em;color:#775176;font-size:.85rem;pointer-events:none}
.reply-result[data-ending-style=pink]{background-color:#ffdeed}
.reply-result[data-ending-style=lilac]{background-color:#ebdfff}
.reply-result[data-ending-style=mint]{background-color:#dff5e9}
.ending-sticker{font-size:4rem;line-height:1.2;margin-bottom:14px;animation:letter-arrive .45s ease both}
.ending-message{white-space:pre-wrap;overflow-wrap:anywhere}
@media(prefers-reduced-motion:reduce){.reply-choices .reply-no,.ending-sticker{transition:none;animation:none}}

#file-list li:has(textarea){flex-wrap:wrap}
#file-list li textarea{flex:0 0 100%;font-size:14px}
#file-list li>span{min-width:0;overflow-wrap:anywhere}
.layout-item-label{display:flex;align-items:center;gap:8px}
.layout-thumbnail{width:56px;height:56px;flex:0 0 56px;object-fit:cover;border:1px solid var(--line);border-radius:8px;background:#f1e6ff}
.layout-video-icon{display:grid;place-items:center;color:#653c8a}
@media(max-width:650px){
  #file-list li:has(.layout-thumbnail){gap:8px}
  #file-list li:has(.layout-thumbnail) .layout-controls{max-width:calc(100% - 64px);flex-shrink:1}
  #file-list .layout-controls button{white-space:nowrap}
}
#file-list .layout-controls{flex-wrap:wrap;justify-content:flex-end;max-width:65%}
.letter-page .letter-frame:has(+ .letter-caption){margin-bottom:6px}
.letter-page .letter-caption{text-align:center;font-size:.92rem;margin-top:0}
#text-block-status{font-size:13px;color:#6438a0;margin:0}

.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(min-width:900px){.theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.theme-card-actions{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;padding:0 16px 14px}
.theme-card-actions button{min-height:44px}
.sample-navigation{display:flex;flex-wrap:wrap;gap:8px;margin:0 auto 18px;max-width:780px}
.sample-theme{min-height:44px;padding:8px 13px;border:1px solid #bfa8d2;border-radius:999px;background:#fff;color:#432956;font:inherit;font-size:.88rem;line-height:1.4}
.sample-theme[aria-pressed=true]{background:#eee0ff;border-color:#6438a0;box-shadow:0 0 0 1px #6438a0;font-weight:700}
.theme-moment-card{background:#fff6df}
.theme-moment-card[data-moment=thanks]{background:#e3f8ec}
.theme-moment-card[data-moment=cheer]{background:#e7def9;transition:background .45s}
.theme-moment-card[data-moment=cheer].moment-open{background:#ffe8ad}
.moment-display{display:grid;justify-items:center;margin:20px 0}
.moment-art{grid-area:1/1;color:#432956;background:#fffdf8;border:2px solid #432956;border-radius:18px;box-shadow:3px 4px #432956;padding:9px;min-width:140px;max-width:100%}
.moment-front{display:grid;justify-items:center;gap:4px;font-weight:700}
.moment-front>span{font-size:72px;line-height:1.1}
.moment-front img{display:block;width:min(230px,100%);aspect-ratio:3/2;object-fit:cover;border-radius:3px}
.moment-note{margin:15px 0 0;padding:13px 17px;white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;line-height:1.65;background:#fffdf6;border:1px dashed #795d87;border-radius:12px}
[data-moment=anniversary] .moment-art{transform:rotate(-4deg);border-radius:4px}
[data-moment=anniversary].moment-open .moment-art{visibility:hidden}
[data-moment=anniversary] .moment-note{grid-area:1/1;align-self:stretch;display:grid;align-content:center;margin:0;min-width:min(200px,100%);border:2px solid #432956;border-radius:4px;box-shadow:3px 4px #432956;transform:rotate(2deg);animation:moment-flip .35s ease-out}
[data-moment=thanks] .moment-art{background:#bcebd7;border-radius:50% 50% 18px 18px}
[data-moment=thanks].moment-open .moment-note{animation:moment-rise .35s ease-out}
[data-moment=cheer] .moment-art{overflow:hidden;background:#fff5c6}
[data-moment=cheer]:not(.moment-open) .moment-front>span{transform:translateY(15px);filter:saturate(.45)}
[data-moment=cheer] .moment-front>span{transition:transform .45s,filter .45s}
[data-moment=cheer] .moment-front small{position:relative;background:#fff5c6}
@keyframes moment-flip{from{transform:rotateY(85deg)}to{transform:rotateY(0) rotate(2deg)}}
@keyframes moment-rise{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.theme-moment-card,.moment-front>span{transition:none!important}.theme-moment-card .moment-note{animation:none!important}}
.sticker,.tile-art span{animation:yay-float 3.2s ease-in-out infinite}
.tile-art span{animation-delay:-1.1s}
.mail-seal:not(:disabled){animation:yay-wiggle 2.8s ease-in-out infinite}
.mail-seal:hover,.mail-seal:focus-visible{animation:none}
@keyframes yay-float{0%,100%{translate:0 0}50%{translate:0 -6px}}
@keyframes yay-wiggle{0%,78%,100%{rotate:0deg}84%{rotate:-8deg}92%{rotate:8deg}}
@media(max-width:650px){.theme-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.sticker,.tile-art span,.mail-seal:not(:disabled){animation:none}}

.letter-meta>span:first-child{min-width:0;overflow-wrap:anywhere}
.frame-sample,.seal-sample{display:grid;place-items:center;min-height:96px;margin:0 0 10px;border:1px dashed var(--line);border-radius:10px;background:#f8f2ff;padding:9px;box-shadow:none}
.frame-sample .letter-frame{margin:0}
.sample-photo{display:grid;place-items:center;width:62px;height:38px;background:#d9eddc;color:#785185;font-size:22px}
.seal-sample .mail-seal{position:static;display:grid;place-items:center;animation:none;transform:none}

.editor-step{margin:0 0 20px;padding:14px;border:1px solid #e2d6ee;border-radius:14px;min-width:0;background:#fff}
.editor-step>legend{padding:3px 9px;color:#563471;background:#f3eaff;border-radius:7px;font-weight:700;line-height:1.4}
.letter-editor{max-width:960px;margin-inline:auto;background:#fffcff;border-color:#ae94c7;box-shadow:3px 4px #d6c4e8}
.letter-editor fieldset,.editor-pair>*{min-inline-size:0}
.letter-editor label,.letter-editor summary{line-height:1.55}
.letter-editor input:not([type=file]),.letter-editor textarea,.letter-editor select{background:#fff;border-color:#cdbdda;line-height:1.5}
.letter-editor textarea{min-height:84px}
.letter-editor small,.letter-editor .preview-tip{line-height:1.55;overflow-wrap:anywhere}
.letter-editor [role=status]:empty{display:none}
.editor-sections{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px}
.editor-sections a{display:grid;place-items:center;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:#f5ecff;color:#593d75;font-size:14px;font-weight:700;text-align:center}
.editor-step[id],.editor-page-header,.editor-part-preview>.preview-tip{scroll-margin-top:12px}
.editor-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px}
.editor-part-preview{min-width:0}
.editor-part-preview>.preview-tip{margin:2px 0 8px;font-weight:700;color:#634780}
.editor-part-preview .letter-page{padding:16px}
#envelope-preview{padding:5px 5px 12px}
#envelope-preview .mail-scene{padding:7px 12px;box-shadow:none}
#envelope-preview .mail-envelope{margin:9px auto 12px;max-width:350px}
#envelope-preview .mail-caption,#envelope-preview .mail-hint{display:none}
#envelope-preview .mail-seal{opacity:1;animation:none;cursor:default}
#closing-preview .letter-meta,#closing-preview h2{display:none}
#closing-preview .letter-sign{margin:0}
.editor-page-preview img,.editor-page-preview video{max-height:260px;object-fit:contain}
.editor-page-jump{display:none}
@media(max-width:800px){
  .editor-pair{grid-template-columns:minmax(0,1fr);gap:10px}
  #file-list .editor-page-jump{display:inline-block}
  .editor-page-preview .letter-page{max-height:56vh;overflow:auto}
}
.editor-start{margin:0 0 20px;color:#593d75;line-height:1.65}
.editor-optional{margin:18px 0 8px;font-weight:700}
.polaroid-preview{display:block;width:min(100%,220px);aspect-ratio:3/2;object-fit:cover;border:7px solid #fff;border-bottom-width:16px;box-shadow:0 0 0 1px #cbbbdc,2px 3px #432956;margin:10px 0 16px}
.editor-option{margin:0 0 8px;border:1px solid var(--line);border-radius:12px;background:#fff}
.editor-option>summary{position:relative;display:grid;gap:2px;padding:11px 42px 11px 13px;cursor:pointer;list-style:none}
.editor-option>summary::-webkit-details-marker{display:none}
.editor-option>summary::after{content:'+';position:absolute;inset-inline-end:14px;top:50%;transform:translateY(-50%);font-size:22px;color:#6438a0}
.editor-option[open]>summary::after{content:'−'}
.editor-option>summary:focus-visible{outline:3px solid #8d55ff;outline-offset:2px;border-radius:10px}
.editor-option>summary small{color:#715a81;line-height:1.4}
.editor-option-body{padding:12px;border-top:1px dashed var(--line)}
#media-look{margin:12px 0}
#media-look .frame-sample{min-height:118px}
#media-look .frame-sample img{width:112px;height:72px;object-fit:contain;background:#f0e7ff}
.letter-meta .letter-heading{font-size:inherit}
.letter-meta>span:only-child{margin-left:auto}
.link-lifetime{font-size:14px;color:#593d75;background:#f5ecff;border-radius:9px;padding:9px 12px}

/* Two gifts, two little rituals. */
.theme-journey{font-size:13px;line-height:1.6;padding:8px 10px;border:1px dashed #b7945c;border-radius:9px;background:#fff6d9;margin:-5px 0 15px}
.theme-journey[data-theme=crush]{background:#f2eaff;border-color:#a58ac2}
.preview-tip{font-size:12px;color:#715a81}
.theme-description{font:400 13px/1.7 var(--body);color:#715a81;margin:6px 0 0}
.editor-page-card{border:1px solid #deceef;border-radius:14px;background:#f9f4ff;padding:12px;margin:12px 0}
.editor-page-header,.page-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.editor-page-header strong{color:#603a81;font-size:15px}
.page-header-actions{display:flex;flex-wrap:wrap;gap:8px}
#file-list .page-delete{color:#a42e53;border-color:#e1b6c5}
.editor-page-card .page-items{list-style:none;padding:0;margin:8px 0}
.editor-page-card .layout-controls select{width:auto;min-height:36px;font-size:13px;margin:0;padding:4px}
.page-actions{justify-content:flex-start;border-top:1px dashed #d9c8ec;padding-top:9px}
#file-list .page-actions button{background:#f3eaff;border-color:#d8c7ed;color:#533175;white-space:normal}
.secret-note,.love-coupon{margin:18px 0;color:#432956;text-align:left}
.secret-note summary{width:fit-content;max-width:100%;min-height:44px;padding:10px 14px;border:1px solid #75405c;border-radius:14px;background:#ffd6e9;box-shadow:2px 3px #75405c;font-weight:700;cursor:pointer}
.secret-note summary:focus-visible{outline:3px solid #8d55ff;outline-offset:4px}
.secret-note p,.love-coupon p{margin:8px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.secret-note p{padding:10px 14px;border-inline-start:3px solid #b65a88;background:#fff2f8}
.love-coupon{padding:13px 16px;border:1px dashed #875525;border-radius:12px;background:#ffedaa;box-shadow:2px 3px #875525}
.love-coupon strong{display:block;padding-bottom:5px;border-bottom:1px dashed #875525;font-size:14px}
.story-progress{font:600 12px var(--body);letter-spacing:.08em;color:#795b88;margin:0 0 12px;text-align:center}
.story-nav{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-top:22px}
.story-nav button{min-height:44px}.story-nav button:disabled{opacity:.35;cursor:default}
.story-end{font-size:13px;color:#795b88}.story-reader{width:100%;scroll-margin-top:24px}
.theme-reveal{position:relative;overflow:hidden;text-align:center;padding:clamp(24px,6vw,48px) 20px;border:2px solid var(--ink);border-radius:28px;box-shadow:6px 7px var(--ink)}
.theme-reveal h2{font:600 clamp(25px,5vw,40px)/1.5 var(--title);overflow-wrap:anywhere;margin:10px 0 20px}
.birthday-reveal{background:#fff6d9;background-image:radial-gradient(#d9ba6a55 1px,transparent 1px);background-size:18px 18px}
.crush-reveal{background:#f1e6ff}.crush-reveal>p{overflow-wrap:anywhere}.intro-heart{font-size:80px;animation:yay-float 3s ease-in-out infinite}
.birthday-cake{display:block;width:min(240px,85%);margin:45px auto 0;position:relative;padding:60px 0 0;border:0;background:none;filter:drop-shadow(4px 5px 0 #51364922)}
.birthday-cake:disabled{opacity:1;cursor:default}
.cake-frosting,.cake-layer,.cake-plate{display:block}
.cake-candles{position:absolute;top:0;left:0;right:0;height:70px;display:flex;align-items:flex-end;justify-content:center;gap:30px}
.cake-candle{position:relative;display:block;width:13px;height:48px;border:2px solid #513649;border-radius:4px 4px 0 0;background:repeating-linear-gradient(135deg,#c8b4f0 0 7px,#fff 7px 12px)}
.candle-flame{position:absolute;top:-28px;left:-3px;width:16px;height:25px;background:#ffc54d;border:2px solid #a66528;border-radius:80% 15% 60% 45%;transform:rotate(-25deg);animation:candle-flicker 1.1s ease-in-out infinite alternate;box-shadow:0 0 20px #ffc54d88}
.cake-candle:nth-child(2) .candle-flame{animation-delay:-.42s}
.cake-candle:nth-child(3) .candle-flame{animation-delay:-.8s}
.cake-frosting{position:relative;z-index:1;height:40px;line-height:36px;color:#bc5180;background:#fff8f4;border:2px solid #513649;border-radius:50% 50% 30% 30%;letter-spacing:16px;padding-left:16px}
.cake-layer{height:92px;margin-top:-15px;padding-top:27px;border:2px solid #513649;background:repeating-linear-gradient(#f5b9d4 0 28px,#ffe7ef 28px 40px);border-radius:0 0 35% 35%;font:700 25px var(--mono);color:#6f3556}
.cake-plate{height:17px;background:#d3c3ef;border:2px solid #513649;border-radius:50%;margin:-3px -15px 0}
.cake-hint{white-space:pre-wrap;overflow-wrap:anywhere;min-height:48px;line-height:1.8}
.candles-out .candle-flame{animation:none;opacity:0;transition:opacity .3s}
.gift-confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.gift-confetti span{position:absolute;left:calc(var(--i)*4.2%);top:-20px;color:#b65a91;font-size:20px;animation:confetti-fall 1.8s calc(var(--i)*.025s) ease-in both}
.gift-confetti span:nth-child(3n){color:#9270c7}.gift-confetti span:nth-child(3n + 1){color:#d19b36}
@keyframes candle-flicker{35%{transform:rotate(-12deg) scale(.85,1.12)}70%{transform:rotate(-34deg) scale(1.08,.9)}to{transform:rotate(-19deg) scale(.94,1.06)}}
@keyframes confetti-fall{from{transform:translateY(-10px) rotate(0);opacity:1}to{transform:translateY(600px) rotate(240deg);opacity:0}}
@media(max-width:650px){.story-nav .pill{font-size:13px}.theme-reveal{box-shadow:3px 4px var(--ink);padding-inline:16px}.story-nav{gap:8px}}
@media(prefers-reduced-motion:reduce){.gift-confetti{display:none}.candle-flame,.intro-heart{animation:none}}
#gift-code-section{margin:12px 0 16px;font-size:14px}
#gift-code-section summary{cursor:pointer;color:var(--purple);font-weight:700;padding:8px 0}
.gift-code-fields{padding:12px;border:1px solid #d9c8ec;border-radius:12px;background:#f8f3ff}
#redeem-code{background:#fff;color:var(--ink);font-size:13px;padding:8px 12px}
.mobile-preview-bar{display:none}
@media(max-width:800px){
  .editor-grid>.preview-sheet{display:none}
  #preview{display:none}
  #editor{padding-bottom:100px}
  .mobile-preview-bar{display:flex;justify-content:center;position:fixed;z-index:5;bottom:0;left:0;right:0;padding:9px 14px calc(10px + env(safe-area-inset-bottom));background:#faf6fff5;border-top:1px solid #d9c8ec}
}
.letter-page[data-paper=sky]{--stationery:#eaf6ff}
.letter-page[data-paper=peach]{--stationery:#ffeddf}
.stationery-sets{display:flex;flex-wrap:wrap;gap:8px}
.stationery-live{display:none}
@media(max-width:800px){
  .stationery-live{display:block;z-index:2;margin:0 -4px 12px;padding:5px 4px 10px;background:#fff}
  .stationery-live .preview-tip{margin:0 0 4px;font-weight:700}
  .stationery-live .letter-page{padding:8px 11px;box-shadow:2px 3px #32214337}
  .stationery-live .letter-heading,.stationery-live h2{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .stationery-live h2{font-size:1rem;margin:2px 0 0}
  .stationery-live .letter-stickers{margin:3px 0 0;font-size:clamp(.82rem,4vw,1.02rem);line-height:1.4;letter-spacing:0}
}
@media(max-width:800px) and (min-height:450px){.stationery-live{position:sticky;top:0}}
.stationery-set{padding:8px 12px;border:1px solid var(--ink);border-radius:10px;color:var(--ink);font-weight:700;background:#f3eaff;box-shadow:2px 2px var(--ink)}
.stationery-set[data-paper=pink]{background:#ffdfed}
.stationery-set[data-paper=mint]{background:#ddf6e9}
.stationery-set[data-paper=sky]{background:#dceeff}
.stationery-set[data-paper=peach]{background:#ffe5d2}

@media(max-width:800px){
  #editor.wrap,#recipient.wrap{width:calc(100% - 24px)}
  .letter-editor{padding:12px}
  .editor-step{padding:12px}
  .editor-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .letter-editor input:not([type=file]),.letter-editor textarea,.letter-editor select{font-size:16px}
  .letter-editor input:not([type=file]),.letter-editor select{min-height:44px}
  .letter-editor .actions{gap:10px}
  .letter-editor .actions>button,.mobile-preview-bar button{min-height:44px}
  .editor-part-preview{padding-top:12px;border-top:1px dashed #deceef;margin-top:3px}
  #file-list .page-items>li{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:9px}
  #file-list .page-items>li textarea{font-size:16px}
  #file-list .page-items .layout-controls{max-width:none;justify-content:flex-start;gap:6px}
  #file-list .layout-controls button,#file-list .layout-controls select{min-height:44px}
  #file-list .layout-controls button{min-width:44px}
  .page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  #file-list .page-actions button,#file-list .page-header-actions button,#file-list .editor-page-jump{min-height:44px;line-height:1.4}
  #file-list .editor-part-preview>.editor-page-jump{margin:14px 4px 5px;padding-inline:12px}
  .editor-page-header{justify-content:flex-start}
  .editor-page-header>.editor-page-jump{margin-inline-start:auto}
  .mail-scene,.opened-mail{padding-inline:clamp(10px,4vw,24px)}
  .reply-card{margin-block:12px;padding:14px}
  .reply-choices{--dodge-right:14px;--dodge-left:-10px;gap:10px;padding-bottom:48px}
  .reply-choices button,.story-nav button{min-height:44px;max-width:100%}
  .theme-reveal .pill,.mail-hint .pill{max-width:100%;line-height:1.45}
  .theme-reveal h2{font-size:clamp(23px,6vw,34px);line-height:1.35;text-wrap:pretty}
  .cake-frosting{letter-spacing:.4em;padding-left:.4em}
  dialog>.sheet{padding:20px 14px 16px}
  #ending-preview>.sheet{padding-top:45px}
}

@media(max-width:360px){
  .letter-editor .field-row,.letter-editor .look-grid{grid-template-columns:minmax(0,1fr)}
  .editor-page-card{padding:9px}
  .editor-part-preview .letter-page{padding:12px}
  .reply-choices{gap:8px}
}
