/* Admin-only visual room editor. The room itself keeps the front-end renderer. */
body.mpp-room-editor-preview #masthead,
body.mpp-room-editor-preview #colophon,
body.mpp-room-editor-preview .site-header,
body.mpp-room-editor-preview .site-footer,
body.mpp-room-editor-preview .entry-header,
body.mpp-room-editor-preview .comments-area {
	display: none !important;
}
body.mpp-room-editor-preview,
body.mpp-room-editor-preview #page,
body.mpp-room-editor-preview #primary,
body.mpp-room-editor-preview .content-area,
body.mpp-room-editor-preview .site-main,
body.mpp-room-editor-preview .entry-content {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #efe9e1;
}
body.mpp-room-editor-preview { overflow: auto; }
.mpp-room-editor-mode { position: relative; min-height: 100vh; overflow: visible; }
.mpp-room-editor-mode .mpp-cottage { min-width: 100%; }
.mpp-room-editor-mode .mpp-reset-book-progress,
.mpp-room-editor-mode .mpp-approve-page-one,
.mpp-room-editor-mode .mpp-approve-all-pages-test {
	display: none !important;
}

.mpp-room-editor-toolbar {
	position: fixed;
	top: 12px;
	left: 50%;
	z-index: 2147483600;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 8px;
	transform: translateX(-50%);
	background: rgba(250,245,239,.96);
	border: 1px solid #d7c9ba;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(50,40,30,.2);
	backdrop-filter: blur(8px);
}
.mpp-room-editor-toolbar button,
.mpp-room-editor-save {
	padding: 8px 12px;
	font: 600 12px/1.2 Montserrat, sans-serif;
	color: #4f4741;
	background: #fff;
	border: 1px solid #d9cdbf;
	border-radius: 8px;
	cursor: pointer;
}
.mpp-room-editor-toolbar button:hover,
.mpp-room-editor-save:hover { border-color: #9ba584; background: #f8f5ef; }
.mpp-room-editor-unsaved { padding: 0 8px; font-size: 12px; font-weight: 700; color: #9b5f45; }

.mpp-room-editor-window,
.mpp-room-editor-mode .mpp-panel {
	position: fixed !important;
	z-index: 2147483200 !important;
	box-sizing: border-box;
	min-width: 260px;
	max-width: min(410px, 90vw);
	max-height: calc(100vh - 80px);
	margin: 0 !important;
	background: rgba(252,247,241,.98) !important;
	border: 1px solid #d9cdbf !important;
	border-radius: 14px !important;
	box-shadow: 0 14px 45px rgba(50,40,30,.25) !important;
	overflow: hidden;
	transition: none !important;
}
.mpp-room-editor-window--properties { top: 78px; right: 20px; width: 310px; }
.mpp-room-editor-mode .mpp-panel {
	top: 78px;
	left: 20px;
	width: 360px !important;
	height: min(720px, calc(100vh - 100px)) !important;
	transform: none !important;
	display: none;
}
.mpp-room-editor-mode .mpp-panel.is-editor-visible { display: flex !important; }
.mpp-room-editor-window[hidden] { display: none !important; }
.mpp-room-editor-window.is-collapsed .mpp-room-editor-window__body,
.mpp-room-editor-mode .mpp-panel.is-collapsed .mpp-item-grid,
.mpp-room-editor-mode .mpp-panel.is-collapsed #mpp-panel-description { display: none !important; }
.mpp-room-editor-window__header,
.mpp-room-editor-mode .mpp-panel-header__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 11px 12px;
	cursor: move;
	user-select: none;
	background: #f4eee7;
	border-bottom: 1px solid #e7ddd2;
}
.mpp-room-editor-window__header button { width: 28px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer; font-size: 18px; }
.mpp-room-editor-window__body { padding: 12px; overflow: auto; max-height: calc(100vh - 150px); }
.mpp-room-editor-selection { margin: 0 0 10px; font-size: 13px; }
.mpp-room-editor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mpp-room-editor-fields label { display: grid; gap: 4px; font: 600 11px/1.3 Montserrat, sans-serif; }
.mpp-room-editor-fields input[type="number"] { width: 100%; box-sizing: border-box; padding: 7px; border: 1px solid #d9cdbf; border-radius: 7px; }
.mpp-room-editor-check { display: flex !important; align-items: center; grid-column: 1 / -1; }
.mpp-room-editor-save,.mpp-room-editor-status { grid-column: 1 / -1; }
.mpp-room-editor-status { min-height: 18px; margin: 0; font-size: 12px; }
.mpp-room-editor-search { width: calc(100% - 24px); margin: 10px 12px 0; box-sizing: border-box; padding: 9px 10px; border: 1px solid #d9cdbf; border-radius: 8px; }

.mpp-room-editor-mode .mpp-test-overlay,
.mpp-room-editor-mode [data-editor-type="structure"],
.mpp-room-editor-mode [data-editor-type="hotspot"] { pointer-events: auto !important; }
.mpp-room-editor-mode .mpp-test-overlay,
.mpp-room-editor-mode [data-editor-type] {
	cursor: move !important;
	touch-action: none;
}
.mpp-room-editor-mode .mpp-hotspot { border: 1px dashed rgba(155,165,132,.65); background: rgba(155,165,132,.08); }
.mpp-room-editor-mode .is-room-editor-selected {
	outline: 3px solid #d7b46a !important;
	outline-offset: 3px;
	filter: drop-shadow(0 0 4px rgba(215,180,106,.8));
}
.mpp-room-editor-mode .mpp-item-card { display: flex; }
.mpp-room-editor-mode .mpp-item-card:has(.mpp-item-card__placement) { flex-wrap: wrap; }
.mpp-room-editor-mode .mpp-item-card__placement {
	flex: 1 1 100%;
	margin: 0 auto;
	color: var(--mpp-editor-text, #3d3833);
	background: var(--mpp-editor-border, #f4eee6);
}
.mpp-room-editor-mode .mpp-item-card.is-editor-filtered { display: none !important; }
.mpp-room-editor-mode .mpp-panel-header__close { display: none; }
.mpp-room-editor-panel-buttons { display:flex; gap:4px; }
.mpp-room-editor-panel-buttons button { width:28px;height:28px;padding:0;border:0;background:transparent;font-size:18px;cursor:pointer; }

@media (max-width: 800px) {
	.mpp-room-editor-toolbar { left: 8px; right: 8px; transform: none; overflow-x: auto; justify-content: flex-start; }
	.mpp-room-editor-window--properties { top: 70px; right: 8px; }
	.mpp-room-editor-mode .mpp-panel { top: 70px; left: 8px; }
}

/* Secured editor application chrome only. Room geometry is owned entirely by
 * 01-cottage-room.css and the shared stage synchroniser. */
html:has(body.mpp-room-editor-app),
body.mpp-room-editor-app {
	width: 100% !important;
	min-height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	box-sizing: border-box !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	background: #efe9e1 !important;
}
body.mpp-room-editor-app #wpadminbar { display: none !important; }
body.mpp-room-editor-app .mpp-room-editor-app-shell,
body.mpp-room-editor-app .mpp-room-editor-mode {
	width: 100% !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	box-sizing: border-box !important;
	overflow: visible !important;
}

.mpp-room-editor-mode .mpp-panel { flex-direction: column !important; }
.mpp-room-editor-mode .mpp-panel-header {
	position: relative;
	flex: 0 0 auto;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	background: transparent;
}
.mpp-room-editor-mode .mpp-panel-header__top { width: 100%; box-sizing: border-box; }
.mpp-room-editor-mode .mpp-panel-header h2 { margin: 0; font-size: 24px; line-height: 1.2; }
.mpp-room-editor-mode #mpp-panel-description { padding: 10px 12px 0; font-size: 13px; line-height: 1.45; }

/* Keep Kadence/global button hover styles out of the private Room Editor. */
.mpp-room-editor-mode button.mpp-item-card,
.mpp-room-editor-mode button.mpp-item-card:hover,
.mpp-room-editor-mode button.mpp-item-card:focus,
.mpp-room-editor-mode button.mpp-item-card:focus-visible,
.mpp-room-editor-mode button.mpp-item-card:active {
	color: #4f4741 !important;
	background: #fff !important;
	background-color: #fff !important;
	border-color: #efe5d9 !important;
	outline: none !important;
	text-decoration: none !important;
}
.mpp-room-editor-mode button.mpp-item-card:hover {
	box-shadow: 0 8px 20px rgba(79,71,65,.10) !important;
}
.mpp-room-editor-mode .mpp-close,
.mpp-room-editor-mode .mpp-close:hover,
.mpp-room-editor-mode .mpp-close:focus,
.mpp-room-editor-mode .mpp-close:focus-visible,
.mpp-room-editor-mode .mpp-close:active {
	color: #fff !important;
	background: #9ba584 !important;
	background-color: #9ba584 !important;
	border-color: #9ba584 !important;
	outline: none !important;
}
.mpp-room-editor-mode .mpp-close:hover {
	background: #87926f !important;
	background-color: #87926f !important;
}

/* The matching Treasure card follows an item selected directly in the room. */
.mpp-room-editor-mode .mpp-item-card.is-room-editor-current-card,
.mpp-room-editor-mode button.mpp-item-card.is-room-editor-current-card,
.mpp-room-editor-mode button.mpp-item-card.is-room-editor-current-card:hover,
.mpp-room-editor-mode button.mpp-item-card.is-room-editor-current-card:focus {
	border-color: #9ba584 !important;
	box-shadow: 0 0 0 3px rgba(155,165,132,.22) !important;
}

/* Room Editor modes: only the active object type can be selected. */
.mpp-room-editor-modes {
	display: flex;
	gap: 4px;
	padding-right: 6px;
	border-right: 1px solid #d9cdbf;
}
.mpp-room-editor-modes button[aria-pressed="true"] {
	border-color: #8f9a78 !important;
	background: #e7ecdf !important;
	box-shadow: inset 0 0 0 1px #8f9a78;
}
.mpp-room-editor-mode[data-room-editor-mode="rewards"] [data-editor-type="hotspot"],
.mpp-room-editor-mode[data-room-editor-mode="rewards"] .mpp-bookshelf-book,
.mpp-room-editor-mode[data-room-editor-mode="hotspots"] .mpp-test-overlay,
.mpp-room-editor-mode[data-room-editor-mode="hotspots"] .mpp-bookshelf-book,
.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-test-overlay,
.mpp-room-editor-mode[data-room-editor-mode="books"] [data-editor-type="hotspot"] {
	pointer-events: none !important;
	cursor: default !important;
}
.mpp-room-editor-mode[data-room-editor-mode="hotspots"] [data-editor-type="hotspot"] {
	pointer-events: auto !important;
	cursor: move !important;
	border: 2px dashed rgba(215, 180, 106, .95) !important;
	background: rgba(215, 180, 106, .12) !important;
}
.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-bookshelf-book {
	pointer-events: auto !important;
	cursor: move !important;
}
.mpp-room-editor-mode-list {
	flex: 1 1 auto;
	min-height: 0;
	padding: 12px;
	overflow-y: auto;
}
.mpp-room-editor-mode-list__item {
	display: grid;
	gap: 3px;
	width: 100%;
	margin: 0 0 8px;
	padding: 10px 11px;
	text-align: left;
	color: #4f4741 !important;
	background: #fff !important;
	border: 1px solid #ddd1c4 !important;
	border-radius: 9px;
	cursor: pointer;
}
.mpp-room-editor-mode-list__item:hover,
.mpp-room-editor-mode-list__item:focus,
.mpp-room-editor-mode-list__item:active {
	color: #4f4741 !important;
	background: #f8f5ef !important;
	border-color: #9ba584 !important;
	box-shadow: none !important;
	outline: none !important;
}
.mpp-room-editor-mode-list__item small {
	font-size: 11px;
	font-weight: 500;
	text-transform: capitalize;
	opacity: .72;
}

.mpp-room-editor-slot-list-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
	gap: 7px;
	margin: 0 0 8px;
}

.mpp-room-editor-slot-list-row.is-batch-mode {
	grid-template-columns: 22px minmax(0, 1fr);
}

.mpp-room-editor-slot-list-row .mpp-room-editor-mode-list__item {
	margin: 0;
}
.mpp-room-editor-slot-list-row .mpp-room-editor-mode-list__item small {
	text-transform: none;
}

.mpp-room-editor-slot-list-row input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: #9ba584;
	cursor: pointer;
}

/* Build 31: strict mode-aware browser and properties panels. */
.mpp-room-editor-mode[data-room-editor-mode="rewards"] .mpp-room-editor-mode-list {
	display: none !important;
}
.mpp-room-editor-mode[data-room-editor-mode="hotspots"] .mpp-item-grid,
.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-item-grid,
.mpp-room-editor-mode[data-room-editor-mode="hotspots"] .mpp-room-editor-search,
.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-room-editor-search,
.mpp-room-editor-mode[data-room-editor-mode="hotspots"] .mpp-room-editor-filter,
.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-room-editor-filter {
	display: none !important;
}
.mpp-room-editor-mode[data-room-editor-mode="hotspots"] .mpp-room-editor-mode-list,
.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-room-editor-mode-list {
	display: block !important;
}
.mpp-room-editor-fields label[hidden] {
	display: none !important;
}

/* Build 32: visual reward resize and rotation controls. */
.mpp-room-editor-transform-box {
	position: absolute;
	box-sizing: border-box;
	pointer-events: none;
}

.mpp-room-editor-transform-box[hidden] {
	display: none !important;
}

.mpp-room-editor-transform-box__outline {
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	border: 2px solid #d7b46a;
	box-shadow: 0 0 0 1px rgba(255,255,255,.9), 0 3px 12px rgba(79,71,65,.22);
	pointer-events: none;
}

.mpp-room-editor-transform-handle,
.mpp-room-editor-rotation-handle {
	position: absolute;
	z-index: 2;
	width: 16px;
	height: 16px;
	margin: 0;
	padding: 0;
	border: 2px solid #fff !important;
	background: #d7b46a !important;
	box-shadow: 0 1px 5px rgba(50,40,30,.35);
	pointer-events: auto;
	touch-action: none;
	-webkit-tap-highlight-color: transparent;
}

.mpp-room-editor-transform-handle {
	border-radius: 3px;
	cursor: nwse-resize;
}

.mpp-room-editor-transform-handle--nw { left: -8px; top: -8px; }
.mpp-room-editor-transform-handle--ne { right: -8px; top: -8px; cursor: nesw-resize; }
.mpp-room-editor-transform-handle--sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.mpp-room-editor-transform-handle--se { right: -8px; bottom: -8px; }

.mpp-room-editor-rotation-stem {
	position: absolute;
	left: 50%;
	top: -31px;
	width: 2px;
	height: 31px;
	transform: translateX(-50%);
	background: #d7b46a;
	pointer-events: none;
}

.mpp-room-editor-rotation-handle {
	left: 50%;
	top: -43px;
	transform: translateX(-50%);
	border-radius: 50%;
	cursor: grab;
}

.mpp-room-editor-rotation-handle:active { cursor: grabbing; }

/* Prevent Kadence button states from recolouring editor handles. */
.mpp-room-editor-transform-handle:hover,
.mpp-room-editor-transform-handle:focus,
.mpp-room-editor-transform-handle:focus-visible,
.mpp-room-editor-transform-handle:active,
.mpp-room-editor-rotation-handle:hover,
.mpp-room-editor-rotation-handle:focus,
.mpp-room-editor-rotation-handle:focus-visible,
.mpp-room-editor-rotation-handle:active {
	border-color: #fff !important;
	background: #d7b46a !important;
	color: transparent !important;
	outline: none !important;
}

/* Build 33: visual hotspot resizing. */
.mpp-room-editor-transform-handle--n,
.mpp-room-editor-transform-handle--s {
	left: 50%;
	width: 22px;
	height: 12px;
	transform: translateX(-50%);
	cursor: ns-resize;
}
.mpp-room-editor-transform-handle--n { top: -6px; }
.mpp-room-editor-transform-handle--s { bottom: -6px; }
.mpp-room-editor-transform-handle--e,
.mpp-room-editor-transform-handle--w {
	top: 50%;
	width: 12px;
	height: 22px;
	transform: translateY(-50%);
	cursor: ew-resize;
}
.mpp-room-editor-transform-handle--e { right: -6px; }
.mpp-room-editor-transform-handle--w { left: -6px; }

/* Rewards keep the four proportional corner handles only. */
.mpp-room-editor-transform-box.is-reward-transform .mpp-room-editor-transform-handle--n,
.mpp-room-editor-transform-box.is-reward-transform .mpp-room-editor-transform-handle--e,
.mpp-room-editor-transform-box.is-reward-transform .mpp-room-editor-transform-handle--s,
.mpp-room-editor-transform-box.is-reward-transform .mpp-room-editor-transform-handle--w {
	display: none !important;
}

/* Hotspots resize freely and do not show reward rotation controls. */
.mpp-room-editor-transform-box.is-hotspot-transform .mpp-room-editor-rotation-stem,
.mpp-room-editor-transform-box.is-hotspot-transform .mpp-room-editor-rotation-handle {
	display: none !important;
}
.mpp-room-editor-transform-box.is-hotspot-transform .mpp-room-editor-transform-box__outline {
	border-style: dashed;
	border-color: #d7b46a;
	background: rgba(215,180,106,.08);
}

/* Books mode: shelf blocks are the selectable editing targets. */
.mpp-book-block-editor {
	position: absolute;
	display: none;
	box-sizing: border-box;
	border: 1px dashed rgba(153, 121, 54, 0.72);
	background: rgba(218, 184, 105, 0.08);
	z-index: 100002;
	pointer-events: auto;
	cursor: grab;
}

.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-book-block-editor {
	display: block;
}

.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-bookshelf-book {
	pointer-events: none !important;
}

.mpp-book-block-editor.is-room-editor-selected {
	border-color: #9a7331;
	background: rgba(218, 184, 105, 0.14);
}

.mpp-book-block-editor.is-room-editor-dirty {
	box-shadow: 0 0 0 2px rgba(177, 116, 46, 0.38);
}

.mpp-room-editor-transform-box.is-book-transform .mpp-room-editor-transform-handle--n,
.mpp-room-editor-transform-box.is-book-transform .mpp-room-editor-transform-handle--e,
.mpp-room-editor-transform-box.is-book-transform .mpp-room-editor-transform-handle--s,
.mpp-room-editor-transform-box.is-book-transform .mpp-room-editor-transform-handle--w {
	display: none;
}

/* Final editor hierarchy: individual books and hotspot slot areas. */
.mpp-room-editor-level-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0 0 10px;
}
.mpp-room-editor-level-controls button {
	padding: 7px 10px;
	font: 600 11px/1.2 Montserrat, sans-serif;
	color: #4f4741;
	background: #fff;
	border: 1px solid #d9cdbf;
	border-radius: 7px;
	cursor: pointer;
}
.mpp-room-editor-level-controls button:hover {
	border-color: #9ba584;
	background: #f8f5ef;
}
.mpp-room-editor-level-controls button.is-active {
	color: #3f4934;
	background: #e9eddf;
	border-color: #87936f;
}

.mpp-hotspot-slot-editor {
	position: absolute;
	display: none;
	box-sizing: border-box;
	border: 2px dashed rgba(107, 125, 84, .9);
	background: rgba(155, 165, 132, .18);
	pointer-events: auto;
	cursor: grab;
}
.mpp-room-editor-mode.is-editing-hotspot-slots .mpp-hotspot-slot-editor {
	display: block;
}
.mpp-room-editor-mode.is-editing-hotspot-slots [data-editor-type="hotspot"] {
	outline: 1px solid rgba(155,165,132,.35);
}
.mpp-hotspot-slot-editor.is-room-editor-selected {
	border-color: #d7b46a;
	background: rgba(215,180,106,.18);
}
.mpp-hotspot-slot-editor.is-room-editor-dirty {
	box-shadow: 0 0 0 2px rgba(177,116,46,.38);
}

.mpp-room-editor-mode.is-editing-individual-books .mpp-book-block-editor {
	pointer-events: none !important;
	background: rgba(218,184,105,.03);
	border-color: rgba(153,121,54,.28);
}
.mpp-room-editor-mode.is-editing-individual-books .mpp-bookshelf-book {
	pointer-events: auto !important;
	cursor: grab !important;
}
.mpp-room-editor-mode.is-editing-individual-books .mpp-bookshelf-book.has-individual-override {
	filter: drop-shadow(0 0 3px rgba(215,180,106,.9));
}
.mpp-room-editor-mode.is-editing-individual-books .mpp-bookshelf-book.is-room-editor-selected {
	outline: 2px solid #d7b46a !important;
	outline-offset: 2px;
}

.mpp-room-editor-level-controls .is-danger { background:#fff4f2; border-color:#b64235; color:#8f2f25; }
.mpp-room-editor-level-controls .is-danger:hover { background:#ffe6e2; color:#76271f; }

/* One dynamic centre marker per editable hotspot slot. */
.mpp-hotspot-slot-editor__marker {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 34px;
	height: 34px;
	border: 3px solid #fff;
	border-radius: 50%;
	background: #d7b46a;
	box-shadow: 0 1px 5px rgba(79, 71, 65, .35);
	transform: translate(-50%, -50%);
	pointer-events: none;
}
.mpp-hotspot-slot-editor__marker::before,
.mpp-hotspot-slot-editor__marker::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 12px;
	height: 3px;
	border-radius: 2px;
	background: #fff;
	transform: translate(-50%, -50%);
}
.mpp-hotspot-slot-editor__marker::after {
	transform: translate(-50%, -50%) rotate(90deg);
}
.mpp-hotspot-slot-editor__label {
	position: absolute;
	left: 50%;
	top: calc(50% + 23px);
	width: max-content;
	max-width: none;
	box-sizing: border-box;
	padding: 2px 6px;
	border-radius: 6px;
	background: rgba(250, 245, 239, .94);
	color: #4f4741;
	font: 600 10px/1.2 Montserrat, sans-serif;
	text-align: center;
	white-space: nowrap;
	transform: translateX(-50%);
	pointer-events: none;
}
/* Prevent old live-site markers duplicating the editable slot markers. */
.mpp-room-editor-mode.is-editing-hotspot-slots .mpp-position-choice-layer {
	display: none !important;
}


/* Final hotspot-slot editor controls. */
.mpp-hotspot-slot-editor[hidden] { display: none !important; }
.mpp-room-editor-slot-details {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin: 10px 0;
	padding: 10px;
	background: #f8f3ed;
	border: 1px solid #e3d7ca;
	border-radius: 10px;
}
.mpp-room-editor-slot-details[hidden] { display: none !important; }
.mpp-room-editor-slot-details label {
	display: grid;
	gap: 4px;
	font: 600 11px/1.3 Montserrat, sans-serif;
}
.mpp-room-editor-slot-details input {
	width: 100%;
	box-sizing: border-box;
	padding: 7px;
	border: 1px solid #d9cdbf;
	border-radius: 7px;
}
.mpp-room-editor-slot-details button { grid-column: 1 / -1; }
.mpp-room-editor-slot-inventory {
	display: grid;
	grid-column: 1 / -1;
	gap: 8px;
	margin-top: 4px;
	padding-top: 10px;
	border-top: 1px solid #dfd3c5;
}
.mpp-room-editor-slot-inventory__heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font: 600 12px/1.3 Montserrat, sans-serif;
}
.mpp-room-editor-slot-inventory__heading span {
	padding: 3px 7px;
	color: #4f4741;
	background: #e9eddf;
	border-radius: 999px;
	font-size: 10px;
}
.mpp-room-editor-slot-inventory__items {
	display: grid;
	gap: 6px;
	max-height: 170px;
	overflow-y: auto;
}
.mpp-room-editor-slot-inventory__item {
	display: grid;
	gap: 2px;
	padding: 7px 8px;
	background: #fff;
	border: 1px solid #e3d7ca;
	border-radius: 7px;
}
.mpp-room-editor-slot-inventory__item strong {
	font: 600 11px/1.35 Montserrat, sans-serif;
}
.mpp-room-editor-slot-inventory__item small,
.mpp-room-editor-slot-inventory__empty {
	margin: 0;
	font: 500 10px/1.4 Montserrat, sans-serif;
	opacity: .75;
}
.mpp-room-editor-slot-inventory__actions,
.mpp-room-editor-slot-occupancy__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 5px;
}
.mpp-room-editor-slot-inventory__actions button,
.mpp-room-editor-slot-occupancy__actions button {
	width: auto;
	padding: 5px 7px;
	font: 600 9px/1.25 Montserrat, sans-serif;
	color: #4f4741;
	background: #faf7f2;
	border: 1px solid #d9cdbf;
	border-radius: 6px;
	cursor: pointer;
}
.mpp-room-editor-slot-inventory__actions button.is-danger {
	color: #8f2f25;
	background: #fff4f2;
	border-color: #c98b83;
}
.mpp-room-editor-slot-occupancy {
	display: grid;
	gap: 6px;
	margin-top: 5px;
	padding: 7px;
	background: #f8f3ed;
	border: 1px solid #e3d7ca;
	border-radius: 7px;
}
.mpp-room-editor-slot-occupancy[hidden] {
	display: none !important;
}
.mpp-room-editor-slot-occupancy p {
	margin: 0;
	font: 500 9px/1.45 Montserrat, sans-serif;
	opacity: .8;
}
.mpp-room-editor-slot-occupancy__choices {
	display: grid;
	gap: 4px;
	max-height: 140px;
	overflow-y: auto;
}
.mpp-room-editor-slot-occupancy__choices label {
	display: flex;
	grid-template-columns: none;
	align-items: center;
	gap: 6px;
	padding: 4px 5px;
	font: 500 9px/1.3 Montserrat, sans-serif;
	background: #fff;
	border-radius: 5px;
}
.mpp-room-editor-slot-occupancy__choices input[type="checkbox"] {
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	margin: 0;
	accent-color: #9ba584;
}
.mpp-room-editor-slot-repeatable__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 5px;
}
.mpp-room-editor-slot-repeatable__row > label {
	min-width: 0;
}
.mpp-room-editor-slot-repeatable__row > .mpp-room-editor-slot-repeatable__flip {
	justify-content: center;
	white-space: nowrap;
}
.mpp-room-editor-slot-repeatable__maximum {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) 64px;
	align-items: center;
	gap: 7px;
	font: 600 9px/1.35 Montserrat, sans-serif !important;
}
.mpp-room-editor-slot-repeatable__maximum input {
	width: 64px !important;
	min-height: 30px !important;
}
.mpp-room-editor-slot-inventory__occupied-by {
	display: grid;
	gap: 2px;
	padding: 7px 8px;
	color: #4f4741;
	background: #f1eee8;
	border: 1px dashed #c9bbaa;
	border-radius: 7px;
}
.mpp-room-editor-slot-inventory__occupied-by strong {
	font: 600 9px/1.35 Montserrat, sans-serif;
}
.mpp-room-editor-slot-inventory__occupied-by small {
	font: 500 9px/1.4 Montserrat, sans-serif;
	opacity: .78;
}
.mpp-room-editor-slot-inventory__repeatable {
	background: rgba(177, 166, 183, .14);
	border-color: rgba(177, 166, 183, .65);
}
.mpp-room-editor-slot-inventory label {
	display: grid;
	gap: 4px;
}
.mpp-room-editor-slot-inventory select {
	width: 100%;
	min-width: 0;
	padding: 7px;
	box-sizing: border-box;
	border: 1px solid #d9cdbf;
	border-radius: 7px;
	background: #fff;
}

