.room-edit-toggle { position: fixed; z-index: 30; right: 13px; bottom: max(24px,env(safe-area-inset-bottom)); display: flex; gap: 7px; align-items: center; min-height: 46px; padding: 9px 15px; border: 1px solid #acbc96; border-radius: 14px; color: #54734f; background: #fff9e8; box-shadow: 0 3px 0 #b2c09b; font: 800 13px "Trebuchet MS",sans-serif; cursor: pointer; }
.room-edit-toggle span { font-size: 24px; }
.room-layout-editor { position: fixed; z-index: 43; inset: auto 12px max(12px,env(safe-area-inset-bottom)); width: min(950px,calc(100vw - 24px)); margin-inline: auto; padding: 12px 16px; border: 1px solid #b7c7a4; border-radius: 20px; color: #476448; background: #fffcef; box-shadow: 0 5px 0 #c7d3b4,0 8px 24px #344f3224; font-family: "Trebuchet MS",system-ui,sans-serif; }
.room-layout-editor[hidden] { display: none !important; }
.room-layout-editor header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 8px; }
.room-layout-editor header strong { font-size: 18px; letter-spacing: -.025em; }
.room-layout-editor header small { display: block; margin-top: 3px; color: #859373; font-size: 11px; line-height: 1.4; }
.room-layout-editor button { min-height: 44px; padding: 8px 13px; border: 1px solid #c5d2b7; border-radius: 11px; color: #4c704b; background: #edf2df; font-family: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.room-layout-editor :focus-visible, .room-edit-toggle:focus-visible { outline: 3px solid #b88b3b; outline-offset: 2px; }
.room-editor-tools { display: flex; align-items: center; gap: 12px; }
.room-editor-tracks { display: flex; flex: 1; gap: 6px; }
.room-layout-editor .room-editor-tracks button { flex: 1; display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #fffdf4; text-align: left; }
.room-editor-tracks b { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; color: #fffdf1; background: var(--track-colour); }
.room-editor-tracks small { display: block; margin-top: 3px; font-size: 9px; color: #91997c; font-weight: 500; }
.room-layout-editor .room-editor-tracks [aria-pressed="true"] { border-color: var(--track-colour); background: #eaf0df; box-shadow: inset 0 0 0 1px var(--track-colour); }
.room-editor-isolate { display: flex; align-items: center; gap: 5px; color: #778b67; white-space: nowrap; font-size: 11px; }
body.room-editing :is(.room-sidebar,.world-supplies,#boombox,.grass-foreground,.chumkin-grass-motion,.chumking-help-tag,.room-edit-toggle) { visibility: hidden; pointer-events: none; }
body.chumking-visiting .room-edit-toggle { visibility: hidden; }
html[data-desktop="companion"] :is(.room-edit-toggle,.room-layout-editor), html[data-android-overlay="true"] :is(.room-edit-toggle,.room-layout-editor) { display: none; }
@media(max-width:700px) {
  .room-layout-editor { padding: 9px 10px; border-radius: 16px; }
  .room-layout-editor header small { font-size: 9px; max-width: 230px; }
  .room-editor-tools { flex-wrap: wrap; gap: 7px; }
  .room-editor-tracks { flex-basis: 100%; }
  .room-layout-editor .room-editor-tracks button { padding: 6px; gap: 4px; }
  .room-editor-tracks b { width: 20px; height: 23px; font-size: 11px; }
  .room-editor-tracks span { font-size: 10px; }
  .room-editor-isolate { margin-right: auto; font-size: 10px; }
  .room-edit-toggle { bottom: 20px; font-size: 12px; padding: 8px 12px; }
}

.room-editor-isolate input { width:16px; height:16px; min-height:0; padding:0; margin:0; box-shadow:none; }
body.room-editing .app-shell :is(.room-item-editor,.room-inventory-drawer) { top:auto; bottom:calc(var(--room-editor-height,180px) + max(24px,env(safe-area-inset-bottom) + 12px)); max-height:calc(100dvh - var(--room-editor-height,180px) - 180px); z-index:44; }
