/* Final responsive layout for existing menus/editors, shared across both areas. */
body{--rac-nav-width:232px;--rac-header-height:58px;--rac-visual-height:100dvh}
body.rac-wide-nav:not(.rac-nav-collapsed)>main,body.rac-wide-nav:not(.rac-nav-collapsed).studio-active>main{margin-left:var(--rac-nav-width)!important;width:calc(100% - var(--rac-nav-width))!important;max-width:none!important;box-sizing:border-box}
body.rac-wide-nav #menuDrawer{position:fixed!important;left:0!important;right:auto!important;top:var(--rac-header-height)!important;bottom:0!important;width:var(--rac-nav-width)!important;height:auto!important;max-height:none!important;box-sizing:border-box;border-radius:0!important;transform:none!important;visibility:visible!important;opacity:1!important;z-index:80;overflow-y:auto;overscroll-behavior:contain;padding:12px!important}
body.rac-wide-nav.rac-nav-collapsed #menuDrawer{display:none!important}
body.rac-wide-nav #menuBackdrop{display:none!important}
body.rac-wide-nav #menuDrawer button{white-space:normal;text-align:left;min-height:44px}
body.rac-wide-nav #menuDrawer .menu-head{position:sticky;top:-12px;background:#101b29;z-index:1;padding:8px 0}
body.rac-wide-nav:not(.rac-nav-collapsed)>main>.view{max-width:1600px;margin-inline:auto}
body.rac-side-tools.studio-layout-active .studio-workspace,body.rac-side-tools.studio-active .studio-workspace{display:grid!important;grid-template-columns:minmax(0,1fr) clamp(252px,28vw,360px)!important;grid-template-rows:minmax(0,1fr)!important;min-height:0!important;overflow:hidden!important}
body.rac-side-tools.studio-layout-active .studio-dock,body.rac-side-tools.studio-active .studio-dock{position:relative!important;inset:auto!important;grid-column:2!important;grid-row:1!important;width:100%!important;height:100%!important;max-height:100%!important;min-height:0!important;border-radius:14px 0 0 14px!important;overflow:hidden!important;display:flex;flex-direction:column}
body.rac-side-tools.studio-layout-active .studio-dock.calm-collapsed,body.rac-side-tools.studio-active .studio-dock.calm-collapsed{max-height:100%!important}
body.rac-side-tools.studio-active .studio-dock-content{min-height:0!important;flex:1;overflow-y:auto!important;overscroll-behavior:contain;padding-bottom:16px!important}
body.rac-side-tools.studio-active .studio-page-actions{position:relative!important;inset:auto!important;flex:none;z-index:1!important}
body.rac-side-tools.studio-active .studio-stage,body.rac-side-tools.studio-layout-active .studio-stage{grid-column:1!important;grid-row:1!important;min-width:0!important;min-height:0!important;height:100%!important;padding:8px!important;overflow:hidden!important}
body.rac-side-tools.studio-layout-active .studio-paper-wrap.editing{width:100%!important;max-width:none!important;height:100%!important;margin:0!important}
body.rac-side-tools.studio-active .studio-workspace{height:calc(var(--rac-visual-height) - 166px)}
body.rac-side-tools.studio-layout-active .rac-studio{height:var(--rac-visual-height)!important}
body:not(.rac-side-tools).studio-layout-active .studio-workspace{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important}
body:not(.rac-side-tools).studio-layout-active .studio-dock{grid-column:1!important;grid-row:2!important;max-height:46dvh!important}
body:not(.rac-side-tools).studio-layout-active .studio-dock.calm-collapsed{max-height:130px!important}
body.rac-side-tools .book-workbench:not(.book-workbench-focus) .book-workbench-panes{display:grid!important;grid-template-columns:minmax(0,1fr) clamp(240px,27vw,310px)!important;align-items:start}
body.rac-side-tools .book-workbench:not(.book-workbench-focus)[data-pane=chapters] .book-workbench-panes{grid-template-columns:clamp(210px,24vw,260px) minmax(0,1fr)!important}
body.rac-side-tools .book-workbench:not(.book-workbench-focus)[data-pane=manuscript] .book-workbench-panes{grid-template-columns:minmax(0,1fr)!important}
body.rac-side-tools .book-workbench .book-chapter-editor{display:grid!important;grid-column:1;grid-row:1;min-width:0}
body.rac-side-tools .book-workbench[data-pane=chapters] .book-chapter-editor{grid-column:2}
body.rac-side-tools .book-workbench .book-workbench-tools{grid-column:2;grid-row:1;align-self:start;height:auto;max-height:none;overflow:visible;position:static;box-sizing:border-box}
body.rac-side-tools .book-workbench .book-chapter-overview{max-height:calc(var(--rac-visual-height) - 180px);overflow-y:auto;overscroll-behavior:contain}
body.rac-side-tools .book-dtp-shell{display:grid!important;grid-template-rows:auto auto minmax(0,1fr) auto!important;height:100%!important;min-height:0!important}
body.rac-side-tools .book-dtp-workspace{display:grid!important;grid-template-columns:minmax(0,1fr) clamp(240px,29vw,340px)!important;min-height:0!important;overflow:hidden!important}
body.rac-side-tools .book-dtp-tools{position:relative!important;inset:auto!important;width:100%!important;max-width:none!important;height:100%!important;max-height:100%!important;transform:none!important;overflow-y:auto!important;overscroll-behavior:contain}
body.rac-side-tools .book-dtp-canvas-wrap{min-height:0!important;overflow:auto!important}
body.rac-side-tools .book-dtp-mobile-bar{display:none!important}
body.rac-side-tools .book-dtp-page{max-width:100%!important}
body.rac-compact-landscape .studio-head{height:46px!important;min-height:46px!important;padding:4px 10px!important}
body.rac-compact-landscape .studio-pagebar{height:44px!important;min-height:44px!important;padding:3px 8px!important;gap:5px}
body.rac-compact-landscape .studio-head .eyebrow,body.rac-compact-landscape .studio-guide{display:none!important}
body.rac-compact-landscape .studio-workspace{height:calc(var(--rac-visual-height) - 90px)!important}
body.rac-compact-landscape .studio-dock-title{padding:6px 10px}
body.rac-compact-landscape .studio-dock-title h2{font-size:1.1rem}
body.rac-compact-landscape .studio-tabs button{padding:8px 5px!important;min-height:40px!important}
body.rac-compact-landscape .appbar{padding:5px 10px;min-height:48px}
body.rac-compact-landscape .book-workbench-header h3{font-size:1.15rem}
body.rac-compact-landscape .book-workbench-nav{flex-wrap:wrap;overflow:visible;padding-bottom:8px}
body.rac-compact-landscape .book-workbench-nav button{flex:0 0 auto}
@media(max-width:639px){.header-actions{gap:5px}.appbar-brand{min-width:0}.appbar-brand h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.book-workbench-nav{flex-wrap:wrap;overflow:visible}.book-workbench-nav button{flex:0 0 auto}.book-workbench .book-chapter-editor-actions{position:relative;bottom:auto}.view input,.view textarea,.view select{scroll-margin-block:85px}}

