/* Phone-only shell. Paper files, print styles and desktop layout are intentionally untouched. */
.wb-mobile-tabs, .wb-mobile-zoom, .wb-mobile-footer, .wb-mobile-menu, .mobile-account-tools { display: none; }
.wb-preview-frame { width: 100%; height: 100%; }
@media screen and (max-width: 720px), screen and (max-width: 1024px) and (max-height: 600px) and (pointer: coarse) {
  .nav-inner { height: 56px; padding: 0 12px; gap: 8px; }
  .brand { min-width: 0; flex: 1; gap: 7px; overflow: hidden; }
  .brand-mark { width: 29px; height: 29px; flex: 0 0 29px; font-size: 15px; border-radius: 8px; }
  .brand-text { min-width: 0; overflow: hidden; }
  .brand-text b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
  .brand-text small, .brand-text .pro { display: none; }
  .nav-actions { flex-shrink: 0; gap: 5px; }
  .nav-actions .btn { padding: 8px; font-size: 12px; white-space: nowrap; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
  .nav-actions .token-pill { display: none; }
  .nav-actions.is-member > button { display: none; }
  .nav-actions.is-member > button:nth-last-child(2) { display: inline-flex; }
  .hero { padding: 28px 14px; }
  .hero h1 { font-size: 25px; line-height: 1.4; }
  .hero-sub { font-size: 13px; }
  .funnel-steps { gap: 6px; font-size: 11px; }
  .search-box { padding-left: 10px; }
  .search-box input { min-width: 0; font-size: 16px; }
  .search-btn { flex-shrink: 0; padding: 10px; font-size: 12px; }
  .filter-bar-wrap { top: 56px; scroll-margin-top: 56px; }
  .filter-bar { padding: 8px 12px; gap: 6px; display: block; }
  .region-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 4px; padding-bottom: 5px; scrollbar-width: none; }
  .region-tab { flex: 0 0 auto; white-space: nowrap; height: 34px; padding: 0 9px; font-size: 12px; }
  .right-filters { gap: 5px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #docTypeGroup { flex-shrink: 0; }
  .seg-btn { white-space: nowrap; font-size: 11px; padding: 7px 8px; }
  .mask-toggle { flex-shrink: 0; white-space: nowrap; font-size: 11px; padding: 7px; }
  #colGroup { display: none; }
  .gallery-section { padding: 20px 12px 36px; }
  .gallery-meta-row { align-items: flex-start; gap: 8px; flex-wrap: wrap; }
  .result-info { font-size: 12px; }
  .cards-grid, .cards-grid.cols-4 { grid-template-columns: minmax(0, 1fr) !important; }
  .tpl-card:hover { transform: none; }
  .tpl-card:hover .a4-sheet { transform: none; }
  .dialog-card { max-height: calc(100dvh - 24px); padding: 22px 18px; }
  .mobile-account-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
  .mobile-account-tools .btn { font-size: 12px; padding: 8px; }
  .tabs-nav { overflow-x: auto; }
  .tabs-nav button { flex-shrink: 0; white-space: nowrap; }
  #ucPane_logs, #ucPane_downloads, #ucPane_orders { overflow-x: auto; }
  .dialog-card input, .dialog-card select, .dialog-card textarea { font-size: 16px; }
  #workbenchModal { padding: 0; align-items: stretch; top: var(--wb-mobile-top, 0px); bottom: auto; height: var(--wb-mobile-height, 100dvh); }
  .wb-shell { position: relative; width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; padding-top: env(safe-area-inset-top); }
  .wb-header { height: 52px; padding: 0 8px; gap: 6px; }
  .wb-h-left { width: 100%; min-width: 0; gap: 6px; }
  .wb-h-left > button { display: none; }
  .wb-h-left > button:first-child { display: inline-flex; padding: 8px; font-size: 12px; flex-shrink: 0; }
  .wb-h-right { display: none; }
  .wb-select { flex: 1; width: 0; min-width: 0; max-width: none; font-size: 16px; padding: 0 5px; }
  .wb-mobile-tabs { display: flex; flex-shrink: 0; padding: 7px 12px; gap: 8px; background: #0f172a; }
  .wb-mobile-tabs button { flex: 1; min-height: 38px; border: 1px solid #334155; border-radius: 9px; background: #1e293b; color: #cbd5e1; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  .wb-mobile-tabs button[aria-selected="true"] { color: #fff; background: #2563eb; border-color: #3b82f6; }
  .wb-body { position: relative; overflow: hidden; }
  .wb-form-sidebar, .wb-form-sidebar.collapsed { display: flex; width: 100%; margin-left: 0; border: 0; transition: none; min-height: 0; }
  .wb-form-head { padding: 10px 14px; }
  .wb-form-head h4 { font-size: 14px; }
  .wb-form-head p { font-size: 12px; }
  .wb-field-filter { height: 40px; font-size: 16px; }
  .wb-fields-list { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 24px; }
  .wb-f-item { flex-shrink: 0; }
  .wb-f-item label { font-size: 12px; }
  .wb-f-item input, .wb-f-item textarea { font-size: 16px; min-height: 44px; line-height: 1.5; padding: 9px; }
  .wb-f-item textarea { min-height: 76px; resize: vertical; }
  .wb-canvas-area { position: absolute; inset: 0; overflow: auto; visibility: hidden; pointer-events: none; }
  .wb-preview-frame { position: relative; min-width: 100%; height: 100%; overflow: hidden; }
  .wb-iframe { position: absolute; width: 1800px; max-width: none; transform-origin: top left; }
  #workbenchModal[data-mobile-tab="preview"] .wb-form-sidebar { display: none; }
  #workbenchModal[data-mobile-tab="preview"] .wb-canvas-area { visibility: visible; pointer-events: auto; }
  .wb-mobile-zoom { display: none; flex-shrink: 0; align-items: center; gap: 5px; padding: 6px 12px; color: #cbd5e1; background: #1e293b; font-size: 11px; }
  #workbenchModal[data-mobile-tab="preview"] .wb-mobile-zoom { display: flex; }
  .wb-mobile-zoom span { flex: 1; }
  .wb-mobile-zoom button { min-width: 35px; height: 32px; padding: 0 7px; border: 1px solid #64748b; border-radius: 6px; background: #334155; color: #fff; }
  .wb-mobile-footer { display: flex; flex-shrink: 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 8px; border-top: 1px solid #334155; }
  .wb-mobile-footer .btn { min-height: 42px; font-size: 13px; }
  .wb-mobile-footer .btn:last-child { flex: 1; }
  .wb-mobile-menu:not([hidden]) { display: flex; flex-direction: column; gap: 12px; position: absolute; z-index: 3; bottom: 0; left: 0; right: 0; max-height: 90%; overflow-y: auto; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: #0f172a; color: #e2e8f0; border: 1px solid #475569; border-radius: 16px 16px 0 0; box-shadow: 0 -20px 70px #0009; }
  .wb-mobile-menu-head, .wb-mobile-account { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .wb-mobile-menu p, .wb-mobile-menu small { font-size: 12px; line-height: 1.6; }
  #wbMobileExports { display: flex; flex-direction: column; gap: 8px; }
  #wbMobileExports button { width: 100%; min-height: 44px; white-space: normal; }
}
