/* In-page editing mode for the flipbook. Nothing here runs unless editor.js is loaded. */
.editor-toolbar{position:fixed;top:12px;left:0;right:0;z-index:60;display:flex;gap:8px;justify-content:center;align-items:flex-start;flex-wrap:wrap;padding:0 16px;font:400 12px/1.2 var(--book-sans)}
/* Edit mode makes room for the toolbar instead of covering the book header. */
body.editing .room{padding-top:62px}
/* Outside edit mode the single button parks in the top-right corner, clear of the title. */
body:not(.editing) .editor-toolbar{justify-content:flex-end}
.editor-toolbar button{border:1px solid #d9dcd1;border-radius:999px;padding:9px 14px;background:#fff;color:#3d4238;font:inherit;cursor:pointer;box-shadow:0 2px 6px rgb(29 37 21 / 8%)}
.editor-toolbar button:hover{background:#f3f4ee}
.editor-toolbar button.primary{background:#6f775d;border-color:#6f775d;color:#fff}
.editor-toolbar button.primary:hover{background:#616951}
.editor-actions{display:none;gap:8px;flex-wrap:wrap;justify-content:center;max-width:min(96vw,1100px)}
body.editing .editor-actions{display:flex}
body.editing #editor-toggle{display:none}
.editor-hint{position:fixed;left:50%;bottom:78px;transform:translateX(-50%);z-index:60;padding:8px 16px;border-radius:999px;background:rgb(41 44 38 / 88%);color:#f4f2e9;font:400 12px/1.4 var(--book-sans);white-space:nowrap;max-width:92vw;overflow:hidden;text-overflow:ellipsis}
body:not(.editing) .editor-hint{display:none}
body.editing [contenteditable="true"]{outline:1px dashed rgb(125 133 114 / 70%);outline-offset:4px;border-radius:2px;cursor:text}
body.editing [contenteditable="true"]:focus{outline:2px solid #6f775d;background:rgb(255 255 255 / 55%)}
body.editing .plate{outline:1px dashed rgb(125 133 114 / 45%);outline-offset:6px}
body.editing .plate img{cursor:pointer}
.swap-btn{position:absolute;bottom:10px;right:10px;z-index:5;border:1px solid #d9dcd1;border-radius:999px;padding:7px 12px;background:rgb(255 255 255 / 94%);color:#3d4238;font:400 11px var(--book-sans);cursor:pointer}
.swap-btn:hover{background:#fff}
.editor-toast{position:fixed;left:50%;top:18px;transform:translateX(-50%);z-index:80;padding:10px 18px;border-radius:8px;background:#292c26;color:#f4f2e9;font:400 12px/1.4 var(--book-sans);opacity:0;transition:opacity .25s ease;pointer-events:none}
.editor-toast.show{opacity:1}
@media print{.editor-toolbar,.editor-hint,.editor-toast,.swap-btn{display:none !important}}
