/* Fonts are bundled locally; the reference images are stylistic references. */
.card-album{position:relative;overflow:hidden;border-radius:7px 7px 0 0;background:#e7e8dd}.card-album-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;aspect-ratio:4/3;overscroll-behavior-x:contain}.card-album-track::-webkit-scrollbar{display:none}.card-album-track .card-image{width:100%;height:100%;max-width:100%;flex:0 0 100%;object-fit:contain;scroll-snap-align:start}.card-slide-prev,.card-slide-next{position:absolute;top:calc(50% - 14px);width:23px;height:28px;border-radius:4px;background:#fffaf2d6;color:#8d8d76;font-size:22px;font-family:Georgia,serif;z-index:3;display:grid;place-items:center}.card-slide-prev{left:7px}.card-slide-next{right:7px}.card-group-title{position:absolute;left:8px;bottom:8px;color:white;background:#5c624b66;padding:3px 6px;border-radius:3px;font-size:8px;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.album-block[data-mode="grid"] .album-slide.album-selected{outline:2px solid #acb78d;outline-offset:-3px}
.scrap-sticker-tray{display:flex;gap:8px;flex-wrap:wrap;padding:12px;background:#fff9e8;border-bottom:1px solid #e5dcc6}.scrap-sticker-tray[hidden]{display:none}.scrap-sticker-tray button{background:#fffdf6;border:1px solid #e7dfc9;border-radius:6px;padding:5px;width:52px;height:52px}.scrap-sticker-tray svg{width:100%;height:100%}.scrap-piece[data-kind="sticker"],.preview-piece[data-kind="sticker"]{padding:0;background:transparent;box-shadow:none;justify-content:center}.scrap-sticker-art{border:0;padding:0;background:transparent;width:100%;height:100%;cursor:pointer}.scrap-sticker-art svg,.preview-piece[data-kind="sticker"] svg{width:100%;height:100%;pointer-events:none}.card-sticker{position:absolute;right:9px;bottom:8px;width:47px;height:47px;rotate:8deg;pointer-events:none}.card-sticker svg{display:block;width:100%;height:100%}.note-card:has(.card-sticker) .card-template-name{padding-right:44px}
[data-font="hand"]{--diary-font:'LXGW WenKai','KaiTi',serif}[data-font="playful"]{--diary-font:'ZCOOL KuaiLe','LXGW WenKai',sans-serif}[data-font="english"]{--diary-font:'Patrick Hand','LXGW WenKai',cursive}
.note-scene:is([data-font="hand"],[data-font="playful"],[data-font="english"]) .tiptap{font-family:var(--diary-font);font-size:20px;line-height:1.95;font-weight:400;letter-spacing:.5px}.note-scene:is([data-font="hand"],[data-font="playful"],[data-font="english"]) .note-title{font-family:var(--diary-font);font-size:35px;letter-spacing:1px}.note-scene:is([data-font="hand"],[data-font="playful"],[data-font="english"]) .image-caption,.note-scene:is([data-font="hand"],[data-font="playful"],[data-font="english"]) .album-caption,.note-scene:is([data-font="hand"],[data-font="playful"],[data-font="english"]) .scrap-text{font-family:var(--diary-font)}
.note-card:is([data-font="hand"],[data-font="playful"],[data-font="english"]) :is(.card-title,.card-copy,.writing-cover p){font-family:var(--diary-font)}.note-card:is([data-font="hand"],[data-font="playful"],[data-font="english"]) .card-title{font-size:22px}.note-card:is([data-font="hand"],[data-font="playful"],[data-font="english"]) .card-copy{font-size:15px;line-height:1.8}.font-options{display:grid;grid-template-columns:1fr 1fr;gap:7px}.font-options button{padding:10px 7px;border:1px solid #dce0cf;border-radius:5px;background:#fffdf7;color:#8e967e;font-size:11px}.font-options button:last-child{grid-column:1/-1}.font-options button[data-note-font=hand]{font-family:'LXGW WenKai',serif;font-size:15px}.font-options button[data-note-font=playful]{font-family:'ZCOOL KuaiLe',sans-serif;font-size:15px}.font-options button[data-note-font=english]{font-family:'Patrick Hand','LXGW WenKai',cursive;font-size:16px}.font-options button.active{border-color:#9eae82;background:#e9efde;color:#667c4f}.font-preview{font-family:var(--diary-font,var(--serif));font-size:18px;padding:15px 8px;margin:10px 0;color:#849171;line-height:1.9;text-align:center;background:#f6f3e7;border-radius:5px}.decoration-options{display:flex;flex-wrap:wrap;gap:6px}.decoration-options button{background:#eeeee2;color:#939a80;border:1px solid transparent;border-radius:4px;padding:8px 10px;font-size:10px}.decoration-options button.active{border-color:#a3b18b;background:#e5ebd8;color:#6f805b}
.note-scene[data-decoration="tape"] .note-paper:before,.note-card[data-decoration="tape"]:before{content:'';position:absolute;z-index:2;width:100px;height:26px;top:-11px;left:calc(50% - 50px);background:#ccb48b90;transform:rotate(-5deg);box-shadow:0 1px 2px #80704c10}.note-scene[data-decoration="washi"] .note-paper:before,.note-card[data-decoration="washi"]:before{content:'';position:absolute;z-index:2;width:105px;height:28px;top:-12px;left:calc(50% - 52px);background-color:#d4dfc49c;background-image:radial-gradient(#adba9380 2px,transparent 2px);background-size:9px 9px;transform:rotate(4deg)}.note-scene[data-decoration="clip"] .note-paper:after,.note-card[data-decoration="clip"]:after{content:'';position:absolute;top:-12px;right:32px;width:15px;height:52px;border:3px solid #9a9c94;border-radius:10px;transform:rotate(13deg);box-shadow:inset 1px 0 1px #fffff5,1px 1px 1px #4b513126;z-index:4;pointer-events:none}.note-scene[data-decoration="binder"] .note-paper:after,.note-card[data-decoration="binder"]:after{content:'';position:absolute;top:-15px;right:42px;width:35px;height:24px;background:#756f5e;border-radius:3px;box-shadow:0 -13px 0 -8px #a8a69b,0 4px 5px #4b453d20;z-index:4;pointer-events:none}
.album-block{margin:28px 0;border:1px solid #ded8c8;border-radius:8px;background:#fffcf5;overflow:hidden;font-family:var(--sans);line-height:1.6}.album-header{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:11px 12px;background:#f3efe3;border-bottom:1px solid #e6dfcf}.album-title{flex:1;min-width:140px;width:180px;outline:0;border:0;background:transparent;font-family:var(--diary-font,var(--serif));font-size:15px;color:#8d8773;padding:3px}.album-title::placeholder{font-size:11px;color:#b1aa96}.album-header select,.album-header button{font-size:10px;color:#999079;background:#fffcf3;border:1px solid #e1dac7;border-radius:4px;padding:5px 7px;white-space:nowrap}.album-stage{position:relative}.album-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;outline:0;min-width:0}.album-track::-webkit-scrollbar{display:none}.album-slide{flex:0 0 100%;min-width:0;scroll-snap-align:start;aspect-ratio:4/3;background:#eceadd;display:flex;align-items:center;justify-content:center;overflow:hidden}.tiptap .album-slide img{display:block;width:100%;height:100%;max-width:100%;max-height:none;object-fit:contain;margin:0!important;border-radius:0}.album-block[data-ratio="landscape"] .album-slide img,.album-block[data-ratio="square"] .album-slide img{object-fit:cover}.album-block[data-ratio="square"] .album-slide{aspect-ratio:1}.album-prev,.album-next{position:absolute;top:calc(50% - 18px);height:36px;width:30px;border-radius:4px;background:#fffaf1de;color:#8e8c77;font-family:Georgia,serif;font-size:27px;display:grid;place-items:center;box-shadow:0 2px 8px #6b60472a}.album-prev{left:9px}.album-next{right:9px}.album-counter{position:absolute;right:12px;top:11px;font-size:10px;color:white;background:#665c4999;padding:4px 8px;border-radius:20px;backdrop-filter:blur(5px)}.album-dots{display:flex;justify-content:center;gap:7px;padding:11px 8px 0}.album-dots button{width:6px;height:6px;padding:0;border-radius:50%;background:#d7d4c4}.album-dots button.active{background:#a0aa83;transform:scale(1.25)}.album-caption{display:block;width:100%;resize:none;outline:0;border:0;background:transparent;color:#9f967b;font-family:var(--diary-font,var(--serif));font-size:14px;text-align:center;padding:9px 16px 14px;line-height:1.7;min-height:42px}.album-caption::placeholder{color:#bdb49f;font-size:11px}.album-block[data-mode="grid"] .album-track{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:5px;overflow:hidden}.album-block[data-mode="grid"] .album-slide{min-width:0;aspect-ratio:1}.album-block[data-mode="grid"] .album-prev,.album-block[data-mode="grid"] .album-next,.album-block[data-mode="grid"] .album-dots{display:none}.album-block[data-mode="grid"] .album-counter{top:12px}
.sticker-tray{border:1px solid #e3ddc9;background:#fff9eccc;border-radius:8px;padding:15px;margin:-9px 0 25px}.sticker-tray-heading{display:flex;align-items:center;justify-content:space-between;color:#a19a80;font-size:11px;letter-spacing:.5px}.sticker-tray-heading button{background:transparent;color:#b4a98b;font-size:22px}.sticker-options{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:8px 0 12px}.sticker-options button{background:#fffdf7;border:1px solid #eee7d2;border-radius:8px;padding:7px;display:flex;flex-direction:column;align-items:center;gap:6px}.sticker-options button:hover{background:#f2eedc;border-color:#d7d8b9}.sticker-options svg{width:100%;max-width:65px;aspect-ratio:1}.sticker-options span{font-size:9px;color:#a89c7e}.sticker-tray small{color:#b1a58b;font-size:9px}.sticker-block{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;margin:8px 0!important;line-height:1;font-family:var(--sans);letter-spacing:0}.sticker-block[data-align="left"]{justify-content:flex-start}.sticker-block[data-align="center"]{justify-content:center}.sticker-art{display:block;border:0;padding:0;background:transparent;max-width:100%;cursor:pointer;transform-origin:50% 60%;filter:drop-shadow(1px 3px 2px #7c6d4c12)}.sticker-art svg{display:block;width:100%;height:auto;pointer-events:none}.sticker-settings{background:transparent;color:#bcb398;position:absolute;right:0;bottom:0;font-size:9px;opacity:0;padding:5px}.sticker-block:hover .sticker-settings,.sticker-block:focus-within .sticker-settings{opacity:1}.sticker-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;width:100%;padding:10px;background:#f2efdf;border:1px solid #e2ddc5;border-radius:5px;margin-top:8px}.sticker-controls[hidden]{display:none}.sticker-controls select,.sticker-controls input[type=text],.sticker-controls button{max-width:100%;background:#fffdf5;border:1px solid #ded9bf;color:#9e9579;font-size:10px;border-radius:3px;padding:5px}.sticker-controls input[type=range]{width:85px;accent-color:#a3b183}.sticker-controls input[type=text]{width:180px}.sticker-wiggle{animation:sticker-wiggle .65s ease-in-out}.sticker-text-glow{animation:sticker-glow 1.7s ease-out}@keyframes sticker-wiggle{0%,100%{translate:0 0;scale:1}25%{translate:0 -10px;scale:1.08;rotate:-8deg}55%{translate:0 -5px;rotate:7deg}80%{translate:0 -3px;rotate:-4deg}}@keyframes sticker-glow{0%,40%{background:#eddfa866;box-shadow:0 0 0 8px #eddfa866}100%{background:transparent;box-shadow:0 0 0 0 transparent}}
.app-shell[data-view="timeline"] .gallery-grid{column-count:1;max-width:820px;margin:0 auto}.app-shell[data-view="timeline"] .note-card{display:block;margin-bottom:34px}.app-shell[data-view="timeline"] .image-wrap{max-height:370px}.app-shell[data-view="timeline"] .card-image{max-height:370px;width:100%;object-fit:contain}.app-shell[data-view="timeline"] .card-body{padding:25px 30px}.app-shell[data-view="timeline"] .card-title{font-size:25px}.app-shell[data-view="timeline"] .card-copy{-webkit-line-clamp:8;font-size:15px;line-height:2}.app-shell[data-view="timeline"] .collage-preview{max-width:700px;margin:auto}.app-shell[data-view="timeline"] .writing-cover{max-height:400px;min-height:260px}.app-shell[data-view="timeline"] .writing-cover p{font-size:22px}
@media(max-width:680px){.view-switch button{font-size:10px;padding:8px 5px}.font-options{grid-template-columns:1fr 1fr}.font-preview{font-size:19px}.note-scene:is([data-font="hand"],[data-font="playful"],[data-font="english"]) .tiptap{font-size:19px;line-height:1.85}.note-scene:is([data-font="hand"],[data-font="playful"],[data-font="english"]) .note-title{font-size:29px}.album-header{gap:5px;padding:9px}.album-title{flex-basis:100%;width:100%;font-size:16px}.album-header select,.album-header button{font-size:9px;padding:5px}.album-caption{font-size:14px}.album-prev,.album-next{width:25px;height:31px;font-size:25px}.album-block[data-mode="grid"] .album-track{grid-template-columns:repeat(2,minmax(0,1fr))}.sticker-options{grid-template-columns:repeat(3,1fr)}.sticker-options svg{max-width:60px}.sticker-settings{opacity:1}.sticker-controls{gap:7px}.sticker-controls input[type=range]{width:70px}.sticker-tray small{line-height:1.8;display:block}.app-shell[data-view="timeline"] .card-body{padding:20px}.app-shell[data-view="timeline"] .card-copy{font-size:14px}.app-shell[data-view="timeline"] .card-title{font-size:23px}.note-card:is([data-font="hand"],[data-font="playful"],[data-font="english"]) .card-title{font-size:18px}.note-card:is([data-font="hand"],[data-font="playful"],[data-font="english"]) .card-copy{font-size:13px}.note-scene[data-decoration="clip"] .note-paper:after{right:18px}}
@media(prefers-reduced-motion:reduce){.sticker-wiggle,.sticker-text-glow{animation:none}}

/* A fifth, optional page style: small dates, small photos, room to keep writing. */
.note-scene[data-layout="daily"] .note-paper{max-width:820px;padding:52px 64px 90px;min-height:calc(100vh - 115px)}
.note-scene[data-layout="daily"] .note-title{font-size:31px;margin-bottom:28px}
.note-scene[data-layout="daily"] .tiptap{font-size:21px;line-height:2.05;letter-spacing:.4px}
.note-scene[data-layout="daily"] .image-block{margin:22px 0 35px!important}
.note-scene[data-layout="daily"] .image-block img{max-height:320px}
.note-scene[data-layout="daily"] .image-block[data-frame="rounded"] .visual-photo{border-radius:9px}
.tiptap .diary-date{font-family:'Patrick Hand','LXGW WenKai',sans-serif;font-size:17px;line-height:1.6;letter-spacing:.4px;color:#959a8c;margin:42px 0 14px}
.tiptap .diary-date:first-child{margin-top:7px}
.daily-preview{padding:26px 23px 5px;font-family:'LXGW WenKai',serif;max-height:470px;overflow:hidden;mask-image:linear-gradient(#000 88%,transparent)}
.daily-preview p{font-size:15px;line-height:1.9;margin:12px 0;white-space:pre-line}
.daily-preview p.diary-date{font-family:'Patrick Hand',sans-serif;font-size:12px;color:#9b9d8a;margin:20px 0 8px}
.daily-preview img{width:42%;max-height:140px;object-fit:contain;border-radius:5px;display:block;margin:16px 0 22px}
.note-card[data-layout="daily"] .card-copy{display:none}
.icon-daily{background-image:radial-gradient(#999e873c 1px,transparent 1px);background-size:7px 7px;justify-content:start;padding-left:7px}
.icon-daily:after{content:'';width:15px;height:11px;background:#afbc9b;position:absolute;left:8px;bottom:6px;border-radius:2px}
.sticker-art img{display:block;width:100%;height:auto;pointer-events:none}
.card-sticker img{display:block;width:100%;height:100%;object-fit:contain}

.illustration-dialog{width:min(860px,calc(100vw - 34px));max-height:85vh;border:1px solid #dedeca;border-radius:16px;background:#faf8f0;color:#626d56;padding:26px;box-shadow:0 25px 90px #343c3438}
.illustration-dialog[open]{display:flex;flex-direction:column}
.illustration-dialog::backdrop{background:#424d3e59;backdrop-filter:blur(4px)}
.illustration-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.illustration-dialog header h2{font-family:'LXGW WenKai',serif;font-size:27px;font-weight:400;margin:8px 0}
.illustration-dialog header p{font-size:12px;color:#9c9e88;margin:0}
.illustration-dialog header>button{background:transparent;color:#969d83;font-size:27px;padding:0 5px}
.illustration-filters{display:flex;gap:10px;margin-top:23px;flex-shrink:0}
.illustration-filters input,.illustration-filters select{font-family:var(--sans);font-size:12px;color:#7f8b6f;border:1px solid #dfe2d0;border-radius:7px;background:#fffdf7;padding:10px;min-width:0}
.illustration-filters input{flex:1;width:50%}
.illustration-dialog #illustrationStatus{font-size:10px;color:#969f85;margin:12px 0}
.illustration-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;overflow-y:auto;min-height:100px;max-height:55vh;padding:2px 4px 8px}
.illustration-options button{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;border:1px solid #e5e3d5;background:#fffdf6;border-radius:8px;padding:10px;color:#7d886b}
.illustration-options button:hover{background:#eef2e6;border-color:#aeba96}
.illustration-options button:focus-visible{outline:2px solid #8a9d73;outline-offset:1px}
.illustration-options img{width:100%;height:105px;object-fit:contain}
.illustration-options span{font-size:10px;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.illustration-options small{font-size:8px;color:#a1a48e}
.illustration-options[aria-busy="true"]{opacity:.6;pointer-events:none}
.illustration-dialog footer{font-size:10px;color:#9a9f88;padding-top:16px;flex-shrink:0}
@media(max-width:680px){
  .note-scene[data-layout="daily"] .note-paper{padding:29px 23px 60px}
  .note-scene[data-layout="daily"] .note-title{font-size:27px}
  .note-scene[data-layout="daily"] .tiptap{font-size:18px;line-height:2}
  .note-scene[data-layout="daily"] .image-block img{max-height:240px}
  .template-options{grid-template-columns:repeat(3,minmax(0,1fr))}
  .illustration-dialog{padding:19px 14px;max-height:88vh;width:calc(100vw - 24px)}
  .illustration-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .illustration-options img{height:85px}
  .illustration-filters{gap:6px}
  .illustration-filters input,.illustration-filters select{font-size:10px;padding:9px 6px}
  .illustration-options button{padding:7px}
}

/* Code-drawn stickers are still by default. Only explicit clicks play a finite motion. */
.sticker-tray-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;color:#a5a38c;font-size:10px}
.sticker-tray-tools select{font-family:var(--sans);font-size:10px;color:#869375;background:#fffdf4;border:1px solid #e1dfca;border-radius:5px;padding:6px 9px;max-width:45%}
.sticker-options{max-height:340px;overflow:auto;padding:3px 3px 7px;align-items:stretch}
.sticker-options button{justify-content:flex-start}
.sticker-options svg{flex-shrink:0}
.sticker-options .sticker-motion-label{font-size:8px;line-height:1.4;color:#a0ad88}
.sticker-controls select[hidden],.scrap-inspector select[hidden]{display:none}
.scrap-sticker-tray{max-height:200px;overflow:auto}
.mosaic-doodle{overflow:visible}
.mosaic-doodle :is(.motion-blink,.motion-bloom,.motion-grow,.motion-wave,.motion-tail,.motion-sway,.motion-page,.motion-rainbow,.motion-tulip){transform-box:fill-box;transform-origin:center}
:is(.sticker-playing,.sticker-looping) .motion-steam{animation:doodle-steam calc(1.1s * var(--sticker-motion-factor,1)) ease-out 2}
:is(.sticker-playing,.sticker-looping) .motion-blink{animation:doodle-blink calc(1.1s * var(--sticker-motion-factor,1)) ease-in-out 2}
:is(.sticker-playing,.sticker-looping) .motion-tail{transform-origin:15% 90%;animation:doodle-tail calc(.28s * var(--sticker-motion-factor,1)) ease-in-out 6}
:is(.sticker-playing,.sticker-looping) .motion-rain{animation:doodle-rain calc(.72s * var(--sticker-motion-factor,1)) ease-in 3}
:is(.sticker-playing,.sticker-looping) .motion-bloom{animation:doodle-bloom calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out 1}
:is(.sticker-playing,.sticker-looping) .motion-grow{transform-origin:50% 100%;animation:doodle-grow calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out 1}
:is(.sticker-playing,.sticker-looping) .motion-toast{animation:doodle-hop calc(1.1s * var(--sticker-motion-factor,1)) ease-in-out 2}
:is(.sticker-playing,.sticker-looping) .motion-sway,:is(.sticker-playing,.sticker-looping) .motion-tulip{transform-origin:50% 100%;animation:doodle-sway calc(1.1s * var(--sticker-motion-factor,1)) ease-in-out 2}
:is(.sticker-playing,.sticker-looping) .motion-wave{transform-origin:20% 95%;animation:doodle-wave calc(.55s * var(--sticker-motion-factor,1)) ease-in-out 4}
:is(.sticker-playing,.sticker-looping) .motion-sparkle{transform-box:fill-box;transform-origin:center;animation:doodle-sparkle calc(1.1s * var(--sticker-motion-factor,1)) ease-in-out 2}
:is(.sticker-playing,.sticker-looping) .motion-flash{animation:doodle-flash calc(1.1s * var(--sticker-motion-factor,1)) ease-out 2}
:is(.sticker-playing,.sticker-looping) .motion-page{transform-origin:0 50%;animation:doodle-page calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out 1}
:is(.sticker-playing,.sticker-looping) .motion-rainbow{animation:doodle-rainbow calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out 1}
:is(.sticker-playing,.sticker-looping) .motion-letter{animation:doodle-letter calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out 1}
:is(.sticker-playing,.sticker-looping) .motion-notes{animation:doodle-notes calc(1.1s * var(--sticker-motion-factor,1)) ease-out 2}
@keyframes doodle-steam{0%{opacity:.25;translate:0 4px}60%{opacity:.8}100%{opacity:.1;translate:0 -8px}}
@keyframes doodle-blink{0%,30%,50%,100%{scale:1 1}40%{scale:1 .1}}
@keyframes doodle-tail{0%,100%{rotate:-7deg}50%{rotate:10deg}}
@keyframes doodle-rain{0%{translate:0 -4px;opacity:.1}35%{opacity:.85}100%{translate:0 10px;opacity:.05}}
@keyframes doodle-bloom{0%,100%{scale:1;rotate:0deg}40%{scale:1.12;rotate:-7deg}70%{scale:1.06;rotate:5deg}}
@keyframes doodle-grow{0%,100%{scale:1}45%{scale:1.08 1.17;rotate:-3deg}75%{rotate:3deg}}
@keyframes doodle-hop{0%,100%{translate:0 0}40%{translate:0 -10px;rotate:-3deg}65%{translate:0 -3px;rotate:2deg}}
@keyframes doodle-sway{0%,100%{rotate:0deg}30%{rotate:-7deg}70%{rotate:7deg}}
@keyframes doodle-wave{0%,100%{rotate:0deg}40%{rotate:-17deg}75%{rotate:8deg}}
@keyframes doodle-sparkle{0%,100%{scale:1;opacity:1}50%{scale:1.3;opacity:.4}}
@keyframes doodle-flash{0%,70%,100%{fill:#fff6c8;filter:none}20%{fill:#fffef3;filter:drop-shadow(0 0 4px #e2c97b)}}
@keyframes doodle-page{0%,100%{scale:1 1}50%{scale:.25 1;opacity:.7}}
@keyframes doodle-rainbow{0%,100%{opacity:1;scale:1}45%{opacity:.55;scale:1.035}}
@keyframes doodle-letter{0%,100%{translate:0 0}45%{translate:0 -12px;rotate:-3deg}65%{rotate:2deg}}
@keyframes doodle-notes{0%,100%{translate:0 0;opacity:1}60%{translate:1px -6px;opacity:.5}}
@media(max-width:680px){
  .sticker-tray:not(.hidden){position:fixed;left:10px;right:10px;bottom:10px;z-index:15;margin:0;box-shadow:0 8px 40px #4d573533;background:#fffaf0}
  .sticker-options{max-height:min(42vh,300px)}
  .sticker-tray-tools{font-size:9px}.sticker-options .sticker-motion-label{font-size:8px}
}
@media(prefers-reduced-motion:reduce){.sticker-playing *{animation:none!important}}
:is(.sticker-playing,.sticker-looping) .motion-bubbles{animation:doodle-hop calc(1.1s * var(--sticker-motion-factor,1)) ease-in-out 2}
:is(.sticker-playing,.sticker-looping) .motion-pudding{transform-box:fill-box;transform-origin:50% 100%;animation:doodle-pudding calc(.55s * var(--sticker-motion-factor,1)) ease-in-out 4}
:is(.sticker-playing,.sticker-looping) .motion-umbrella{transform-box:fill-box;transform-origin:50% 90%;animation:doodle-sway calc(1.1s * var(--sticker-motion-factor,1)) ease-in-out 2}
:is(.sticker-playing,.sticker-looping) .motion-leaf{animation:doodle-leaf calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out 1;transform-box:fill-box;transform-origin:center}
:is(.sticker-playing,.sticker-looping) .motion-star-trail{animation:doodle-steam calc(1.1s * var(--sticker-motion-factor,1)) ease-out 2}
@keyframes doodle-pudding{0%,100%{scale:1}35%{scale:1.09 .93}70%{scale:.97 1.05}}
@keyframes doodle-leaf{0%,100%{translate:0 0;rotate:0deg}35%{translate:4px 2px;rotate:9deg}70%{translate:-3px 3px;rotate:-6deg}}
@media(prefers-reduced-motion:reduce){.sticker-playing *{animation:none!important}}

/* Direct manipulation: the document anchor follows the text, the artwork spans the paper. */
.sticker-motion-controls{display:grid;gap:8px;width:100%;min-width:0}
.sticker-motion-controls .sticker-field{margin:4px 0;gap:8px}
.sticker-motion-controls .sticker-field select{flex:1;width:0}
.compact-sticker-controls .sticker-motion-controls .sticker-field>span{display:inline;font-size:10px}
.sticker-wiggle{animation-duration:calc(.65s * var(--sticker-motion-factor,1))}
.sticker-motion-controls select{min-width:0;max-width:100%}
.sticker-motion-controls[hidden]{display:none!important}
.sticker-looping [class*="motion-"]{animation-iteration-count:infinite!important}
.sticker-looping .motion-blink{animation-duration:calc(4.8s * var(--sticker-motion-factor,1))}
.sticker-looping .motion-tail{animation-duration:calc(.7s * var(--sticker-motion-factor,1))}
.sticker-motion-paused *,.mosaic-motion-background :is(.sticker-looping,.sticker-playing) *{animation-play-state:paused!important}
.mosaic-doodle :is(.motion-float,.motion-tentacles,.motion-breathe,.motion-wings,.motion-chime,.motion-flame,.motion-ripple){transform-box:fill-box;transform-origin:center}
:is(.sticker-playing,.sticker-looping) .motion-float{animation:doodle-float calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-tentacles{transform-origin:50% 0;animation:doodle-tentacles calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-breathe{animation:doodle-breathe calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-wings{animation:doodle-wings calc(1.1s * var(--sticker-motion-factor,1)) ease-in-out 2}
:is(.sticker-playing,.sticker-looping) .motion-spray{animation:doodle-spray calc(2.2s * var(--sticker-motion-factor,1)) ease-out}
:is(.sticker-playing,.sticker-looping) .motion-ripple{animation:doodle-ripple calc(2.2s * var(--sticker-motion-factor,1)) ease-out}
:is(.sticker-playing,.sticker-looping) .motion-chime{transform-origin:50% 0;animation:doodle-chime calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-flame{transform-origin:50% 100%;animation:doodle-flame calc(.55s * var(--sticker-motion-factor,1)) ease-in-out 4}
:is(.sticker-playing,.sticker-looping) .motion-orbit{transform-origin:56px 56px;animation:doodle-spin calc(2.2s * var(--sticker-motion-factor,1)) linear}
:is(.sticker-playing,.sticker-looping) .motion-spin{transform-origin:56px 48px;animation:doodle-spin calc(2.2s * var(--sticker-motion-factor,1)) linear}
.sticker-looping :is(.motion-spin,.motion-orbit){animation-duration:calc(6s * var(--sticker-motion-factor,1))}
@keyframes doodle-float{0%,100%{translate:0 0}50%{translate:0 -5px}}
@keyframes doodle-tentacles{0%,100%{transform:skewX(0deg) scaleY(1)}50%{transform:skewX(6deg) scaleY(.92)}}
@keyframes doodle-breathe{0%,100%{scale:1}50%{scale:1.04 .96}}
@keyframes doodle-wings{0%,100%{scale:1 1}50%{scale:.45 1}}
@keyframes doodle-spray{0%,100%{translate:0 4px;opacity:.2}40%{translate:0 -3px;opacity:1}80%{translate:0 -8px;opacity:.1}}
@keyframes doodle-ripple{0%{scale:.8;opacity:.1}40%{opacity:.7}100%{scale:1.08;opacity:.1}}
@keyframes doodle-chime{0%,100%{rotate:-5deg}50%{rotate:5deg}}
@keyframes doodle-flame{0%,100%{scale:1;rotate:-2deg}50%{scale:.94 1.07;rotate:2deg}}
@keyframes doodle-spin{to{rotate:360deg}}
/* Daily feelings: the face and chalk grain move together, without moving the handles. */
.soft-character [class*="motion-"]{transform-box:fill-box;transform-origin:50% 70%}
:is(.sticker-playing,.sticker-looping) .motion-mood-giggle{animation:mood-giggle calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-heartbeat{animation:mood-heartbeat calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-proud{animation:mood-proud calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-exhale{animation:mood-exhale calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-sob{animation:mood-sob calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-puff{animation:mood-puff calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-quiver{animation:mood-quiver calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-slump{animation:mood-slump calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-breathe{animation:mood-breathe calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-drift{animation:mood-drift calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) :is(.motion-mood-hearts,.motion-mood-sleep,.motion-mood-steam,.motion-mood-bubbles){animation:mood-rise calc(2.2s * var(--sticker-motion-factor,1)) ease-out}
:is(.sticker-playing,.sticker-looping) :is(.motion-mood-glint,.motion-mood-dot){animation:mood-glint calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) :is(.motion-mood-tear,.motion-mood-sweat){animation:mood-tear calc(2.2s * var(--sticker-motion-factor,1)) ease-in}
:is(.sticker-playing,.sticker-looping) .motion-mood-puddle{animation:mood-puddle calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-sigh{animation:mood-sigh calc(2.2s * var(--sticker-motion-factor,1)) ease-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-yawn{animation:mood-yawn calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .soft-character .mood-delay-two{animation-delay:calc(-.75s * var(--sticker-motion-factor,1))}
:is(.sticker-playing,.sticker-looping) .soft-character .mood-delay-three{animation-delay:calc(-1.5s * var(--sticker-motion-factor,1))}
@keyframes mood-giggle{0%,20%,65%,100%{translate:0 0;scale:1}30%,48%{translate:0 -3px;scale:1.04 .96;rotate:-2deg}39%,57%{translate:0 -1px;scale:.98 1.03;rotate:2deg}}
@keyframes mood-heartbeat{0%,55%,100%{scale:1}22%,40%{scale:1.055}30%{scale:1.015}}
@keyframes mood-proud{0%,100%{translate:0 0;rotate:0deg}45%{translate:0 -3px;rotate:-4deg}65%{rotate:1deg}}
@keyframes mood-exhale{0%,100%{scale:1;translate:0 0}60%{scale:1.04 .92;translate:0 2px}}
@keyframes mood-sob{0%,100%{translate:0 0;scale:1}40%{translate:0 2px;scale:1.02 .97}55%{translate:0 -1px;scale:.99 1.02}}
@keyframes mood-puff{0%,100%{scale:1;rotate:0deg}32%{scale:1.07 .98;rotate:-2deg}42%{rotate:2deg}52%{rotate:-2deg}62%{rotate:1deg}}
@keyframes mood-quiver{0%,25%,70%,100%{translate:0 0}32%,44%,56%{translate:-1px 0}38%,50%,62%{translate:1px 0}}
@keyframes mood-slump{0%,100%{translate:0 0;scale:1}55%{translate:0 3px;scale:1.025 .96}}
@keyframes mood-breathe{0%,100%{scale:1;translate:0 0}50%{scale:1.035 1.045;translate:0 -1px}}
@keyframes mood-drift{0%,100%{translate:0 0;rotate:-1deg}50%{translate:0 -3px;rotate:1deg}}
@keyframes mood-rise{0%{translate:0 4px;opacity:.1}35%{opacity:.85}100%{translate:1px -8px;opacity:0}}
@keyframes mood-glint{0%,100%{opacity:.25;scale:.85}45%{opacity:1;scale:1.1}}
@keyframes mood-tear{0%{translate:0 -2px;opacity:.15}25%{opacity:.95}90%,100%{translate:0 6px;opacity:.1}}
@keyframes mood-puddle{0%,100%{scale:1;opacity:.5}60%{scale:1.08 1;opacity:.7}}
@keyframes mood-sigh{0%{translate:0 0;opacity:.05}35%{opacity:.7}100%{translate:6px 0;opacity:0}}
@keyframes mood-yawn{0%,100%{scale:1}50%{scale:1.1 1.6}}
/* Small stories use body anticipation, facial reactions and separate moving props. */
:is(.sticker-playing,.sticker-looping) .motion-mood-hop{animation:mood-hop calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-bashful{animation:mood-bashful calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-wobble{animation:mood-wobble calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-nod{animation:mood-nod calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-tilt{animation:mood-tilt calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-focus{animation:mood-focus calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-dizzy{animation:mood-dizzy calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-lucky{animation:mood-lucky calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-relief{animation:mood-relief calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-longing{animation:mood-longing calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-cheer{animation:mood-cheer calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-snuggle{animation:mood-snuggle calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-ember{animation:mood-ember calc(2.2s * var(--sticker-motion-factor,1)) ease-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-snap{animation:mood-snap calc(2.2s * var(--sticker-motion-factor,1)) ease-out}
:is(.sticker-playing,.sticker-looping) :is(.motion-mood-cheeks,.motion-mood-blush){animation:mood-blush calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-brows{animation:mood-brows calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-leaf{animation:mood-leaf calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-confetti{animation:mood-confetti calc(2.2s * var(--sticker-motion-factor,1)) ease-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-shadow{animation:mood-shadow calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-cheer-hands{animation:mood-cheer-hands calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-peek{animation:mood-peek calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-clasp{animation:mood-clasp calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-eye-glint{animation:mood-eye-glint calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-sleepbubble{transform-origin:20% 70%;animation:mood-sleepbubble calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-gaze{animation:mood-gaze calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-question{animation:mood-question calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-page{transform-origin:0 50%;animation:mood-page calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) :is(.motion-mood-bulb,.motion-mood-rays,.motion-mood-bolts){animation:mood-light calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-spiral{transform-origin:center;animation:mood-spiral calc(2.2s * var(--sticker-motion-factor,1)) linear}
:is(.sticker-playing,.sticker-looping) .motion-mood-tangle{animation:mood-tangle calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-clover{transform-origin:50% 90%;animation:mood-clover calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-drop-hands{animation:mood-drop-hands calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-poof{animation:mood-poof calc(2.2s * var(--sticker-motion-factor,1)) ease-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-relief-mouth{animation:mood-relief-mouth calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-plane{animation:mood-plane calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-letter-hug{animation:mood-letter-hug calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
:is(.sticker-playing,.sticker-looping) .motion-mood-blanket{animation:mood-blanket calc(2.2s * var(--sticker-motion-factor,1)) ease-in-out}
@keyframes mood-hop{0%,15%,100%{translate:0 0;scale:1}27%{translate:0 2px;scale:1.06 .92}43%{translate:0 -9px;scale:.97 1.04}60%{translate:0 1px;scale:1.05 .94}74%{translate:0 -2px;scale:1}}
@keyframes mood-bashful{0%,100%{rotate:0deg;translate:0 0}40%{rotate:-4deg;translate:0 2px}70%{rotate:2deg}}
@keyframes mood-wobble{0%,100%{rotate:0deg;scale:1}35%{rotate:-2deg;scale:1.025 .98}65%{rotate:2deg;scale:.99 1.02}}
@keyframes mood-nod{0%,100%{rotate:0deg;translate:0 0}40%{rotate:3deg;translate:0 3px}65%{rotate:4deg;translate:0 4px}80%{rotate:-1deg;translate:0 0}}
@keyframes mood-tilt{0%,100%{rotate:0deg}30%,48%{rotate:-7deg}70%,85%{rotate:4deg}}
@keyframes mood-focus{0%,100%{translate:0 0;rotate:0deg}40%{translate:0 2px;rotate:1deg}70%{translate:0 -1px;rotate:-1deg}}
@keyframes mood-dizzy{0%,100%{translate:0 0;rotate:-3deg}33%{translate:2px -1px;rotate:3deg}66%{translate:-2px 1px;rotate:0deg}}
@keyframes mood-lucky{0%,100%{translate:0 0;scale:1}30%{translate:0 -4px;scale:.98 1.03}55%{translate:0 0;scale:1.03 .97}80%{rotate:2deg}}
@keyframes mood-relief{0%,100%{scale:1;translate:0 0}25%{scale:.98 1.035;translate:0 -1px}65%,82%{scale:1.045 .95;translate:0 3px}}
@keyframes mood-longing{0%,100%{rotate:-1deg;translate:0 0}45%{rotate:3deg;translate:0 -2px}75%{rotate:1deg}}
@keyframes mood-cheer{0%,100%{translate:0 0;scale:1}30%,65%{translate:0 -3px;scale:1.025}48%{translate:0 1px;scale:1 .98}}
@keyframes mood-snuggle{0%,100%{scale:1;translate:0 0}45%{scale:.98 .96;translate:0 2px}75%{scale:1.02 1.015;translate:0 -1px}}
@keyframes mood-ember{0%,18%,100%{translate:0 2px;scale:.4;opacity:0}30%{translate:0 0;scale:1.05;opacity:1}76%{translate:var(--ember-x,5px) var(--ember-y,-13px);scale:.25;opacity:0}}
@keyframes mood-snap{0%,22%,75%,100%{scale:.3;opacity:0}35%{scale:1.2;opacity:1}55%{scale:.7;opacity:.6}}
@keyframes mood-blush{0%,100%{opacity:.35;scale:.95}38%,65%{opacity:.8;scale:1.1}}
@keyframes mood-brows{0%,100%{translate:0 0}30%,60%{translate:0 1.5px}}
@keyframes mood-leaf{0%,100%{translate:0 0;rotate:-8deg}50%{translate:3px -3px;rotate:10deg}}
@keyframes mood-confetti{0%{translate:0 -4px;rotate:-12deg;opacity:.1}35%{opacity:1}100%{translate:5px 8px;rotate:35deg;opacity:0}}
@keyframes mood-shadow{0%,100%{scale:1;opacity:.4}43%{scale:.75 1;opacity:.2}60%{scale:1.08 1;opacity:.45}}
@keyframes mood-cheer-hands{0%,100%{translate:0 0;scale:1}30%,65%{translate:0 -9px;scale:1.06}48%{translate:0 -3px}}
@keyframes mood-peek{0%,100%{translate:0 0;scale:1}35%,60%{translate:0 -8px;scale:.96}78%{translate:0 -3px}}
@keyframes mood-clasp{0%,100%{scale:1;translate:0 0}45%{scale:.9 1;translate:0 -2px}}
@keyframes mood-eye-glint{0%,100%{opacity:.55;scale:.8}45%{opacity:1;scale:1.15}}
@keyframes mood-sleepbubble{0%,100%{scale:.45;opacity:.65}65%{scale:1.2;opacity:.9}76%{scale:1.15}84%{scale:.4;opacity:.35}}
@keyframes mood-gaze{0%,100%{translate:0 0}25%,45%{translate:2px 0}65%,85%{translate:-2px 0}}
@keyframes mood-question{0%,100%{translate:0 0;rotate:0deg}35%{translate:0 -4px;rotate:8deg}60%{translate:0 -1px;rotate:-4deg}}
@keyframes mood-page{0%,25%,100%{scale:1 1;opacity:1}55%{scale:.15 1;opacity:.6}80%{scale:1 1;opacity:1}}
@keyframes mood-light{0%,20%,100%{opacity:.3;scale:.92}55%,75%{opacity:1;scale:1.06}}
@keyframes mood-spiral{to{rotate:360deg}}
@keyframes mood-tangle{0%,100%{rotate:-4deg;scale:.98}50%{rotate:7deg;scale:1.07}}
@keyframes mood-clover{0%,100%{rotate:-6deg}40%{rotate:9deg}70%{rotate:-3deg}}
@keyframes mood-drop-hands{0%,100%{translate:0 0}55%,80%{translate:0 4px;scale:1.04 1}}
@keyframes mood-poof{0%,25%,100%{translate:-4px 0;scale:.5;opacity:0}50%{translate:0 0;scale:1;opacity:.85}85%{translate:7px -2px;scale:1.2;opacity:0}}
@keyframes mood-relief-mouth{0%,100%{scale:1}30%,55%{scale:.7 1.2}80%{scale:1 .45}}
@keyframes mood-plane{0%,10%,100%{translate:-3px 3px;rotate:-8deg;opacity:0}25%{opacity:1}65%{translate:30px -7px;rotate:4deg;opacity:1}90%{translate:42px -3px;rotate:12deg;opacity:0}}
@keyframes mood-letter-hug{0%,100%{translate:0 0;rotate:0deg}45%{translate:0 -3px;rotate:-2deg}}
@keyframes mood-blanket{0%,100%{translate:0 0;scale:1}45%{translate:0 -2px;scale:1.02 1.04}}
@media(prefers-reduced-motion:reduce){:is(.sticker-playing,.sticker-looping,.sticker-wiggle),:is(.sticker-playing,.sticker-looping) *{animation:none!important}}
.sticker-inline-motion{position:absolute;top:100%;left:0;z-index:20;width:210px;padding:10px;background:#fffef7;border:1px solid #d8dec8;border-radius:9px;box-shadow:0 5px 18px #59603d20;white-space:normal}
.sticker-inline-motion[hidden]{display:none!important}
.sticker-inline-motion .sticker-field{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px}
.sticker-anchor{display:block;position:relative;pointer-events:none;min-height:0;margin:0!important;padding:0}
.sticker-anchor.sticker-inline-anchor{display:inline-block;vertical-align:middle;line-height:0}
.sticker-layer{position:absolute;inset:0;pointer-events:none;border-radius:inherit}
.sticker-layer .sticker-object{position:absolute;display:block;pointer-events:auto;line-height:1;margin:0!important;padding:0;border:1px solid transparent;border-radius:8px;touch-action:none;box-sizing:content-box}
.sticker-layer .sticker-object.is-selected{border:1px dashed #9daf87;background:#dce8cf0b}
.sticker-layer .sticker-object.is-dragging{border-color:#849a6b;cursor:grabbing}
.sticker-object .sticker-art{position:relative;display:grid;place-items:center;max-width:none;padding:0;cursor:grab;touch-action:none;outline:none;filter:drop-shadow(0 3px 2px #776d5510)}
.sticker-object .sticker-art:active{cursor:grabbing}
.sticker-object .sticker-art svg,.sticker-object .sticker-art img{display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;pointer-events:none;margin:0!important}
.sticker-object .sticker-art:focus-visible{outline:1px dashed #849a6b;outline-offset:4px;border-radius:6px}
.sticker-resize-handle,.sticker-rotate-handle{display:none;position:absolute;background:#fffef7;border:1px solid #99aa85;color:#819367;padding:0;align-items:center;justify-content:center;touch-action:none;line-height:1;z-index:2;box-shadow:0 2px 5px #4e63321a}
.sticker-object.is-selected .sticker-resize-handle,.sticker-object.is-selected .sticker-rotate-handle{display:flex}
.sticker-resize-handle{right:-9px;bottom:-9px;width:19px;height:19px;border-radius:5px;cursor:nwse-resize;font-size:13px}
.sticker-rotate-handle{top:-25px;left:calc(50% - 10px);width:20px;height:20px;border-radius:50%;cursor:grab;font-size:15px}
.sticker-rotate-handle:after{content:'';position:absolute;width:1px;height:7px;top:19px;background:#a8b395}
.sticker-mini-toolbar{position:fixed;z-index:35;display:flex;align-items:center;justify-content:center;gap:3px;min-width:124px;height:40px;padding:4px 9px;background:#fffdf6f7;border:1px solid #dfdfcf;border-radius:22px;box-shadow:0 5px 20px #5663431d;backdrop-filter:blur(12px)}
.sticker-mini-toolbar[hidden],.sticker-popover[hidden],.sticker-popover [hidden]{display:none!important}
.sticker-mini-toolbar button{display:grid;place-items:center;background:transparent;color:#7b8a68;width:32px;height:30px;padding:0;border-radius:50%;font-size:19px;line-height:1}
.sticker-mini-toolbar button:hover{background:#edf1e3;color:#5e774b}
.sticker-mini-toolbar button:disabled{opacity:.35;cursor:default}
.sticker-mini-toolbar .sticker-settings{position:static;opacity:1;font-size:22px;bottom:auto;right:auto}
.sticker-mini-toolbar .sticker-delete{color:#ad9786;font-size:19px}
.sticker-popover{position:fixed;z-index:40;width:242px;max-height:calc(100dvh - 100px);overflow:auto;padding:17px;background:#fffcf4;border:1px solid #e2decc;border-radius:15px;box-shadow:0 12px 40px #4c594327;color:#748361;font:12px/1.6 var(--sans);text-align:left;box-sizing:border-box}
.sticker-popover header{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px;padding-bottom:10px;border-bottom:1px solid #eae6d7;font-size:12px;letter-spacing:.5px}
.sticker-popover header button{border:0;background:transparent;color:#a4a48b;font-size:20px;padding:0 2px;line-height:1}
.sticker-section-label{font-size:10px;color:#a2a28b;display:block;margin:12px 0 8px}
.sticker-palette-options{display:flex;gap:13px;padding:2px}
.sticker-palette-swatch{width:25px;height:25px;background:var(--palette-color);border:3px solid #fffdf5;border-radius:50%;box-shadow:0 0 0 1px #d7d8c7;padding:0}
.sticker-palette-swatch[aria-pressed="true"]{outline:1px solid #8b9f75;outline-offset:3px}
.sticker-mood-options{display:flex;gap:5px;margin-bottom:16px}
.sticker-mood-options button{flex:1;min-width:0;border:1px solid #e4e3d2;border-radius:7px;padding:6px 3px;font-size:10px;color:#929b80;background:#faf9ef}
.sticker-mood-options button[aria-pressed="true"]{background:#eaf0df;color:#6e8557;border-color:#becba9}
.sticker-field{display:flex;align-items:center;gap:12px;justify-content:space-between;margin:13px 0}
.sticker-field>span{font-size:10px;color:#9a9f87;white-space:nowrap}
.sticker-field input[type="range"]{width:145px;accent-color:#97aa80;height:16px;cursor:pointer}
.sticker-field input[type="range"]{-webkit-appearance:none;appearance:none;background:transparent}
.sticker-field input[type="range"]::-webkit-slider-runnable-track{height:3px;border-radius:4px;background:#dfe5d2}
.sticker-field input[type="range"]::-webkit-slider-thumb{-webkit-appearance:none;width:13px;height:13px;margin-top:-5px;border:2px solid #fffdf5;border-radius:50%;background:#9cad86;box-shadow:0 1px 3px #7e8f6329}
.sticker-popover select,.sticker-popover input[type="text"]{min-width:0;width:100%;background:#faf9ef;color:#849171;font:11px var(--sans);border:1px solid #e2e3d1;border-radius:7px;padding:7px}
.sticker-field select{width:153px}
.sticker-popover .sticker-drag-hint{font-size:9px;line-height:1.7;color:#afb29a;padding-top:12px;margin:14px 0 0;border-top:1px solid #ece8da}
.page-layer-selection[data-type="sticker"] .page-layer-tools{padding:4px 8px;gap:3px;border:1px solid #dfdfcf;border-radius:22px;background:#fffdf6f7;box-shadow:0 5px 20px #5663431d;transform:rotate(calc(-1 * var(--selected-rotation,0deg)))}
.page-layer-selection[data-type="sticker"] .page-layer-tools button{background:transparent;color:#7b8a68;width:30px;height:30px;padding:0;border-radius:50%;font-size:18px}
.page-layer-selection[data-type="sticker"] .page-layer-tools :is([aria-label="移动选中图层"],[aria-label="水平翻转选中图层"],[aria-label="垂直翻转选中图层"],[aria-label="选中图层置顶"],[aria-label="锁定选中图层"]){display:none}
.page-layer-tools button[hidden]{display:none!important}
@media(max-width:680px){
  .sticker-popover{width:calc(100vw - 24px);max-height:55dvh;padding:16px 19px;border-radius:16px;box-shadow:0 -3px 40px #4c594323}
  .sticker-popover .sticker-drag-hint{display:none}
  .sticker-palette-section,.sticker-mood-section{display:inline-block;vertical-align:top}
  .sticker-palette-section{width:42%}.sticker-mood-section{width:58%}
  .sticker-resize-handle{width:23px;height:23px;right:-11px;bottom:-11px}
  .sticker-rotate-handle{width:24px;height:24px;left:calc(50% - 12px);top:-29px}
  .sticker-mini-toolbar{height:42px}
}
