/* Mobile editors paint independently of the player's blur and clipped layers. */
.sheet.is-mobile-editor [hidden] {
  display: none !important;
}

html .sheet.is-mobile-editor {
  position: fixed;
  top: var(--app-viewport-offset-top, 0px) !important;
  right: 0;
  bottom: auto !important;
  left: 0;
  z-index: 100;
  display: flex;
  width: 100%;
  height: var(--app-viewport-height) !important;
  padding: max(8px, env(safe-area-inset-top)) 8px calc(110px + env(safe-area-inset-bottom));
  overflow: visible;
  isolation: auto;
  transform: none;
}

html.is-keyboard-open .sheet.is-mobile-editor,
html .sheet.is-mobile-editor.is-short-editor {
  padding-bottom: 8px;
}

html .sheet.is-mobile-editor,
html .sheet.is-mobile-editor *,
html .sheet.is-mobile-editor *::before,
html .sheet.is-mobile-editor *::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html .sheet.is-mobile-editor .sheetBackdrop {
  background: rgba(0, 0, 0, 0.45);
}

html #sheet.is-mobile-editor .sheetPanel {
  position: relative !important;
  inset: auto !important;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  width: 100% !important;
  min-width: 0;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 20px;
  background: var(--surface) !important;
  contain: none;
  transform: none !important;
}

html .sheet.is-mobile-editor .sheetHeader {
  position: relative;
  top: auto;
  flex: 0 0 auto;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface);
}

html .sheet.is-mobile-editor .sheetClose {
  width: 44px;
  height: 44px;
}

html .sheet.is-mobile-editor .sheetContent {
  flex: 1 1 0;
  min-height: 0;
  padding: 12px 16px;
  overflow: auto !important;
  overscroll-behavior: contain;
  overflow-anchor: none;
  -webkit-overflow-scrolling: auto;
}

html .sheet.is-mobile-editor[data-panel="chat"]:not(.is-chat-join) .sheetContent {
  display: flex;
  overflow: hidden !important;
}

html .sheet.is-mobile-editor .chatRoom {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 8px;
  height: auto;
  min-width: 0;
  min-height: 0;
}

html .sheet.is-mobile-editor .chatRoom > * {
  flex-shrink: 0;
}

html .sheet.is-mobile-editor .chatMessages {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: auto;
}

html .sheet.is-mobile-editor .chatComposer {
  position: relative;
  bottom: auto;
  grid-template-columns: minmax(0, 1fr) 44px;
  min-height: 56px;
  margin: 0;
  background: var(--surface);
}

html .sheet.is-mobile-editor .chatComposer button {
  width: 44px;
  height: 44px;
}

html .sheet.is-mobile-editor input,
html .sheet.is-mobile-editor textarea {
  font-size: 16px;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

html .sheet.is-mobile-editor .dedicationActions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding: 4px 0;
  background: var(--surface);
}

html .sheet.is-mobile-editor.is-short-editor .sheetHeader {
  padding: 4px 12px;
}

html .sheet.is-mobile-editor.is-short-editor .sheetHeader h2 {
  font-size: 18px;
}

html .sheet.is-mobile-editor.is-short-editor .sheetContent {
  padding: 6px 12px;
}

html .sheet.is-mobile-editor.is-short-editor .chatIdentity,
html .sheet.is-mobile-editor.is-short-editor .chatPresence,
html .sheet.is-mobile-editor.is-short-editor .chatJoinIntro,
html .sheet.is-mobile-editor.is-short-editor .panelIntro {
  display: none;
}

html .sheet.is-mobile-editor.is-short-editor .formField textarea {
  min-height: 64px;
  height: 64px;
}

html.is-mobile-editor-open .app .backdrop {
  visibility: hidden;
}
