@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=DM+Sans:wght@400;500;600&display=swap');
:root{--paper:#f6efdf;--bg:#eee8dc;--ink:#483e34;--muted:#8c8070;--line:#d5cbb8;--green:#465443;--gold:#c4a365}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:14px;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23827660' opacity='.065' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E")}button,input,select{font:inherit;color:inherit}button,select{cursor:pointer}button{border:0;background:none}button:focus-visible,input:focus-visible,select:focus-visible,[contenteditable]:focus-visible{outline:2px solid #867749;outline-offset:4px}button:disabled{opacity:.3;cursor:default}[hidden]{display:none!important}.svg-defs{position:absolute;width:0;height:0}#app{max-width:1280px;margin:auto;padding:0 64px}.topbar{height:100px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:28px}.brand{font-family:'Cormorant Garamond',Georgia,serif;font-size:42px;font-weight:600;letter-spacing:-3px;padding:0}.brand i{font-size:22px;font-weight:400;margin-left:5px}.brand-note{font-size:10px;letter-spacing:2px;text-transform:uppercase;color:var(--muted)}.icon-button{width:42px;height:42px;border:1px solid var(--line);border-radius:50%;font-size:20px;display:inline-grid;place-items:center}.topbar>.icon-button{margin-left:auto}.intro{position:relative;padding:66px 0 45px}.eyebrow{font-size:10px;letter-spacing:2.4px;text-transform:uppercase;color:#867854;display:flex;align-items:center;gap:10px}.eyebrow>span:first-child:not(:only-child){width:23px;height:1px;background:#a38c5d}h1,h2{font-family:'Cormorant Garamond',Georgia,serif;font-weight:500}h1{font-size:64px;letter-spacing:-2px;margin:12px 0}p{line-height:1.7}.intro p{color:var(--muted);font-size:15px;margin:10px 0 27px}.primary{background:var(--green);color:#faf5e8;padding:14px 22px;border-radius:4px;box-shadow:0 3px 5px #453d3015;font-size:12px}.primary:hover{background:#34432f}.primary>span:first-child{font-size:17px;margin-right:8px}.intro-flower{position:absolute;right:50px;top:15px;transform:rotate(20deg);color:#8b8e6b;opacity:.5}.intro-flower svg{width:175px;height:255px}.library-bar{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:0 0 17px;font-size:11px;letter-spacing:1.5px;text-transform:uppercase}.library-bar>span:last-child{color:var(--muted)}.books{display:grid;grid-template-columns:repeat(3,1fr);gap:40px;padding:38px 12px 46px}.book-item{text-align:center;min-width:0}.book-cover{display:block;width:100%;max-width:240px;aspect-ratio:.73;margin:auto;position:relative;border-radius:4px 10px 10px 4px;background-color:#57624b;color:#d8c38b;padding:20px 19px 20px 27px;box-shadow:inset 7px 0 9px #0004,inset -2px 0 2px #fff2,6px 8px 0 -3px #e1d6bd,8px 10px 0 -4px #867861,12px 17px 23px #3f352e27;transition:transform .25s;background-image:repeating-linear-gradient(0deg,#ffffff05 0px,#ffffff05 1px,transparent 1px,transparent 3px),repeating-linear-gradient(90deg,#00000008 0px,#00000008 1px,transparent 1px,transparent 3px)}.book-cover:hover{transform:translateY(-7px) rotate(-1deg)}.book-cover:before{content:'';position:absolute;inset:13px 11px 13px 20px;border:1px solid #ccb67666;border-radius:2px}.book-cover:after{content:'';position:absolute;bottom:-17px;left:30px;width:14px;height:48px;background:#ad9561;clip-path:polygon(0 0,100% 0,100% 100%,50% 83%,0 100%);box-shadow:1px 2px 3px #0003}.book-cover.rose{background-color:#af8175;color:#efdbb2}.book-cover.wine{background-color:#6b3f43}.book-cover.midnight{background-color:#394956}.cover-inner{border:1px solid #ccb67677;height:100%;display:flex;align-items:center;flex-direction:column;justify-content:center;position:relative}.cover-inner:before,.cover-inner:after{content:'✧';position:absolute;left:8px;font-size:19px}.cover-inner:before{top:4px}.cover-inner:after{bottom:4px;left:auto;right:8px}.cover-inner svg{width:82px;height:115px;filter:drop-shadow(0 1px 1px #0003)}.cover-title{font-family:'Cormorant Garamond',Georgia,serif;font-size:27px;padding:5px 9px;overflow-wrap:anywhere;line-height:1.1}.cover-subtitle{font-size:7px;letter-spacing:2.8px;margin-top:13px}.cover-stars{font-size:20px;letter-spacing:14px;margin:12px 0 5px}.book-caption{margin-top:30px;font-family:'Cormorant Garamond',Georgia,serif;font-size:23px}.book-meta{color:var(--muted);font-size:10px;margin-top:7px;letter-spacing:.5px}.quote{text-align:center;border-top:1px solid var(--line);padding:22px 0 30px}.quote>span{font-family:Georgia;font-size:40px;color:#b5a885;height:30px;display:block}.quote p{font:italic 25px 'Cormorant Garamond',Georgia,serif;margin:10px}.quote small{font-size:9px;letter-spacing:1.7px;color:var(--muted)}.library-footer{border-top:1px solid var(--line);padding:25px 0;display:flex;justify-content:space-between;font-size:9px;letter-spacing:1px;color:var(--muted)}.editor-nav{display:flex;align-items:center;justify-content:space-between;padding-top:25px;font-size:11px}.text-button{padding:10px 0;font-size:12px}.editor-heading{display:flex;align-items:center;justify-content:space-between;margin:28px 0 20px}.editor-heading h1{font-size:42px;margin:7px 0;overflow-wrap:anywhere}.mode-label{display:flex;align-items:center;gap:6px;font-size:12px}input[type=checkbox]{accent-color:var(--green)}.toolbar{display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid var(--line);border-radius:7px;background:#f8f1e4;position:relative;z-index:2}.toolbar select{border:none;background:transparent;padding:6px 0;max-width:135px}.toolbar button{min-height:34px;min-width:34px;border-radius:3px}.toolbar button:hover{background:#e4dac5}.toolbar-spacer{flex:1}input[type=color]{width:25px;height:28px;border:0;background:transparent;padding:0}.desk{display:flex;gap:22px;align-items:flex-start;margin-top:22px}.journal{flex:1;min-width:0;background:#665044;border-radius:6px 13px 13px 6px;padding:7px 8px 9px 18px;position:relative;box-shadow:3px 9px 21px #46362628}.binding{position:absolute;left:7px;top:18px;bottom:18px;width:6px;border-left:1px dashed #b69b77}.paper{position:relative;background:var(--paper);min-height:660px;padding:30px 42px 57px;border-radius:2px 7px 7px 2px;box-shadow:inset 16px 0 18px -15px #58432488,2px 3px 0 #c3b699,3px 5px 0 #e6dcc6;background-image:radial-gradient(ellipse at 100% 0,#c4a36a14,transparent 70%)}.paper-top{display:flex;justify-content:space-between;color:#a49577;font-size:8px;letter-spacing:1.7px;margin-bottom:28px}.entry-title{display:block;border:none;background:transparent;width:100%;font:500 38px 'Caveat',cursive;margin:12px 0 17px;outline-offset:2px}#entry-date{background:transparent;border:0;font-size:11px;color:#9a8464;min-height:28px}#writing{font:22px/36px 'Caveat',cursive;min-height:450px;outline:none;position:relative;z-index:1;overflow-wrap:anywhere;background-image:repeating-linear-gradient(transparent 0,transparent 35px,#baac892e 35px,#baac892e 36px)}#writing:empty:before{content:attr(data-placeholder);color:#b1a28a;pointer-events:none}.paper-bottom{position:absolute;bottom:20px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;color:#ad9871;font:12px Georgia}.page-nav{display:flex;align-items:center;justify-content:center;gap:18px;padding:24px 0 35px;font-size:12px}.page-nav .text-button{margin-left:12px}.sticker-panel{width:270px;flex-shrink:0;background:#f6efdf;border:1px solid #d6c8ab;border-radius:7px;padding:20px;box-shadow:3px 7px 15px #47382410}.panel-head{display:flex;align-items:center;justify-content:space-between}.panel-head h2{font-size:30px;margin:8px 0}.panel-head .eyebrow{font-size:8px}.panel-head .icon-button{border:0}.sticker-panel p{color:var(--muted);font-size:11px}.sticker-categories{display:flex;gap:5px;flex-wrap:wrap;margin:16px 0}.sticker-categories button{border:1px solid var(--line);border-radius:20px;font-size:10px;padding:7px 9px}.sticker-categories button.active{background:var(--green);color:white}#sticker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}#sticker-grid button{font-size:37px;padding:9px 0;filter:drop-shadow(1px 3px 1px #64503922);transition:transform .15s}#sticker-grid button:hover{transform:rotate(-10deg) scale(1.15)}#placed-stickers{position:absolute;inset:0;pointer-events:none;z-index:3}.placed-sticker{position:absolute;pointer-events:auto;touch-action:none;user-select:none;line-height:1;padding:6px;transform:translate(-50%,-50%) rotate(var(--rotation));filter:drop-shadow(0 2px 1px #45372b35);text-shadow:2px 2px white,-2px -2px white;cursor:grab}.placed-sticker.selected{outline:1px dashed #947a46;border-radius:5px}.placed-sticker:active{cursor:grabbing}#sticker-controls{border-top:1px solid var(--line);margin-top:18px;padding-top:12px}#sticker-controls label{display:flex;align-items:center;justify-content:space-between;font-size:11px;margin:10px 0}input[type=range]{width:135px;accent-color:var(--green)}dialog{border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:8px;padding:35px;width:min(420px,calc(100% - 32px));box-shadow:0 15px 70px #30261933}dialog::backdrop{background:#342c2466;backdrop-filter:blur(4px)}dialog h2{font-size:35px;margin:10px 0 25px}.dialog-close{position:absolute;right:12px;top:10px;font-size:28px;width:35px;height:35px}.field{display:block;margin:22px 0}.field>span{display:block;font-size:12px;margin-bottom:10px}.field input,.field select{width:100%;background:#fff6;border:1px solid var(--line);padding:12px;border-radius:3px}dialog p,.notice{font-size:12px;color:var(--muted);line-height:1.7}.notice{border-top:1px solid var(--line);margin-top:20px;padding-top:20px}.secondary{border:1px solid var(--line);padding:12px 18px;margin-top:20px;width:100%}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:var(--green);color:white;padding:14px 22px;border-radius:5px;z-index:20;font-size:12px;max-width:90vw}
@media(min-width:1100px){.journal{max-width:800px}.desk{justify-content:center}.paper{min-height:700px}}
@media(max-width:900px){#app{padding:0 32px}.books{gap:27px;padding-left:0;padding-right:0}.cover-title{font-size:24px}.cover-inner svg{height:95px}.sticker-panel{width:235px;padding:15px}.paper{padding:25px 27px 55px}.brand-note{font-size:8px}.intro-flower{right:5px}}
@media(max-width:650px){#app{padding:0 20px}.topbar{height:78px}.brand{font-size:36px}.brand-note{display:none}.intro{padding:38px 0 31px}h1{font-size:49px}.intro p{max-width:245px;font-size:13px;line-height:1.8}.intro-flower{right:-6px;top:29px;opacity:.25}.intro-flower svg{width:100px;height:190px}.intro .primary{padding:12px 17px}.books{grid-template-columns:repeat(2,1fr);gap:34px 24px;padding-top:28px}.book-cover{padding:17px 14px 17px 23px}.cover-inner svg{height:85px;width:60px}.cover-title{font-size:22px}.cover-subtitle{font-size:6px;letter-spacing:1.5px}.cover-stars{font-size:14px;margin:5px 0}.book-caption{font-size:22px;margin-top:26px}.book-meta{font-size:9px}.quote p{font-size:23px}.library-footer{gap:15px;font-size:8px;line-height:1.8}.library-footer>span:last-child{text-align:right;max-width:180px}.editor-nav{padding-top:18px}.editor-heading{margin:23px 0 15px}.editor-heading h1{font-size:35px;max-width:230px}.editor-heading .eyebrow{font-size:8px}.mode-label{font-size:10px;white-space:nowrap}.toolbar{gap:3px;padding:7px;flex-wrap:wrap}.toolbar select{font-size:11px;max-width:96px}.toolbar button{font-size:13px}.toolbar #stickers-toggle{font-size:11px}.toolbar-spacer{flex:1}.desk{margin-top:15px}.journal{margin:0 -7px;width:calc(100% + 14px);padding-left:13px}.paper{min-height:610px;padding:22px 23px 50px}.entry-title{font-size:33px}#writing{min-height:410px}.paper-top{font-size:7px}.sticker-panel{position:fixed;bottom:0;left:0;right:0;width:100%;max-height:55dvh;overflow:auto;z-index:10;border-radius:20px 20px 0 0;padding:20px 24px max(22px,env(safe-area-inset-bottom));box-shadow:0 -10px 60px #352a3340}#sticker-grid{grid-template-columns:repeat(6,1fr)}.sticker-panel p{margin:3px 0}.panel-head h2{font-size:26px;margin:4px 0}#sticker-grid button{font-size:32px}#sticker-controls{display:flex;gap:15px;align-items:center;flex-wrap:wrap}#sticker-controls label{gap:5px}input[type=range]{width:85px}.page-nav{gap:12px}.page-nav .text-button{margin-left:0}.icon-button{min-width:40px;min-height:40px}}

#sticker-quick-actions{position:fixed;z-index:19;right:max(18px,env(safe-area-inset-right));bottom:max(22px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:8px;padding:8px;border:1px solid #b08a60;background:#ead7afed;box-shadow:0 7px 25px #24140d55;border-radius:30px;color:#5f402a;font:11px Georgia,serif;backdrop-filter:blur(5px)}#sticker-quick-actions[hidden]{display:none}#sticker-quick-actions .quick-tool-mark{display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#f4e6c8;color:#795936}.quick-size-control{display:flex;align-items:center;gap:5px;padding:0 4px;color:#765438}.quick-size-control input{width:90px;accent-color:#713f34}#sticker-quick-actions button{min-width:38px;min-height:38px;padding:8px 12px;border:0;border-radius:20px;background:#713f34;color:#fff1d5;font:15px Georgia,serif;box-shadow:inset 0 0 0 1px #d6aa7b55}#sticker-quick-actions button:hover{background:#583028}#quick-remove-sticker{font-size:12px!important}#sticker-controls{display:none!important}#remove-sticker{width:100%;margin-top:7px;padding:11px;border:1px solid #9b6955;border-radius:3px;background:#764539;color:#fff1d5;font-family:Georgia,serif}
@media(max-width:650px){#sticker-quick-actions{left:50%;right:auto;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);max-width:calc(100% - 18px);white-space:nowrap}#sticker-quick-actions .quick-tool-mark{display:none}.quick-size-control input{width:74px}#sticker-quick-actions button{min-height:42px;padding:9px 12px}#quick-remove-sticker span:last-child{display:none}#remove-sticker{min-height:44px;flex-basis:100%}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
html:lang(ja){--cjk-sans:'Hiragino Kaku Gothic ProN','Yu Gothic',Meiryo,sans-serif;--cjk-serif:'Hiragino Mincho ProN','Yu Mincho',serif}
html:lang(ko){--cjk-sans:'Apple SD Gothic Neo','Malgun Gothic',sans-serif;--cjk-serif:'AppleMyungjo',Batang,serif}
html:is(:lang(ko),:lang(ja)) :is(.eyebrow,.brand-note,.cover-subtitle,.paper-top,.quote small,.library-footer){letter-spacing:normal;line-height:1.6}
html:is(:lang(ko),:lang(ja)) :is(.intro h1,.cover-title,.book-caption,dialog h2,.editor-heading h1){font-family:var(--cjk-serif);line-height:1.4}
html:is(:lang(ko),:lang(ja)) :is(button,input,select,textarea){font-family:var(--cjk-sans)}
#toast .toast-action{margin-left:10px;padding:6px 12px;border:1px solid rgba(255,255,255,.55);border-radius:99px;background:rgba(255,255,255,.14);color:#fff;font:inherit;font-weight:700;cursor:pointer;min-height:32px}
#toast .toast-action:active{background:rgba(255,255,255,.3)}
.welcome-tour{width:min(420px,calc(100vw - 32px));padding:28px 26px 22px;border:3px solid #917048;border-radius:18px;background:#f4e8d0 url('assets/vintage/paper.svg') center/cover;color:#46301f;text-align:center;box-shadow:0 24px 70px #0008}
.welcome-tour::backdrop{background:#0f1f18cc}
.welcome-icon{width:76px;height:76px;margin:0 auto 10px;border-radius:50%;background:#2a4a39;color:#f3dca4;display:flex;align-items:center;justify-content:center;font-size:38px;box-shadow:0 0 0 4px #dcb97466}
.welcome-step{display:block;font-size:11px;letter-spacing:2px;text-transform:uppercase;color:#80633e;font-weight:700}
.welcome-tour h2{font-family:'Cormorant Garamond',Georgia,serif;font-size:34px;line-height:1.05;margin:8px 0 10px}
.welcome-tour p{font-size:16px;line-height:1.45;margin:0 0 16px}
.welcome-dots{display:flex;justify-content:center;gap:8px;margin-bottom:18px}
.welcome-dots i{width:9px;height:9px;border-radius:50%;background:#46301f33}
.welcome-dots i.on{width:26px;border-radius:5px;background:#2a4a39}
.welcome-tour .primary{width:100%;min-height:46px;font-size:16px}
.welcome-tour .welcome-skip{margin-top:8px;min-height:40px}
#toast[popover]{top:auto;right:auto;margin:0;height:auto;width:max-content;overflow:visible;border:0}
