@media (hover:none), (pointer:coarse), (max-width:768px) {
  html,
  body,
  #app,
  #app * {
    -webkit-touch-callout: none !important;
  }

  #app a,
  #app button,
  #app img,
  #app .listing-item,
  #app .thumbnail,
  #app .preview,
  #app .no-select {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    touch-action: manipulation;
  }

  #app input,
  #app textarea,
  #app select,
  #app [contenteditable="true"],
  #app [role="textbox"],
  #app input *,
  #app textarea *,
  #app [contenteditable="true"] * {
    -webkit-touch-callout: default;
    -webkit-user-select: text;
    user-select: text;
  }

  header.flexbar > * {
    min-width: 0;
  }

  header.flexbar h1,
  header.flexbar .title,
  header.flexbar span:not(.material-symbols):not(.material-symbols-outlined) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .floating-window:not(.floating-tooltip) {
    position: fixed !important;
    top: 56px !important;
    left: 8px !important;
    right: auto !important;
    bottom: max(112px, calc(env(safe-area-inset-bottom, 0px) + 88px)) !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    height: auto !important;
    max-height: none !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: none !important;
    box-sizing: border-box;
  }



  html,
  body,
  #app {
    max-width: 100vw;
    overflow-x: hidden;
  }

  #context-menu.floating-window {
    position: fixed !important;
    top: auto !important;
    left: 8px !important;
    right: auto !important;
    bottom: max(112px, calc(env(safe-area-inset-bottom, 0px) + 88px)) !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 196px) !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: none !important;
    box-sizing: border-box;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
  }

  #context-menu .context-menu-header,
  #context-menu .action {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  #context-menu .context-menu-header {
    align-items: center !important;
    gap: 8px !important;
    min-height: 48px !important;
    padding: 8px 10px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }

  #context-menu .context-menu-create-toggle {
    position: static !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    justify-content: flex-start !important;
  }

  #context-menu .selected-count-header {
    flex: 0 0 auto !important;
    margin-left: auto !important;
  }

  #context-menu .action {
    min-height: 44px !important;
  }

  .floating-window .prompt-taskbar,
  .floating-window .prompt-taskbar-drag,
  .floating-window .card-content,
  .floating-window .card-actions {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .floating-window .card-content {
    max-height: calc(100dvh - 176px) !important;
    overflow: auto !important;
    padding-bottom: 72px !important;
  }

  .floating-window .searchContext,
  .floating-window p {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .floating-window .prompt-resize-corner,
  .floating-window .resize-handles {
    display: none !important;
  }

  .floating-window .settings-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .floating-window .settings-table thead {
    display: none !important;
  }

  .floating-window .settings-table tbody {
    display: block !important;
    width: 100% !important;
  }

  .floating-window .settings-table tr {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    width: 100% !important;
    margin: 0 0 10px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.035);
    box-sizing: border-box;
  }

  .floating-window .settings-table td {
    display: block !important;
    width: auto !important;
    box-sizing: border-box;
    padding: 4px 6px !important;
    text-align: left !important;
  }

  .floating-window .settings-table td:first-child {
    flex: 1 0 100%;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .floating-window .settings-table td:nth-child(2) {
    flex: 1 0 100%;
    font-size: 13px;
  }

  .floating-window .settings-table td:nth-child(2)::before {
    content: "\5230\671F\FF1A";
    font-weight: 700;
  }

  .floating-window .settings-table .settings-table__td--narrow {
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 2px !important;
  }

  .floating-window .settings-table .action {
    width: 40px;
    height: 40px;
  }

  .floating-window .card-actions {
    left: 0 !important;
    right: 0 !important;
    padding: 8px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .floating-window .card-actions .button,
  .floating-window .card-actions button {
    min-width: 88px;
    white-space: nowrap;
  }
}

.fbq-mobile-toast {
  position: fixed;
  left: 50%;
  bottom: max(132px, calc(env(safe-area-inset-bottom, 0px) + 108px));
  z-index: 2147483647;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(24, 32, 38, 0.94);
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