/* Managed Room Slots: friendly labels stay readable while permanent IDs remain
 * short, automatic and safely separated from the editable name. */
.mpp-room-editor-slot-name {
	grid-column: 1 / -1;
}
.mpp-room-editor-slot-code {
	display: flex;
	grid-column: 1 / -1;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 7px 9px;
	color: rgba(79, 71, 65, .72);
	background: rgba(255, 255, 255, .72);
	border: 1px solid #e3d7ca;
	border-radius: 7px;
	font: 600 10px/1.3 Montserrat, sans-serif;
}
.mpp-room-editor-slot-code code {
	padding: 2px 6px;
	color: #4f4741;
	background: #e9eddf;
	border-radius: 999px;
	font: 700 10px/1.3 Montserrat, sans-serif;
	letter-spacing: .03em;
}
.mpp-room-editor-slot-list__heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-width: 0;
}
.mpp-room-editor-slot-list__heading strong {
	min-width: 0;
	font-size: 13px;
	line-height: 1.25;
}
.mpp-room-editor-slot-list__count {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 22px;
	padding: 0 7px;
	color: #4f4741;
	background: #e9eddf;
	border-radius: 999px;
	font: 700 10px/1 Montserrat, sans-serif;
}
.mpp-room-editor-slot-list-row .mpp-room-editor-mode-list__item small {
	display: block;
	overflow-wrap: anywhere;
	line-height: 1.45;
}


