:root{font-family:Arial,"PingFang SC","Microsoft YaHei",sans-serif;color:#302c30;background:#292331;font-synthesis:none}
*{box-sizing:border-box}*[hidden]{display:none!important}html,body{height:100%;overflow:hidden}body{margin:0;display:flex;flex-direction:column}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.35}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.card:focus-visible{outline:3px solid #ffc3a1;outline-offset:3px}a{color:inherit}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.top{height:68px;flex:none;z-index:4;display:flex;align-items:center;gap:20px;padding:0 clamp(16px,3.5vw,58px);background:#302837;border-bottom:1px solid #ffffff19;color:#fff5ed}.brand{display:flex;align-items:center;gap:7px;text-decoration:none;margin-right:auto}.brand img:first-child{width:43px;height:43px;object-fit:contain}.brand img:last-child{width:82px;height:auto}.top-caption{font-size:11px;color:#d0bdb7;letter-spacing:.1em}.spark{color:#f2a276}.header-actions{display:flex;align-items:center;gap:7px}.quiet-button,.save-button,.share-button{border-radius:999px;padding:9px 15px;font-size:12px;font-weight:700;white-space:nowrap}.quiet-button{border:1px solid #ffffff46;background:transparent;color:#eee0d8}.save-button{border:1px solid #f2a476;background:#f2a476;color:#302333;box-shadow:0 8px 20px #ee936c32}.share-button{border:1px solid #f7d4b3;background:#f7d4b3;color:#382636}
#workspace{flex:1;min-height:0;overflow:hidden}.workbench{display:grid;grid-template-columns:minmax(0,1.13fr) minmax(360px,.87fr);height:100%;min-height:0}.stage{min-height:0;overflow:hidden;display:flex;flex-direction:column;background:radial-gradient(circle at 65% 48%,#514153 0,#302738 56%,#292331 100%);color:#fff7ef;position:relative}.stage-heading{flex:none;min-height:79px;padding:17px clamp(18px,3vw,48px) 8px;display:flex;align-items:start;justify-content:space-between;gap:12px}.eyebrow{margin:0 0 7px;color:#ecaa8b;font-size:10px;letter-spacing:.18em;font-weight:700}.eyebrow span{color:#9f859c}.stage-heading h1{font-family:"Noto Serif SC","Songti SC",SimSun,serif;font-weight:500;font-size:clamp(18px,2.1vw,26px);letter-spacing:.04em;margin:0}.preview-link{border:0;background:transparent;color:#ffd2b6;font-size:11px;white-space:nowrap;padding:4px 0}.stage-scene{flex:1;min-height:0;position:relative;display:grid;place-items:center;isolation:isolate}.orbit{position:absolute;border:1px solid #ffffff17;border-radius:50%;pointer-events:none}.orbit-one{width:min(72vh,480px);height:min(72vh,480px);transform:rotate(-12deg)}.orbit-two{width:min(89vh,590px);height:min(89vh,590px);border-style:dashed;opacity:.75}.glow{position:absolute;width:90px;height:90px;border-radius:50%;filter:blur(25px);opacity:.3;pointer-events:none}.glow-one{top:12%;left:16%;background:#f2a378}.glow-two{bottom:14%;right:12%;background:#c69cd4}.stage-side-note{position:absolute;right:3.5%;bottom:12%;writing-mode:vertical-rl;letter-spacing:.3em;font-size:9px;color:#d4b4ae8c}
.card{position:relative;z-index:1;width:min(65%,302px,calc((100dvh - 290px)*.7));aspect-ratio:3/4.3;overflow:hidden;border-radius:7px;background:#fff8ef;color:#3b3034;box-shadow:0 26px 75px #140e1c9c,0 0 0 1px #ffffff36;cursor:pointer;transform:translateZ(0);animation:cardArrive .55s cubic-bezier(.22,.68,0,1.05)}.card:after{content:"";position:absolute;inset:0;pointer-events:none;border:1px solid #ffffff86;border-radius:7px}.card-content{height:100%;width:100%;position:relative}.card-content img{display:block;width:100%;height:100%;object-fit:cover}.card-page-photo{height:100%;position:relative}.card-page-photo:after{content:"";position:absolute;inset:52% 0 0;background:linear-gradient(transparent,#201b2a75)}.card-page-photo .photo-stamp{position:absolute;z-index:1;bottom:20px;left:22px;color:#fff9f0;font-size:10px;letter-spacing:.3em;text-shadow:0 1px 7px #21151e}.card-page-letter,.card-page-voice{height:100%;padding:32px 30px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:radial-gradient(circle at 80% 10%,#f7e3d7,#fff8ef 57%);position:relative}.card-page-letter:before,.card-page-voice:before{content:"✳";position:absolute;top:25px;color:#c79686;font-size:18px}.card-page-letter:after,.card-page-voice:after{content:"心 意 码";position:absolute;bottom:22px;color:#b5a29f;letter-spacing:.36em;font-size:9px}.card-page-letter p,.card-page-mixed p,.voice-caption{white-space:pre-wrap;overflow-wrap:anywhere;font-family:"Noto Serif SC","Songti SC",SimSun,serif;line-height:1.9;font-size:clamp(15px,1.6vw,19px);margin:0;max-height:72%;overflow:auto}.card-page-letter .quote{position:absolute;left:23px;top:64px;font-size:68px;line-height:1;color:#e9d1c3;font-family:Georgia,serif}.card-page-mixed{height:100%;display:flex;flex-direction:column;background:#fff8ef}.card-page-mixed img{height:56%;object-fit:cover;flex:none}.card-page-mixed .mixed-words{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:19px 22px;overflow:auto;text-align:center}.card-page-mixed p{font-size:15px;max-height:100%}.card-page-voice{background:radial-gradient(circle at 20% 15%,#f7e2db,#f2e8e7 49%,#e9d9e9)}.voice-eyebrow{color:#aa6e72;font-size:10px;letter-spacing:.3em;margin:0 0 20px}.voice-disc{width:94px;height:94px;border-radius:50%;border:1px solid #c89ba9;display:grid;place-items:center;margin-bottom:23px;box-shadow:0 0 0 10px #be8fa522,0 0 0 23px #be8fa51a}.voice-play{width:58px;height:58px;border:0;border-radius:50%;background:#4a354b;color:#fff6ed;font-size:22px;display:grid;place-items:center;padding:0 0 0 3px;box-shadow:0 7px 18px #4a354b40}.voice-play.playing{padding:0;font-size:16px}.voice-caption{font-size:14px;max-height:18%;margin-top:14px}.waveform{display:flex;align-items:center;justify-content:center;gap:3px;height:30px}.waveform i{width:3px;height:var(--h);background:#b67f8f;border-radius:3px;opacity:.65}.voice-playing .waveform i{animation:wave 950ms ease-in-out infinite alternate;animation-delay:var(--delay)}
.stage-bottom{min-height:55px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:7px clamp(18px,3vw,48px) 13px}.stage-bottom p{font-size:11px;color:#b8a8bc;margin:0}.page-nav{display:flex;align-items:center;justify-content:center;gap:13px;color:#dfd0df;font-size:11px;white-space:nowrap}.page-nav button{width:32px;height:32px;border-radius:50%;border:1px solid #ffffff42;background:#ffffff16;color:#fff5ee}.page-nav button:hover:not(:disabled){background:#f2a476;color:#2d2431}
.card-page-photo.layout-center{background:#f7e8dc;padding:12% 9%}.card-page-photo.layout-center img{border-radius:3px;box-shadow:0 8px 25px #3b263341}.card-page-photo.layout-center .photo-stamp{bottom:6%;left:9%;color:#76575d;text-shadow:none}.card-page-photo.layout-split img{height:73%}.card-page-photo.layout-split:after{inset:62% 0 0;background:linear-gradient(transparent,#f8eadf 30%)}.card-page-photo.layout-split .photo-stamp{color:#76575d;text-shadow:none}.card-page-mixed.layout-center{padding:8%;justify-content:center;gap:10px}.card-page-mixed.layout-center img{height:55%;border-radius:3px}.card-page-mixed.layout-center .mixed-words{flex:0 1 auto;min-height:18%}.card-page-mixed.layout-full{position:relative;color:#fff}.card-page-mixed.layout-full img{position:absolute;inset:0;width:100%;height:100%}.card-page-mixed.layout-full .mixed-words{position:absolute;bottom:0;width:100%;height:45%;align-items:end;padding:20px 22px;background:linear-gradient(transparent,#211b2abb)}
.creator{min-height:0;overflow-y:auto;overscroll-behavior:contain;background:#fffaf3;padding:28px clamp(19px,3.4vw,50px) 38px}.creator-heading h2{font-family:"Noto Serif SC","Songti SC",SimSun,serif;font-size:25px;font-weight:600;margin:0;color:#382e35}.creator-heading>p:last-of-type{font-size:12px;color:#9b8c88;line-height:1.65;margin:10px 0 20px}.type-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:5px;border-radius:14px;background:#f3eae4}.type-tabs button{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:0;border-radius:10px;background:transparent;color:#9c8c8f;padding:10px 2px 9px}.type-tabs button.active{color:#623d50;background:#fff;box-shadow:0 4px 13px #3e273019}.type-tabs strong{font-size:11px;white-space:nowrap}.type-icon{font-family:"Noto Serif SC",serif;font-size:23px;line-height:1.1}
.editor-block{margin:23px 0}.editor-block.compact{margin-top:18px}.block-heading{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:9px}.block-heading label,.block-heading strong{font-size:13px;color:#4f4046;font-weight:700}.block-heading span{font-size:10px;color:#ac999b}.editor-block textarea,.editor-block select,.share-dialog input{width:100%;padding:12px;border:1px solid #dcd0ce;border-radius:10px;background:#fff;color:#3a3037}.editor-block textarea{resize:vertical;min-height:112px;line-height:1.75}.field-help{font-size:11px;color:#a39899;line-height:1.55;margin:7px 0 0}.writing-nudge{display:flex;gap:10px;align-items:start;background:#f7ede8;border-radius:10px;padding:11px 12px;margin-top:13px;color:#9a6a68;font-size:11px;line-height:1.6}.writing-nudge span{font-size:18px}.writing-nudge p{margin:0}.choice-line select{appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%239c7b84'/%3E%3C/svg%3E") no-repeat right 14px center}.upload-box{margin-top:12px;border:1px dashed #d6b8b4;background:#fff5f0;border-radius:10px;padding:12px}.upload-box label,.audio-upload{color:#a15f6a;font-size:12px;font-weight:700;cursor:pointer}.upload-box input{display:block;margin-top:9px;max-width:100%;font-size:11px}.upload-box p{color:#aa9695;font-size:10px;margin:8px 0 0}
.voice-intro{font-size:12px;color:#978589;line-height:1.65;margin:0 0 13px}.record-panel{background:linear-gradient(120deg,#f7e6e4,#efe5ef);border-radius:14px;padding:14px;display:flex;align-items:center;gap:12px;min-width:0}.record-art{display:flex;align-items:center;gap:2px;height:31px;width:31px;flex:none}.record-art i{width:2px;height:var(--h);background:#ae7187;border-radius:2px}.record-art.active i{animation:wave 700ms ease-in-out infinite alternate;animation-delay:var(--delay)}.record-panel>div:nth-child(2){display:flex;flex-direction:column;min-width:0;gap:3px;flex:1}.record-panel strong{font-size:11px;color:#604753;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-panel span{font-size:10px;color:#a38291;font-variant-numeric:tabular-nums}.record-button{flex:none;border:0;border-radius:999px;background:#574052;color:#fff;padding:9px 11px;font-size:11px;font-weight:700}.record-button.recording{background:#bd6d6d}.audio-upload{display:inline-flex;align-items:center;gap:9px;margin-top:14px}.audio-upload span{font-size:15px}#audio-file{display:block;max-width:100%;font-size:11px;margin-top:8px}.audio-ready{display:flex;align-items:center;gap:10px;margin-top:13px;padding:10px;border:1px solid #e2d3d8;border-radius:10px;background:#fff}.audio-ready>span{width:29px;height:29px;display:grid;place-items:center;border-radius:50%;background:#5e455b;color:#fff}.audio-ready>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.audio-ready strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.audio-ready small{font-size:10px;color:#aa9a9f}.audio-ready button{border:0;background:none;color:#ac6873;font-size:11px}
.theme-section{border-top:1px solid #eee3df;padding-top:18px;margin-top:22px}.theme-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.theme-choice{min-width:0;padding:0;border:1px solid transparent;background:transparent;border-radius:8px;text-align:left;overflow:hidden;color:#75666a}.theme-choice.selected{border-color:#b87887;background:#fff}.theme-photo{height:48px;background-size:cover;background-position:center;position:relative}.theme-choice.selected .theme-photo:before{content:"✓";position:absolute;top:3px;right:3px;background:#fff;color:#a66874;border-radius:50%;width:16px;height:16px;display:grid;place-items:center;font-size:11px}.theme-meta{display:block;padding:5px}.theme-meta strong{font-size:10px}.theme-meta small{display:none}.page-actions{border-top:1px solid #eee3df;padding-top:15px;margin-top:22px;display:flex;align-items:center;justify-content:space-between;gap:8px}.page-actions>span{font-size:11px;color:#a09396}.page-actions>div{display:flex;gap:5px;flex-wrap:wrap;justify-content:end}.page-actions button{border:1px solid #ded1d3;border-radius:7px;background:#fff;color:#79656b;padding:6px 8px;font-size:11px}.privacy{font-size:10px;color:#aaa0a1;line-height:1.5;margin:21px 0 0}.error{color:#a43d40;background:#fff0ed;border-radius:8px;padding:10px;font-size:12px}.plan-note{background:#fff3e7;color:#995d39;border-radius:8px;padding:10px;font-size:12px;line-height:1.5}
.page-footer{height:139px;flex:none;z-index:3;background:#2f2635;border-top:1px solid #ffffff24;color:#fff4eb;padding:10px clamp(16px,3.5vw,58px) 7px;box-shadow:0 -12px 35px #1f172752}.footer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.footer-head>div{display:flex;align-items:baseline;gap:11px}.footer-head strong{font-family:"Noto Serif SC","Songti SC",SimSun,serif;font-weight:500;font-size:14px;letter-spacing:.04em}.footer-head span,.footer-note{font-size:10px;color:#bdabba}.footer-strip{display:flex;gap:9px;align-items:stretch}.page-list{display:flex;gap:8px;flex:1;min-width:0;overflow-x:auto;scroll-snap-type:x proximity}.page-tile,.add-tile{height:77px;width:77px;min-width:77px;border-radius:7px;scroll-snap-align:start}.page-tile{padding:4px;background:#493a4a;border:1px solid #ffffff3d;text-align:left;color:#e5d5df}.page-tile.active{border-color:#ffa97e;box-shadow:0 0 0 2px #ffa97e44}.page-thumb{height:48px;border-radius:3px;background:#6b5363;display:flex;align-items:center;justify-content:center;background-size:cover;background-position:center;color:#efc1b9;font-size:15px}.page-tile strong{display:block;padding:3px 1px 0;font-size:10px;font-weight:600}.add-tile{flex:none;border:1px dashed #d7aa9c;background:#ffffff0b;color:#f7be9f;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}.add-tile span{font-size:22px}.add-tile strong{font-size:10px}.footer-note{margin:4px 0 0}
dialog{border:0;padding:0;box-shadow:0 25px 90px #0c07159c;max-height:92dvh;overflow:auto}dialog::backdrop{background:#17121cbb}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.dialog-head button{border:0;background:none;color:#8e8276;font-size:26px;line-height:1}.dialog-brand{display:flex;align-items:center;gap:6px;color:#9b8171;font-size:12px}.dialog-brand img:first-child{width:32px;height:32px;object-fit:contain}.dialog-brand img:last-child{width:70px;height:auto}.preview-dialog{width:min(92vw,430px);border-radius:16px;background:#342a3b;padding:18px;color:#fff}.preview-dialog .dialog-card{width:min(100%,300px,calc((92dvh - 170px)*.7));margin:12px auto}.dialog-hint{text-align:center;color:#c0abba;font-size:11px;margin:8px}.preview-dialog .page-nav{margin:10px 0 0}.share-dialog,.reset-dialog{width:min(92vw,510px);border-radius:16px;background:#fffaf3;padding:22px 26px}.share-dialog .dialog-brand img{width:70px}.result-mark{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#e7f1e9;color:#54775b;margin:24px 0 13px;font-size:23px}.share-dialog h2,.share-dialog h3,.reset-dialog strong{font-family:"Noto Serif SC","Songti SC",SimSun,serif}.share-dialog h2{font-size:25px;margin:0 0 7px}.share-dialog h3{font-size:20px;margin:0}.share-dialog>p,.reset-dialog p{font-size:13px;color:#81776d;line-height:1.6}.invite-block{margin:22px 0}.invite-block>label,.share-dialog>label,#share-result>label{display:block;margin-bottom:8px;font-size:13px;font-weight:700}.link-row{display:flex;gap:7px}.link-row input{min-width:0;flex:1;border:1px solid #dacdc9;border-radius:8px;padding:11px}.button{border:1px solid transparent;border-radius:9px;padding:10px 15px;font-size:12px;font-weight:700;white-space:nowrap}.button-outline{border-color:#d8bdba;background:#fff;color:#8e574f}.button-primary{background:#a96374;color:#fff}.dialog-actions{display:flex;gap:9px;margin:16px 0}.share-divider{height:1px;background:#e6deda;margin:23px 0}.qr-wrap{display:flex;flex-direction:column;align-items:center;gap:8px;margin:15px 0}.qr-wrap img{width:170px;height:170px}.qr-wrap a{color:#9b5b60;font-size:12px;text-decoration:none}.reset-dialog{width:min(90vw,380px)}.reset-dialog p{margin:20px 0}.reset-dialog .dialog-actions{justify-content:flex-end}
.viewer .creator,.viewer .page-footer,.viewer .header-actions{display:none}.viewer .workbench{display:block}.viewer .stage{height:100%}.viewer .card{width:min(75vw,330px,calc((100dvh - 210px)*.7))}
@keyframes cardArrive{from{opacity:.45;transform:translateY(13px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes wave{to{transform:scaleY(.35);opacity:1}}
@media(max-width:760px){.top{height:56px;padding:0 12px;gap:8px}.brand img:first-child{width:35px;height:35px}.brand img:last-child{width:72px}.top-caption{display:none}.header-actions{gap:5px}.header-actions button{padding:8px 10px;font-size:0}.header-actions #new-card:after{content:"新卡";font-size:11px}.header-actions #save:after{content:"保存";font-size:11px}.header-actions #open-share:after{content:"发布";font-size:11px}.header-actions .save-button span{display:none}.workbench{display:block;overflow-y:auto;overscroll-behavior:contain}.stage{height:500px}.stage-heading{min-height:65px;padding:14px 17px 6px}.stage-heading h1{font-size:20px}.stage-scene{min-height:0}.stage-side-note{display:none}.stage .card{width:min(68vw,260px,calc((100dvh - 420px)*.7))}.stage-bottom{min-height:45px;padding:5px 17px 10px}.stage-bottom p{max-width:145px;line-height:1.3}.orbit-one{width:330px;height:330px}.orbit-two{width:400px;height:400px}.creator{overflow:visible;padding:22px 17px 35px}.creator-heading h2{font-size:23px}.page-footer{height:131px;padding:9px 11px 5px}.footer-head strong{font-size:12px}.footer-head>div{gap:6px}.footer-head>span{max-width:112px;text-align:right;line-height:1.2}.page-tile,.add-tile{height:72px;width:68px;min-width:68px}.page-thumb{height:43px}.page-tile strong,.add-tile strong{font-size:9px}.footer-note{margin:3px 0 0}.page-actions{display:block}.page-actions>div{justify-content:start;margin-top:8px}.share-dialog,.reset-dialog{padding:18px}.preview-dialog{max-height:96dvh}.viewer .workbench{height:100%;overflow:hidden}.viewer .stage{height:100%}.viewer .card{width:min(79vw,340px,calc((100dvh - 180px)*.7))}}
@media(max-width:360px){.brand img:last-child{width:64px}.stage{height:425px}.stage .card{width:min(62vw,210px,calc((100dvh - 370px)*.7))}.stage-heading h1{font-size:18px}.footer-head>span{display:none}.type-tabs strong{font-size:10px}.type-icon{font-size:21px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* The maker works at the card itself; controls appear only when a card region is touched. */
.workbench{display:block}.stage{height:100%;background:radial-gradient(circle at 50% 42%,#5a4559 0,#33283a 53%,#251f2d 100%)}
.stage-heading{min-height:70px}.format-bar{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;gap:18px;padding:4px 18px 10px;color:#d9bfcb}.format-bar>span{font-size:11px;letter-spacing:.12em;white-space:nowrap}.format-bar .type-tabs{display:flex;gap:5px;background:#ffffff18;border:1px solid #ffffff1e;border-radius:999px;padding:4px}.format-bar .type-tabs button{width:73px;min-height:45px;padding:4px 8px;flex-direction:row;gap:5px;border-radius:999px;color:#ddcdd8}.format-bar .type-tabs button.active{background:#f9dfce;color:#523948;box-shadow:0 5px 15px #170e1b46}.format-bar .type-tabs strong{font-size:11px}.format-bar .type-icon{font-size:17px}.format-options{border:1px solid #ffffff3d;background:#ffffff0b;color:#f4d1bc;border-radius:999px;padding:10px 13px;font-size:11px;white-space:nowrap}.format-options:hover{background:#ffffff20}
.stage .card{width:min(38vw,360px,calc((100dvh - 345px)*.7));box-shadow:0 35px 90px #140e1cac,0 0 0 1px #ffffff6d;transform:rotate(-1.2deg)}.stage .card:hover{transform:rotate(0deg) translateY(-4px);transition:transform .28s ease}.stage-scene:before,.stage-scene:after{content:"";position:absolute;width:min(38vw,360px,calc((100dvh - 345px)*.7));aspect-ratio:3/4.3;background:#efdfdb;border-radius:7px;box-shadow:0 15px 30px #140e1c55;transform:translate(14px,8px) rotate(3deg)}.stage-scene:before{background:#d8b6bd;transform:translate(-12px,7px) rotate(-3.5deg)}.stage-scene:after{background:#eee5de;transform:translate(10px,5px) rotate(2deg)}.stage .card{z-index:2}.stage-bottom{padding-bottom:12px}.stage-error{position:absolute;bottom:57px;left:50%;transform:translateX(-50%);z-index:5;max-width:min(90vw,420px);margin:0;background:#fff4ed;color:#a03c45;border-radius:10px;padding:9px 13px;box-shadow:0 6px 20px #170e1b70}
.editable-part{cursor:pointer}.editable-part:hover{outline:2px solid #edbc9b;outline-offset:-5px}.edit-badge{position:absolute;z-index:4;right:12px;bottom:11px;border:1px solid #fff8ed8c;border-radius:999px;background:#33263fcc;color:#fffaf3;padding:7px 10px;font-size:10px;box-shadow:0 5px 13px #2b1d2d66}.card-page-mixed>.edit-badge{top:12px;bottom:auto}.card-page-mixed .mixed-words{position:relative}.card-page-mixed .mixed-words .edit-badge{bottom:7px}.card-page-letter .edit-badge{bottom:36px;right:20px}.card-page-voice .voice-disc{position:relative}.card-page-voice .voice-disc .edit-badge{bottom:-33px;right:50%;transform:translateX(50%);white-space:nowrap}.card-page-voice .voice-caption{position:relative;min-height:29px}.card-page-voice .voice-caption .edit-badge{position:static;display:block;margin:7px auto 0;white-space:nowrap}.card-page-voice .voice-play:disabled{opacity:.5}
.edit-dialog{position:fixed;inset:0 0 0 auto;margin:0;max-height:none;height:100dvh;width:min(440px,100vw);max-width:none;border:0;border-left:1px solid #ffffff44;padding:0;background:#fffaf3;color:#3d3039;box-shadow:-15px 0 50px #17101f88}.edit-dialog::backdrop{background:#1a111bb5;backdrop-filter:blur(4px)}.edit-dialog .creator{height:100%;overflow-y:auto;padding:25px 28px 50px}.edit-dialog .creator-heading{display:grid;grid-template-columns:1fr auto;align-items:start;gap:8px}.edit-dialog .creator-heading h2{margin:0}.edit-dialog .creator-heading p#editor-intro{grid-column:1/-1;margin:3px 0 6px}.edit-dialog #close-editor{border:1px solid #e8d9d5;background:#fff;border-radius:50%;width:32px;height:32px;font-size:22px;line-height:1;color:#674653}.edit-dialog .creator-heading .eyebrow{margin-bottom:6px}.edit-dialog[data-section="text"] :is(#image-fields,#voice-fields,#layout-field,.theme-section,.page-actions),.edit-dialog[data-section="image"] :is(#text-field,#voice-fields,.theme-section,.page-actions),.edit-dialog[data-section="voice"] :is(#text-field,#image-fields,#layout-field,.theme-section,.page-actions),.edit-dialog[data-section="options"] :is(#text-field,#image-fields,#voice-fields){display:none}.edit-dialog[data-section="options"] .page-actions{margin-top:25px}.edit-dialog[data-section="voice"] .voice-intro{margin-top:15px}
.viewer .format-bar{display:none}.viewer .stage-scene:before,.viewer .stage-scene:after{display:none}.viewer .stage .card{transform:none;cursor:pointer}.viewer .stage .card:hover{transform:none}
@media(max-width:760px){.stage{height:100%}.stage-heading{min-height:64px;padding:14px 16px 7px}.format-bar{gap:4px;justify-content:space-between;padding:1px 10px 8px;flex-wrap:wrap}.format-bar>span{width:100%;text-align:center;font-size:9px}.format-bar .type-tabs{flex:1;justify-content:space-around;min-width:0}.format-bar .type-tabs button{width:auto;min-width:0;min-height:38px;padding:3px 5px;gap:3px}.format-bar .type-tabs strong{font-size:10px}.format-bar .type-icon{font-size:15px}.format-options{font-size:0;padding:10px 10px;min-height:45px}.format-options:after{content:"调整 ✦";font-size:10px}.stage .card,.stage-scene:before,.stage-scene:after{width:min(72vw,310px,calc((100dvh - 335px)*.7))}.stage-scene{min-height:0}.stage-bottom{min-height:43px;padding:5px 15px 9px}.stage-bottom p{max-width:180px}.page-footer{height:131px}.edit-dialog{inset:auto 0 0;margin:0;width:100vw;height:auto;max-height:82dvh;border:0;border-radius:20px 20px 0 0;box-shadow:0 -15px 45px #17101f80}.edit-dialog .creator{max-height:82dvh;padding:21px 20px 34px}.viewer .stage{height:100%}}
@media(max-width:360px){.format-bar .type-tabs strong{font-size:9px}.format-bar .type-tabs button{padding:3px 4px}.format-bar .type-icon{font-size:13px}.stage .card,.stage-scene:before,.stage-scene:after{width:min(72vw,250px,calc((100dvh - 325px)*.7))}.stage-bottom p{font-size:10px}}
.stage .card,.stage-scene:before,.stage-scene:after{width:min(38vw,360px,calc((100dvh - 370px)*.68))}
.inline-write{display:block;width:100%;min-height:46%;max-height:75%;padding:13px 12px;border:1px dashed #bd8f98;border-radius:8px;background:#fffaf0dc;color:#45343d;resize:none;text-align:center;outline:none;font-family:"Noto Serif SC","Songti SC",SimSun,serif;font-size:clamp(15px,1.6vw,19px);line-height:1.9;box-shadow:0 4px 15px #3c22301b}.card-page-mixed .inline-write{flex:1;min-height:0;height:100%;font-size:15px}.card-page-voice .inline-write{min-height:22%;height:22%;margin-top:15px;font-size:14px}
.edit-dialog{inset:68px 0 139px auto;height:auto;max-height:none;z-index:7;box-shadow:-10px 0 35px #1c101f8a}.edit-dialog::backdrop{display:none}.edit-dialog .creator{height:100%}
@media(max-width:760px){.stage .card,.stage-scene:before,.stage-scene:after{width:min(72vw,310px,calc((100dvh - 335px)*.7))}.edit-dialog{inset:auto 0 131px 0;height:auto;max-height:55dvh;border-radius:18px 18px 0 0;box-shadow:0 -11px 25px #1c101f66}.edit-dialog .creator{max-height:55dvh;padding-bottom:22px}}
@media(max-width:360px){.stage .card,.stage-scene:before,.stage-scene:after{width:min(72vw,250px,calc((100dvh - 325px)*.7))}}
.edit-dialog[data-section="image"] :is(#editor-intro,#layout-field,.privacy){display:none}
.edit-dialog[data-section="voice"] .privacy{display:none}
@media(max-width:760px){.format-bar .type-tabs button,.format-options{min-height:44px}}
.stage-scene{padding-top:18px}.card-page-mixed .mixed-words.editable-part{padding-bottom:36px}.card-page-mixed.layout-center .mixed-words.editable-part{min-height:25%}.card-page-mixed .mixed-words .edit-badge{right:7px;bottom:6px;font-size:9px}
.card-page-voice .voice-caption.editable-part{overflow:visible;max-height:none;min-height:55px;margin-top:16px;font-size:12px;line-height:1.4}
.edit-dialog[data-section="voice"] #editor-intro{display:none}
@media(max-width:760px){.edit-dialog[data-section="voice"],.edit-dialog[data-section="voice"] .creator{max-height:43dvh}}
.stage #card{touch-action:none}.stage-scene.fanning #card{opacity:.14;filter:blur(3px);transition:opacity .2s ease,filter .2s ease}.stage-scene.fanning:before,.stage-scene.fanning:after{opacity:.13;transition:opacity .2s ease}
.fan{position:absolute;inset:0;z-index:6;display:grid;place-items:center;background:radial-gradient(circle at 50% 47%,#403046ae,#1c1527e8 78%);animation:fanAppear .2s ease-out}.fan-deck{position:relative;width:100%;height:100%;pointer-events:none}.fan-card{position:absolute;top:47%;left:50%;width:98px;height:149px;padding:6px;border:1px solid #fff6e8a3;border-radius:8px;background:#fff8ee;color:#4e3945;text-align:left;box-shadow:0 13px 26px #0f09177d;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) rotate(var(--rot));transform-origin:50% 110%;transition:transform .2s cubic-bezier(.2,.7,.2,1),box-shadow .2s ease,border-color .2s ease;pointer-events:auto;cursor:pointer;display:flex;flex-direction:column;gap:5px}.fan-card.active{border-color:#f6a982;box-shadow:0 0 0 3px #f6a98277,0 22px 45px #0f0917b0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y) - 24px)) rotate(var(--rot)) scale(1.1)}.fan-face{flex:1;min-height:0;display:grid;place-items:center;overflow:hidden;border-radius:4px;background:#f4e5e0;background-position:center;background-size:cover;color:#7d5469;text-align:center;padding:9px;font-family:"Noto Serif SC","Songti SC",SimSun,serif;font-size:11px;line-height:1.5;overflow-wrap:anywhere}.fan-voice .fan-face{font-size:40px;background:linear-gradient(145deg,#f3d8d2,#ded0e9)}.fan-card strong{display:block;white-space:nowrap;font-size:10px;font-weight:700;padding-left:2px}.fan-instruction{position:absolute;z-index:30;left:50%;bottom:10px;transform:translateX(-50%);margin:0;padding:8px 13px;border:1px solid #ffffff3d;border-radius:999px;background:#281e34dc;color:#fff4eb;font-size:11px;white-space:nowrap;pointer-events:none}@keyframes fanAppear{from{opacity:0;transform:scale(.93)}to{opacity:1;transform:scale(1)}}
@media(max-width:760px){.fan-card{width:83px;height:127px}.fan{background:radial-gradient(circle at 50% 45%,#483548a8,#20182be8 82%)}.fan-instruction{bottom:9px}}
.fan-card{width:120px;height:178px}.fan-card.active{transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y) - 31px)) rotate(var(--rot)) scale(1.08)}.fan-face{font-size:13px}.fan-card strong{font-size:11px}.fan-instruction{bottom:4px}
@media(max-width:760px){.fan-card{width:94px;height:146px}.fan-face{font-size:11px}.fan-card strong{font-size:10px}}
.preview-dialog{isolation:isolate}.preview-dialog #full-card{touch-action:none}.preview-dialog.fanning #full-card{opacity:.12;filter:blur(3px);transition:opacity .2s ease,filter .2s ease}.preview-fan{inset:51px 0 64px;z-index:8;border-radius:8px}.preview-fan .fan-instruction{bottom:6px}
.voice-play:disabled{pointer-events:none}
.fan{overflow:hidden;touch-action:none}
.fan-card{transform:translate(calc(-50% + var(--x,0px)),calc(-50% + var(--y,0px))) rotate(var(--rot,0deg)) scale(var(--scale,1));transition:transform .32s cubic-bezier(.18,.75,.2,1),box-shadow .25s ease,border-color .25s ease;will-change:transform;backface-visibility:hidden}
.fan-card.active{transform:translate(calc(-50% + var(--x,0px)),calc(-50% + var(--y,0px))) rotate(var(--rot,0deg)) scale(var(--scale,1))}
.fan.dragging .fan-card{transition:none}
.fan-add{border:1.5px dashed #f6b99a;background:#fff7edee;color:#8f655d}
.fan-add .fan-face{border:1px dashed #d6aea0;background:linear-gradient(150deg,#fff8ec,#f7e5df);font-family:system-ui,sans-serif;font-size:47px;font-weight:200;color:#bb887d}
.fan-add.active{border-color:#ffcf9f;box-shadow:0 0 0 3px #ffcf9f77,0 22px 45px #0f0917b0}
@media(prefers-reduced-motion:reduce){.fan,.fan-card{animation:none;transition:none}}
.mobile-deck{display:none}
@media(max-width:760px){
  .page-footer{display:none}
  .stage-bottom{min-height:75px;padding:4px 14px 10px;gap:10px}
  .stage-bottom #hint{display:none}
  .stage-bottom .page-nav{gap:6px}
  .stage-bottom .page-nav button{width:30px;height:30px}
  .stage-bottom .page-nav span{font-size:10px}
  .mobile-deck{display:flex;align-items:center;flex:1;min-width:0;height:58px;padding:4px 9px 4px 10px;border:1px solid #e7bda07a;border-radius:12px;background:linear-gradient(110deg,#564056,#382c41);color:#fff5eb;text-align:left;box-shadow:0 8px 22px #140c1980;touch-action:none;user-select:none}
  .mobile-deck-art{position:relative;flex:none;width:53px;height:43px;margin-right:7px}
  .mobile-deck-art i{position:absolute;top:4px;left:12px;width:28px;height:38px;border:1px solid #fff5e6b3;border-radius:3px;background:linear-gradient(145deg,#f5d9ca,#eac0b7);box-shadow:0 2px 7px #120c1960}
  .mobile-deck-art i:first-child{transform:translateX(-9px) rotate(-13deg);background:#c5a2a9}
  .mobile-deck-art i:last-child{transform:translateX(9px) rotate(13deg);background:#f5e2cb}
  .mobile-deck-copy{display:flex;flex-direction:column;min-width:0;gap:1px}
  .mobile-deck-copy strong{font-size:11px;font-weight:700;white-space:nowrap}
  .mobile-deck-copy small{font-size:10px;color:#ffd3b2;white-space:nowrap}
  .mobile-deck-copy em{font-size:9px;font-style:normal;color:#cfbacb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-deck-arrow{margin-left:auto;color:#ffd0ac;font-size:14px}
  .stage .card,.stage-scene:before,.stage-scene:after{width:min(78vw,340px,calc((100dvh - 290px)*.7))}
  .stage-error{bottom:79px}
  .viewer .mobile-deck-copy em{display:none}
}
@media(max-width:360px){.stage .card,.stage-scene:before,.stage-scene:after{width:min(78vw,310px,calc((100dvh - 290px)*.7))}.mobile-deck-copy strong{font-size:10px}.mobile-deck-copy small{font-size:9px}.mobile-deck-art{width:46px;margin-right:4px}}
.format-shell{position:relative;z-index:7;flex:none}
.format-bar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:min(620px,100%);margin:auto;padding:6px 16px 11px}
.format-bar>button{min-width:0;min-height:47px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:1px solid #ffffff3d;border-radius:11px;background:#ffffff10;color:#fff4ea;font-size:13px;font-weight:700}
.format-bar>button span{color:#d2bcca;font-size:10px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.format-bar>button.active{background:#f9dfce;border-color:#f9dfce;color:#493748;box-shadow:0 6px 20px #170e1b5c}
.format-bar>button.active span{color:#795b69}
.format-panel{position:absolute;top:100%;left:50%;width:min(620px,calc(100vw - 28px));max-height:min(37dvh,270px);overflow-y:auto;transform:translateX(-50%);padding:14px 17px 17px;border:1px solid #f6dac7;border-radius:12px;background:#fff9f0;color:#493945;box-shadow:0 18px 50px #140e1cb0;animation:fanAppear .18s ease-out}
.format-panel:before{content:"";position:absolute;top:-6px;left:calc(16.66% - 5px);width:10px;height:10px;transform:rotate(45deg);background:#fff9f0;border-left:1px solid #f6dac7;border-top:1px solid #f6dac7}
.format-panel[data-section="atmosphere"]:before{left:calc(50% - 5px)}.format-panel[data-section="adjust"]:before{left:calc(83.33% - 5px)}
.format-section{display:none}.format-panel[data-section="form"] [data-panel="form"],.format-panel[data-section="atmosphere"] [data-panel="atmosphere"],.format-panel[data-section="adjust"] [data-panel="adjust"]{display:block}
.format-section>p{margin:0 0 10px;color:#8c7378;font-size:12px}.format-section .type-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.format-section .type-tabs button{min-height:65px}
#background-field>strong,#layout-field>label,.format-panel .theme-section>strong{display:block;margin-bottom:9px;font-size:12px;color:#544249}
.background-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.background-choices button{min-height:60px;border:1px solid #dfd1cf;border-radius:9px;color:#65565b;font-size:11px;padding:31px 2px 5px;background:linear-gradient(145deg,#f7e3d7,#fff8ef 60%)}.background-choices button[data-background="blush"]{background:linear-gradient(145deg,#f0d4de,#fdf1f1 70%)}.background-choices button[data-background="sand"]{background:linear-gradient(145deg,#dfc9aa,#f6e8d4 70%)}.background-choices button[data-background="sage"]{background:linear-gradient(145deg,#cbdacc,#eff4e8 70%)}.background-choices button.active{border-color:#a56b78;box-shadow:0 0 0 2px #a56b7840}
.format-panel #layout-field select{width:100%;padding:9px 11px;border:1px solid #ddcfcc;border-radius:8px;background:#fff;color:#55444c;font-size:12px}
.format-panel .theme-section{margin-top:13px;padding-top:12px}.format-panel .theme-section small{font-size:10px;font-weight:400;color:#9e8b8d}.format-panel .theme-grid{grid-template-columns:repeat(4,1fr)}
.format-panel .page-actions{display:grid;grid-template-columns:repeat(3,1fr);margin:0;padding:0;border:0;gap:8px}.format-panel .page-actions button{min-height:43px;font-size:12px}.format-panel #delete{border-color:#e7c6c1;color:#a24f58;background:#fff5f2}
.card-content[data-background="blush"] .card-page-letter,.card-content[data-background="blush"] .card-page-voice{background:radial-gradient(circle at 80% 10%,#f0d4de,#fdf1f1 60%)}
.card-content[data-background="sand"] .card-page-letter,.card-content[data-background="sand"] .card-page-voice{background:radial-gradient(circle at 80% 10%,#dfc9aa,#f6e8d4 60%)}
.card-content[data-background="sage"] .card-page-letter,.card-content[data-background="sage"] .card-page-voice{background:radial-gradient(circle at 80% 10%,#cbdacc,#eff4e8 60%)}
.viewer .format-shell{display:none}
@media(max-width:760px){.format-bar{gap:7px;padding:4px 12px 9px}.format-bar>button{min-height:46px;font-size:12px}.format-bar>button span{font-size:9px}.format-panel{max-height:34dvh;padding:12px}.format-section .type-tabs button{min-height:57px}.edit-dialog{inset:auto 0 0 0;max-height:55dvh}.edit-dialog .creator{max-height:55dvh}}
.format-panel{animation:panelFade .18s ease-out both}
.edit-dialog[open]{animation:editorFade .2s cubic-bezier(.2,.75,.25,1) both}
@keyframes panelFade{from{opacity:0}to{opacity:1}}
@keyframes editorFade{from{opacity:0;transform:scale(.975)}to{opacity:1;transform:scale(1)}}
.layout-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.layout-choices button{min-height:69px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:1px solid #dfd1cf;border-radius:9px;background:#fff;color:#79656c}
.layout-choices button span{font-size:25px;line-height:1;color:#a37785}
.layout-choices button strong{font-size:11px;font-weight:600}
.layout-choices button.active{border-color:#a56b78;background:#fff0e7;box-shadow:0 0 0 2px #a56b7838;color:#55404a}
.image-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.image-choice{min-width:0;padding:4px;border:1px solid #dfd1cf;border-radius:9px;background:#fff;color:#6b5660;text-align:left}
.image-choice img{display:block;width:100%;height:72px;border-radius:5px;object-fit:cover}
.image-choice span{display:block;padding:5px 2px 0;font-size:11px;font-weight:700}
.image-choice small{display:block;padding:0 2px 3px;font-size:9px;color:#aa9695;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.image-choice.selected{border-color:#a56b78;box-shadow:0 0 0 2px #a56b7838}
.edit-dialog #image-fields .upload-box{margin-top:14px}
@media(max-width:760px){.image-choice img{height:62px}}
@media(prefers-reduced-motion:reduce){.format-panel,.edit-dialog[open]{animation:none}}
.edit-dialog[data-section="image"]{inset:50% auto auto 50%;width:min(440px,calc(100vw - 28px));height:auto;max-height:min(72dvh,560px);border:1px solid #f0dfd6;border-radius:18px;transform:translate(-50%,-50%);box-shadow:0 22px 70px #130d19b3}
.edit-dialog[data-section="image"][open]{animation:imageEditorFade .18s ease-out both}
.edit-dialog[data-section="image"] .creator{height:auto;max-height:min(72dvh,560px);overflow-y:auto;padding:22px 22px 25px}
@keyframes imageEditorFade{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.edit-dialog[data-section="image"][open]{animation:none}}
.image-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.upload-tile{cursor:pointer;border:1.5px dashed #cfa4a1;border-radius:10px;background:linear-gradient(145deg,#fff7f2,#f8ecea);color:#985c69}
.upload-tile:hover,.upload-tile:focus-within{border-color:#aa6f79;background:#fff0e9}
.upload-plus{display:grid;place-items:center;border-radius:50%;background:#f1d9d5;color:#9f6171;font-family:Arial,sans-serif;font-weight:300}
.own-image-section{margin-top:15px;padding-top:12px;border-top:1px solid #eadcda}.own-image-section>strong{display:block;margin-bottom:9px;font-size:12px;color:#65545b}
.image-upload-tile{min-height:62px;display:flex;align-items:center;justify-content:center;gap:12px;padding:9px 12px;text-align:left}
.image-upload-tile .upload-plus{width:35px;height:35px;font-size:29px;line-height:1}
.image-upload-tile>span:last-child{display:flex;flex-direction:column;gap:2px}.image-upload-tile strong{font-size:11px}.image-upload-tile small{font-size:9px;color:#ab8990}
.image-upload-tile.selected{border-style:solid;border-color:#a56b78;box-shadow:0 0 0 2px #a56b7838}
.audio-upload-tile{min-height:66px;display:flex;align-items:center;gap:12px;margin-top:13px;padding:10px 13px}
.audio-upload-tile .upload-plus{width:39px;height:39px;flex:none;font-size:30px}
.audio-upload-tile>span:last-child{display:flex;flex-direction:column;gap:3px}
.audio-upload-tile strong{font-size:12px}.audio-upload-tile small{font-size:10px;color:#a7868c}
.edit-dialog[data-section="voice"]{inset:50% auto auto 50%;width:min(440px,calc(100vw - 28px));height:auto;max-height:min(72dvh,560px);border:1px solid #f0dfd6;border-radius:18px;transform:translate(-50%,-50%);box-shadow:0 22px 70px #130d19b3}
.edit-dialog[data-section="voice"][open]{animation:imageEditorFade .18s ease-out both}
.edit-dialog[data-section="voice"] .creator{height:auto;max-height:min(72dvh,560px);overflow-y:auto;padding:22px 22px 25px}
@media(prefers-reduced-motion:reduce){.edit-dialog[data-section="voice"][open]{animation:none}}

.image-categories{display:flex;gap:6px;overflow-x:auto;padding:2px 1px 10px;scrollbar-width:thin}
.image-categories button{flex:none;border:1px solid #ddcecc;border-radius:999px;background:#fff;color:#806a70;padding:7px 12px;font-size:11px}
.image-categories button.active{border-color:#a56b78;background:#fff0e7;color:#694452;font-weight:700}
.letter-frame{display:none;position:absolute;inset:16px;z-index:1;pointer-events:none}
.card-content[data-frame="line"] .letter-frame{display:block;border:1px solid #bd948b}
.card-content[data-frame="double"] .letter-frame{display:block;border:1px solid #bd948b;box-shadow:inset 0 0 0 5px transparent,inset 0 0 0 6px #d9b6a6}
.card-content[data-frame="floral"] .letter-frame{display:block;inset:0}
.card-content[data-frame="floral"] .letter-frame[data-art="watercolor"]::before,.card-content[data-frame="floral"] .letter-frame[data-art="watercolor"]::after{content:"";position:absolute;width:30%;aspect-ratio:1;background:url('/assets/letter-floral.png') no-repeat center/contain;opacity:.78}
.card-content[data-frame="floral"] .letter-frame[data-art="watercolor"]::before{top:7px;left:7px}
.card-content[data-frame="floral"] .letter-frame[data-art="watercolor"]::after{bottom:7px;right:7px;transform:rotate(180deg)}
.card-content[data-frame="floral"] .card-page-letter{padding:54px 35px}
.card-content[data-frame="floral"] .card-page-letter .quote{top:69px;color:#e9c9bd}
.card-page-letter>p{position:relative;z-index:2}
@media(max-width:420px){.image-categories button{padding:7px 10px}}

.format-panel[data-section="atmosphere"]{max-height:min(50dvh,385px)}
.card-content[data-frame="floral"] .letter-frame[data-art="peony"]{background:url('/assets/letter-peony.png') no-repeat center/100% 100%;opacity:.84}
.card-content[data-frame="floral"] .letter-frame[data-art="custom"]{background-repeat:no-repeat;background-position:center;background-size:100% 100%}
@media(max-width:760px){.format-panel[data-section="atmosphere"]{max-height:min(47dvh,365px)}}

/* The border belongs to the letter itself, so its picker shares the image dialog layout. */
.card-page-letter .frame-edit-badge{top:13px;right:13px;bottom:auto;z-index:5}
.edit-dialog[data-section="frame"]{inset:50% auto auto 50%;width:min(440px,calc(100vw - 28px));height:auto;max-height:min(72dvh,560px);border:1px solid #f0dfd6;border-radius:18px;transform:translate(-50%,-50%);box-shadow:0 22px 70px #130d19b3}
.edit-dialog[data-section="frame"][open]{animation:imageEditorFade .18s ease-out both}
.edit-dialog[data-section="frame"] .creator{height:auto;max-height:min(72dvh,560px);overflow-y:auto;padding:22px 22px 25px}
.edit-dialog[data-section="frame"] :is(#text-field,#image-fields,#voice-fields,#editor-intro,.privacy,.theme-section,.page-actions){display:none}
.edit-dialog:not([data-section="frame"]) #frame-fields{display:none}
.frame-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.frame-choice{min-width:0;display:flex;flex-direction:column;align-items:center;gap:7px;padding:8px 5px;border:1px solid #dfd1cf;border-radius:10px;background:#fff;color:#66545c;font-size:11px;cursor:pointer}
.frame-choice.selected{border-color:#a56b78;box-shadow:0 0 0 2px #a56b7838}
.frame-preview{display:block;width:76px;height:96px;border-radius:3px;background:#fff8ef center/100% 100% no-repeat;box-shadow:0 1px 5px #46303926}
.frame-preview[data-art="birthdaySoft"]{background-size:100% auto;background-position:center top}
.frame-preview[data-art="loveHearts"]{background-size:100% auto;background-position:center top}
.frame-preview[data-art="christmasPine"]{background-size:110% auto;background-position:left top}
.frame-preview[data-art="springRed"]{border:2px solid #ae3e38;box-shadow:inset 0 0 0 5px #fff8ef,inset 0 0 0 6px #d4a15f}
.frame-preview-line{border:1px solid #bd948b;outline:4px solid #fff8ef;outline-offset:-5px}
.frame-preview-double{border:1px solid #bd948b;box-shadow:inset 0 0 0 5px #fff8ef,inset 0 0 0 6px #d9b6a6}
.card-content[data-frame="floral"] .letter-frame[data-art="birthdaySoft"]{background:url('/assets/letter-birthday-soft.png') no-repeat center top/100% auto;opacity:.92}
.card-content[data-frame="floral"] .letter-frame[data-art="loveSoft"]{background:url('/assets/letter-love-soft.png') no-repeat center/100% 100%;opacity:.88}
.card-content[data-frame="floral"] .letter-frame[data-art="loveHearts"]{background:url('/assets/letter-love-hearts.png') no-repeat center top/100% auto;opacity:.62}
.card-content[data-frame="floral"] .letter-frame[data-art="christmasPine"]::before,.card-content[data-frame="floral"] .letter-frame[data-art="christmasPine"]::after{content:"";position:absolute;width:55%;height:35%;background:url('/assets/letter-festival-christmas.png') no-repeat left top/contain;opacity:.8}
.card-content[data-frame="floral"] .letter-frame[data-art="christmasPine"]::before{top:0;left:0}
.card-content[data-frame="floral"] .letter-frame[data-art="christmasPine"]::after{bottom:0;right:0;transform:rotate(180deg)}
.card-content[data-frame="floral"] .letter-frame[data-art="springRed"]{inset:14px;border:2px solid #ae3e38;box-shadow:inset 0 0 0 6px transparent,inset 0 0 0 7px #d4a15f;border-radius:4px}
.card-content[data-frame="floral"] .letter-frame[data-art="springRed"]::before,.card-content[data-frame="floral"] .letter-frame[data-art="springRed"]::after{content:"✦";position:absolute;color:#b94a39;font-size:23px;line-height:1;background:#fff8ef;padding:0 5px}
.card-content[data-frame="floral"] .letter-frame[data-art="springRed"]::before{top:-10px;left:14px}
.card-content[data-frame="floral"] .letter-frame[data-art="springRed"]::after{bottom:-10px;right:14px}
.card-content[data-frame="floral"] .letter-frame[data-art="birthdaySoft"]~.quote,.card-content[data-frame="floral"] .letter-frame[data-art="loveSoft"]~.quote{display:none}
.card-content[data-frame="floral"] .letter-frame[data-art="loveHearts"]~.quote,.card-content[data-frame="floral"] .letter-frame[data-art="christmasPine"]~.quote,.card-content[data-frame="floral"] .letter-frame[data-art="springRed"]~.quote{display:none}
.card-content[data-frame="floral"] .letter-frame[data-art="birthdaySoft"]~p,.card-content[data-frame="floral"] .letter-frame[data-art="loveHearts"]~p{margin-top:32px}
.card-page-photo img[src$="/assets/love-chocolate.png"],.card-page-mixed img[src$="/assets/love-chocolate.png"],.image-choice img[src$="/assets/love-chocolate.png"]{object-fit:contain;background:#fff8ef}
@media(prefers-reduced-motion:reduce){.edit-dialog[data-section="frame"][open]{animation:none}}

/* Paper backgrounds keep a light reading area; Christmas uses the supplied red stationery. */
.background-choices{grid-template-columns:repeat(5,minmax(0,1fr))}
.background-choices button{min-height:64px;line-height:1.2}
.background-choices button[data-background="everydayPaper"],.card-content[data-background="everydayPaper"] :is(.card-page-letter,.card-page-voice){background:linear-gradient(#fffaf0df,#fffaf0e8),url('/assets/rose.jpg') center/cover}
.background-choices button[data-background="birthdayPaper"],.card-content[data-background="birthdayPaper"] :is(.card-page-letter,.card-page-voice){background:#fff5f1 url('/assets/letter-birthday-soft.png') center 8%/100% auto no-repeat}
.background-choices button[data-background="lovePaper"],.card-content[data-background="lovePaper"] :is(.card-page-letter,.card-page-voice){background:linear-gradient(#fff6f2d9,#fff6f2e8),url('/assets/love-vintage.jpg') center/cover}
.background-choices button[data-background="anniversaryPaper"],.card-content[data-background="anniversaryPaper"] :is(.card-page-letter,.card-page-voice){background:#fff9f1 url('/assets/letter-peony.png') center/100% 100% no-repeat}
.background-choices button[data-background="christmasPaper"],.card-content[data-background="christmasPaper"] :is(.card-page-letter,.card-page-voice){background:linear-gradient(#761f1db0,#761f1dd4),url('/assets/christmas-background.jpg') center/cover}
.background-choices button[data-background="springPaper"],.card-content[data-background="springPaper"] :is(.card-page-letter,.card-page-voice){background:linear-gradient(#fff8f0df,#fff8f0eb),url('/assets/festival-spring-lanterns.jpg') center/cover}
.background-choices button:is([data-background="everydayPaper"],[data-background="lovePaper"],[data-background="anniversaryPaper"],[data-background="springPaper"]){background-blend-mode:normal}
.background-choices button[data-background="christmasPaper"]{color:#fff8ed}
.card-content[data-background="christmasPaper"] :is(.card-page-letter,.card-page-voice){color:#fff8ed}
.card-content[data-background="christmasPaper"] :is(.card-page-letter,.card-page-voice):after{color:#f7cdb8}
.card-content[data-background="christmasPaper"] .card-page-letter .quote{color:#f7cdb8}
@media(max-width:760px){.background-choices{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Small decorations leave the center of the letter clear for longer messages. */
.card-content[data-frame="floral"] .letter-frame:is([data-art="birthdayConfetti"],[data-art="christmasSnow"],[data-art="springCorner"]){inset:13px;border:1px solid #dcbcb9;border-radius:7px}
.card-content[data-frame="floral"] .letter-frame:is([data-art="birthdayConfetti"],[data-art="christmasSnow"],[data-art="springCorner"])::before,.card-content[data-frame="floral"] .letter-frame:is([data-art="birthdayConfetti"],[data-art="christmasSnow"],[data-art="springCorner"])::after{position:absolute;font-size:23px;line-height:1;background:#fff8ef;padding:0 5px}
.card-content[data-frame="floral"] .letter-frame[data-art="birthdayConfetti"]::before,.card-content[data-frame="floral"] .letter-frame[data-art="birthdayConfetti"]::after{content:"✦ · ✧";color:#e3a77e}
.card-content[data-frame="floral"] .letter-frame[data-art="christmasSnow"]::before,.card-content[data-frame="floral"] .letter-frame[data-art="christmasSnow"]::after{content:"❄ ✧";color:#668b79}
.card-content[data-frame="floral"] .letter-frame[data-art="springCorner"]{border-color:#cf8a72}
.card-content[data-frame="floral"] .letter-frame[data-art="springCorner"]::before,.card-content[data-frame="floral"] .letter-frame[data-art="springCorner"]::after{content:"✿ ✦";color:#bf6250}
.card-content[data-frame="floral"] .letter-frame:is([data-art="birthdayConfetti"],[data-art="christmasSnow"],[data-art="springCorner"])::before{top:-12px;left:12px}
.card-content[data-frame="floral"] .letter-frame:is([data-art="birthdayConfetti"],[data-art="christmasSnow"],[data-art="springCorner"])::after{bottom:-12px;right:12px}
.card-content[data-frame="floral"] .letter-frame[data-art="loveChocolate"]::before,.card-content[data-frame="floral"] .letter-frame[data-art="loveChocolate"]::after{content:"";position:absolute;width:38%;height:31%;background:url('/assets/love-chocolate.png') center/contain no-repeat;opacity:.8}
.card-content[data-frame="floral"] .letter-frame[data-art="loveChocolate"]::before{left:-5%;top:0;transform:rotate(-15deg)}
.card-content[data-frame="floral"] .letter-frame[data-art="loveChocolate"]::after{right:-5%;bottom:0;transform:rotate(165deg)}
.card-content[data-frame="floral"] .letter-frame[data-art="loveChocolate"]~.quote{display:none}
.frame-preview[data-art="birthdayConfetti"]{border:1px solid #e6bc9c;box-shadow:inset 0 0 0 5px #fff8ef,inset 0 0 0 6px #e6bc9c}
.frame-preview[data-art="christmasSnow"]{border:1px solid #789a86;box-shadow:inset 0 0 0 5px #fff8ef,inset 0 0 0 6px #789a86}
.frame-preview[data-art="springCorner"]{border:1px solid #cf8a72;box-shadow:inset 0 0 0 5px #fff8ef,inset 0 0 0 6px #cf8a72}
.frame-preview[data-art="loveChocolate"]{background-size:75% auto;background-position:center top}

/* Compact, matching motifs replace the older full-width decorative presets. */
.card-content[data-frame="floral"] .letter-frame[data-art^="mini"]{inset:0}
.letter-frame[data-art="miniCake"]{--corner-icon:url('/assets/letter-icon-cake.svg')}
.letter-frame[data-art="miniCandle"]{--corner-icon:url('/assets/letter-icon-candle.svg')}
.letter-frame[data-art="miniBalloon"]{--corner-icon:url('/assets/letter-icon-balloon.svg')}
.letter-frame[data-art="miniRose"],.letter-frame[data-art="miniAnniversaryRose"]{--corner-icon:url('/assets/letter-icon-rose.svg')}
.letter-frame[data-art="miniBell"]{--corner-icon:url('/assets/letter-icon-bell.svg')}
.letter-frame[data-art="miniGingerbread"]{--corner-icon:url('/assets/letter-icon-gingerbread.svg')}
.card-content[data-frame="floral"] .letter-frame[data-art^="mini"]::before,.card-content[data-frame="floral"] .letter-frame[data-art^="mini"]::after{content:"";position:absolute;width:clamp(40px,21%,64px);aspect-ratio:1;background:var(--corner-icon) center/contain no-repeat;opacity:.92}
.card-content[data-frame="floral"] .letter-frame[data-art^="mini"]::before{top:17px;left:17px}
.card-content[data-frame="floral"] .letter-frame[data-art^="mini"]::after{bottom:17px;right:17px}
.card-content[data-frame="floral"] .letter-frame[data-art^="mini"]~.quote{display:none}
.frame-preview[data-art^="mini"]{background-size:58% auto;background-position:center center}
.card-content[data-frame="floral"] .letter-frame[data-art="loveChocolate"]::before,.card-content[data-frame="floral"] .letter-frame[data-art="loveChocolate"]::after{width:27%;height:23%}
.card-page-letter .edit-badge:not(.frame-edit-badge){right:auto;left:50%;bottom:36px;transform:translateX(-50%);white-space:nowrap}

/* Voice playback follows the media element's actual playing state. */
.voice-disc{isolation:isolate}
.voice-disc::before,.voice-disc::after{content:"";position:absolute;inset:-10px;border:1px solid #bd889d;border-radius:50%;opacity:0;pointer-events:none}
.voice-playing .voice-disc::before,.voice-playing .voice-disc::after{animation:voiceHalo 2.8s ease-out infinite}
.voice-playing .voice-disc::after{animation-delay:1.4s}
.voice-play{position:relative;z-index:1;padding:0;cursor:pointer;touch-action:manipulation}
.voice-play::before{content:"";width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:16px solid currentColor;transform:translateX(2px)}
.voice-play.playing::before{width:16px;height:20px;border:0;border-left:5px solid currentColor;border-right:5px solid currentColor;box-sizing:border-box;transform:none}
.voice-play:focus-visible{outline:3px solid #b9798b;outline-offset:4px}
.voice-playing .waveform i{animation:voiceWave 930ms ease-in-out infinite alternate;animation-delay:var(--delay);transform-origin:center;opacity:.9}
@keyframes voiceHalo{0%{transform:scale(.85);opacity:.7}65%{opacity:.3}100%{transform:scale(1.48);opacity:0}}
@keyframes voiceWave{0%{transform:scaleY(.38);opacity:.48}100%{transform:scaleY(1.18);opacity:1}}
@media(prefers-reduced-motion:reduce){.voice-playing .voice-disc::before,.voice-playing .voice-disc::after,.voice-playing .waveform i{animation:none}.voice-playing .voice-disc::before{opacity:.5}.voice-playing .waveform i{opacity:1}}

/* A quiet receiving ritual for the public card and the author's full preview. */
.reading-layer[hidden]{display:none}
.reading-layer{position:absolute;inset:0;z-index:12;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:17px;padding:15px;background:radial-gradient(circle at 50% 43%,#503b50,#271d33 80%);color:#fff7ef;text-align:center;animation:readingAppear .38s ease-out both}
.reading-cover-card{position:relative;width:min(67vw,290px,calc((100dvh - 285px)*.7));aspect-ratio:3/4.3;display:flex;flex-direction:column;align-items:center;overflow:hidden;border:1px solid #fff8eeaf;border-radius:9px;background:#fff7ed;color:#4b3945;box-shadow:0 22px 55px #130b1b9c,10px 10px 0 -2px #e9d1cf;transform-origin:left center}
.reading-cover-card{cursor:pointer}
.reading-cover-card:after{content:"";position:absolute;inset:8px;border:1px solid #d9b6ac84;border-radius:5px;pointer-events:none}
.reading-cover-art{width:100%;height:47%;flex:none;background:linear-gradient(135deg,#f1d5d1,#fae9de 55%,#ebdbe5);background-size:cover;background-position:center}
.reading-cover-kicker{margin-top:25px;color:#a76f78;font-size:10px;letter-spacing:.25em}
.reading-cover-card strong{max-width:80%;margin:17px auto 0;font-family:"Noto Serif SC","Songti SC",SimSun,serif;font-weight:500;font-size:clamp(16px,2vw,21px);line-height:1.55}
.reading-cover-mark{margin-top:auto;margin-bottom:25px;color:#b29292;font-size:9px;letter-spacing:.16em}
.reading-primary{min-width:142px;min-height:42px;border:1px solid #f5c3aa;border-radius:999px;background:#f5c3aa;color:#382b3c;padding:9px 23px;font-size:13px;font-weight:700;box-shadow:0 8px 22px #160d2140;cursor:pointer}
.reading-secondary{border:0;background:transparent;color:#edd7d4;padding:8px 12px;font-size:12px;cursor:pointer}
.reading-primary:focus-visible,.reading-secondary:focus-visible{outline:3px solid #fff;outline-offset:3px}
.reading-cover.opening{animation:readingFadeOut .5s ease-in forwards;pointer-events:none}
.reading-cover.opening .reading-cover-card{animation:readingOpen .5s cubic-bezier(.22,.64,.28,1) forwards}
.reading-end-mark{width:66px;height:66px;display:grid;place-items:center;border:1px solid #f4cdb7a6;border-radius:50%;color:#f0bd9c;font-size:30px;box-shadow:0 0 0 10px #f7d0b219}
.reading-end p{margin:7px 0 -8px;color:#e8bbaa;font-size:12px;letter-spacing:.25em}
.reading-end h2{max-width:300px;margin:0 0 14px;font-family:"Noto Serif SC","Songti SC",SimSun,serif;font-weight:500;font-size:clamp(22px,4vw,30px);line-height:1.6}
.reading-page-ghost{position:absolute;inset:0;z-index:3;overflow:hidden;border-radius:inherit;pointer-events:none}
.viewer.reading-loading .stage-scene>.card,.viewer.reading-loading .stage-bottom,.viewer:is(.reading-closed,.reading-ended) .stage-bottom{visibility:hidden}
.viewer .preview-link{display:none}
.preview-dialog{position:relative}
.preview-dialog .reading-layer{inset:52px 0 0;border-radius:0 0 16px 16px}
.preview-dialog:is(.reading-closed,.reading-ended) :is(.dialog-card,.dialog-hint,.page-nav){visibility:hidden}
@keyframes readingAppear{from{opacity:0}to{opacity:1}}
@keyframes readingFadeOut{to{opacity:0}}
@keyframes readingOpen{to{opacity:.45;transform:perspective(900px) rotateY(-34deg) translateY(-10px) scale(1.04)}}
@media(max-width:760px){.reading-cover-card{width:min(67vw,270px,calc((100dvh - 245px)*.7))}.reading-cover-kicker{margin-top:20px}.reading-cover-card strong{margin-top:12px}}
@media(prefers-reduced-motion:reduce){.reading-layer,.reading-cover.opening,.reading-cover.opening .reading-cover-card{animation:none}}

/* On a shared card, keep navigation quiet and give the card the available space. */
.viewer .top{height:42px;gap:0;background:#292331;border:0;padding-inline:clamp(14px,2.5vw,32px)}
.viewer .brand{opacity:.55;transition:opacity .2s ease}
.viewer .brand:hover,.viewer .brand:focus-visible{opacity:1}
.viewer .brand img:first-child{width:27px;height:27px}
.viewer .brand img:last-child{width:59px}
.viewer .top-caption,.viewer .stage-heading,.viewer .stage-side-note{display:none}
.viewer .stage .card{width:min(75vw,350px,calc((100dvh - 130px)*.7))}
@media(max-width:760px){
  .viewer .top{height:36px;padding-inline:14px}
  .viewer .brand img:first-child{width:24px;height:24px}
  .viewer .brand img:last-child{width:54px}
  .viewer .stage .card{width:min(84vw,350px,calc((100dvh - 120px)*.7))}
}
