.book>aside{position:relative;padding:0 0 0 116px;overflow:hidden;background:transparent;box-shadow:none}
.bookmark-tabs{position:absolute;top:38px;left:0;width:117px;display:flex;flex-direction:column;gap:10px;z-index:1}
.bookmark-tabs button{min-height:56px;padding:12px 9px;text-align:center;font-size:13px;line-height:1.35;border:1px solid #dedede;border-radius:10px 0 0 10px;background:#fff;color:#656565;box-shadow:none;overflow-wrap:break-word}
.bookmark-tabs button[aria-selected=true]{color:#000;border-color:#000;border-right-color:#fff;font-weight:650}
.bookmark-content{height:100%;padding:34px;background:#fff;border:1px solid #dedede;overflow-y:auto;box-shadow:inset -12px 0 22px -24px #00000050}
.bookmark-panel[hidden]{display:none!important}
.bookmark-panel>h1{font-size:28px;line-height:1.3;margin:0 0 28px;font-weight:650}
.bookmark-panel>.studio-tools{border:0;padding:0;margin:0}
.bookmark-panel>.studio-tools>summary,.bookmark-panel>details:has(#sources)>summary{display:none}
.bookmark-panel>.wallpaper-settings{margin:0}
.bookmark-panel>.wallpaper-settings>h2,#panel-widgets>h2{display:none}
.bookmark-panel select{width:100%}
@media(max-width:759px){.book>aside,body[data-panel=edit] .book>aside{padding:0;min-height:0;height:auto;overflow:visible}.bookmark-tabs{position:static;width:100%;display:flex;flex-direction:row;gap:4px;padding:0 0 8px;overflow-x:auto}.bookmark-tabs button{flex:1;min-width:0;min-height:48px;border-radius:8px;font-size:11px;padding:8px 5px}.bookmark-tabs button[aria-selected=true]{border-color:#000}.bookmark-content{height:auto;min-height:600px;padding:24px;overflow:visible}.bookmark-panel>h1{font-size:24px}}
@media print{.bookmark-tabs,.bookmark-content{display:none!important}}

.studio-toolbar{display:none!important}
.book-viewport{margin-top:28px}
#panel-output .top-actions{display:flex;flex-direction:column;align-items:stretch;gap:16px;width:100%}
#panel-output .top-actions>select,#panel-output .top-actions>button,#panel-output .save-menu>summary{width:100%;max-width:none;min-height:44px;margin:0;padding:12px 14px;font-size:14px;border:1px solid #dedede;border-radius:8px;background:#fff;color:#252525}
#panel-output .save-menu{margin:0;font-size:14px}
#panel-output .save-menu>summary{display:flex;align-items:center;justify-content:space-between}
#panel-output .save-options{width:100%}
#panel-output #guides[aria-pressed=true]{border-color:#000;background:#fff;color:#252525}
@media(max-width:759px){.bookmark-tabs button{flex:0 0 auto;min-width:68px}.bookmark-tabs{overflow-x:auto}.book-viewport{margin-top:16px}}

#panel-format>select{width:100%;min-height:48px;padding:12px 14px;border:1px solid #dedede;border-radius:8px;background:#fff;color:#252525;font-size:16px}
#panel-widgets>#guides{margin:0 0 18px;background:#fff;color:#252525;border-color:#dedede}
#panel-widgets>#guides[aria-pressed=true]{border-color:#000}
#panel-save>.save-menu{margin:0;font-size:16px}
#panel-save>.save-menu>summary{display:flex;align-items:center;justify-content:space-between;min-height:48px}
#panel-save .save-options{width:100%}
/* A clear paper edge frames the full editor page, independent of its content. */
.bookmark-content{border:1px solid #bdbdbd;box-shadow:0 2px 8px rgba(0,0,0,.035);background:#fff}
.bookmark-tabs button[aria-selected=true]{border-right-color:#fff}

/* The paper itself is A4 (210:297); bookmarks occupy an external gutter. */
@media screen{.book-viewport{max-width:1572px}main.book{width:1572px;grid-template-columns:836px 720px}.book>aside{width:836px;height:calc(720px * 297 / 210);padding:0 0 0 116px}.bookmark-content{width:720px;height:calc(720px * 297 / 210);min-height:0;box-sizing:border-box}.book>.workspace{height:calc(720px * 297 / 210)}}
@media screen and (max-width:759px){main.book{width:720px!important}.book>aside,body[data-panel=edit] .book>aside{width:720px;height:auto;min-height:0;padding:0}.bookmark-content{width:720px;height:calc(720px * 297 / 210);min-height:0;overflow-y:auto}.bookmark-tabs{position:static;width:720px}.bookmark-tabs button[aria-selected=true]{border-right-color:#000}}
/* Flat sheets: fixed editor, adjacent preview with a constant gutter. */
@media screen{main.book{grid-template-columns:836px var(--preview-width);gap:16px}.book>.workspace{width:var(--preview-width)}.book .paper-shell{margin-inline:0}.book .paper,.bookmark-content,.book>aside{box-shadow:none}.book .paper{outline:1px solid #bdbdbd;outline-offset:-1px}.bookmark-content{border:1px solid #bdbdbd;background:#fff}}
@media screen and (max-width:759px){.book .workspace{width:720px}.book .paper-shell{margin-inline:auto}}
/* Widget gallery cards use the page background, with borders only. */
.book #library .library-item{background:transparent;box-shadow:none}
/* Two fixed, symmetric A4 slots; portrait artwork is centered in the right slot. */
@media screen{main.book{grid-template-columns:836px 720px;width:1572px;gap:16px}.book>.workspace{width:720px;height:calc(720px * 297 / 210)}.book .paper-shell{margin-inline:auto}}

.book #library .library-item[hidden],.book #library .gallery-heading[hidden]{display:none!important}
.widget-filter{margin:16px 0}.widget-filter label{font-size:13px;margin-bottom:6px}.widget-filter select{background:#fff;border-color:#dedede}
#panel-widgets>.template-picker{margin:0 0 16px;padding:12px 0;border-bottom:1px solid #dedede}
#panel-widgets>.template-picker>summary{display:list-item;font-size:14px;font-weight:600;cursor:pointer}
#panel-widgets>.template-picker>label{display:none}