/* Build 47: grouped structure editing. */
.mpp-structure-group-editor { position:absolute; border:2px dashed rgba(142,116,67,.9); background:rgba(250,245,239,.12); box-sizing:border-box; pointer-events:none; display:none; }
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-structure-group-editor { display:block; pointer-events:auto; cursor:move; }
.mpp-structure-group-editor > span { position:absolute; left:0; top:-25px; padding:3px 7px; border-radius:4px; background:#4f4741; color:#fff; font:600 11px/1.3 Montserrat,sans-serif; white-space:nowrap; }
.mpp-structure-group-editor.is-room-editor-selected { border-style:solid; outline:2px solid rgba(255,255,255,.9); }
.mpp-structure-group-editor.is-room-editor-dirty { border-color:#b97b45; }
.mpp-room-editor-mode[data-room-editor-mode="structure"] [data-editor-type="hotspot"],
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-test-overlay,
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-bookshelf-book { pointer-events:none !important; }


/* Build 47.2: tight structure hit areas and list-first selection. */
.mpp-room-editor-mode-list__item.is-selected {
    background: #eef1e8 !important;
    border-color: #87936f !important;
    box-shadow: inset 3px 0 0 #87936f !important;
}
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-structure-group-editor.is-room-editor-selected {
    z-index: 2147483000 !important;
}

/* Build 47.4: compact structure handles. */
.mpp-structure-group-editor {
    background: transparent !important;
    border-color: transparent !important;
    pointer-events: none !important;
}
.mpp-structure-group-editor > span { display: none !important; }
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-structure-handle {
    position: absolute;
    display: block;
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 6px;
    background: #87936f;
    box-shadow: 0 0 0 1px rgba(79,71,65,.42), 0 2px 7px rgba(79,71,65,.28);
    transform: translate(-50%, -50%);
    z-index: 2147483100;
    cursor: move;
    pointer-events: auto;
}
.mpp-room-editor-mode:not([data-room-editor-mode="structure"]) .mpp-structure-handle { display: none !important; }
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-structure-handle:hover,
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-structure-handle.is-selected {
    background: #657153;
    box-shadow: 0 0 0 3px rgba(255,255,255,.92), 0 0 0 5px rgba(135,147,111,.72);
}
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-structure-group-editor.is-room-editor-selected {
    border: 1px dashed rgba(135,147,111,.4) !important;
    outline: none !important;
}


/* Build 47.7: structures use green handles only; never show full-overlay transform boxes. */
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-structure-group-editor,
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-structure-group-editor.is-room-editor-selected {
    display: block !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none !important;
}
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-room-editor-transform-box.is-structure-transform {
    display: none !important;
}

/* Build 50.3: editor chrome repair after shared-stage unification.
 * The document has one vertical scrollbar (on html). Body and room stage never
 * create a second scrolling context. Reward filter layout is restored without
 * touching room geometry. */
html:has(body.mpp-room-editor-app) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
body.mpp-room-editor-app {
    overflow: visible !important;
}
body.mpp-room-editor-app .mpp-room-editor-app-shell,
body.mpp-room-editor-app .mpp-room-editor-mode,
body.mpp-room-editor-app .mpp-cottage-shell,
body.mpp-room-editor-app .mpp-cottage {
    overflow: visible !important;
}
body.mpp-room-editor-app .mpp-cottage-shell {
    overflow-x: clip !important;
}

/* Reward browser controls: keep labels, selects and actions aligned inside the
 * fixed editor panel. These rules affect editor chrome only. */
.mpp-room-editor-mode .mpp-room-editor-filter {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    flex: 0 0 auto;
    width: auto;
    margin: 10px 12px 0;
    padding: 0;
    box-sizing: border-box;
}
.mpp-room-editor-mode .mpp-room-editor-filter > label {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    color: #4f4741;
    font: 600 12px/1.3 Montserrat, sans-serif;
}
.mpp-room-editor-mode .mpp-room-editor-filter select {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 40px;
    margin: 0;
    padding: 7px 34px 7px 10px;
    box-sizing: border-box;
    color: #4f4741;
    background-color: #fff;
    border: 1px solid #d9cdbf;
    border-radius: 8px;
    font: 500 13px/1.2 Montserrat, sans-serif;
}
.mpp-room-editor-mode .mpp-room-editor-filter__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}
.mpp-room-editor-mode .mpp-room-editor-filter__actions button {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 9px 8px;
    box-sizing: border-box;
    white-space: nowrap;
}

/* The panel itself remains fixed; only its item list scrolls when needed. */
.mpp-room-editor-mode .mpp-panel {
    overflow: hidden !important;
}
.mpp-room-editor-mode .mpp-item-grid,
.mpp-room-editor-mode .mpp-room-editor-mode-list {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}


/* Complete Monthly Book scenes are editable only in Books mode. */
.mpp-room-editor-mode .mpp-book-scene-editor {
    box-sizing: border-box;
}
.mpp-room-editor-mode .mpp-room-editor-filter__actions [data-editor-copy-slot-report] {
    grid-column: 1 / -1;
}
.mpp-room-editor-mode[data-room-editor-mode="rewards"] .mpp-book-scene-editor,
.mpp-room-editor-mode[data-room-editor-mode="hotspots"] .mpp-book-scene-editor,
.mpp-room-editor-mode[data-room-editor-mode="structure"] .mpp-book-scene-editor {
	pointer-events: none !important;
}
.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-book-scene-editor {
	pointer-events: auto !important;
}
.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-book-scene-editor.is-room-editor-selected {
	outline: 2px solid rgba(126, 104, 75, 0.85);
	outline-offset: 3px;
}

/* ==========================================
   BOOKSHELF CAPACITY / MAXIMUM-FILL PREVIEW
========================================== */
.mpp-bookshelf-preview-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 285;
}

