/* The room remains a single continuous surface; only its paper objects are framed. */
:root{--lace-brocade-bg:url('/assets/lace/brocade.png');--lace-paper-inner:url('/assets/lace/paper.png');--lace-center-bow:url('/assets/lace/bow.png');--lace-wide-trim:url('/assets/lace/trim.png');--lace-topbar-border:url('/assets/lace/trim.png')}
main[data-page="shelf"]{max-width:1240px;padding-top:28px}
.scrapbook-front{position:relative;isolation:isolate;padding:22px 46px 18px;background:rgba(255,252,253,.66);border-radius:8px;box-shadow:0 8px 35px rgba(217,170,183,.08)}
.scrapbook-front::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--lace-brocade-bg) center/340px;opacity:.34;border-radius:inherit;pointer-events:none}
.scrapbook-heading{text-align:center;margin-bottom:18px}
.scrapbook-heading>span{font:10px/1.6 var(--font-serif-en);color:var(--text-secondary)}
.scrapbook-heading h1{font-size:27px;line-height:1.5;margin:7px 0;text-shadow:none}
.scrapbook-heading h1 span{font-size:18px;color:var(--text-body);margin-left:8px}
.scrapbook-heading p{font-size:14px;color:var(--text-secondary);margin:0}
.scrapbook-spread{display:grid;grid-template-columns:44% 56%;align-items:center;max-width:880px;margin:auto;min-height:260px;gap:0}
.polaroid-column{display:flex;flex-direction:column;align-items:center;gap:20px;padding:12px 18px 0}
.polaroid{position:relative;flex:none;width:155px;height:195px;background:#FFFEFA;padding:10px 10px 34px;border:1px solid #E8DDE0;box-shadow:0 8px 20px rgba(217,170,183,.25);transform:rotate(-7deg);transform-style:preserve-3d}
.polaroid.breeze{animation:polaroid-breeze 8s ease-in-out infinite}
.polaroid.breeze:hover,.polaroid.breeze:focus-within{animation-play-state:paused}
.polaroid-photo{position:relative;display:block;padding:0;width:133px;height:149px;min-width:0;min-height:0;border:0;border-radius:0;overflow:hidden;background:#f3e7ea}
.polaroid-image{width:100%;height:100%;object-fit:cover}
.polaroid-caption{position:absolute;left:3px;bottom:2px;width:147px;height:31px;min-width:0;min-height:0;padding:2px;font-size:11px;color:#84777C;font-style:italic;border-radius:0;white-space:normal;line-height:1.3;overflow:hidden}
.pearl-bow{display:block;width:49px;height:42px;background:var(--lace-center-bow) center/contain no-repeat;filter:drop-shadow(0 3px 2px #d9aab740);pointer-events:none}
.polaroid>.pearl-bow{position:absolute;left:-20px;top:-19px;transform:rotate(-14deg);width:61px;height:56px;z-index:4}
.polaroid-controls{display:flex;gap:3px;justify-content:center}
.polaroid-controls button{padding:4px;width:28px;height:28px;min-width:0;min-height:0;border-radius:50%;color:var(--text-secondary)}
.polaroid-controls svg{width:14px;height:14px}
.polaroid-controls .active{background:var(--bg-selected);color:var(--text-accent)}
.polaroid-atmosphere{position:absolute;inset:0;mix-blend-mode:screen;pointer-events:none}
.polaroid-atmosphere i{position:absolute;width:3px;height:3px;border-radius:50%;left:calc(var(--n)*8.3%);top:-10px;background:#fff5fb;box-shadow:0 0 5px #ffe7f1;animation:scrapbook-snow calc(3s + var(--n)*.3s) linear infinite;animation-delay:calc(var(--n)*-.7s)}
[data-atmosphere="off"] .polaroid-atmosphere{display:none}
[data-atmosphere="sun"] .polaroid-atmosphere{background:linear-gradient(125deg,transparent 15%,#ffefd677 45%,transparent 72%);animation:polaroid-sun 5s ease-in-out infinite}
[data-atmosphere="sun"] .polaroid-atmosphere i{display:none}
.profile-letter{position:relative;padding:27px 24px 38px;border:1px solid #e8d9df;border-radius:4px;background:rgba(255,252,253,.88);box-shadow:0 4px 18px #d9aab712;outline:1px dashed #dec8d1;outline-offset:-9px}
.profile-letter::before,.profile-letter::after{content:"";position:absolute;left:5px;right:5px;height:12px;background:var(--lace-wide-trim) center/auto 12px repeat-x;opacity:.55;pointer-events:none}
.profile-letter::before{top:-8px;transform:rotate(180deg)}.profile-letter::after{bottom:-8px}
.profile-caption{display:block;color:var(--text-secondary);font-size:10px;font-style:italic;margin-bottom:14px}
.profile-lines{display:grid;gap:8px}
.profile-lines button{display:flex;justify-content:flex-start;text-align:left;padding:3px 0;gap:9px;font-size:15px;line-height:1.65;border-radius:0;min-width:0;white-space:normal;color:var(--text-body)}
.profile-lines button:first-child{font-size:17px;color:var(--text-primary)}
.profile-lines button>span{font-size:7px;flex:none;color:var(--primary-pink)}
.profile-lines strong{font-weight:normal}
.profile-sticker{position:absolute;right:-24px;bottom:-23px;transform:rotate(12deg);width:72px;height:86px;padding:0;background:none;filter:drop-shadow(0 3px 3px #b18d9e30)}
.profile-sticker img{width:100%;height:100%;object-fit:contain}
.letter-signature{position:absolute;right:47px;bottom:10px;font-size:11px;color:var(--text-secondary);font-style:italic}
.chronicle-divider{position:relative;display:flex;align-items:center;justify-content:center;gap:12px;margin:25px 0 13px;color:var(--text-secondary);font-size:11px;line-height:1.6;text-align:center}
.chronicle-divider::before,.chronicle-divider::after{content:"";height:1px;background:linear-gradient(90deg,transparent,#e4d7dd);flex:1}
.chronicle-divider::after{transform:rotate(180deg)}
.chronicle-divider>.pearl-bow{position:absolute;top:-23px;left:calc(50% - 14px);width:28px;height:24px}
.room-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:8px 22px 0}
.room-toolbar h2{font-size:20px;margin:6px 0 0}.room-toolbar .eyebrow{font-size:9px}
.room-toolbar button{font-size:13px;padding:9px 8px;gap:5px}.room-toolbar svg{width:16px;height:16px}
.pegboard-room{position:relative}
.pegboard-stage{position:relative;width:100%;height:550px;isolation:isolate;perspective:1100px}
#pegboard-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}
.board-fallback{position:absolute;inset:6% 4% 5%;z-index:-1;border-radius:5px;background:radial-gradient(circle,#b6a7ad 1.5px,#f5edf0 2.5px,#f8f2f4 3.5px);background-size:23px 23px;box-shadow:inset 0 0 6px #d8bfc9,4px 12px 28px #d9aab733;transform:rotateX(3deg)}
#pegboard-canvas[data-ready="true"]+.board-fallback{visibility:hidden}
.board-fallback i{position:absolute;left:7%;right:7%;top:43%;height:12px;background:#fffaf4;border-bottom:6px solid #e6d8d6;box-shadow:0 14px 14px #bba1aa44;transform:skewX(-9deg)}
.board-fallback i+i{top:80%}
.floating-hud{position:absolute;right:13%;top:8%;display:grid;gap:3px;z-index:3}
.floating-hud button{justify-content:space-between;gap:24px;text-align:left;color:var(--text-body);padding:5px 0;background:none;border:0;border-radius:0;text-shadow:0 0 10px rgba(217,170,183,.6);opacity:.78;position:relative;font-size:18px;min-height:28px}
.floating-hud button::before{content:"";position:absolute;width:35px;height:11px;left:-45px;top:11px;border-left:.5px solid var(--primary-pink);border-top:.5px solid var(--primary-pink);transform:skewX(-35deg);opacity:.6}
.floating-hud small{font:9px var(--font-serif-en);color:inherit}
.floating-hud button:hover{opacity:1;transform:translateX(-3px);color:var(--text-primary)}
.shelf-books{position:absolute;inset:0;pointer-events:none;transform-style:preserve-3d}
.shelf-volume{position:absolute;left:calc(14% + var(--slot)*16%);top:calc(21% + var(--row)*36%);width:94px;height:136px;padding:0;border:0;border-radius:0;background:none!important;perspective:900px;transform-style:preserve-3d;pointer-events:auto;min-width:0;min-height:0}
.shelf-volume .solid-book{--bw:90px;--bh:128px;--bd:24px;transform:rotateY(-24deg) rotateX(4deg);transition:transform .45s;filter:none}
.shelf-volume:hover .solid-book,.shelf-volume:focus-visible .solid-book{transform:translateY(-8px) rotateY(-15deg) rotateX(0deg)}
.shelf-volume-label{position:absolute;bottom:-20px;left:0;right:0;font:10px var(--font-serif-en);color:var(--text-body);text-align:center;opacity:.8}
.solid-book{position:relative;width:var(--bw);height:var(--bh);transform-style:preserve-3d;--bw:240px;--bh:330px;--bd:38px}
.book-face{position:absolute;backface-visibility:hidden;border:1px solid #b99eaa;box-sizing:border-box}
.face-front,.face-back{width:var(--bw);height:var(--bh);left:0;top:0;background:#f8eef1;overflow:hidden}
.face-front{transform:translateZ(calc(var(--bd)/2));border-radius:1px 3px 3px 1px;box-shadow:inset 5px 0 7px #c5a8b244,inset 0 0 0 6px #ffffff25}
.face-back{transform:rotateY(180deg) translateZ(calc(var(--bd)/2));background:repeating-linear-gradient(45deg,#fff5f6 0 2px,#f7ecee 2px 3px)}
.face-spine{width:var(--bd);height:var(--bh);left:calc((var(--bw) - var(--bd))/2);top:0;transform:rotateY(-90deg) translateZ(calc(var(--bw)/2));background:linear-gradient(90deg,#c69eac,var(--cover-tint),#f4dfe6);display:flex;flex-direction:column;align-items:center;justify-content:space-around;color:#705764;font-size:10px}
.face-spine>span{writing-mode:vertical-rl;font:8px var(--font-serif-en)}.face-spine>b{writing-mode:vertical-rl;font-size:12px;font-weight:normal}
.face-pages{width:var(--bd);height:calc(var(--bh) - 5px);left:calc((var(--bw) - var(--bd))/2);top:2.5px;transform:rotateY(90deg) translateZ(calc(var(--bw)/2 - 2px));background:repeating-linear-gradient(90deg,#fffdf8 0 1px,#d7cdca 1px 1.7px)}
.face-top,.face-bottom{width:calc(var(--bw) - 3px);height:var(--bd);left:1.5px;top:calc((var(--bh) - var(--bd))/2);background:repeating-linear-gradient(0deg,#fffdf8 0 1px,#d6ccc8 1px 1.7px)}
.face-top{transform:rotateX(90deg) translateZ(calc(var(--bh)/2 - 2px))}.face-bottom{transform:rotateX(-90deg) translateZ(calc(var(--bh)/2 - 2px))}
.cover-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.cover-print{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#795e6b;padding:11% 8%;background:linear-gradient(115deg,#fff9fa66,transparent 38%,#fff9fa66);text-align:center}
.cover-print::before{content:"";position:absolute;inset:6%;border:.5px solid #be9eac;pointer-events:none}
.cover-print small{font:7px/1.7 var(--font-serif-en);color:inherit}
.cover-print h3{font-size:12px;line-height:1.6;margin:6px 0;color:inherit}
.cover-number{position:absolute;top:14%;font:11px var(--font-serif-en)}.cover-flower{font-size:26px;line-height:1;margin-top:7px;color:#b38f9e}
.cover-rule{width:20px;height:1px;background:#c6acb8;margin:0 0 8px}
.cover-footnote{position:absolute;bottom:9%;font-size:5px}
.cover-art+.layout-classic{background:linear-gradient(0deg,#fff8f7ed 0 45%,#fff8f733 70%);justify-content:flex-end;padding-bottom:18%}
.cover-art+.layout-classic .cover-number{background:#fff7f2aa;border-radius:50%;padding:5px}
.layout-photo{background:linear-gradient(0deg,#34252caa,transparent 65%);color:#fff9fc;justify-content:flex-end;padding-bottom:18%}
.layout-photo .cover-flower,.layout-photo .cover-number{display:none}.layout-photo::before{border-color:#ffffff88}
.cover-art+.layout-minimal{background:#fff8f2d9}
.shelf-ribbon{position:absolute;right:-12px;top:25%;width:17px;height:10px;background:var(--cover-tint);transform:translateZ(4px);box-shadow:0 1px 2px #8f667966}
.keepsake-layer{position:absolute;inset:0;pointer-events:none;z-index:2}
.keepsake{position:absolute;width:113px;height:132px;min-width:0;min-height:0;padding:0;border:0;border-radius:0;transform:translate(-50%,-85%) scale(var(--item-scale));transform-origin:50% 85%;pointer-events:auto;background:none!important;filter:drop-shadow(2px 6px 3px #876a7a3d);touch-action:manipulation}
.keepsake-art{width:100%;height:100%;object-fit:contain;filter:drop-shadow(2px 0 0 #fffaf5) drop-shadow(-2px 0 0 #fffaf5) drop-shadow(0 2px 0 #fffaf5) drop-shadow(0 -2px 0 #fffaf5)}
.kind-hanging{height:135px;width:80px;transform-origin:50% 4%;transform:translate(-50%,0) scale(var(--item-scale));animation:keepsake-swing 6s ease-in-out infinite}
.kind-hanging::before{content:"";position:absolute;top:0;left:48%;width:5px;height:12px;border:2px solid #b7a6a0;border-radius:6px;box-shadow:2px 2px 3px #806d6a55;z-index:2}
.kind-plush:hover{animation:plush-hop .6s ease-in-out}
.crystal-stars{position:absolute;top:17%;left:62%;font-size:12px;color:#fff9ed;animation:crystal-twinkle 3s ease-in-out infinite}.crystal-stars i{position:absolute;left:-44px;top:34px;font-size:9px}
.decor-editing .keepsake{animation:none;touch-action:none;cursor:move}
.decor-editing .keepsake::after{content:"";position:absolute;inset:0;border:1px dashed #b4889e;border-radius:4px;opacity:.4}
.decor-editing .keepsake.decor-selected::after{opacity:1;box-shadow:0 0 0 2px #fff8}
.room-empty{position:absolute;left:14%;top:30%;width:40%;text-align:center;color:var(--text-body);font-size:14px}
.room-board-mark{position:absolute;bottom:5%;left:12%;font:8px var(--font-serif-en);color:var(--text-secondary)}
.room-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 24px 10px;background:none!important;font-size:12px}
.room-footer>span{font:11px var(--font-serif-en)}.room-footer button{font-size:13px}
.decor-edit-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;padding:14px;border-top:1px solid var(--border-paper);background:var(--bg-card)}
.decor-edit-bar label{width:135px;gap:3px;margin:0;font-size:12px}.decor-edit-bar input,.decor-edit-bar select{min-height:30px;font-size:12px}
.room-dialog{padding:26px;max-height:calc(100dvh - 28px);border-radius:8px;background:var(--bg-main);overflow:auto;overscroll-behavior:contain}
.room-dialog .dialog-head{gap:12px}.room-dialog .dialog-head small{font:9px var(--font-serif-en)}.room-dialog h2{font-size:23px;margin-top:7px}
.room-dialog button{font-size:14px}.room-dialog form>button[type="submit"]{width:100%;background:var(--bg-selected);margin-top:15px;border:1px solid var(--border-paper)}
.room-dialog .dialog-head>.icon{flex:none}.room-dialog::backdrop{background:rgba(58,42,51,.5);backdrop-filter:blur(12px)}
.inspector-dialog{width:1100px;max-width:calc(100% - 36px);background:transparent;border:0;box-shadow:none;padding:22px 36px 28px;color:#fff4f8;--text-body:#f1e2e9;--text-secondary:#d5bdc8;--text-primary:#fff4f8;--bg-hover:#ffeff718;--bg-selected:#ffeff725;--border-paper:#f1c3d244}
.inspector-dialog .dialog-head{margin-bottom:0}.inspector-dialog .dialog-head h2{font-size:21px}
.inspector-content{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(180px,1fr);gap:15px;align-items:center}
.inspector-stage{position:relative;height:470px;display:grid;place-items:center;perspective:1300px;touch-action:none;cursor:grab;min-width:0}
.inspector-stage.rotating{cursor:grabbing}
.book-turntable{width:240px;height:330px;position:relative;transform-style:preserve-3d;transition:transform .6s cubic-bezier(.2,.65,.25,1);will-change:transform}
.rotating .book-turntable{transition:none}
.inspected-book .cover-print small{font-size:12px}.inspected-book .cover-print h3{font-size:26px}.inspected-book .cover-number{font-size:23px}.inspected-book .cover-flower{font-size:70px}.inspected-book .cover-footnote{font-size:10px}.inspected-book .cover-rule{width:45px}
.inspected-book .face-spine>span{font-size:11px}.inspected-book .face-spine>b{font-size:19px}
.book-shadow{position:absolute;left:calc(50% - 100px);bottom:28px;width:200px;height:12px;box-shadow:0 0 35px 13px #6d4b5d25;border-radius:50%;transform:rotate(-5deg);pointer-events:none}
.cover-back-inscription{display:flex;height:100%;padding:38px 22px 25px;flex-direction:column;align-items:center;justify-content:space-between;text-align:center;color:#79616c}
.cover-back-inscription p{font-size:16px;line-height:1.8;max-height:130px;overflow:auto;color:inherit;white-space:pre-wrap}
.cover-back-inscription small{font:8px/1.8 var(--font-serif-en);color:inherit}
.cover-back-inscription code{font:8px/1.8 var(--font-mono);overflow-wrap:anywhere;width:100%;letter-spacing:0}
.wax-seal{display:grid;place-items:center;width:40px;height:40px;background:#d7acba;border-radius:50%;border:2px solid #e7c6d1;box-shadow:inset 1px 2px 3px #a4778a44;color:#fff4f6;margin:5px 0}.wax-seal svg{width:23px;height:23px}
.inspector-hud{position:relative;padding:0 16px 0 25px;color:var(--text-body);transform:translateY(var(--hud-shift,0px));transition:transform .4s;text-shadow:0 0 10px #d9aab750;min-width:0}
.inspector-hud::before{content:"";position:absolute;left:-35px;top:20px;width:42px;height:22px;border-top:.5px solid var(--primary-pink);border-left:.5px solid var(--primary-pink);transform:skewX(40deg);opacity:.7}
.inspector-hud>small{font:11px var(--font-serif-en)}.inspector-hud h3{font-size:23px;margin:14px 0 24px}.inspector-hud p{font-size:15px;line-height:1.9;margin:20px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.inspector-data{display:grid;grid-template-columns:1fr 1fr;gap:12px 20px;font:11px var(--font-serif-en);align-items:center}.inspector-data b{font-size:20px;font-weight:normal}
.inspector-hud .badge{background:none;border:0;padding:0;font-size:12px}
.inspector-commands{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;align-items:center;margin:0 auto}
.inspector-commands .segmented{border:0;background:var(--bg-hover);padding:3px;border-radius:6px}.inspector-commands .segmented button{border-radius:4px;font-size:13px;padding:10px}
.inspector-commands [aria-pressed="true"]{background:var(--bg-selected)}
.inspector-commands>button{font-size:13px}.inspector-commands>[data-inspector-read]{background:var(--bg-selected);border:1px solid var(--border-paper)}
.protruding-bookmark{position:absolute;left:calc(100% - 4px);width:32px;height:18px;min-width:0;min-height:0;padding:0 0 0 7px;background:var(--ribbon)!important;border:1px solid #ffffff66;border-radius:0 2px 2px 0;transform:translateZ(calc(var(--bd)/2 - var(--ribbon-depth)));color:#795e6b;box-shadow:1px 2px 3px #81647144;backface-visibility:visible;font-size:9px}
.protruding-bookmark:hover,.protruding-bookmark:focus-visible{width:39px;filter:brightness(1.1)}
.bookmark-preview{min-height:113px;margin-top:20px;max-height:170px;overflow:auto;text-shadow:none}
.bookmark-preview small{font-size:9px}.bookmark-preview p{font-size:13px;margin:6px 0;line-height:1.7}.bookmark-preview button{padding:4px 0;font-size:12px}
.book-opening{animation:book-lift-open .65s ease-in forwards}.book-opening .face-front{transform-origin:left center;transition:transform .6s;transform:translateZ(calc(var(--bd)/2)) rotateY(-130deg)}
.cover-editor-grid{display:grid;grid-template-columns:160px minmax(0,1fr);gap:24px}.cover-sample{height:226px;background:var(--bg-selected);display:grid;place-items:center;overflow:hidden;border:1px solid var(--border-paper)}.cover-sample img{width:100%;height:100%;object-fit:cover}.cover-sample span{font:9px var(--font-serif-en);text-align:center}
.cover-editor-grid label{font-size:14px}.cover-editor-grid textarea{font-size:14px;line-height:1.5}
.pool-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}.pool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:20px 0}.pool-grid>.empty{grid-column:1/-1}
.pool-item{position:relative;min-width:0}.pool-item img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:4px}.pool-item>span{display:block;font-size:11px;line-height:1.8;margin-top:4px}.pool-item button{position:absolute;right:3px;top:3px;background:var(--bg-card);padding:5px;min-width:28px;min-height:28px}.pool-item svg{width:13px;height:13px}
.keepsake-memory-image{height:260px;display:grid;place-items:center;margin:6px 0 22px}.keepsake-memory-image img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 5px 10px #8c687a22)}
.keepsake-story{white-space:pre-wrap;overflow-wrap:anywhere;font-size:17px;line-height:1.9;color:var(--text-body);margin-top:20px}
.memory-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.chapter-index{margin:22px 0 10px}.chapter-index summary{font-size:17px;color:var(--text-body);cursor:pointer;padding:12px 0;border-bottom:1px solid var(--border-paper)}.chapter-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 25px;padding:16px 0}.chapter-links button{justify-content:space-between;text-align:left;border-bottom:1px dashed var(--border-paper);border-radius:0;padding:12px 0;font-size:14px}.chapter-links small{font-size:10px}
@keyframes polaroid-breeze{0%,100%{transform:rotate(-7deg)}50%{transform:rotate(-5.5deg)}}
@keyframes scrapbook-snow{to{transform:translate(8px,170px);opacity:.1}}
@keyframes polaroid-sun{0%,100%{opacity:.2;transform:translateX(-15%)}50%{opacity:.9;transform:translateX(12%)}}
@keyframes keepsake-swing{0%,100%{transform:translate(-50%,0) scale(var(--item-scale)) rotate(-2deg)}50%{transform:translate(-50%,0) scale(var(--item-scale)) rotate(2deg)}}
@keyframes plush-hop{40%{transform:translate(-50%,calc(-85% - 6px)) scale(var(--item-scale))}70%{transform:translate(-50%,-85%) scale(var(--item-scale))}}
@keyframes crystal-twinkle{0%,100%{opacity:.2;filter:blur(.5px)}50%{opacity:1;filter:blur(0)}}
@keyframes book-lift-open{to{transform:translateY(-20px) rotateY(-35deg) scale(1.1)}}

/* Moonlit original lace: no dark corner strips or opaque trim underneath it. */
[data-theme="dark"]{--bg-main:#1A1518;--bg-card:rgba(38,30,35,.82);--bg-paper-inner:rgba(48,38,44,.88);--border-paper:rgba(224,176,188,.22);--lace-frame-color:rgba(38,30,35,.82);--lace-inner-color:rgba(48,38,44,.88);--lace-edge:rgba(224,176,188,.22);--lace-art-opacity:.22}
[data-theme="dark"] body{background-color:#1A1518;background-image:radial-gradient(ellipse at 24% 0,rgba(217,170,183,.045),transparent 65%)}
[data-theme="dark"] :is(.skin-card.lace-outer-card,.sidebar,.topbar,.workspace>footer,.drawer-head,.ornate-dialog-box,.ornate-command,.toolbar,.reader-filter,.reader-pager,#ai-form){background-image:none!important;background-color:rgba(38,30,35,.82);backdrop-filter:blur(16px)}
[data-theme="dark"] .lace-inner-paper,[data-theme="dark"] .ornate-dialog-box :is(input,textarea){background-image:none!important;background-color:rgba(48,38,44,.88)}
[data-theme="dark"] .skin-card.lace-outer-card::after{background-image:none!important;height:0!important;content:none!important}
[data-theme="dark"] :is(.skin-card.lace-outer-card,.ornate-dialog-box,.ornate-command,.toolbar,.reader-filter,.reader-pager,#ai-form)::before,
[data-theme="dark"] :is(.ornate-dialog-box,.ornate-command,.toolbar,.reader-filter,.reader-pager,#ai-form,.topbar)::after,
[data-theme="dark"] :is(.lace-inner-paper::before,.lace-crest,.lace-charms>span,.ai-conversation p::before,.pearl-bow,.profile-letter::before,.profile-letter::after){opacity:.22!important;filter:invert(.08) sepia(.35) hue-rotate(290deg) brightness(.85)!important;mix-blend-mode:screen!important}
[data-theme="dark"] .skin-card.lace-outer-card::before{background:var(--lace-wide-trim) left top/auto 60px repeat-x!important}
[data-theme="dark"] .skin-card.lace-outer-card{padding-bottom:28px}
[data-theme="dark"] .scrapbook-front{background:rgba(38,30,35,.5);box-shadow:0 6px 30px #0d090b33}
[data-theme="dark"] .scrapbook-front::before{opacity:.22;filter:invert(.08) sepia(.35) hue-rotate(290deg) brightness(.85);mix-blend-mode:screen}
[data-theme="dark"] .profile-letter{background:rgba(48,38,44,.88);border-color:var(--border-paper);outline-color:var(--border-paper);backdrop-filter:blur(16px)}
[data-theme="dark"] .chronicle-divider::before,[data-theme="dark"] .chronicle-divider::after{background:linear-gradient(90deg,transparent,#e0b0bc44)}
[data-theme="dark"] .polaroid{background:#d4c3c8;border-color:#96818c;box-shadow:0 8px 25px #09060866}
[data-theme="dark"] .polaroid-caption{color:#58474f}
[data-theme="dark"] .inspector-dialog{background:transparent;backdrop-filter:none}
[data-theme="dark"] .board-fallback{background:radial-gradient(circle,#181215 1.5px,#35282e 2.5px,#3b2e35 3.5px);background-size:23px 23px;box-shadow:inset 0 0 6px #79606c44,4px 12px 28px #0003}
[data-theme="dark"] .board-fallback i{background:#65525b;border-color:#403139}
[data-bows="false"] .pearl-bow{display:none}
@media(min-width:1450px){main[data-page="shelf"]{padding-top:30px}.pegboard-stage{height:600px}.scrapbook-spread{min-height:270px}}
@media(max-width:1000px){.scrapbook-front{padding:18px 26px}.profile-letter{padding:25px 22px 32px}.profile-lines button{font-size:14px}.profile-lines button:first-child{font-size:16px}.pegboard-stage{height:490px}.shelf-volume{width:85px;height:125px;left:calc(13% + var(--slot)*16%)}.shelf-volume .solid-book{--bw:78px;--bh:113px;--bd:22px}.floating-hud{right:10%}.floating-hud button{font-size:16px;gap:12px}.keepsake{width:100px;height:118px}.kind-hanging{width:65px;height:115px}.inspector-dialog{padding:22px}.inspector-content{grid-template-columns:1.3fr 1fr}.inspector-stage{height:450px}.inspector-hud{padding:0 8px 0 15px}.inspector-hud h3{font-size:20px}}
@media(max-width:760px){
  main[data-page="shelf"]{padding:17px 12px 30px}.scrapbook-front{padding:16px 12px 12px}.scrapbook-heading h1{font-size:24px}.scrapbook-heading h1 span{font-size:15px}.scrapbook-heading p{font-size:12px}.scrapbook-spread{grid-template-columns:1fr;gap:5px;max-width:460px}.polaroid-column{padding:17px 0 0;gap:16px}.polaroid-controls{gap:10px}.polaroid-controls button{width:32px;height:32px}.profile-letter{margin:6px 13px 18px;padding:24px 20px 36px}.profile-lines{gap:7px}.profile-lines button{font-size:14px;min-height:24px;padding:3px 0}.profile-lines button:first-child{font-size:17px}.profile-sticker{width:57px;height:71px;right:-12px;bottom:-19px}.profile-caption{font-size:9px}.chronicle-divider{font-size:9px;gap:7px;margin:24px 0 12px}.room-toolbar{padding:8px 7px 0;gap:4px;align-items:start}.room-toolbar h2{font-size:18px}.room-toolbar .eyebrow{font-size:8px}.room-toolbar .actions{gap:0;flex-wrap:nowrap}.room-toolbar button{width:36px;height:36px;padding:7px;min-width:36px;min-height:36px}.room-toolbar button span{display:none}.room-toolbar svg{width:17px;height:17px}
  .pegboard-stage{height:360px;margin-top:8px}.floating-hud{right:11%;top:5%;gap:1px}.floating-hud button{font-size:13px;gap:10px;min-height:22px;padding:3px 0}.floating-hud small{font-size:6px}.floating-hud button::before{width:20px;left:-25px;height:7px;top:10px}.shelf-volume{left:calc(14% + var(--slot)*15%);top:calc(27% + var(--row)*34%);width:49px;height:80px}.shelf-volume .solid-book{--bw:46px;--bh:69px;--bd:14px}.shelf-volume .cover-print h3{font-size:7px;margin:2px 0}.shelf-volume .cover-print small{font-size:4px}.shelf-volume .cover-number{font-size:6px}.shelf-volume .cover-flower{font-size:15px}.shelf-volume .cover-footnote{font-size:3px}.shelf-volume .cover-rule{margin-bottom:3px;width:12px}.shelf-volume .face-spine>span{font-size:4px}.shelf-volume .face-spine>b{font-size:6px}.shelf-volume .face-spine small{font-size:5px}.shelf-volume-label{font-size:7px;bottom:-13px}.shelf-ribbon{width:10px;height:6px;right:-8px}
  .keepsake{width:65px;height:78px}.kind-hanging{width:43px;height:85px}.room-board-mark{font-size:5px;bottom:10%}.room-footer{padding:0 7px;gap:3px}.room-footer>span{font-size:8px}.room-footer button{font-size:12px;padding:6px;min-width:32px}.room-footer .actions{gap:1px}.room-footer small{font-size:9px}.room-empty{font-size:11px;left:10%;top:35%;width:45%}.room-empty button{font-size:11px;padding:5px}.room-empty p{font-size:12px;line-height:1.6}.decor-edit-bar{padding:10px 0;gap:6px}.decor-edit-bar button{padding:8px;font-size:12px;min-width:36px}.decor-edit-bar label{width:120px}
  .room-dialog{padding:18px;max-width:calc(100% - 20px)}.room-dialog h2{font-size:21px}.room-dialog .dialog-head{margin-bottom:8px}.room-dialog .dialog-head>.icon{width:36px;height:36px;min-width:36px;min-height:36px}.inspector-dialog{padding:16px 14px 20px;max-width:calc(100% - 16px)}.inspector-content{grid-template-columns:minmax(0,1fr);gap:0}.inspector-stage{height:365px;perspective:1000px}.book-turntable{width:192px;height:264px}.inspected-book{--bw:192px;--bh:264px;--bd:32px}.inspected-book .cover-print h3{font-size:21px}.inspected-book .cover-print small{font-size:9px}.inspected-book .cover-print .cover-number{font-size:18px}.inspected-book .cover-print .cover-flower{font-size:54px}.inspected-book .cover-print .cover-footnote{font-size:8px}.cover-back-inscription{padding:26px 17px 20px}.cover-back-inscription p{font-size:13px;max-height:86px}.cover-back-inscription code{font-size:7px}.cover-back-inscription small{font-size:7px}.cover-back-inscription .wax-seal{width:31px;height:31px}.wax-seal svg{width:18px;height:18px}.inspector-hud{padding:0 10px 8px;transform:none}.inspector-hud::before{display:none}.inspector-hud>small{font-size:10px}.inspector-hud h3{font-size:19px;margin:10px 0}.inspector-data{grid-template-columns:auto 1fr auto 1fr;gap:9px;font-size:9px}.inspector-data b{font-size:17px}.inspector-hud>p{font-size:13px;margin:10px 0}.bookmark-preview{min-height:0;margin-top:10px}.bookmark-preview:empty{display:none}.inspector-commands{gap:4px;margin-top:10px}.inspector-commands .segmented{width:100%;justify-content:center}.inspector-commands .segmented button{font-size:12px;padding:9px 6px;flex:1;gap:4px;min-width:0}.inspector-commands .segmented svg{width:14px;height:14px}.inspector-commands>button{font-size:12px;padding:10px;min-width:0}.cover-editor-grid{grid-template-columns:90px minmax(0,1fr);gap:13px}.cover-sample{height:135px}.cover-editor-grid input,.cover-editor-grid select{padding:9px;font-size:14px!important}.pool-grid{gap:10px}.pool-summary{font-size:11px}.pool-summary button{font-size:12px;padding:6px}.keepsake-memory-image{height:210px}.keepsake-story{font-size:16px}.memory-fields{gap:10px}.chapter-links{grid-template-columns:1fr}.chapter-links button{font-size:15px}
}
@media(max-width:359px){.profile-letter{margin-left:7px;margin-right:7px;padding-left:16px;padding-right:16px}.profile-lines button{font-size:12px}.profile-lines button:first-child{font-size:15px}.profile-sticker{width:48px;height:58px}.profile-caption{font-size:8px}.chronicle-divider{font-size:8px}.pegboard-stage{height:330px}.shelf-volume{width:43px}.shelf-volume .solid-book{--bw:40px;--bh:62px;--bd:12px}.keepsake{width:57px;height:68px}.kind-hanging{width:38px;height:75px}.room-toolbar h2{font-size:17px}.floating-hud{right:10%;top:6%}.floating-hud button{font-size:11px}.floating-hud small{font-size:5px}.inspector-data{gap:5px;font-size:8px}.inspector-data b{font-size:15px}}
@media(prefers-reduced-motion:reduce){.polaroid,.polaroid-atmosphere,.polaroid-atmosphere i,.keepsake,.crystal-stars,.book-opening{animation:none!important}.book-turntable,.solid-book{transition:none!important}}
