.shelf3d-room{position:relative;background:none;box-shadow:none;border:0}
.decor-switcher{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:7px 12px;color:var(--text-secondary);font-size:12px}
.decor-switcher label{display:flex;gap:10px;align-items:center;margin:0;min-width:0}.decor-switcher select{width:210px;max-width:100%;padding:6px;font-size:12px}.decor-switcher button{padding:6px}.decor-switcher svg{width:16px;height:16px}.decor-switcher output{font-size:11px}.decor-switcher.settings-section{display:block}.decor-switcher.settings-section label{margin:12px 0}
.three-inspector-dialog:has(.hat-workshop){width:min(1240px,97vw)}
.three-inspector-dialog:has(.hat-workshop) .three-inspector-body{grid-template-columns:minmax(0,1fr) 290px;align-items:start}
.three-inspector-dialog:has(.hat-workshop) #three-inspector-stage{position:sticky;top:0;height:600px}
.three-inspector-dialog:has(.keepsake-controls) .three-inspector-hud{padding:8px 0;align-self:start;min-width:0}
.keepsake-controls{font-size:12px;line-height:1.6}.keepsake-controls label{display:block;margin:10px 0;font-size:12px}.keepsake-controls input,.keepsake-controls select,.keepsake-controls textarea{max-width:100%;width:100%;box-sizing:border-box;font:12px/1.6 var(--font-body,sans-serif);padding:7px;border-radius:4px;letter-spacing:0}.keepsake-controls textarea{resize:vertical;min-height:60px}.keepsake-controls input[type=checkbox]{width:14px;height:14px;margin:0 5px 0 0;vertical-align:middle}.keepsake-toggle{display:flex;gap:10px;flex-wrap:wrap}.keepsake-toggle label{white-space:nowrap;margin:5px 0}.companion-state{font-size:11px;color:var(--text-secondary);display:block}.keepsake-controls summary{cursor:pointer;padding:6px 0;border-bottom:1px solid #b8a9ac55}.hat-workshop{border-top:1px solid #b8a9ac55;margin-top:12px;padding-top:5px}.hat-modes{display:flex;gap:4px;margin:8px 0}.hat-modes button{font-size:12px;padding:7px;flex:1;white-space:normal}.keepsake-controls .keepsake-upload{font-size:12px;padding:6px;min-height:29px;display:inline-flex;gap:6px;align-items:center}.keepsake-upload svg{width:14px;height:14px}.fabric-swatches{display:grid;grid-template-columns:repeat(6,34px);justify-content:space-between;gap:8px;border:0;padding:5px 0;margin:0}.fabric-swatches legend{padding:6px 0;font-size:12px}.fabric-swatches button{width:34px;height:34px;min-height:34px;padding:3px;border:1px solid #a89ba155;border-radius:50%;background:transparent;box-shadow:none;display:grid;place-items:center}.fabric-swatches button span{width:24px;height:24px;border-radius:50%;background:var(--fabric-a);box-shadow:inset 0 1px 4px #302b3030}.fabric-swatches button[data-fabric-swatch*=stripe] span{background:repeating-linear-gradient(0deg,var(--fabric-a) 0 5px,var(--fabric-b) 5px 10px)}.fabric-swatches button[data-fabric-swatch=houndstooth] span,.fabric-swatches button[data-fabric-swatch=diamond] span{background:repeating-conic-gradient(var(--fabric-a) 0% 25%,var(--fabric-b) 0% 50%) 50% / 9px 9px}.fabric-swatches button[aria-pressed=true]{border:2px solid #ae7d90;outline:2px solid #cfb4bf33}.fabric-swatches button svg{width:16px;height:16px}.hat-calibration fieldset{border:0;padding:0;display:flex;gap:5px}.hat-calibration legend{font-size:11px}.hat-calibration label{display:flex;gap:3px;align-items:center;min-width:0;margin:3px 0}.hat-calibration input{width:65px;padding:4px}.keepsake-save-state{font-size:11px;display:block;min-height:20px;margin-top:8px;color:var(--text-secondary);cursor:pointer}#fabric-name{display:block;font-size:11px}#three-inspector-canvas[data-pet-mode=true]{cursor:grab}
@media(max-width:760px){.three-inspector-dialog:has(.hat-workshop) .three-inspector-body{grid-template-columns:1fr}.three-inspector-dialog:has(.hat-workshop) #three-inspector-stage{position:relative;height:370px}.keepsake-controls{max-width:420px;margin:auto}.fabric-swatches{grid-template-columns:repeat(7,34px)}.decor-switcher{padding:4px;gap:4px}.decor-switcher label{gap:5px;flex:1}.decor-switcher select{width:auto;min-width:0;flex:1}.three-inspector-dialog:has(.hat-workshop){max-height:94dvh}.hat-calibration input{width:75px}.three-inspector-dialog:has(.hat-workshop) .three-inspector-hud{padding:0 5px}}
.shelf-overview{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:18px;padding:18px 12px}
.shelf-overview .floating-hud{position:static;gap:3px;min-width:0}
.shelf-overview .shelf-book-actions{position:static;transform:none;flex-wrap:wrap;max-width:100%;width:auto;white-space:normal}
.shelf3d-stage{position:relative;width:100%;height:490px;isolation:isolate}
#shelf3d-canvas{display:block;width:100%;height:100%;touch-action:pan-y;outline:none}
.shelf3d-status{position:absolute;left:0;right:0;top:45%;text-align:center;font-size:14px;pointer-events:none}
.shelf3d-stage .floating-hud{top:20px;right:28px;gap:1px;pointer-events:auto}
.shelf3d-stage .floating-hud button{font-size:15px;min-height:24px;gap:20px;padding:3px 0;opacity:.7}
.shelf3d-stage .floating-hud small{font-size:8px}
.shelf-book-actions{position:absolute;display:flex;gap:3px;align-items:center;z-index:60;pointer-events:auto;touch-action:manipulation;transform:translate(-50%,-100%);white-space:nowrap}
.shelf-book-actions[hidden],.shelf-editor[hidden]{display:none}
.shelf-book-actions button{font-size:12px;padding:7px 9px;min-height:30px;border:1px solid #ddcbbd77;background:#fffdfaab;backdrop-filter:blur(8px);border-radius:24px;box-shadow:0 2px 12px #e8c8c433}
.shelf-book-actions svg{width:13px;height:13px}
.shelf3d-access{position:absolute;left:10px;bottom:5px;display:flex;gap:4px;max-width:90%;overflow:auto;opacity:0;pointer-events:none}
.shelf3d-access:focus-within{opacity:1;pointer-events:auto}
.shelf3d-access button{font-size:12px;white-space:nowrap;pointer-events:auto}
.shelf-editor{display:flex;gap:10px;flex-wrap:wrap;align-items:center;padding:12px 18px;border-top:1px solid #d8c5ca66;border-bottom:1px solid #d8c5ca66;background:#fffaf933;font-size:13px}
.shelf-editor button{font-size:13px;padding:8px}.shelf-editor svg{width:15px;height:15px}
.shelf-editor select{width:150px;max-width:100%;padding:7px}
.shelf-transform-fields{display:flex;gap:5px}.shelf-transform-fields label{display:flex;flex-direction:row;align-items:center;gap:4px;margin:0;font-size:11px}
.shelf-transform-fields input{width:62px;padding:6px;font:12px var(--font-serif-en)}
#shelf-save-state{font-size:12px;color:var(--text-secondary)}
.three-inspector-dialog{width:min(1100px,96vw);max-width:96vw;border:1px solid #dbc9c044;background:rgba(255,251,249,.95);backdrop-filter:blur(20px);padding:22px;border-radius:8px;overflow:auto;max-height:95dvh}
.three-inspector-dialog[open]{animation:inspect-arrive .28s ease-out}
@keyframes inspect-arrive{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
 .petting-hint{flex-shrink:0;margin:8px 6px 0;text-align:center;font-size:11px;line-height:1.5;color:#ae8392;min-height:17px;overflow-wrap:anywhere}
 .petting-hint[hidden]{display:block;visibility:hidden}
 #keepsake-pet{border-radius:24px;justify-content:center;min-width:210px}
 .three-inspector-dialog #keepsake-pet>span{display:inline!important;margin:0!important;font-size:12px}
 #keepsake-pet[aria-pressed=true]{background:#f8dbe5;color:#98536e;box-shadow:inset 0 0 0 1px #efc1d1}
 #keepsake-pet[aria-pressed=true] svg{fill:currentColor;animation:pet-heartbeat 1.8s ease-in-out infinite}
 .three-inspector-dialog #three-inspector-canvas[data-pet-mode=true]{cursor:pointer}
 @keyframes pet-heartbeat{0%,100%{transform:scale(1)}35%{transform:scale(1.15)}55%{transform:scale(1.03)}}
 @media(prefers-reduced-motion:reduce){#keepsake-pet[aria-pressed=true] svg{animation:none}}
 @media(max-width:760px){.three-inspector-dialog[data-inspector-kind=decor] .inspector-commands:has(#keepsake-pet){display:grid;grid-template-columns:1fr 1fr;justify-items:center;border-radius:8px;width:100%;box-sizing:border-box}.three-inspector-dialog #keepsake-pet{grid-column:1/-1;white-space:normal;min-height:36px;min-width:0;width:100%}.petting-hint{font-size:10px;margin-top:4px}}
@media(prefers-reduced-motion:reduce){.three-inspector-dialog[open]{animation:none}}
.three-inspector-body{display:grid;grid-template-columns:minmax(0,1fr) 210px;min-height:490px;gap:20px}
#three-inspector-stage{position:relative;min-width:0;height:490px}
#three-inspector-canvas{width:100%;height:100%;display:block;touch-action:none;cursor:grab;outline:none}
#three-inspector-canvas:active{cursor:grabbing}
.three-inspector-hud{padding:80px 4px 15px;font-size:14px;color:var(--text-secondary);align-self:center}
.three-inspector-hud h3{font-size:23px;line-height:1.5;color:var(--text-primary);margin:12px 0}
.three-inspector-hud small{font:9px/1.8 var(--font-serif-en)}
.three-inspector-hud code{display:block;overflow-wrap:anywhere;font:10px/1.8 monospace;margin-top:10px;color:#9a817b}
.three-inspector-dialog[data-inspector-kind="decor"] .segmented{display:flex;flex-wrap:wrap;justify-content:center}
.three-inspector-dialog[data-inspector-kind="decor"] .segmented button{white-space:nowrap;min-width:0}
.three-inspector-dialog .segmented button[aria-pressed="true"]{background:var(--bg-card,#fff7f8);box-shadow:0 1px 4px #a87f8926;color:var(--text-primary)}
#three-bookmark-echo{position:absolute;right:0;bottom:32px;width:230px;max-width:75%;padding:8px 2px 8px 15px;border-left:1px solid #bd9894;color:var(--text-body);background:#fffcfae0;font-size:13px;line-height:1.7}
#three-bookmark-echo::before{content:'';position:absolute;right:100%;top:0;width:55px;border-top:1px solid #bd9894;transform:rotate(20deg);transform-origin:right}
#three-bookmark-echo p{margin:6px 0;max-height:140px;overflow:auto}#three-bookmark-echo small{font-size:10px}#three-bookmark-echo button{font-size:12px}
[data-theme="dark"] .three-inspector-dialog{background:#30262df5}
[data-theme="dark"] .shelf-book-actions button,[data-theme="dark"] #three-bookmark-echo{background:#382e36ed}
@media(min-width:1600px){.shelf3d-stage{height:540px}}
@media(max-width:760px){.shelf3d-stage{height:390px}.shelf3d-room .room-toolbar{padding:8px 4px;align-items:flex-start}.shelf3d-room .room-toolbar h2{font-size:18px}.shelf3d-room .room-toolbar .actions{justify-content:flex-end;gap:2px;flex-wrap:wrap}.shelf3d-room .room-toolbar button{padding:6px;font-size:11px}.shelf3d-room .room-toolbar .eyebrow{font-size:7px}.shelf3d-stage .floating-hud{right:12px;top:4px}.shelf3d-stage .floating-hud button{font-size:12px;min-height:19px}.shelf3d-stage .floating-hud small{font-size:7px}.three-inspector-dialog{padding:12px}.three-inspector-body{grid-template-columns:1fr;gap:0;min-height:0}#three-inspector-stage{height:400px}.three-inspector-hud{padding:0 10px;display:block}.three-inspector-hud h3{font-size:18px;margin:4px 0}.three-inspector-hud code{font-size:9px}.three-inspector-hud p{margin:6px 0}.three-inspector-dialog .inspector-commands{flex-wrap:wrap;justify-content:center;gap:6px}.three-inspector-dialog .inspector-commands button{font-size:12px;padding:7px}.shelf-editor{padding:8px 4px;gap:6px}.shelf-book-actions button{font-size:10px;padding:6px}.shelf-book-actions{gap:2px}.shelf-book-actions svg{width:12px}}
@media(max-width:400px){.shelf3d-stage{height:340px}#three-inspector-stage{height:330px}.shelf3d-room .room-toolbar button span{font-size:10px}.shelf3d-room .room-toolbar .actions{max-width:180px}.shelf3d-room .room-toolbar h2{font-size:16px}}
@media(max-width:768px){.shelf-overview{display:flex;flex-direction:column;align-items:stretch;gap:20px;padding:16px 8px}.shelf-overview .floating-hud{align-self:center;pointer-events:none;width:min(280px,100%)}.shelf-overview .floating-hud button{pointer-events:none;gap:12px;font-size:14px;min-height:25px}.shelf-overview .floating-hud small{font-size:8px}.shelf-overview .floating-hud button::before{display:none}.shelf-overview .shelf-book-actions{align-self:center;justify-content:center;gap:5px}.shelf-overview .shelf-book-actions button{min-height:40px;padding:8px 9px;font-size:12px}.shelf-overview .gallery-transfer{max-width:100%;flex-basis:100%}}
.keepsake-controls[hidden],.keepsake-serene[hidden]{display:none!important}
.three-inspector-dialog[data-inspector-kind=decor]{width:min(1100px,96vw);overflow:hidden;display:flex;flex-direction:column;max-height:94dvh}
.three-inspector-dialog[data-inspector-kind=decor]:not([open]){display:none}
.three-inspector-dialog[data-inspector-kind=decor] .three-inspector-body{grid-template-columns:minmax(0,1fr) 280px;align-items:center;min-height:0;flex:1;overflow:hidden}
.three-inspector-dialog[data-inspector-kind=decor] #three-inspector-stage{position:relative;top:auto;height:min(60dvh,560px)}
.three-inspector-dialog[data-inspector-kind=decor] .three-inspector-hud{align-self:center;padding:20px 12px;min-width:0;max-height:100%;overflow:hidden}
.keepsake-serene{font-family:"ChillKai",serif;line-height:1.95;cursor:pointer;outline-offset:6px;overflow-wrap:anywhere}
.keepsake-serene h3{font-size:23px;font-weight:400}.keepsake-serene p{white-space:pre-wrap;color:var(--text-secondary);opacity:.78;font-size:15px;margin:20px 0}.keepsake-serene .keepsake-date{font-size:12px;opacity:.58}.keepsake-serene .keepsake-signature-text{font-size:14px;opacity:.65}.keepsake-serene p:empty{display:none}
.three-inspector-dialog[data-keepsake-editing=true] .three-inspector-hud{align-self:stretch;overflow-y:auto;scrollbar-width:thin;animation:inspect-arrive .22s ease-out}
.keepsake-controls #keepsake-done{position:sticky;top:0;z-index:2;font-size:12px;background:var(--bg-card,#fff9f8)}
.three-inspector-dialog[data-inspector-kind=decor] .inspector-commands{flex-shrink:0;gap:2px;padding:5px 10px;margin:12px auto 0;border:1px solid #c8b6ba44;border-radius:32px;background:var(--bg-card,#fffaf8);box-shadow:0 4px 20px #987d8910}
.three-inspector-dialog[data-inspector-kind=decor] .inspector-commands>button,.keepsake-hat-menu summary{font-size:13px;padding:9px 13px;min-height:40px;border:0;background:none;box-shadow:none;cursor:pointer;display:flex;gap:6px;align-items:center;color:inherit}
.three-inspector-dialog[data-inspector-kind=decor] .inspector-commands .segmented{background:none;gap:0;padding:0}
.keepsake-hat-menu{position:relative}.keepsake-hat-menu summary{list-style:none}.keepsake-hat-menu summary::-webkit-details-marker{display:none}.keepsake-hat-menu svg{width:15px;height:15px}.keepsake-hat-menu>div{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);z-index:3;min-width:165px;padding:6px;background:var(--bg-card,#fffaf8);border:1px solid #c8b6ba66;border-radius:8px;box-shadow:0 8px 24px #76556222}.keepsake-hat-menu>div button{display:block;width:100%;font-size:13px;padding:9px;white-space:nowrap;background:none;border:0;box-shadow:none}
.shelf-book-actions button,.shelf-book-actions select{pointer-events:auto;touch-action:manipulation;min-height:40px}
@media(max-width:760px){.three-inspector-dialog[data-inspector-kind=decor]{padding:12px;width:calc(100% - 20px)}.three-inspector-dialog[data-inspector-kind=decor] .three-inspector-body{grid-template-columns:1fr;overflow:hidden}.three-inspector-dialog[data-inspector-kind=decor] #three-inspector-stage{height:min(42dvh,350px);min-height:180px}.three-inspector-dialog[data-inspector-kind=decor] .three-inspector-hud{padding:0 14px;max-height:27dvh}.keepsake-serene h3{font-size:20px}.keepsake-serene p{font-size:13px;line-height:1.75;margin:8px 0}.keepsake-serene .keepsake-signature-text{font-size:12px}.three-inspector-dialog[data-inspector-kind=decor] .inspector-commands{gap:0;padding:3px;flex-wrap:nowrap;max-width:100%;margin-top:8px}.three-inspector-dialog[data-inspector-kind=decor] .inspector-commands>button,.keepsake-hat-menu summary{font-size:11px;padding:7px 8px;gap:4px;white-space:nowrap}.three-inspector-dialog[data-inspector-kind=decor] .inspector-commands .segmented{width:auto;flex-wrap:nowrap}.three-inspector-dialog[data-inspector-kind=decor] .segmented button{font-size:11px;padding:7px}.fabric-swatches{grid-template-columns:repeat(7,28px);gap:6px}.fabric-swatches button{width:28px;height:28px;min-height:28px}.fabric-swatches button span{width:20px;height:20px}.shelf-book-actions{max-width:calc(100% - 12px);width:max-content}.shelf-book-actions button{font-size:11px;padding:6px}.shelf-book-actions .gallery-transfer{flex-basis:100%;max-width:160px;font-size:11px!important;padding:4px!important}}