.mpp-bookshelf-preview-book {
	position: absolute;
	display: none;
	height: var(--mpp-preview-height, 5%);
	transform: translateY(-100%);
	transform-origin: bottom center;
	border: 1px solid rgba(79, 71, 65, 0.45);
	border-radius: 2px 2px 0 0;
	background:
		linear-gradient(90deg, rgba(255,255,255,.2), rgba(79,71,65,.08)),
		rgba(155, 165, 132, 0.58);
	box-shadow: 0 1px 2px rgba(79, 71, 65, 0.18);
}

.mpp-room-editor-mode.is-previewing-full-bookshelves .mpp-bookshelf-preview-book {
	display: block;
	pointer-events: auto;
	cursor: move;
}
.mpp-bookshelf-preview-book.is-room-editor-selected { outline:2px solid #7f8c69; outline-offset:2px; }
.mpp-bookshelf-preview-book small { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); font:700 9px/1 sans-serif; color:#4f4741; }
.mpp-book-template-list-item small { display:block; opacity:.7; }

.mpp-bookshelf-layout-controls {
	margin: 0 0 14px;
	padding: 12px;
	border: 1px solid #e7ddd1;
	border-radius: 10px;
	background: #fffdf9;
}

.mpp-bookshelf-layout-controls__buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 10px;
}