body.rac-wide-nav:not(.rac-nav-collapsed).studio-layout-active .rac-studio{left:var(--rac-nav-width)!important;right:0!important;width:auto!important}
body.rac-side-tools.studio-active .calm-tools-toggle{display:block!important;position:relative!important;flex:none;order:-3!important}
body.rac-side-tools .book-workbench .book-chapter-editor[hidden]{display:none!important}
body.rac-side-tools .writer-cover-workspace{display:grid!important;grid-template-columns:minmax(0,1fr) clamp(240px,30vw,340px)!important;min-height:0!important;align-items:start}
body.rac-side-tools .writer-cover-stage{width:100%!important;max-height:none!important;min-width:0}
body.rac-side-tools .writer-cover-dialog .photo-free-tools{position:sticky!important;top:0;max-height:calc(var(--rac-visual-height) - 120px)!important;overflow-y:auto!important;overscroll-behavior:contain}
body.rac-side-tools .book-dtp-tools #bookDtpSheetClose{display:none}
body.rac-wide-nav.calm-launch>.appbar{display:flex!important}
body.rac-side-tools:not(.rac-wide-nav):not(.calm-project):not(.calm-launch)>main{width:min(1600px,100%);max-width:none}
body:not(.rac-side-tools) .book-workbench:not(.book-workbench-focus) .book-workbench-panes{display:flex;flex-direction:column}
body:not(.rac-side-tools) .book-workbench .book-chapter-overview,body:not(.rac-side-tools) .book-workbench .book-workbench-tools,body:not(.rac-side-tools) .book-workbench .book-chapter-editor{width:100%;box-sizing:border-box}
body:not(.rac-side-tools) .book-workbench:not(.book-workbench-focus)[data-pane]:not([data-pane=manuscript]) .book-chapter-editor{display:none}

