/* Preview candidate: only the outer desktop controls, with native mobile rules retained. */
:root:not([data-mobile-layout]) .cm-compact-world-tools {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: calc(20px + env(safe-area-inset-right));
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: calc(100% - 40px - env(safe-area-inset-left) - env(safe-area-inset-right));
}
:root:not([data-mobile-layout]) .cm-compact-world-tools > :is(.device-view-toggle,.mobile-fullscreen-toggle,.cafe-music-toggle,.cm-controls-help) {
  position: static;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #ffffff3b;
  border-radius: 9px;
  background: #10214ad9;
  color: #fff;
  box-shadow: 0 3px 8px #0002;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: calc(11px * var(--cm-text-scale, 1));
  line-height: 1;
  white-space: nowrap;
  opacity: 1;
}
:root:not([data-mobile-layout]) .cm-compact-world-tools > .device-view-toggle {
  background: linear-gradient(135deg,#285ddbdb,#102956e8);
  border-color: #9cdeff91;
}
:root:not([data-mobile-layout]) .cm-compact-world-tools > :is(.cafe-music-toggle,.cm-controls-help) {
  width: 38px;
  padding: 0;
}
:root:not([data-mobile-layout]) .cm-compact-world-tools > button > svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
:root:not([data-mobile-layout]) .cm-compact-world-tools > .cafe-music-toggle[aria-pressed=true] {
  color: #acffee;
  border-color: #91ead099;
  background: #123d4dcc;
}
:root:not([data-mobile-layout]) .cm-compact-world-tools > button:disabled {
  opacity: .65;
  cursor: progress;
}
:root:not([data-mobile-layout]) .cm-compact-world-tools > button:focus-visible {
  outline: 2px solid #a8dfff;
  outline-offset: 3px;
}
:root:not([data-mobile-layout]) .cm-compact-world-tools > .wallet-entry {
  position: static;
  flex: 0 0 auto;
  margin: 0;
}
:root:not([data-mobile-layout]) .cm-compact-world-tools > .wallet-entry > .wallet-connect {
  min-height: 36px;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: calc(11px * var(--cm-text-scale, 1));
  white-space: nowrap;
}
:root:not([data-mobile-layout]) .cm-compact-world-tools > .wallet-entry > .cm-wallet-privacy-toggle {
  min-height: 36px;
  height: 36px;
  width: 36px;
}
:root:not([data-mobile-layout]) .cm-compact-world-tools > .cafe-music-mobile {
  display: none;
}
/* Keep the original mobile music / full-screen / wallet row and its native sizing. */
:root[data-mobile-layout] .cm-compact-world-tools > :is(.device-view-toggle,.cafe-music-toggle,.cm-controls-help,.operator-health) {
  display: none !important;
}
/* The private operator and desktop controls retain the existing close-up visibility. */
:root:not([data-mobile-layout]) .laptop-mode.closeup .cm-compact-world-tools > :is(.device-view-toggle,.cafe-music-toggle,.cm-controls-help,.operator-health) {
  visibility: hidden;
  pointer-events: none;
}
@media (min-width: 701px) and (max-width: 1000px) {
  :root:not([data-mobile-layout]) .cm-compact-world-tools { right: 16px; gap: 7px; }
}
