/* Mobile app shell. Template canvases keep their original pixel geometry. */
#yf-mobile-header, #yf-library-search { display: none; }
@media (max-width: 899px) {
  :root { --yf-top: max(env(safe-area-inset-top, 0px), var(--tuce-tg-top, 0px)); --yf-bottom: max(env(safe-area-inset-bottom, 0px), var(--tuce-tg-bottom, 0px)); --yf-bar: calc(58px + var(--yf-top)); --yf-nav: calc(66px + var(--yf-bottom)); }
  html, body, #app { width: 100% !important; min-width: 0 !important; }
  body { background: #f4f6fa; -webkit-tap-highlight-color: transparent; }
  [data-tuce-app-toolbar], [data-tuce-editor-navigation], [data-yf-preview-note] { display: none !important; }
  #yf-mobile-header { position: fixed; inset: 0 0 auto; z-index: 2147483005; display: flex; align-items: center; gap: 10px; height: var(--yf-bar); padding: calc(8px + var(--yf-top)) 14px 8px; box-sizing: border-box; background: #fff; border-bottom: 1px solid #e8edf4; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
  #yf-mobile-header button { min-width: 44px; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: #f0f4fa; color: #263449; font-size: 15px; font-weight: 600; }
  #yf-mobile-heading { flex: 1; min-width: 0; }
  #yf-mobile-title { display: block; font-size: 17px; font-weight: 650; color: #15253c; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  #yf-mobile-caption { display: block; margin-top: 2px; font-size: 11px; color: #738198; }
  #yf-mobile-caption.yf-asset-missing { color: #b45309; }
  #yf-mobile-header #yf-export { background: #1677ff; color: #fff; padding: 0 16px; }
  #yf-mobile-header button[hidden] { display: none; }
  body[data-tuce-mobile-page="editor"] { position: relative; height: 100dvh !important; overflow: hidden !important; }
  [data-tuce-editor-shell] { position: fixed !important; inset: var(--yf-bar) 0 var(--yf-nav) !important; width: 100% !important; height: auto !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; }
  [data-tuce-mobile-editor] { position: absolute !important; inset: 0 !important; height: 100% !important; width: 100% !important; margin: 0 !important; }
  .tuce-mobile-pane-tabs { position: fixed !important; inset: auto 0 0 !important; z-index: 2147483004; height: var(--yf-nav); min-height: var(--yf-nav); padding: 7px 12px calc(7px + var(--yf-bottom)); gap: 6px; border: 0; border-top: 1px solid #e5eaf2; box-sizing: border-box; background: #fff; box-shadow: 0 -4px 20px #15253c08; }
  .tuce-mobile-pane-tabs button { min-height: 46px; border: 0 !important; border-radius: 12px !important; background: transparent; color: #718096; font-size: 14px; font-weight: 600; }
  .tuce-mobile-pane-tabs button.is-active { background: #eaf2ff; color: #1269e8; }
  [data-tuce-mobile-editor] > [data-tuce-editor-pane] { box-sizing: border-box !important; padding: 16px !important; overscroll-behavior: contain; scrollbar-width: thin; }
  [data-tuce-mobile-editor] > [data-tuce-editor-pane="preview"] { padding: 8px !important; background: #e9edf3 !important; }
  [data-tuce-editor-preview-tools] { display: none !important; }
  [data-tuce-editor-pane="templates"] { background: #f4f6fa !important; }
  [data-yf-form-layout] { display: flex !important; flex-direction: column !important; gap: 16px; width: 100% !important; }
  [data-yf-form-column] { width: 100% !important; min-width: 0 !important; max-width: none !important; }
  [data-yf-form-layout] > div { width: 100% !important; height: auto !important; min-height: 0 !important; border: 0 !important; }
  [data-tuce-editor-pane="templates"] .fromItme { width: 100% !important; height: auto !important; min-height: 0 !important; max-height: none !important; padding: 0 !important; overflow: visible !important; }
  [data-yf-field-row] { display: flex !important; flex-wrap: wrap; align-items: center !important; gap: 8px; padding: 14px !important; margin-bottom: 10px; border: 1px solid #e5eaf1; border-radius: 14px; background: #fff; }
  [data-yf-field-label] { width: 100% !important; min-width: 0 !important; text-align: left !important; color: #53647b; font-size: 13px !important; font-weight: 600; }
  [data-yf-field-control] { flex: 1 1 100%; display: flex; align-items: center; width: 100% !important; min-width: 0; padding: 0 !important; }
  [data-yf-field-control] > div { min-width: 0; }
  [data-tuce-editor-pane="templates"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  [data-tuce-editor-pane="templates"] textarea { min-height: 44px !important; height: auto; font-size: 16px !important; border-radius: 9px; padding: 9px 10px; }
  [data-tuce-editor-pane="templates"] .ant-select { font-size: 16px !important; }
  [data-tuce-editor-pane="templates"] .ant-select-selector { min-height: 44px !important; align-items: center; border-radius: 9px !important; }
  [data-tuce-editor-pane="templates"] .editField { position: static !important; width: 100% !important; height: auto !important; max-height: none !important; padding: 12px !important; border: 1px solid #e5eaf1; border-radius: 14px; box-sizing: border-box; background: #fff; }
  [data-tuce-editor-pane="templates"] .editField .ant-menu { display: flex !important; flex-wrap: wrap; gap: 8px; width: 100% !important; border: 0; }
  [data-tuce-editor-pane="templates"] .editField .ant-menu-item { width: auto !important; height: 40px !important; line-height: 40px !important; margin: 0 !important; padding: 0 12px !important; border-radius: 8px; }
  [data-tuce-editor-pane="templates"] .ant-menu { display: flex !important; flex-wrap: wrap; gap: 8px; width: 100% !important; height: auto !important; padding: 10px 0; border: 0; background: transparent; }
  [data-tuce-editor-pane="templates"] .ant-menu-item { width: auto !important; min-height: 42px; margin: 0 !important; border-radius: 9px; background: #fff; }
  [data-tuce-editor-pane="templates"] .tuce-template-footer { position: static !important; height: auto !important; width: 100% !important; margin-top: 18px; padding: 0 !important; border: 0 !important; background: transparent !important; }
  [data-tuce-editor-pane="templates"] .tuce-template-footer > div { position: static !important; height: auto !important; display: flex !important; flex-wrap: wrap; justify-content: flex-start !important; gap: 8px; border: 0 !important; }
  [data-tuce-editor-pane="templates"] .tuce-template-footer .ant-select-selector input { min-height: 0 !important; }
  [data-yf-field-control] button { min-width: 52px !important; white-space: nowrap !important; }
  [data-yf-template-controls] { position: static !important; width: 100% !important; height: auto !important; padding: 12px 0 !important; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
  [data-yf-native-actions] { display: none !important; }
  [data-tuce-editor-pane="templates"] button { min-height: 42px; border-radius: 9px; white-space: normal; }
  [data-tuce-editor-pane="parameters"] { background: #f4f6fa !important; }
  [data-tuce-editor-pane="parameters"] .listMobile { width: calc(33.333% - 6px) !important; margin: 3px !important; }
  [data-tuce-editor-pane="parameters"] .mobileButton { display: flex; justify-content: center; align-items: center; min-height: 42px; border-radius: 10px; font-size: 14px; }
  [data-tuce-editor-pane="parameters"] input { font-size: 16px !important; min-height: 40px; }
  [data-tuce-editor-pane="parameters"] button { min-height: 42px; border-radius: 9px; }
  [data-tuce-editor-pane="parameters"] img { object-fit: contain; }
  .ant-modal { max-width: calc(100vw - 24px) !important; margin: 0 auto; top: 16px; padding-bottom: 16px; }
  .ant-modal-body { max-height: calc(100dvh - 160px); overflow: auto; }
  body[data-tuce-mobile-page="home"] { padding-top: var(--yf-bar); }
  [data-tuce-home-header] { display: none !important; }
  [data-tuce-mobile-home] { min-height: calc(100dvh - var(--yf-bar)) !important; padding-bottom: 76px; background: #f4f6fa !important; }
  #yf-library-search { display: block; padding: 16px 16px 10px; }
  #yf-library-search input { box-sizing: border-box; width: 100%; height: 48px; padding: 0 16px; border: 1px solid #e2e8f1; border-radius: 14px; background: #fff; color: #23344e; font-size: 16px; outline-color: #1677ff; }
  [data-tuce-home-content] { padding: 0 12px 24px !important; }
  [data-tuce-home-content] .main { display: flex !important; flex-wrap: wrap; align-content: flex-start; }
  [data-tuce-home-content] .itme { display: flex !important; flex-direction: column; align-items: center; justify-content: center; width: calc(50% - 10px) !important; height: 116px !important; margin: 5px !important; border: 1px solid #e5eaf1; border-radius: 16px !important; background: #fff; color: #23344e; font-size: 14px !important; box-sizing: border-box; }
  [data-tuce-home-content] .itmeImage { height: 52px !important; padding: 0 !important; }
  [data-tuce-home-content] .itmeImage img { width: 38px !important; height: 38px !important; object-fit: contain; }
  [data-tuce-home-content] .itme[data-yf-filtered="true"] { display: none !important; }
  [data-tuce-home-disclaimer] { display: none !important; }
  #tuce-mobile-category-trigger { display: none !important; }
  [data-tuce-home-sidebar] { top: var(--yf-bar) !important; height: calc(100dvh - var(--yf-bar)) !important; }
}