body.studio-layout-active .rac-studio{height:var(--rac-visual-height)!important}
body:not(.rac-side-tools).studio-layout-active .studio-dock:not(.calm-collapsed){max-height:min(46dvh,var(--rac-tool-height,46dvh))!important}

/* Shared working surface: calm navy, one navigation and one primary action. */
body{background:#0e1724;--radius:10px;--shadow:none;--line:#2c3c50}
body main{min-width:0}
body .view.active{min-width:0;overflow-wrap:anywhere}
body .panel,body .summary-card,body .book-workbench,body .book-workbench-tools,body .trailer-screen{background:#152131!important;box-shadow:none!important;border-color:#2c3c50!important;border-radius:10px!important}
body .view.active button:not(.primary):not(.success):not(.creation-card):not(.page-card):not(.flow-page-card):not(.book-chapter-card),body .studio-secondary,body .studio-tool,body .studio-quiet{box-shadow:none!important;text-shadow:none!important;background:#213044;color:#eef3f8;border:1px solid #35465b;border-radius:7px!important;font-weight:600}
body .view.active button.success,body .view.active button.primary,body #studioPrimary,body #saveBookChapter,body #renderTrailer{background:#eac064!important;color:#17202c!important;box-shadow:none!important;border:0!important;border-radius:7px!important;font-weight:750}
body .view.active input,body .view.active textarea,body .view.active select,body .studio-dock input,body .studio-dock textarea,body .studio-dock select{border-radius:7px!important;max-width:100%;min-width:0;box-sizing:border-box;font-size:1rem;line-height:1.4}
body .view.active .button-row{flex-wrap:wrap!important;min-width:0}
body .view.active .button-row>*{min-width:0;white-space:normal;overflow-wrap:anywhere}
body .appbar,body .studio-head{background:#101c2b!important;backdrop-filter:none;gap:12px;border-bottom:1px solid #2c3c50}
.rac-area-switch{flex:0 1 160px;order:1;min-width:0}
.rac-area-switch select{width:100%;min-height:44px;padding:8px 10px;background:#1c2a3c;font-size:.95rem}
.appbar .header-actions,.studio-head .studio-head-actions{order:2;margin-left:auto}
body #menuDrawer{background:#101c2b!important;border-right:1px solid #2c3c50;box-shadow:none;border-radius:0!important}
body #menuDrawer [hidden]{display:none!important}
body #menuDrawer .menu-accordion{border:0;background:transparent;box-shadow:none;border-radius:0}
body[data-rac-area]:not([data-rac-area=general]) #menuDrawer .menu-accordion>summary{display:none}
body #menuDrawer .menu-group{border:0;padding:0;gap:4px}
body #menuDrawer .menu-group>span{display:none}
body #menuDrawer button:not(#closeMenu),body #menuDrawer .rac-menu-extra button{width:100%;background:transparent!important;border:0!important;border-radius:6px!important;min-height:44px;color:#c7d2e1;text-align:left;padding:10px 12px;font-size:.95rem;font-weight:550;box-shadow:none}
body #menuDrawer button[aria-current=page]{background:#eac0641c!important;color:#eac064;border-left:3px solid #eac064!important}
.rac-menu-extra{margin-top:12px;border-top:1px solid #2c3c50;padding-top:8px}
.rac-menu-extra>summary{min-height:44px;padding:10px 8px;font-size:.9rem;color:#a9bbd0;cursor:pointer}
body #menuDrawer .menu-home{border-bottom:1px solid #2c3c50!important;margin-bottom:12px}
body #menuDrawer .menu-head b{font-size:1.05rem;color:#edf2f8}
body .studio-dock{background:#152131!important;box-shadow:none!important;border-radius:0!important;border-left:1px solid #2c3c50}
body .studio-dock-title{padding:10px 14px}
body .studio-dock-title h2{font-size:1.05rem;margin:0}
body .studio-dock-title small,body .studio-handle{display:none}
body .studio-status{background:transparent!important;border:0;color:#afbdd0;font-size:.85rem;box-shadow:none}
body .studio-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible!important;border-bottom:1px solid #2c3c50;gap:0}
body .studio-tabs button{min-width:0;white-space:normal;font-size:.875rem!important;min-height:44px!important;padding:8px 4px!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;border:0!important;color:#becbdd}
body .studio-tabs button.active{color:#eac064!important;border-bottom:2px solid #eac064!important}
body.studio-layout-active .studio-dock:not(.calm-collapsed) .studio-page-actions{display:flex!important;position:relative!important;padding:12px 14px!important;background:#152131!important;border-top:1px solid #2c3c50;flex:none!important}
body.studio-layout-active #studioPrimary{width:100%;min-height:48px}
body.studio-layout-active .studio-dock-content{padding:12px 14px!important;overflow-x:hidden!important}
body .pro-selection-title{font-size:1rem;margin:0 0 12px;color:#edf2f8;font-weight:650}
body .pro-mode-tools .studio-mode-row{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:8px}
body .pro-mode-tools .studio-mode-row button{padding:7px 9px!important;min-width:0;min-height:40px;flex:1 1 40px;font-size:.875rem;box-shadow:none!important;border:1px solid #35465b!important;background:#1c2b3d!important;color:#edf2f8!important}
body .pro-mode-tools .studio-mode-row button.active{border-color:#eac064!important}
body .pro-main-groups{display:grid!important;gap:8px;width:100%;min-width:0}
body .pro-main-groups>details,body .rac-tool-group{background:#19283a!important;border:1px solid #304259!important;border-radius:7px!important;min-width:0}
body .pro-main-groups>details>summary,body .rac-tool-group>summary{font-size:1rem;color:#f0f4f9!important;min-height:48px;padding:12px!important;cursor:pointer;font-weight:600}
body .pro-main-groups>details>*:not(summary){margin:0;padding:10px 12px;min-width:0}
body .pro-element-actions{display:flex;flex-direction:column;gap:12px;background:transparent;padding-top:0;border:0}
body .pro-element-actions>b{display:none}
body .pro-element-actions #studioClearSelection{align-self:flex-end;padding:5px;background:transparent!important;min-height:36px;border:0}
body .pro-element-actions .studio-bubble-style[hidden]{display:none!important}
body .pro-main-groups [data-pro-group]{border:0;border-top:1px solid #304259;background:transparent;border-radius:0}
body .pro-main-groups [data-pro-group]>summary{padding:12px 0;min-height:44px;font-size:.95rem;color:#c0ccdc;cursor:pointer}
body .pro-main-groups .pro-extra{display:grid;gap:12px;padding-block:8px}
body .pro-main-groups [hidden]{display:none!important}
body .pro-main-groups .pro-row{display:flex;flex-wrap:wrap;gap:8px}
body .pro-main-groups .pro-row>*{min-width:0;flex:1 1 100px;white-space:normal;max-width:100%}
body .pro-main-groups button:not(.danger){box-shadow:none!important;background:#23354b!important;color:#edf2f8;border:1px solid #3b4e64;border-radius:6px;font-size:.95rem;font-weight:550;min-height:44px}
body .pro-delete-action{border-top:1px solid #304259;padding:12px!important}
body .pro-delete-action>button{width:auto!important;min-height:44px!important;padding:8px 12px!important;background:transparent!important;color:#f28c8c!important;border:0!important;box-shadow:none!important;font-size:.95rem;font-weight:600}
body .pro-main-groups textarea{min-height:90px}
body .pro-main-groups .pro-transfer{padding:10px 12px}
body .studio-pagebar{flex-wrap:wrap!important;gap:6px;padding:8px!important;height:auto!important;min-height:48px;overflow:visible!important;background:#111e2e}
body .studio-pagebar button{min-width:0;min-height:40px;box-shadow:none!important}
body .studio-pagebar .studio-tool{padding:7px 9px!important}
body.rac-side-tools .calm-tools-toggle{display:none!important}
body .book-workbench-nav{display:block!important;flex-wrap:wrap!important;overflow:visible!important;white-space:normal!important;margin-block:12px}
.rac-book-tool-picker{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:.95rem}
.rac-book-tool-picker select{width:min(100%,320px);min-height:44px}
body .book-workbench-header{background:transparent;border-bottom:1px solid #2c3c50;padding-bottom:12px}
body .book-workbench-header h3{font-size:1.15rem}
body .book-workbench-header .eyebrow{display:none}
body .book-workbench-tools details,body .book-dtp-tools details,body .photo-free-tools details{border:1px solid #304259!important;border-radius:7px!important;background:#19283a!important;box-shadow:none!important}
body .book-workbench-tools details>summary,body .book-dtp-tools details>summary,body .photo-free-tools details>summary{padding:12px!important;min-height:44px;font-size:.95rem;font-weight:600}
body .book-workbench-tools>*,body .book-dtp-tools>*,body .photo-free-tools>*{min-width:0;max-width:100%}
body .book-dtp-tabs{display:flex;flex-wrap:wrap;overflow:visible!important}
body .book-dtp-tabs button{min-width:0;flex:1 1 80px;white-space:normal}
body .trailer-steps{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(110px,1fr))!important;overflow:visible!important;gap:6px}
body .trailer-steps button{min-width:0;font-size:.9rem!important;white-space:normal;padding:9px!important}
body .trailer-steps button.current{outline:0!important;border-left:3px solid #eac064!important;color:#eac064!important}
body .trailer-editor-controls{padding:14px;background:#152131;border:1px solid #2c3c50;border-radius:8px;min-width:0}
body .trailer-editor-controls .rac-tool-group>*:not(summary){margin:0;padding:10px 12px}
body .trailer-studio-view{max-width:1400px}
body .trailer-choice-grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
body.rac-side-tools .trailer-editor-grid{grid-template-columns:minmax(0,1fr) clamp(250px,29vw,340px)}
body .trailer-progress span{background:#eac064}
@media(max-width:639px){
 body .appbar,body .studio-head{flex-wrap:wrap;padding:8px 10px!important;gap:6px}
 body .rac-area-switch{flex-basis:120px}
 body .rac-area-switch select{font-size:.875rem;min-height:40px;padding:6px}
 body .studio-head .studio-save{display:none}
 body .studio-head .studio-brand b{font-size:1rem}
 body .studio-head .studio-menu b{display:none}
 body .studio-pagebar .studio-tool span{display:none}
 body .studio-pagebar #studioRedo{font-size:.8rem;padding:7px!important}
 body .studio-pagebar-spacer{display:none}
 body .studio-pagebar strong{font-size:.9rem;margin-right:auto}
 body .studio-dock-title{display:none}
 body .studio-tabs button{font-size:.85rem!important}
 body .studio-dock-content{padding:10px!important}
 body .trailer-editor-grid{grid-template-columns:1fr}
 body .rac-book-tool-picker select{width:100%}
 body .book-workbench-header{flex-wrap:wrap}
}
/* Book tools use the same visible, closed groups as the comic editor. */
body .book-workbench .book-workbench-nav{margin:0!important;display:grid!important;gap:8px}
body .book-workbench-nav>[hidden]{display:none!important}
body .book-workbench-tools .book-workbench-tools-head{display:none}
body .book-workbench .rac-book-group-body{padding:10px}
body .book-workbench-tools #bookWorkbenchToolBody{padding:0!important;min-width:0}
body .book-workbench-tools #bookWorkbenchToolBody>button{width:100%;margin-bottom:8px;white-space:normal}
body .book-workbench-tools #bookWorkbenchToolBody[hidden]{display:none!important}
body.rac-side-tools .book-workbench:not(.book-workbench-focus)[data-pane=manuscript] .book-workbench-panes{grid-template-columns:minmax(0,1fr) clamp(240px,27vw,310px)!important}
body:not(.rac-side-tools) .book-workbench:not(.book-workbench-focus)[data-pane]:not([data-pane=chapters]) .book-chapter-editor:not([hidden]){display:grid!important}
body.rac-side-tools .book-workbench:not(.book-workbench-focus)[data-pane=chapters] .book-workbench-panes{grid-template-columns:minmax(0,1fr) clamp(240px,27vw,310px)!important}
body.rac-side-tools .book-workbench[data-pane=chapters] .book-chapter-editor{display:none!important}
body.rac-side-tools .book-workbench[data-pane=chapters] .book-chapter-overview{grid-column:1;grid-row:1}
body .book-workbench-tools button.success,body .book-dtp-tools button.success,body .photo-free-tools button.success{background:#23354b!important;color:#edf2f8!important;border:1px solid #3b4e64!important;box-shadow:none!important}
body .view.active .form-grid,body .trailer-form{min-width:0}
body .view.active .form-grid>*{min-width:0;max-width:100%}
body .studio-dock-content .pro-main-groups .studio-element-list button{max-width:100%!important;min-width:0!important}
body:not(.rac-side-tools) .book-workbench .book-chapter-overview[hidden]{display:none!important}

/* Book pages scroll below a separate navigation row. Each page owns its layers. */
body .book-dtp-canvas-wrap,body.rac-side-tools .book-dtp-canvas-wrap{overflow:hidden!important;grid-template-rows:auto minmax(0,1fr);min-width:0;min-height:0}
body .book-dtp-page-nav{position:relative;top:auto;z-index:2;min-width:0;grid-template-columns:44px minmax(0,1fr) auto 44px;isolation:isolate}
body .book-dtp-page-nav>.review-bar{grid-column:1/-1}
body .book-dtp-page-viewport{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;padding:6px 0 18px;position:relative;isolation:isolate}
body .book-dtp-page{isolation:isolate;touch-action:pan-x pan-y}
body .dtp-mode-edit .book-dtp-page{max-width:none!important;max-height:none!important;margin:0 auto;align-self:start}
body .dtp-mode-edit .book-dtp-page [data-dtp-element],body .book-dtp-handle{touch-action:none}
body .book-dtp-dialog button:not(.book-dtp-handle){height:auto!important;min-height:44px;white-space:normal!important;overflow-wrap:anywhere;box-sizing:border-box;line-height:1.35}
body .book-dtp-dialog .review-bar{display:flex;flex-wrap:wrap;align-items:stretch;min-width:0;box-sizing:border-box}
body .book-dtp-dialog .review-bar>button{flex:1 1 170px;width:auto!important;max-width:100%;padding:10px 12px}
body .book-dtp-dialog .review-bar>details{flex:1 1 170px;min-width:0;max-width:100%}
body .book-dtp-dialog .review-bar summary{white-space:normal;overflow-wrap:anywhere;height:auto;box-sizing:border-box}
body.rac-side-tools .book-dtp-tools{overflow:hidden!important;grid-template-rows:auto minmax(0,1fr) auto}
body .book-export-actions{align-items:stretch!important;gap:10px;margin-bottom:14px}
body .book-export-actions>button{flex:1 1 240px;width:auto!important;max-width:100%;margin:0!important;height:auto!important;min-height:44px;white-space:normal}
@media(max-height:550px) and (orientation:landscape){body .book-dtp-shell{padding:6px;gap:5px}body .book-dtp-head{display:grid;grid-template-columns:minmax(0,1fr)}body .book-dtp-head h2{font-size:1rem}body .book-dtp-head .eyebrow,body .book-dtp-head small{display:none}body .book-dtp-head>.button-row{display:flex!important;flex-wrap:wrap;width:100%;gap:5px}body .book-dtp-head button{padding:6px 8px}body .book-dtp-dialog .review-bar>button,body .book-dtp-dialog .review-bar>details{flex-basis:120px;font-size:14px}body .book-dtp-page-nav{grid-template-columns:36px minmax(0,1fr) auto 36px;gap:4px}body .book-dtp-page-nav button{min-height:36px}}

body .book-dtp-page{max-width:none!important}

/* Keep the page viewport bounded despite older mobile whole-dialog rules. */
body #bookDtpDialog#bookDtpDialog .book-dtp-shell{display:grid!important;grid-template-rows:auto auto minmax(0,1fr) auto!important;height:100%!important;min-height:0!important;overflow:hidden!important;padding:14px!important}
body #bookDtpDialog#bookDtpDialog .book-dtp-workspace{display:grid!important;min-height:0!important;overflow:hidden!important;margin-bottom:0}
body #bookDtpDialog#bookDtpDialog .book-dtp-canvas-wrap{height:100%!important;min-height:0!important;padding:10px!important;box-sizing:border-box}
body #bookDtpDialog#bookDtpDialog .book-dtp-page{touch-action:pan-x pan-y!important}
@media(max-width:820px){body #bookDtpDialog#bookDtpDialog .book-dtp-shell{padding:7px!important}body:not(.rac-side-tools) #bookDtpDialog#bookDtpDialog .book-dtp-workspace{grid-template-columns:minmax(0,1fr)!important}body #bookDtpDialog#bookDtpDialog .book-dtp-canvas-wrap{padding:6px!important}}
@media(max-height:550px) and (orientation:landscape){body #bookDtpDialog#bookDtpDialog .book-dtp-shell{padding:5px!important;gap:4px}body #bookDtpDialog#bookDtpDialog .book-dtp-head button{min-height:36px!important}body #bookDtpDialog#bookDtpDialog .book-dtp-head h2{margin:0}body #bookDtpDialog#bookDtpDialog .book-dtp-page-nav button{min-height:36px!important}}
body #bookDtpDialog#bookDtpDialog .book-dtp-rail{display:flex!important;flex-wrap:nowrap!important;position:static!important}
body #bookDtpDialog#bookDtpDialog .book-dtp-head>.button-row{display:flex!important;flex-wrap:wrap;justify-content:flex-end;width:auto;gap:6px}
body #bookDtpDialog#bookDtpDialog .book-dtp-head>.button-row>*{flex:0 0 auto!important;width:auto!important;margin:0!important}
body #bookDtpDialog#bookDtpDialog .book-dtp-mobile-bar{position:static!important}
@media(max-height:550px) and (orientation:landscape){body #bookDtpDialog#bookDtpDialog .book-dtp-head{gap:4px}body #bookDtpDialog#bookDtpDialog .book-dtp-head>.button-row{width:100%;justify-content:flex-start}body #bookDtpDialog#bookDtpDialog .book-dtp-head #bookDtpReflow{display:none}}
#bookDtpDialog#bookDtpDialog .review-bar button,#bookDtpDialog#bookDtpDialog .review-bar summary{overflow-wrap:anywhere!important;white-space:normal!important;min-width:0!important}
#writerExportWork#writerExportWork .book-export-actions{align-items:stretch!important}
#writerExportWork#writerExportWork .book-export-actions>button{height:100%!important;grid-column:auto!important;overflow-wrap:anywhere!important}
#bookDtpDialog#bookDtpDialog .book-dtp-page-nav{max-height:min(50dvh,320px);overflow-y:auto;overflow-x:hidden;min-height:0;box-sizing:border-box}