.mpp-bookshelf-layout-controls details > summary {
	cursor: pointer;
	font-weight: 700;
	color: #4f4741;
}

.mpp-bookshelf-layout-controls details > p {
	margin: 8px 0 12px;
	font-size: 12px;
	line-height: 1.45;
	color: #6f655d;
}

.mpp-bookshelf-layout-grid h4 {
	margin: 14px 0 7px;
	font-size: 13px;
}

.mpp-bookshelf-layout-row {
	display: grid;
	grid-template-columns: 58px repeat(3, minmax(92px, 1fr));
	gap: 6px;
	align-items: end;
	padding: 7px 0;
	border-top: 1px solid #eee5dc;
}

.mpp-bookshelf-layout-row strong {
	font-size: 11px;
	align-self: center;
}

.mpp-bookshelf-layout-row label {
	display: grid;
	gap: 3px;
	font-size: 10px;
	color: #6f655d;
}

.mpp-bookshelf-layout-row input {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 5px 6px;
}

.mpp-bookshelf-layout-controls [data-save-bookshelf-layout] {
	margin-top: 12px;
}

.mpp-bookshelf-layout-status {
	display: block;
	min-height: 18px;
	margin-top: 6px;
	font-size: 11px;
	color: #6f655d;
}

.mpp-bookshelf-layout-row { grid-template-columns: 58px repeat(3,minmax(90px,1fr)); }
.mpp-bookshelf-layout-row label { font-size:10px; }
.mpp-bookshelf-layout-row input { width:100%; box-sizing:border-box; }

/* Build 62: shelf-first Books editor. The baseline is always visible in Books mode. */
.mpp-bookshelf-shelf-editor {
	position: absolute;
	height: 18px;
	transform: translate(-50%, calc(-50% + 10px));
	pointer-events: auto;
	cursor: grab;
	z-index: 99920;
}
.mpp-bookshelf-shelf-editor:active { cursor: grabbing; }
.mpp-bookshelf-shelf-editor__baseline {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 1px;
	background: linear-gradient(90deg, rgba(79,71,65,.46) 0 30px, transparent 30px calc(100% - 30px), rgba(79,71,65,.46) calc(100% - 30px) 100%);
	box-shadow: none;
}
.mpp-bookshelf-shelf-editor__handle {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 16px;
	height: 16px;
	border: 2px solid #fff;
	border-radius: 4px;
	background: #8f6b45;
	box-shadow: 0 1px 5px rgba(0,0,0,.35);
	transform: translate(-50%, -50%);
}
.mpp-bookshelf-shelf-editor small {
	position: absolute;
	left: 50%;
	top: -18px;
	padding: 1px 5px;
	border-radius: 10px;
	background: rgba(255,255,255,.92);
	color: #5a4634;
	font: 700 10px/1.4 sans-serif;
	transform: translateX(-50%);
	white-space: nowrap;
}
.mpp-bookshelf-shelf-editor.is-room-editor-selected .mpp-bookshelf-shelf-editor__baseline {
	height: 1px;
	background: linear-gradient(90deg, rgba(63,128,95,.72) 0 34px, transparent 34px calc(100% - 34px), rgba(63,128,95,.72) calc(100% - 34px) 100%);
}
.mpp-bookshelf-shelf-editor.is-room-editor-selected .mpp-bookshelf-shelf-editor__handle {
	background: #3f805f;
}
.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-bookshelf-shelf-editor { display: block; }
.mpp-room-editor-mode:not([data-room-editor-mode="books"]) .mpp-bookshelf-shelf-editor { display: none; }
.mpp-room-editor-mode[data-room-editor-mode="books"]:not(.is-editing-individual-books) .mpp-bookshelf-preview-book,
.mpp-room-editor-mode[data-room-editor-mode="books"]:not(.is-editing-individual-books) .mpp-bookshelf-book {
	pointer-events: none !important;
}
.mpp-room-editor-mode.is-editing-individual-books .mpp-bookshelf-shelf-editor {
	pointer-events: none;
	opacity: .72;
}
.mpp-room-editor-mode.is-editing-individual-books .mpp-bookshelf-preview-book,
.mpp-room-editor-mode.is-editing-individual-books .mpp-bookshelf-book {
	pointer-events: auto !important;
}

/* Build 64: actual Monthly Books are previews only; template slots own shelf geometry. */
.mpp-room-editor-mode[data-room-editor-mode="books"] .mpp-bookshelf-book { pointer-events:none !important; }


/* Build 65: zoom, pan and history controls. */
.mpp-room-editor-zoom-controls { display:inline-flex; align-items:center; gap:4px; padding-left:4px; border-left:1px solid #ddd1c4; }
.mpp-room-editor-zoom-controls button { min-width:34px; padding:7px 8px; }
.mpp-room-editor-level-controls { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.mpp-room-editor-mode.is-space-panning,
.mpp-room-editor-mode.is-space-panning * { cursor: grab !important; user-select:none !important; }
.mpp-room-editor-mode.is-actively-panning,
.mpp-room-editor-mode.is-actively-panning * { cursor: grabbing !important; }
/* Shelf baseline reference is shown only at the ends, leaving the book bottoms and shelf artwork unobstructed. */
.mpp-bookshelf-shelf-editor__baseline { opacity:.8; pointer-events:none; }

/* Build 66: keep editor chrome fixed while only the room canvas zooms. */
.mpp-room-editor-mode > .mpp-room-editor-toolbar,
.mpp-room-editor-mode > .mpp-room-editor-window,
.mpp-room-editor-mode > .mpp-panel {
	zoom: 1 !important;
}

/* Clean shelf-first editing: guides never cover the book bottoms. */
.mpp-bookshelf-shelf-editor {
	height: 1px;
	transform: translate(-50%, 9px);
}
.mpp-bookshelf-shelf-editor__baseline {
	top: 0;
	height: 1px;
	background: linear-gradient(90deg,
		rgba(79,71,65,.42) 0 12px,
		transparent 12px calc(100% - 12px),
		rgba(79,71,65,.42) calc(100% - 12px) 100%);
	opacity: .65;
}
.mpp-bookshelf-shelf-editor__handle {
	left: 0;
	top: 0;
	width: 12px;
	height: 12px;
	border-width: 1px;
	transform: translate(-50%, -50%);
}
.mpp-bookshelf-shelf-editor small {
	left: 0;
	top: -21px;
	transform: none;
}
.mpp-bookshelf-shelf-editor.is-room-editor-selected .mpp-bookshelf-shelf-editor__baseline {
	background: linear-gradient(90deg,
		rgba(63,128,95,.72) 0 14px,
		transparent 14px calc(100% - 14px),
		rgba(63,128,95,.72) calc(100% - 14px) 100%);
}

/* Template numbers are fine-tuning aids only. */
.mpp-bookshelf-preview-book small { display: none; }
.mpp-room-editor-mode.is-editing-individual-books .mpp-bookshelf-preview-book small { display: block; }

/* In normal Books mode, clicking any visible spine selects and drags its shelf. */
.mpp-room-editor-mode[data-room-editor-mode="books"]:not(.is-editing-individual-books) .mpp-bookshelf-preview-book,
.mpp-room-editor-mode[data-room-editor-mode="books"]:not(.is-editing-individual-books) .mpp-bookshelf-book {
	pointer-events: auto !important;
	cursor: grab !important;
}


/* Build 67: one clear bookshelf-settings panel and permanently unnumbered books. */
.mpp-bookshelf-preview-book small { display: none !important; }
.mpp-bookshelf-layout-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	align-items: end;
}
.mpp-bookshelf-layout-row strong {
	grid-column: 1 / -1;
	font-size: 12px;
	padding-top: 2px;
}
.mpp-bookshelf-layout-row label { min-width: 0; }
.mpp-bookshelf-layout-row input { min-width: 0; width: 100%; }
.mpp-bookshelf-layout-controls details { min-width: 0; }
.mpp-bookshelf-layout-grid { min-width: 0; overflow: visible; }


/* Build 68: the Room Editor uses one slot-marker system only. The pulsing
 * member-facing placement buttons must never sit underneath the editable slot
 * rectangles because that creates two conflicting visual targets. */
.mpp-room-editor-mode .mpp-position-choice-layer,
.mpp-room-editor-mode .mpp-position-choice {
	display: none !important;
}

/* Keep the fourteen shelf selectors compact without hiding any shelf. */
.mpp-room-editor-shelf-list {
	margin: 0 0 10px;
	border: 1px solid #f4eee6;
	border-radius: 10px;
	background: #fcf7f1;
	overflow: hidden;
}
.mpp-room-editor-shelf-list > summary {
	padding: 12px 14px;
	color: #3d3833;
	font-weight: 700;
	cursor: pointer;
	list-style-position: inside;
}
.mpp-room-editor-shelf-list[open] > summary {
	border-bottom: 1px solid #f4eee6;
	background: #faf5ef;
}
.mpp-room-editor-shelf-list__items {
	display: grid;
	gap: 8px;
	padding: 10px;
}
.mpp-room-editor-shelf-list__items .mpp-room-editor-mode-list__item {
	margin: 0;
}

/* Preview books must remain at layer 285 so layer-286 bookcase decorations
 * stay in front. Raise the reading-chair stack only inside the Room Editor. */
.mpp-room-editor-mode .mpp-room-layer--reading-chair-left-arm {
	z-index: 290 !important;
}
.mpp-room-editor-mode .mpp-room-layer--reading-chair-back {
	z-index: 295 !important;
}
.mpp-room-editor-mode .mpp-room-layer--reading-chair-right-arm {
	z-index: 305 !important;
}

/* Build 69: keep the active slot editor above every room object. The saved
   decoration layer continues to control room artwork only; editor controls
   have their own deliberately higher interaction layer. */
.mpp-room-editor-mode.is-editing-hotspot-slots [data-editor-type="hotspot"].is-active-slot-parent {
	z-index: 100300 !important;
	isolation: isolate;
}
.mpp-room-editor-mode.is-editing-hotspot-slots [data-editor-type="hotspot"].is-active-slot-parent .mpp-hotspot-slot-editor {
	z-index: 100301 !important;
}
.mpp-room-editor-mode.is-editing-hotspot-slots .mpp-room-editor-transform-box {
	z-index: 100305 !important;
}

/* Build 70: self-contained Moonlight Paper Pantry editor skin. These final
   rules deliberately outrank Kadence/global form and button styles. */
.mpp-room-editor-mode {
	--mpp-editor-sage: #9ba284;
	--mpp-editor-lilac: #b1a6b7;
	--mpp-editor-blue: #758693;
	--mpp-editor-tan: #c3a98e;
	--mpp-editor-olive: #aca58b;
	--mpp-editor-text: #3d3833;
	--mpp-editor-bg: #faf5ef;
	--mpp-editor-panel: #fcf7f1;
	--mpp-editor-border: #f4eee6;
	color: var(--mpp-editor-text);
	font-family: Montserrat, sans-serif;
}
.mpp-room-editor-mode > .mpp-room-editor-window,
.mpp-room-editor-mode > .mpp-panel {
	color: var(--mpp-editor-text) !important;
	background: var(--mpp-editor-panel) !important;
	border-color: var(--mpp-editor-border) !important;
}
.mpp-room-editor-mode .mpp-room-editor-window__header,
.mpp-room-editor-mode .mpp-panel-header__top {
	color: var(--mpp-editor-text) !important;
	background: var(--mpp-editor-bg) !important;
	border-color: var(--mpp-editor-border) !important;
}
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	button:not(.mpp-item-card):not(.mpp-close) {
	min-width: 0 !important;
	min-height: 0 !important;
	box-sizing: border-box !important;
	color: var(--mpp-editor-text) !important;
	background: var(--mpp-editor-panel) !important;
	border: 1px solid var(--mpp-editor-border) !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	font-family: Montserrat, sans-serif !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	letter-spacing: 0 !important;
	text-decoration: none !important;
	text-transform: none !important;
	appearance: none !important;
}
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	button:not(.mpp-item-card):not(.mpp-close):not(.is-danger):not(:disabled):hover,
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	button:not(.mpp-item-card):not(.mpp-close):not(.is-danger):not(:disabled):focus {
	color: #fff !important;
	background: var(--mpp-editor-sage) !important;
	border-color: var(--mpp-editor-sage) !important;
	box-shadow: none !important;
}
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	button[aria-pressed="true"],
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	button.is-active,
.mpp-room-editor-mode .mpp-room-editor-mode-list__item.is-selected {
	color: #fff !important;
	background: var(--mpp-editor-lilac) !important;
	border-color: var(--mpp-editor-lilac) !important;
	box-shadow: inset 3px 0 0 rgba(61, 56, 51, .18) !important;
}
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	button:focus-visible,
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	input:focus-visible,
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	select:focus-visible {
	outline: 2px solid var(--mpp-editor-blue) !important;
	outline-offset: 2px !important;
}
.mpp-room-editor-mode :where(.mpp-room-editor-window, .mpp-panel)
	:where(input[type="text"], input[type="number"], input[type="search"], select) {
	min-height: 34px !important;
	box-sizing: border-box !important;
	color: var(--mpp-editor-text) !important;
	background: #fff !important;
	border: 1px solid var(--mpp-editor-border) !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	font-family: Montserrat, sans-serif !important;
	letter-spacing: 0 !important;
}
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	button:disabled {
	cursor: default !important;
	opacity: .58 !important;
}
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	button.is-danger,
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	button.is-danger:hover,
.mpp-room-editor-mode :where(.mpp-room-editor-toolbar, .mpp-room-editor-window, .mpp-panel)
	button.is-danger:focus {
	color: #7d3d35 !important;
	background: #fff4f2 !important;
	border-color: #c3a98e !important;
}

/* Consistent breathing room inside the floating editor panels. */
.mpp-room-editor-mode .mpp-item-grid {
	gap: 12px !important;
	padding: 12px 14px 18px 12px !important;
	box-sizing: border-box !important;
	scrollbar-gutter: stable;
}
.mpp-room-editor-mode button.mpp-item-card {
	align-items: center !important;
	gap: 12px !important;
	width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 12px !important;
	box-sizing: border-box !important;
	border-color: var(--mpp-editor-border) !important;
	border-radius: 14px !important;
}
.mpp-room-editor-mode button.mpp-item-card .mpp-item-image {
	flex: 1 1 58%;
	min-width: 0;
	margin: 0 !important;
	border-radius: 11px;
}
.mpp-room-editor-mode button.mpp-item-card h4 {
	flex: 1 1 42%;
	min-width: 0;
	font-size: 19px;
	line-height: 1.3;
}
.mpp-room-editor-mode .mpp-close {
	flex: 0 0 auto;
	width: calc(100% - 24px) !important;
	margin: 10px 12px 12px !important;
	box-sizing: border-box !important;
}
