/* deskparity71: Tess-only OCR (no Paddle); speed UPS/edge; translate POST blob */
/* deskparity67: OCR kana/jpn fix; deskparity64 capture fit/pan-y; deskparity63 Select text bottom */
/* PdfStudio phone: desktop chrome colours, phone-readable scale */

html.pdfstudio-mobile,
body.pdfstudio-mobile {
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  background: var(--menu-bg);
  color: var(--text);
  /* Kill any leftover Safari chrome offset from older builds — never drive layout from vv */
  --vv-top: 0px;
}

html.pdfstudio-mobile,
body.pdfstudio-mobile {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  /* iOS Safari: prefer fill-available so layout stays in the unobscured area */
  min-height: 100%;
  min-height: -webkit-fill-available;
}
@supports (height: 100dvh) {
  html.pdfstudio-mobile,
  body.pdfstudio-mobile {
    height: 100dvh;
    max-height: 100dvh;
  }
}

body.pdfstudio-mobile .app {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  min-height: -webkit-fill-available;
  overflow: hidden !important;
  background-color: var(--panel);
  /* deskparity114: paint safe+extra top strip black (no white under notch) */
  background-image: linear-gradient(#111111, #111111);
  background-size: 100% calc(env(safe-area-inset-top, 0px) + 10px);
  background-repeat: no-repeat;
  background-position: top left;
  /* Notch + 10px breathing room — do NOT use visualViewport padding (shake) */
  padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  box-sizing: border-box;
}
@supports (height: 100dvh) {
  body.pdfstudio-mobile .app {
    height: 100dvh !important;
    max-height: 100dvh !important;
  }
}

/* Browser preview: safe-area + 10px; never --vv-top */
body.pdfstudio-mobile.pdfstudio-browser .app {
  padding-top: calc(env(safe-area-inset-top, 0px) + 10px) !important;
}

/* Solid strip under notch so PDF never paints through the status/notch gap */
body.pdfstudio-mobile .app > .menubar {
  background: var(--menu-bg);
  /* menubar itself sits BELOW .app safe-area padding — keep opaque */
  position: relative !important;
  z-index: 40;
}
body.pdfstudio-mobile .app > .tabbar,
body.pdfstudio-mobile .app > .globalbar {
  position: relative !important;
  z-index: 39;
}

/* Viewer must stay in the flex main well — never under chrome */
body.pdfstudio-mobile .main {
  position: relative !important;
  z-index: 1;
}
body.pdfstudio-mobile #viewer.viewer-wrap {
  margin-top: 0 !important;
  top: auto !important;
  transform: none !important;
}

body.pdfstudio-mobile .mobile-banner { display: none !important; }
.phone-quickbar { display: none !important; }

/* Hidden file input — activated by <label for=fileOpenPhone> (iOS-safe) */
#fileOpenPhone {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 0.1px !important;
  height: 0.1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  z-index: -1 !important;
  /* pointer-events kept so programmatic label.click works */
}

/* CRITICAL: never force display on .popup-menu — [hidden] must stay none
   or every File/Edit/View/Tools/Window/Help menu shows at once (deskparity3 bug). */
body.pdfstudio-mobile .popup-menu[hidden] {
  display: none !important;
}
/* deskparity155: Microsoft Word–style pull-downs — single column, light panel, tight rows */
/* deskparity158: shared min/max so File ≈ Edit/View/Tools/Window (was File capped narrow vs siblings) */
/* deskparity222: full menu names — no text-overflow ellipsis; widen so long labels fit */
body.pdfstudio-mobile .popup-menu:not([hidden]) {
  z-index: 10060 !important;
  width: max-content;
  max-width: min(98vw, 36rem);
  min-width: min(18rem, 94vw);
  max-height: min(70vh, 28rem);
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  background: #ffffff !important;
  border: 1px solid #c8c8c8 !important;
  border-radius: 2px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-content: stretch !important;
  align-items: stretch !important;
  gap: 0;
  box-sizing: border-box;
  padding: 4px 0 !important;
}
body.pdfstudio-mobile .popup-menu:not([hidden]) > button,
body.pdfstudio-mobile .popup-menu:not([hidden]) > label,
body.pdfstudio-mobile .popup-menu:not([hidden]) > .menu-open-label {
  flex: 0 0 auto;
  display: block !important;
  width: max-content;
  min-width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  text-align: left !important;
  line-height: 1.25;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 8px 16px !important; /* ~36–40px row with line */
  min-height: 36px !important;
  margin: 0 !important;
}
body.pdfstudio-mobile .popup-menu:not([hidden]) > button:hover:not(:disabled),
body.pdfstudio-mobile .popup-menu:not([hidden]) > label:hover,
body.pdfstudio-mobile .popup-menu:not([hidden]) > .menu-open-label:hover,
body.pdfstudio-mobile .popup-menu:not([hidden]) > button:active:not(:disabled) {
  background: #e8f2fc !important; /* Word-like soft blue highlight */
}
@media (max-width: 767.98px) {
  body.pdfstudio-mobile .popup-menu:not([hidden]) > button,
  body.pdfstudio-mobile .popup-menu:not([hidden]) > label,
  body.pdfstudio-mobile .popup-menu:not([hidden]) > .menu-open-label {
    min-height: 40px !important; /* still tappable on phone without looking sparse */
    padding: 10px 16px !important;
    font-size: 14px !important;
  }
}
body.pdfstudio-mobile .popup-menu > .menu-sep,
body.pdfstudio-mobile .popup-menu > hr,
body.pdfstudio-mobile .popup-menu > .sep,
body.pdfstudio-mobile .popup-menu > .menu-section-label,
body.pdfstudio-mobile .popup-menu > .menu-recent-list {
  flex: 1 1 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
body.pdfstudio-mobile .popup-menu > .menu-sep,
body.pdfstudio-mobile .popup-menu > hr,
body.pdfstudio-mobile .popup-menu > .sep {
  height: 1px;
  margin: 4px 8px;
  border: none;
  background: #e0e0e0;
  padding: 0;
  min-height: 0;
  flex: 0 0 auto;
  width: auto;
  align-self: stretch;
}
body.pdfstudio-mobile .popup-menu > .menu-section-label {
  font-size: 11px;
  padding: 6px 16px 2px;
  color: #6b6b6b;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  flex: 0 0 auto;
}
body.pdfstudio-mobile .popup-menu > .menu-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
body.pdfstudio-mobile .popup-menu > .menu-recent-list > button {
  width: 100%;
  box-sizing: border-box;
}

/* deskparity154: menubar popups fully on-screen — no right-edge clip (Help etc.) */
body.pdfstudio-mobile #helpMenu,
body.pdfstudio-mobile #fileMenu,
body.pdfstudio-mobile #editMenu,
body.pdfstudio-mobile #viewMenu,
body.pdfstudio-mobile #toolsMenu,
body.pdfstudio-mobile #windowMenu,
body.pdfstudio-mobile #languageMenu,
body.pdfstudio-mobile #translateMenu,
body.pdfstudio-mobile #bimMenu {
  left: auto !important;
  right: auto !important; /* override app.css #helpMenu{right:8px} — JS clamps left */
}
/* deskparity222: keep full names (dialog … OK; no mid-label truncation) */
/* deskparity222: ALL pull-down menus full names — File/Edit/View/Tools/BIM/Language/Help/Window */
body.pdfstudio-mobile .popup-menu:not([hidden]),
body.pdfstudio-mobile #fileMenu:not([hidden]),
body.pdfstudio-mobile #editMenu:not([hidden]),
body.pdfstudio-mobile #viewMenu:not([hidden]),
body.pdfstudio-mobile #toolsMenu:not([hidden]),
body.pdfstudio-mobile #bimMenu:not([hidden]),
body.pdfstudio-mobile #windowMenu:not([hidden]),
body.pdfstudio-mobile #helpMenu:not([hidden]),
body.pdfstudio-mobile #languageMenu:not([hidden]),
body.pdfstudio-mobile #translateMenu:not([hidden]) {
  max-width: min(98vw, 40rem) !important;
  width: max-content !important;
  min-width: min(18rem, 94vw) !important;
}
body.pdfstudio-mobile .popup-menu:not([hidden]) > button,
body.pdfstudio-mobile .popup-menu:not([hidden]) > label,
body.pdfstudio-mobile .popup-menu:not([hidden]) > .menu-open-label,
body.pdfstudio-mobile .popup-menu:not([hidden]) .lang-option,
body.pdfstudio-mobile .language-menu:not([hidden]) button,
body.pdfstudio-mobile .language-menu:not([hidden]) label {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
}

body.pdfstudio-mobile .popup-menu:not([hidden]) > button,
body.pdfstudio-mobile .popup-menu:not([hidden]) > label,
body.pdfstudio-mobile .popup-menu:not([hidden]) > .menu-open-label {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: normal;
  hyphens: none;
}
body.pdfstudio-mobile .popup-menu:not([hidden]) > .menu-recent-list > button {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  max-width: none !important;
}
/* deskparity155: File→Language all visible — no horizontal scroll */
body.pdfstudio-mobile .menubar {
  overflow-x: hidden !important;
  scrollbar-width: none;
}
body.pdfstudio-mobile .menubar::-webkit-scrollbar { height: 0; display: none; }

body.pdfstudio-mobile #viewer,
body.pdfstudio-mobile .viewer-wrap,
body.pdfstudio-mobile .main {
  background: var(--stage);
}

/* Chrome bars: stay in flex flow at top / bottom — never float mid-screen */
body.pdfstudio-mobile .menubar,
body.pdfstudio-mobile .tabbar,
body.pdfstudio-mobile .globalbar,
body.pdfstudio-mobile .statusbar {
  flex-shrink: 0 !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

body.pdfstudio-mobile .menubar {
  background: #111111 !important; /* deskparity114: inverted black bar */
  border-bottom: 1px solid #333333 !important;
  display: flex !important;
  flex-wrap: wrap !important; /* deskparity222: full names may wrap */
  align-items: center !important;
  align-content: center !important;
  justify-content: flex-start !important;
  height: auto !important;
  min-height: 28px !important;
  max-height: none !important;
  padding: 4px 2px !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  gap: 0 2px;
}

/* deskparity155: denser labels so File→Language fit one phone row */
body.pdfstudio-mobile .menubar .menu-item {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: auto !important;
  -moz-osx-font-smoothing: auto !important;
  opacity: 1 !important;
  padding: 4px 3px !important;
  flex: 0 0 auto !important;
  min-width: unset !important;
  text-align: center !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}
body.pdfstudio-mobile .menubar .menu-item:hover {
  background: rgba(255,255,255,0.16) !important;
}
body.pdfstudio-mobile .menubar .menu-item:disabled {
  opacity: 0.45 !important;
  color: #bbbbbb !important;
  -webkit-text-fill-color: #bbbbbb !important;
}

body.pdfstudio-mobile .tabbar {
  background: var(--tab-bg);
  border-bottom: 1px solid var(--border);
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  align-content: center !important;
  height: auto !important;
  min-height: 32px !important;
  max-height: none !important;
  overflow: hidden !important;
  gap: 2px 4px;
}

body.pdfstudio-mobile .globalbar {
  background: var(--toolbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  align-content: flex-start !important;
  height: auto !important;
  min-height: 36px !important;
  max-height: none !important;
  overflow: visible !important;
  gap: 0;
}
body.pdfstudio-mobile .globalbar::-webkit-scrollbar {
  display: none;
}

/* Tabbar/find single-row; toolbar groups wrap (~2 rows, all icons visible) */
body.pdfstudio-mobile .doc-tabs,
body.pdfstudio-mobile .tabbar-right,
body.pdfstudio-mobile .find-box {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  flex-shrink: 0;
  max-width: none !important;
  overflow: visible !important;
}
body.pdfstudio-mobile .gbar-group {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  align-content: flex-start !important;
  flex: 0 1 auto !important;
  max-width: 100% !important;
  overflow: visible !important;
  gap: 0;
}
body.pdfstudio-mobile .gbar-group.tools-group {
  flex: 0 1 auto !important;
  overflow: visible !important;
}
body.pdfstudio-mobile .statusbar,
body.pdfstudio-mobile .status {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  gap: 4px 8px;
}

body.pdfstudio-mobile .main {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  width: 100%;
}

body.pdfstudio-mobile .viewer-wrap {
  min-height: 0 !important;
  height: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  position: relative !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}

body.pdfstudio-mobile .statusbar {
  background: #f0f0f0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ——— Phone scale (match desktop layout, readable size) ——— */
@media (max-width: 767.98px) {
  body.pdfstudio-mobile {
    --fs-menu: 13px;
    --fs-tab: 13px;
    --fs-tool: 12px;
    --fs-ui: 13px;
    --fs-status: 12px;
    --global-h: 36px;
  }

  /* deskparity155: File→Language one page, no right-scroll */
  body.pdfstudio-mobile .menubar {
    height: auto !important;
    min-height: 26px !important;
    padding: 3px 1px !important;
    gap: 0 1px;
    flex-wrap: wrap !important; /* deskparity222 */
    overflow-x: visible !important;
    overflow-y: visible !important;
    justify-content: flex-start !important;
  }
  body.pdfstudio-mobile .menubar::-webkit-scrollbar {
    display: none;
  }
  body.pdfstudio-mobile .menu-item {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-font-smoothing: auto !important;
    -moz-osx-font-smoothing: auto !important;
    letter-spacing: -0.02em;
    padding: 4px 2px !important;
    min-height: 28px !important;
    line-height: 1.15 !important;
    border-radius: 2px;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
    min-width: unset !important;
    max-width: none !important;
    text-align: center !important;
    overflow: visible !important;
    text-overflow: clip !important;
    opacity: 1 !important;
  }
  /* deskparity222: never truncate Membership/Language via data-short */
  body.pdfstudio-mobile .menubar .menu-item[data-short] {
    font-size: 10.5px !important;
  }
  body.pdfstudio-mobile .menubar .menu-item[data-short]::after {
    content: none !important;
    display: none !important;
  }

  /* Tabbar / find: single dense row */
  body.pdfstudio-mobile .tabbar {
    height: auto !important;
    min-height: 32px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    padding: 0 4px;
    gap: 4px;
  }
  body.pdfstudio-mobile .doc-tabs {
    flex-wrap: nowrap !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: 45% !important;
    overflow: hidden !important;
  }
  body.pdfstudio-mobile .tabbar-right {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    justify-content: flex-end !important;
  }
  body.pdfstudio-mobile .find-box {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  body.pdfstudio-mobile .doc-tab {
    font-size: 13px !important;
    padding: 4px 8px !important;
    min-height: 28px !important;
  }

  /* Global toolbar: row1 = Open…Fit; row2 = Hand…Edit (full width, no horiz scroll) */
  body.pdfstudio-mobile .globalbar {
    min-height: 26px !important;
    height: auto !important;
    max-height: none !important;
    padding: 1px 2px;
    gap: 0;
    row-gap: 0;
    flex-wrap: wrap !important;
    align-content: flex-start !important;
    overflow: visible !important;
  }
  body.pdfstudio-mobile .globalbar::-webkit-scrollbar {
    display: none;
  }
  /* Row 1 groups stay on one line (no display:contents — keep clusters) */
  body.pdfstudio-mobile .gbar-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex: 0 0 auto !important;
    max-width: none !important;
    overflow: visible !important;
    gap: 0;
    align-items: center !important;
  }
  /* deskparity150: tools-group is annotation tools only (Hand/zoom live in nav-group) */
  body.pdfstudio-mobile .gbar-group.tools-group {
    display: flex !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-content: flex-start !important;
    overflow: visible !important;
    overflow-x: visible !important;
    gap: 0;
    box-sizing: border-box;
  }
  body.pdfstudio-mobile .gbar-sep,
  body.pdfstudio-mobile .gbar-spacer {
    display: none !important;
  }
  /* Appearance row eats a whole row on phone — hide; tools keep last color */
  body.pdfstudio-mobile .appearance {
    display: none !important;
  }
  /* Dense icons — tools row fits ~10 on phone without sideways drag */
  body.pdfstudio-mobile .icon-btn,
  body.pdfstudio-mobile .tool-btn {
    min-height: 34px !important;
    min-width: 26px !important;
    width: 26px !important;
    height: 34px !important;
    padding: 0 1px !important;
    border-radius: 4px;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
  }
  body.pdfstudio-mobile .tools-group .icon-btn,
  body.pdfstudio-mobile .tools-group .tool-btn {
    /* deskparity222: do NOT flex-grow — that stretched icons apart on phone390 */
    flex: 0 0 auto !important;
    min-width: 24px !important;
    max-width: 28px !important;
    width: 26px !important;
    height: 34px !important;
  }
  /* deskparity28: allow file row + tools row (no clip); tools stay one wrap via flex % */
  /* deskparity150: Hand+zoom moved to nav-group (right of Fit); keep ± glyphs readable */
  body.pdfstudio-mobile .nav-group .tool-zoom-btn,
  body.pdfstudio-mobile .tools-group .tool-zoom-btn {
    font-weight: 700;
  }
  body.pdfstudio-mobile .nav-group .tool-zoom-btn span.txt,
  body.pdfstudio-mobile .tools-group .tool-zoom-btn span.txt {
    font-size: 16px !important;
    line-height: 1 !important;
  }
  body.pdfstudio-mobile .icon-btn .ico,
  body.pdfstudio-mobile .tool-btn .ico {
    width: 15px !important;
    height: 15px !important;
  }
  body.pdfstudio-mobile .icon-btn span,
  body.pdfstudio-mobile .tool-btn span {
    display: none !important;
  }
  /* Keep zoom ± text glyphs visible (they use .txt, not i18n span labels) */
  body.pdfstudio-mobile .icon-btn span.txt,
  body.pdfstudio-mobile .tool-btn span.txt {
    display: inline !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }
  body.pdfstudio-mobile .zoom-label,
  body.pdfstudio-mobile .page-indicator {
    font-size: 10px !important;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
  }
  body.pdfstudio-mobile .page-indicator input {
    width: 1.6em !important;
    min-height: 22px !important;
    height: 22px !important;
    font-size: 10px !important;
    padding: 0 2px !important;
  }
  /* deskparity126: Fit ≈1.2× like Clear/Measure (was 9px) */
  body.pdfstudio-mobile #btnFit {
    font-size: 10px !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    padding: 3px 7px !important;
    min-height: 26px !important;
  }
  body.pdfstudio-mobile #btnFit span {
    display: inline !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  body.pdfstudio-mobile .find-box input {
    font-size: 16px !important; /* iOS zoom-avoid */
    min-height: 28px;
    height: 28px;
    min-width: 0;
    width: 100%;
    max-width: 160px;
    flex: 1 1 auto;
  }
  body.pdfstudio-mobile .find-nav,
  body.pdfstudio-mobile .find-clear {
    min-width: 28px;
    min-height: 28px;
    width: 28px;
    height: 28px;
    font-size: 16px;
    padding: 0;
    flex-shrink: 0;
  }

  /* deskparity222: phone popup rows — full labels, no ellipsis clip */
  body.pdfstudio-mobile .popup-menu button,
  body.pdfstudio-mobile .popup-menu label,
  body.pdfstudio-mobile .popup-menu .menu-open-label {
    min-height: 44px;
    font-size: 15px;
    padding: 10px 16px;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  body.pdfstudio-mobile .statusbar,
  body.pdfstudio-mobile .status {
    font-size: 13px !important;
    min-height: 28px !important;
    height: auto !important;
    padding: 4px 10px !important;
  }

  body.pdfstudio-mobile .main.sidebar-collapsed {
    grid-template-columns: 1fr !important;
  }
  body.pdfstudio-mobile .main.sidebar-collapsed .sidebar {
    display: none !important;
  }
  body.pdfstudio-mobile .sidebar-reveal {
    display: none !important; /* phone: Thumbs toolbar btn opens slide-over */
  }

  /* deskparity153: thumbs in-flow under chrome; reserve gutter so Fit sees remaining width */
  body.pdfstudio-mobile .main:not(.sidebar-collapsed) {
    display: grid !important;
    grid-template-columns: min(78vw, 220px) 1fr !important;
  }
  body.pdfstudio-mobile .main:not(.sidebar-collapsed) .sidebar {
    display: flex !important;
    flex-direction: column;
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: 220px;
    height: auto !important;
    max-height: 100%;
    z-index: 2; /* below menubar/globalbar 39–40; above viewer */
    background: var(--panel, #f7f7f7);
    border-right: 1px solid var(--border, #ccc);
    box-shadow: 2px 0 12px rgba(0,0,0,.18);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain; /* deskparity154: no scroll-chaining into viewer */
    touch-action: pan-y;
    padding-bottom: 12px;
  }
  body.pdfstudio-mobile #thumbs {
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  body.pdfstudio-mobile .thumbs-scrim {
    position: fixed;
    top: var(--pdfstudio-chrome-bottom, 0px);
    left: min(78vw, 220px);
    right: 0;
    bottom: env(safe-area-inset-bottom, 0px);
    z-index: 3;
    background: rgba(0,0,0,.22);
    -webkit-tap-highlight-color: transparent;
  }
  body.pdfstudio-mobile .thumbs-scrim[hidden] {
    display: none !important;
  }
  body.pdfstudio-mobile .thumbs-move-hint {
    margin: 0;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.35;
    color: #1e3a5f;
    background: #e8f2fc;
    border-bottom: 1px solid #c5daf0;
  }
  body.pdfstudio-mobile .thumbs-move-hint[hidden] {
    display: none !important;
  }
  body.pdfstudio-mobile #thumbs .thumb {
    min-height: 52px;
    -webkit-tap-highlight-color: rgba(11,107,203,.18);
  }
  body.pdfstudio-mobile #thumbs .thumb.thumb-moving {
    border-color: #0b6bcb !important;
    box-shadow: 0 0 0 2px #0b6bcb;
    background: #e8f2fc;
  }
  body.pdfstudio-mobile #btnThumbs.active {
    background: #dbeafe;
    border-color: #0b6bcb;
    color: #0b6bcb;
  }

  /* Drop / open CTA — MUST receive taps (app.css sets pointer-events:none) */
  body.pdfstudio-mobile label.drop-hint,
  body.pdfstudio-mobile .drop-hint,
  body.pdfstudio-mobile #dropHintLabel {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    inset: 12px !important;
    margin: 0 !important;
    min-height: 0 !important;
    padding: 24px 16px !important;
    border: 2px dashed rgba(255,255,255,.45) !important;
    border-radius: 16px !important;
    background: rgba(0,0,0,.22) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(11,107,203,.25);
    z-index: 3;
    box-sizing: border-box;
  }
  body.pdfstudio-mobile .drop-hint .inner {
    text-align: center;
    max-width: 320px;
    pointer-events: none; /* decorative text only */
  }
  body.pdfstudio-mobile .drop-hint .inner .drop-cta,
  body.pdfstudio-mobile label.drop-cta {
    pointer-events: auto !important; /* iOS: label must receive the tap */
    -webkit-tap-highlight-color: rgba(255,255,255,.25);
  }
  body.pdfstudio-mobile .drop-hint .drop-title {
    font-size: 20px !important;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
  }
  body.pdfstudio-mobile .drop-hint .hint {
    font-size: 14px !important;
    color: #e5e7eb !important;
  }
  body.pdfstudio-mobile .drop-cta {
    display: inline-block !important;
    margin-top: 16px;
    background: #0b6bcb;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 12px;
    pointer-events: auto !important;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
  }

  body.pdfstudio-mobile .drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 220px;
    margin: 24px 16px;
    padding: 28px 20px;
    border: 2px dashed #9ca3af;
    border-radius: 16px;
    background: rgba(255,255,255,.12);
    color: #f3f4f6;
    text-align: center;
    cursor: pointer;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
  }
  body.pdfstudio-mobile .drop-title {
    font-size: 20px;
    font-weight: 700;
  }
  body.pdfstudio-mobile .drop-sub {
    font-size: 14px;
    opacity: 0.9;
    max-width: 280px;
  }
}

@media (min-width: 768px) {
  /* deskparity153: tablet thumbs in-flow under chrome (same Fit gutter as phone) */
  body.pdfstudio-mobile.pdfstudio-tablet .main:not(.sidebar-collapsed) {
    display: grid !important;
    grid-template-columns: min(240px, 32vw) 1fr !important;
  }
  body.pdfstudio-mobile.pdfstudio-tablet .main:not(.sidebar-collapsed) .sidebar {
    display: flex !important;
    flex-direction: column;
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: 280px;
    height: auto !important;
    max-height: 100%;
    z-index: 2;
    background: var(--panel, #f7f7f7);
    border-right: 1px solid var(--border, #ccc);
    box-shadow: 2px 0 12px rgba(0,0,0,.18);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.pdfstudio-mobile.pdfstudio-tablet .sidebar-reveal {
    display: none !important;
  }
}

/* deskparity153: shared thumbs scrim — below chrome, right of thumbs gutter */
body.pdfstudio-mobile .thumbs-scrim {
  position: fixed;
  top: var(--pdfstudio-chrome-bottom, 0px);
  left: min(78vw, 220px);
  right: 0;
  bottom: env(safe-area-inset-bottom, 0px);
  z-index: 3;
  background: rgba(0,0,0,.22);
  -webkit-tap-highlight-color: transparent;
}
body.pdfstudio-mobile .thumbs-scrim[hidden] {
  display: none !important;
}
body.pdfstudio-mobile .thumbs-move-hint {
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  color: #1e3a5f;
  background: #e8f2fc;
  border-bottom: 1px solid #c5daf0;
}
body.pdfstudio-mobile .thumbs-move-hint[hidden] {
  display: none !important;
}
body.pdfstudio-mobile #thumbs .thumb.thumb-moving {
  border-color: #0b6bcb !important;
  box-shadow: 0 0 0 2px #0b6bcb;
  background: #e8f2fc;
}
body.pdfstudio-mobile #btnThumbs.active {
  background: #dbeafe;
  border-color: #0b6bcb;
  color: #0b6bcb;
}
body.pdfstudio-mobile #btnThumbs .ico {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}


/* ios8 / mobile-111: hide empty-state when a doc is open (Open uses #openPdfLabelProxy) */
body.pdfstudio-mobile .viewer-wrap.has-doc > label.drop-hint,
body.pdfstudio-mobile .viewer-wrap.has-doc > .drop-hint,
body.pdfstudio-mobile #viewer.has-doc > #dropHintLabel {
  display: none !important;
  /* pointer-events kept so programmatic label.click works */
}

#openPdfLabelProxy {
  position: fixed !important;
  left: -9999px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  z-index: -1 !important;
}

body.pdfstudio-mobile .drop-demo {
  display: inline-block !important;
  margin-top: 12px;
  margin-left: 0;
  background: #374151;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  pointer-events: auto !important;
  -webkit-tap-highlight-color: rgba(255,255,255,.2);
}
body.pdfstudio-mobile .drop-hint .inner .drop-demo {
  pointer-events: auto !important;
}


/* mobile fit-page padding — small inset so one page can fill the well */
body.pdfstudio-mobile .viewer-wrap {
  padding: 8px 6px !important;
  box-sizing: border-box;
  align-items: center !important;
}
body.pdfstudio-mobile .viewer-wrap .page-wrap {
  margin-left: auto !important;
  margin-right: auto !important;
  flex-shrink: 0;
}


/* Toolbar Open proxy: invisible but not full-screen */
.open-pdf-proxy {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  /* pointer-events kept so programmatic label.click works */
}


/* Open controls are labels (iOS Files sheet) */
label.drop-cta,
label#btnOpen.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
label#btnOpen.icon-btn {
  box-sizing: border-box;
}

/* Tool gestures: finger moves box/cursor only — page scroll locked */
body.pdfstudio-mobile .page-wrap canvas.overlay {
  touch-action: none !important;
}
body.pdfstudio-mobile .viewer-wrap.anno-dragging {
  overflow: hidden !important; /* freeze scroll while dragging a box */
  overscroll-behavior: none !important;
  touch-action: none !important;
}
body.pdfstudio-mobile .viewer-wrap.anno-dragging * {
  touch-action: none !important;
}

/* Hand pinch-zoom feedback */
body.pdfstudio-mobile .viewer-wrap.pinching {
  touch-action: none !important;
}
body.pdfstudio-mobile .viewer-wrap.tool-pan,
body.pdfstudio-mobile .viewer-wrap.tool-draw,
body.pdfstudio-mobile .viewer-wrap.tool-measure {
  touch-action: pan-x pan-y; /* JS owns pinch — never hand/draw/measure pinch-zoom to Safari (was closing/jumping out) */
}
/* Hand mode: overlay must stay tappable so placed objects can be selected anytime */
body.pdfstudio-mobile .viewer-wrap.tool-pan .page-wrap.interactive canvas.overlay,
body.pdfstudio-mobile .viewer-wrap.tool-pan .page-wrap canvas.overlay {
  pointer-events: auto !important;
  touch-action: none !important;
}

/* Context menu readable on phone */
body.pdfstudio-mobile .ctx-menu {
  min-width: min(92vw, 280px);
  max-height: min(70vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 15px;
  z-index: 10080 !important;
}
body.pdfstudio-mobile .ctx-menu button {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 15px;
}


/* Text Box inline editor — must receive taps / keyboard on phone */
body.pdfstudio-mobile .page-wrap .inline-note-edit,
body.pdfstudio-mobile .page-wrap .inline-text-edit {
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  z-index: 40 !important;
  /* deskparity116: do NOT force 16px — JS scales small fonts to avoid iOS zoom while keeping locked metrics */
  -webkit-text-size-adjust: 100%;
}

/* Pinch preview: no browser gesture interference */
body.pdfstudio-mobile .viewer-wrap.pinching {
  overflow: auto !important;
  overscroll-behavior: none !important;
}
body.pdfstudio-mobile .viewer-wrap.pinching .page-wrap {
  transform-box: fill-box;
}

/* Zoom label stays on row 1 with Fit */
body.pdfstudio-mobile .zoom-fit-group .zoom-label {
  min-width: 36px;
  text-align: center;
}


/* deskparity19 zoom harden: block Safari page-zoom / back-gesture fighting PDF pinch */
body.pdfstudio-mobile .viewer-wrap.tool-pan.pinching,
body.pdfstudio-mobile .viewer-wrap.tool-draw.pinching,
body.pdfstudio-mobile .viewer-wrap.tool-measure.pinching,
body.pdfstudio-mobile .viewer-wrap.pinching {
  touch-action: none !important;
  overscroll-behavior: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
html.pdfstudio-mobile.pinching-doc,
body.pdfstudio-mobile.pinching-doc {
  overflow: hidden !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
}


/* deskparity126: Clear beside Fit — ≈1.2× (was 8px) */
body.pdfstudio-mobile #btnClearAnnos {
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 3px 7px !important;
  min-height: 26px !important;
}
body.pdfstudio-mobile #btnClearAnnos span.txt {
  display: inline !important;
  font-size: 10px !important;
  line-height: 1 !important;
}
body.pdfstudio-mobile .zoom-fit-group {
  gap: 1px !important;
}

/* deskparity21: sticky simulated pen for Draw — diagonal real-pen silhouette */
body.pdfstudio-mobile .ps-draw-pen {
  position: fixed;
  z-index: 10050;
  width: 36px;
  height: 36px;
  margin-left: -6px;
  margin-top: -30px;
  pointer-events: none;
  color: #111827;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
  transition: opacity .12s ease;
  transform: rotate(-18deg);
}
body.pdfstudio-mobile .ps-draw-pen svg {
  display: block;
  width: 36px;
  height: 36px;
}
body.pdfstudio-mobile .ps-draw-pen[hidden] {
  display: none !important;
}
body.pdfstudio-mobile.ps-draw-mode .viewer-wrap.tool-draw,
body.pdfstudio-mobile .viewer-wrap.tool-draw {
  cursor: none !important;
}
body.pdfstudio-mobile .viewer-wrap.tool-draw canvas.overlay {
  cursor: none !important;
}

/* deskparity23: Draw keeps overlay tappable for ink; pinch still JS-owned like Hand */
body.pdfstudio-mobile .viewer-wrap.tool-draw .page-wrap canvas.overlay {
  pointer-events: auto !important;
  touch-action: none !important;
}


/* deskparity34: Translate expand — dedicated backdrop (no trap); large ×; Retry on fail */
/* deskparity32/23/21: prior expand + multi-color highlights */
body.pdfstudio-mobile .ps-translate-expand,
.ps-translate-expand {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: transparent;
  box-sizing: border-box;
  pointer-events: none; /* only backdrop + card receive taps */
  -webkit-tap-highlight-color: transparent;
}
.ps-translate-expand[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
.ps-translate-expand-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
}
.ps-translate-expand-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(62vh, 480px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto !important;
  touch-action: pan-y;
}
.ps-translate-expand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  font-weight: 700;
  font-size: 13px;
  color: #1d4ed8;
  flex: 0 0 auto;
}

/* deskparity54: target language select in translate box head */
.ps-translate-expand-lang,
.ps-quick-translate-lang {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 58%;
  margin: 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #1e3a8a;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #93c5fd;
  border-radius: 8px;
  padding: 6px 8px;
  min-height: 36px;
  -webkit-appearance: menulist;
  appearance: menulist;
  touch-action: manipulation;
}
.ps-translate-expand-head > span,
.ps-quick-translate-head > span {
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 36%;
}

.ps-translate-expand-close {
  border: 0;
  background: rgba(30, 58, 138, 0.12);
  font-size: 28px;
  line-height: 1;
  color: #1e3a8a;
  padding: 8px 16px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex: 0 0 auto;
}
.ps-translate-expand-src {
  padding: 8px 12px 0;
  font-size: 11px;
  color: #6b7280;
  max-height: 72px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.ps-translate-expand-body {
  padding: 12px;
  font-size: 15px;
  line-height: 1.45;
  /* deskparity87/86/85: 譯文 / translated output = blue (desktop parity) */
  color: #2563eb;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
}
.ps-translate-expand-fail {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
}
.ps-translate-expand-fail[hidden] { display: none !important; }
.ps-translate-expand-fail-msg {
  font-size: 13px;
  color: #9a3412;
  line-height: 1.35;
}
.ps-translate-expand-retry {
  align-self: flex-start;
  border: 1px solid #b45309;
  background: linear-gradient(#fff7ed, #ffedd5);
  color: #9a3412;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ps-translate-expand-retry:disabled {
  opacity: 0.55;
  cursor: wait;
}
.ps-translate-expand-hint {
  padding: 0 12px 10px;
  font-size: 11px;
  color: #9ca3af;
  flex: 0 0 auto;
}

/* deskparity42: whole-doc Translate menu hidden — use selection context Translate */
body.pdfstudio-mobile .menu-item#menuTranslate {
  display: none !important;
}
.ps-translate-expand-body.is-loading {
  color: #6b7280;
  font-style: italic;
}




/* deskparity88: #psQuickTranslate — true bottom dock / bottom bar (NOT center 90vh card) */
body.pdfstudio-mobile .ps-quick-translate,
.ps-quick-translate {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
  padding: 0;
  background: transparent;
  box-sizing: border-box;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
body.pdfstudio-mobile .ps-quick-translate.ps-quick-translate-dock,
.ps-quick-translate.ps-quick-translate-dock {
  /* flush to viewport bottom chrome */
  align-items: flex-end;
  justify-content: stretch;
  padding: 0;
}
.ps-quick-translate[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
.ps-quick-translate-backdrop {
  position: absolute;
  inset: 0;
  /* deskparity88: light dim above bottom dock — PDF stays readable */
  background: rgba(15, 23, 42, 0.18);
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
}
.ps-quick-translate-card,
.ps-quick-translate-card.ps-quick-translate-bottombar {
  position: relative;
  z-index: 1;
  /* deskparity92: taller bottom dock so internal 50/50 capture|translate fits */
  width: 100%;
  max-width: 100%;
  max-height: min(56vh, 520px);
  height: min(56vh, 520px);
  margin: 0;
  background: #fff;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -8px 28px rgba(0,0,0,.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto !important;
  touch-action: pan-y;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.ps-quick-translate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  font-weight: 700;
  font-size: 13px;
  color: #1d4ed8;
  flex: 0 0 auto;
}
.ps-quick-translate-close {
  border: 0;
  background: rgba(30, 58, 138, 0.12);
  font-size: 28px;
  line-height: 1;
  color: #1e3a8a;
  padding: 8px 16px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex: 0 0 auto;
}
/* deskparity61: content below head — top half capture, bottom half translation */
.ps-quick-translate-split {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* deskparity64: top capture fit-width; vertical scroll/pan only */
.ps-quick-translate-capture-wrap {
  /* deskparity92: top HALF = capture screen (Sam 比例一半一半) */
  flex: 1 1 50%;
  max-height: 50%;
  min-height: 0;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: block;
  box-sizing: border-box;
  touch-action: pan-y;
  cursor: grab;
  position: relative;
}
.ps-quick-translate-capture-wrap.is-panning {
  cursor: grabbing;
  -webkit-user-select: none;
  user-select: none;
}
.ps-quick-translate-capture-wrap[hidden] { display: none !important; }
.ps-quick-translate-capture {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: top center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none; /* pan via wrap scroll / pointer drag */
  margin: 0 auto;
  /* deskparity64 marker: capture-fit-width + pan-y */
}
/* deskparity87: middle OCR/原文 pane REMOVED — keep node hidden for compat */
.ps-quick-translate-src {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}
/* deskparity87: bottom stack — black original then blue translation */
.ps-quick-translate-orig {
  padding: 12px 12px 6px;
  font-size: 14px;
  line-height: 1.45;
  color: #111827; /* black / near-black original language */
  background: #fff;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 0 0 auto;
  border-bottom: 1px solid #e5e7eb;
}
.ps-quick-translate-orig[hidden] { display: none !important; }
.ps-quick-translate-orig.is-empty { display: none !important; }
.ps-quick-translate-scroll {
  /* deskparity92: bottom HALF = translate output */
  flex: 1 1 50%;
  max-height: 50%;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* deskparity92/88: sentence segments — black source then blue translation immediately below */
.ps-quick-translate-segs {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}
.ps-quick-translate-segs[hidden] { display: none !important; }
.ps-quick-translate-seg {
  padding: 10px 12px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.ps-quick-translate-seg:last-child { border-bottom: 0; }
.ps-quick-translate-seg-label {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  margin-bottom: 4px;
}
.ps-quick-translate-seg-src {
  font-size: 14px;
  line-height: 1.45;
  color: #111827; /* black original */
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 6px;
}
.ps-quick-translate-seg-tr {
  font-size: 15px;
  line-height: 1.45;
  color: #2563eb; /* blue translation */
  white-space: pre-wrap;
  word-break: break-word;
}
/* when no capture image, translation takes full split */
.ps-quick-translate-split.no-capture .ps-quick-translate-scroll {
  flex: 1 1 100%;
}
.ps-quick-translate-body {
  padding: 12px;
  font-size: 15px;
  line-height: 1.45;
  /* deskparity87/86/85: 譯文 / translated output = blue (desktop parity) */
  color: #2563eb;
  overflow: visible;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
  flex: 0 0 auto;
}
.ps-quick-translate-body.is-loading {
  color: #6b7280;
  font-style: italic;
}
.ps-quick-translate-fail {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
}
.ps-quick-translate-fail[hidden] { display: none !important; }
.ps-quick-translate-fail-msg {
  font-size: 13px;
  color: #9a3412;
  line-height: 1.35;
}
.ps-quick-translate-retry {
  align-self: flex-start;
  border: 1px solid #b45309;
  background: linear-gradient(#fff7ed, #ffedd5);
  color: #9a3412;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ps-quick-translate-retry:disabled {
  opacity: 0.55;
  cursor: wait;
}
.ps-quick-translate-hint {
  padding: 0 12px 10px;
  font-size: 11px;
  color: #9ca3af;
  flex: 0 0 auto;
}

/* deskparity158: iPhone AirPrint-style Print sheet */
body.pdfstudio-mobile #printModal.modal-backdrop {
  z-index: 11000 !important;
  align-items: flex-end !important;
  justify-content: stretch !important;
  padding: 0 !important;
  background: rgba(0, 0, 0, 0.42) !important;
  -webkit-backdrop-filter: saturate(140%) blur(2px);
  backdrop-filter: saturate(140%) blur(2px);
}
body.pdfstudio-mobile #printModal.modal-backdrop.show {
  display: flex !important;
}
body.pdfstudio-mobile #printModal .modal.print-dialog.ios-print-sheet {
  width: 100% !important;
  max-width: 100% !important;
  max-height: min(92vh, 780px) !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 14px 14px 0 0 !important;
  background: #f2f2f7 !important;
  box-shadow: 0 -8px 28px rgba(0,0,0,.18) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  color: #000 !important;
  animation: iosPrintSheetUp .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes iosPrintSheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
body.pdfstudio-mobile #printModal .ios-print-head {
  display: grid !important;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  gap: 4px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  padding-bottom: 10px;
  background: rgba(249,249,249,.94) !important;
  border-bottom: 0.5px solid rgba(60,60,67,.18);
  flex: 0 0 auto;
  position: relative;
}
body.pdfstudio-mobile #printModal .ios-print-head h2 {
  margin: 0 !important;
  text-align: center;
  font-size: 17px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  color: #000 !important;
}
body.pdfstudio-mobile #printModal .ios-print-cancel,
body.pdfstudio-mobile #printModal .ios-print-go {
  appearance: none;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 17px !important;
  line-height: 1.2;
  padding: 8px 4px !important;
  min-height: 44px;
  cursor: pointer;
  color: #007aff !important;
  -webkit-text-fill-color: #007aff !important;
}
body.pdfstudio-mobile #printModal .ios-print-cancel {
  justify-self: start;
  font-weight: 400 !important;
}
body.pdfstudio-mobile #printModal .ios-print-go {
  justify-self: end;
  font-weight: 600 !important;
}
body.pdfstudio-mobile #printModal .desktop-print-close,
body.pdfstudio-mobile #printModal .desktop-print-actions,
body.pdfstudio-mobile #printModal .desktop-print-extra {
  display: none !important;
}
body.pdfstudio-mobile #printModal .print-dialog-body {
  grid-template-columns: 1fr !important;
  overflow: auto !important;
  flex: 1 1 auto;
  padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  gap: 12px !important;
  background: #f2f2f7 !important;
}
body.pdfstudio-mobile #printModal .print-settings.ios-print-groups {
  border: none !important;
  border-right: none !important;
  border-bottom: none !important;
  max-height: none !important;
  padding: 0 !important;
  background: transparent !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
body.pdfstudio-mobile #printModal .ios-print-group {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: #fff !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: none;
}
body.pdfstudio-mobile #printModal .ios-print-group > legend {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 14px 4px;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #6c6c70 !important;
  text-transform: none;
  letter-spacing: 0;
  background: #fff;
}
body.pdfstudio-mobile #printModal .ios-print-row,
body.pdfstudio-mobile #printModal .ios-print-group .print-radio,
body.pdfstudio-mobile #printModal .ios-print-group .print-pages-custom {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 !important;
  padding: 11px 14px !important;
  min-height: 44px;
  border-bottom: 0.5px solid rgba(60,60,67,.12);
  font-size: 17px !important;
  color: #000 !important;
  background: #fff;
}
body.pdfstudio-mobile #printModal .ios-print-group .print-radio:last-child,
body.pdfstudio-mobile #printModal .ios-print-group .print-pages-custom:last-child,
body.pdfstudio-mobile #printModal .ios-copies-row {
  border-bottom: none !important;
}
body.pdfstudio-mobile #printModal .ios-print-row > label,
body.pdfstudio-mobile #printModal .ios-print-group .print-radio {
  font-size: 17px !important;
  font-weight: 400 !important;
  color: #000 !important;
}
body.pdfstudio-mobile #printModal .ios-printer-row .ios-print-row-value {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}
body.pdfstudio-mobile #printModal #printPrinter {
  appearance: none;
  -webkit-appearance: none;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: right;
  direction: ltr;
  font-size: 17px !important;
  color: #8e8e93 !important;
  max-width: 62vw;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 24px;
}
body.pdfstudio-mobile #printModal .ios-chevron {
  color: #c7c7cc;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  transform: scaleX(0.7);
}
body.pdfstudio-mobile #printModal .ios-stepper {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e5ea;
}
body.pdfstudio-mobile #printModal .ios-stepper-btn {
  width: 36px;
  height: 32px;
  border: none;
  background: transparent;
  color: #007aff;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
body.pdfstudio-mobile #printModal .ios-stepper-btn:active {
  background: rgba(0,0,0,.06);
}
body.pdfstudio-mobile #printModal #printCopies {
  width: 42px !important;
  height: 32px;
  margin: 0 !important;
  border: none !important;
  border-left: 0.5px solid rgba(60,60,67,.18) !important;
  border-right: 0.5px solid rgba(60,60,67,.18) !important;
  border-radius: 0 !important;
  background: #e5e5ea !important;
  text-align: center;
  font-size: 17px !important;
  font-variant-numeric: tabular-nums;
  color: #000 !important;
  -moz-appearance: textfield;
}
body.pdfstudio-mobile #printModal #printCopies::-webkit-outer-spin-button,
body.pdfstudio-mobile #printModal #printCopies::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
body.pdfstudio-mobile #printModal .print-pages-custom input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 8px;
  border: none !important;
  background: #f2f2f7 !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  font-size: 16px !important;
}
body.pdfstudio-mobile #printModal .print-preview-pane {
  min-height: 140px !important;
  max-height: 26vh !important;
  background: transparent !important;
  padding: 0 !important;
}
body.pdfstudio-mobile #printModal .print-preview-frame {
  background: #fff !important;
  border-radius: 12px !important;
  border: none !important;
  box-shadow: none !important;
}
body.pdfstudio-mobile #printModal .print-preview-nav {
  color: #6c6c70;
}
body.pdfstudio-mobile #printModal .print-preview-nav button {
  background: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  color: #007aff !important;
  min-width: 36px;
  min-height: 32px;
}
body.pdfstudio-mobile #btnSave:not(:disabled),
body.pdfstudio-mobile #btnPrint:not(:disabled) {
  pointer-events: auto !important;
  touch-action: manipulation;
}


/* deskparity28: Fit screen for iPhone Duo / Surface Duo / foldables / iPad */
body.pdfstudio-mobile .viewer-wrap {
  /* Keep page inside safe well; chrome (menubar/globalbar) never clipped */
  min-height: 0 !important;
  flex: 1 1 auto !important;
}
/* iPad / large tablets — slightly roomier page inset, still fit one page */
@media (min-width: 768px) {
  body.pdfstudio-mobile .viewer-wrap {
    padding: 12px 10px !important;
  }
  body.pdfstudio-mobile .tools-group .icon-btn,
  body.pdfstudio-mobile .tools-group .tool-btn {
    flex: 0 0 auto !important;
    min-width: 26px !important;
    max-width: 28px !important;
    width: 26px !important;
    height: 36px !important;
  }
  body.pdfstudio-mobile .globalbar {
    max-height: none !important;
  }
}
/* Dual-screen / foldable: prefer spanning one pane; don't hide top tools */
@supports (width: env(viewport-segment-width 0 0)) {
  body.pdfstudio-mobile .app {
    /* Stay in first horizontal segment when folded open */
    max-width: 100%;
  }
  body.pdfstudio-mobile .viewer-wrap {
    padding: 8px 6px !important;
  }
}
@media (horizontal-viewport-segments: 2) {
  body.pdfstudio-mobile .app {
    /* Duo hinge: keep chrome full-width across, viewer uses available flex height */
    width: 100% !important;
  }
  body.pdfstudio-mobile .menubar,
  body.pdfstudio-mobile .globalbar,
  body.pdfstudio-mobile .tabbar {
    width: 100% !important;
    max-width: 100% !important;
  }
}
/* Landscape phones / Duo landscape — fit height carefully */
@media (orientation: landscape) and (max-height: 500px) {
  body.pdfstudio-mobile .menubar .menu-item {
    padding: 2px 2px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-font-smoothing: auto !important;
  }
  body.pdfstudio-mobile .globalbar {
    max-height: calc(26px * 2 + 4px) !important;
  }
  body.pdfstudio-mobile .viewer-wrap {
    padding: 4px 4px !important;
  }
}

/* deskparity37: thumbs move hint visible again while selecting */

/* deskparity38: press-drag reorder chrome */
body.pdfstudio-mobile #thumbs.thumb-reordering {
  touch-action: none;
  overflow-y: auto;
}
body.pdfstudio-mobile #thumbs .thumb.thumb-dragging {
  opacity: 0.35;
}
body.pdfstudio-mobile .thumb-ghost {
  border: 2px solid #0b6bcb !important;
  border-radius: 8px;
  background: #fff !important;
}
body.pdfstudio-mobile #thumbs .thumb {
  touch-action: none; /* drag = reorder; scroll list via edge auto-scroll / panel chrome */
}
body.pdfstudio-mobile #thumbs .thumb.drag-before {
  box-shadow: inset 0 3px 0 #0b6bcb;
}
body.pdfstudio-mobile #thumbs .thumb.drag-after {
  box-shadow: inset 0 -3px 0 #0b6bcb;
}



/* deskparity114: mark/measure bars on phone (appearance row stays hidden) */
body.pdfstudio-mobile .mark-style-bar,
body.pdfstudio-mobile .measure-bar {
  display: flex !important;
  padding: 6px 8px;
  gap: 6px;
  background: #111;
  border-bottom: 1px solid #333;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
}
body.pdfstudio-mobile .mark-style-bar[hidden],
body.pdfstudio-mobile .measure-bar[hidden] {
  display: none !important;
}
body.pdfstudio-mobile .mark-style-label,
body.pdfstudio-mobile .measure-live {
  color: #f8fafc;
  font-size: 12px;
}
body.pdfstudio-mobile .color-swatches .swatch {
  width: 26px; height: 26px; border-radius: 5px; border: 2px solid #fff;
}
body.pdfstudio-mobile .measure-bar .measure-mode {
  /* deskparity127: ~0.8× (was 32/52 / 6px 8px) — keep ≥24px tap */
  min-height: 26px; min-width: 42px; padding: 4px 6px; font-size: 10px;
  background: #222; color: #fff; border-color: #555;
}
body.pdfstudio-mobile .measure-bar .measure-mode.active {
  background: #fbbf24; color: #111; border-color: #fbbf24;
}
body.pdfstudio-mobile .measure-bar .measure-done {
  min-height: 26px; padding: 4px 8px; font-size: 10px; /* deskparity127: ~0.8× */
}
body.pdfstudio-mobile .page-wrap .inline-text-edit {
  /* deskparity132: must show caret + accept keyboard on first tap */
  -webkit-user-select: text !important;
  user-select: text !important;
  touch-action: manipulation !important;
  -webkit-text-size-adjust: 100%;
  opacity: 1 !important;
  pointer-events: auto !important;
  caret-color: #111111 !important;
  background: rgba(255, 255, 255, 0.97);
  z-index: 60 !important;
}
body.pdfstudio-mobile .measure-bar {
  flex-wrap: wrap;
  row-gap: 6px;
  overflow-x: visible;
}
/* deskparity126: ONE compact cal row — inputs stay inline (not a second white row) */
body.pdfstudio-mobile .measure-cal-inputs {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  flex-basis: auto !important;
  width: auto !important;
  max-width: none !important;
  box-sizing: border-box;
  gap: 3px;
  padding: 1px 3px;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  z-index: 6;
  order: 0 !important;
  flex-wrap: nowrap !important;
}
body.pdfstudio-mobile .measure-cal-length {
  /* deskparity128: ~75% (48/32/16 → 36/24/12); iOS may zoom at <16 — accepted per Sam */
  width: 36px; min-width: 34px; min-height: 24px; font-size: 12px; padding: 1px 3px;
  color: #111 !important; background: #fff !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  box-sizing: border-box;
}
body.pdfstudio-mobile .measure-cal-unit {
  /* deskparity128: ~75% with length */
  min-width: 34px; width: 34px; min-height: 24px; font-size: 11px;
  color: #111 !important; background: #fff !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}
body.pdfstudio-mobile .measure-cal-apply {
  /* deskparity127: ~0.8× with mode buttons */
  min-height: 26px; padding: 3px 6px; font-size: 10px;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}
body.pdfstudio-mobile .measure-cal-clear,
body.pdfstudio-mobile #measureCalClear {
  display: none !important; /* Clear moved to gbar CLR */
}
/* deskparity126: never let viewer overlay steal measure-bar taps */
body.pdfstudio-mobile .measure-bar,
body.pdfstudio-mobile .measure-bar * {
  -webkit-touch-callout: default;
}
body.pdfstudio-mobile .viewer-wrap.anno-dragging .measure-bar,
body.pdfstudio-mobile .viewer-wrap.anno-dragging .measure-bar * {
  pointer-events: auto !important;
}
body.pdfstudio-mobile #calibrateModal.modal-backdrop {
  display: none !important;
  z-index: -1 !important;
  pointer-events: none !important;
}
body.pdfstudio-mobile #calibrateModal #calibrateLength,
body.pdfstudio-mobile #calibrateModal #calibrateUnit {
  font-size: 16px !important;
  min-height: 44px;
  color: #111 !important;
  background: #fff !important;
}

/* deskparity126: compact ONE-line calibrate row + ALWAYS-visible tools */
body.pdfstudio-mobile #measureBar {
  position: relative;
  z-index: 30;
  pointer-events: auto !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  max-height: none;
  overflow: visible !important;
  gap: 4px;
}
body.pdfstudio-mobile #measureCalibrateRow {
  flex: 0 0 auto;
  width: 100%;
  order: 1;
  padding-bottom: 3px; /* deskparity127 */
  border-bottom: 1px dashed #94a3b8;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 3px; /* deskparity127: was 4px */
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
body.pdfstudio-mobile #measureToolsRow {
  flex: 0 0 auto;
  width: 100%;
  order: 2;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 3px; /* deskparity127: was 4px */
  align-items: center;
  min-height: 28px; /* deskparity127: was 36px ~0.8× */
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 8;
  pointer-events: auto !important;
}
body.pdfstudio-mobile #measureToolsRow .measure-mode,
body.pdfstudio-mobile #measureToolsRow .measure-done,
body.pdfstudio-mobile #measureToolsRow .measure-points-done {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
/* deskparity126: tools-row Clear gone */
body.pdfstudio-mobile #measureToolsRow .measure-cancel,
body.pdfstudio-mobile #measureCancel,
body.pdfstudio-mobile .measure-cancel {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
body.pdfstudio-mobile #measureScaleReadout {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 24px; /* deskparity127 */
  font-size: 10px;
  padding: 2px 5px;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.pdfstudio-mobile #measureCalibrateInputs.cal-input-highlight,
body.pdfstudio-mobile .measure-cal-inputs.cal-input-highlight {
  border-color: #f59e0b !important;
  outline: 2px solid #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.4);
}
/* deskparity126: bottom 1mm=pt strip gone */
body.pdfstudio-mobile #measureLive,
body.pdfstudio-mobile .measure-live,
body.pdfstudio-mobile #measureLive:empty,
body.pdfstudio-mobile .measure-live:empty {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: 0 !important;
  overflow: hidden !important;
  font-size: 0 !important;
}


/* deskparity126: Finish always on tools row; measure allows pinch like Hand */
body.pdfstudio-mobile #measureDone.measure-done {
  display: inline-flex !important;
}
body.pdfstudio-mobile .viewer-wrap.tool-measure .page-wrap canvas.overlay {
  touch-action: none !important; /* 1-finger place/adjust; 2-finger pinch owned by JS */
}

/* deskparity126: Measure text name beside Clear — ≈1.2× (was 8px / 2px 6px) */
body.pdfstudio-mobile #btnMeasureTool,
body.pdfstudio-mobile .measure-gbar-btn {
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  min-width: auto !important;
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  padding: 3px 7px !important;
  min-height: 26px !important;
}
body.pdfstudio-mobile #btnMeasureTool span.txt,
body.pdfstudio-mobile .measure-gbar-btn span.txt {
  display: inline !important;
  font-size: 10px !important;
  line-height: 1 !important;
}
body.pdfstudio-mobile #btnMeasureTool .ico {
  display: none !important;
}

/* deskparity126: Fit beside Clear — ≈1.2× (was 9px) */
body.pdfstudio-mobile #btnFit {
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 3px 7px !important;
  min-height: 26px !important;
}
body.pdfstudio-mobile #btnFit span,
body.pdfstudio-mobile #btnFit span[data-i18n] {
  display: inline !important;
  font-size: 10px !important;
  line-height: 1 !important;
}


/* deskparity126: Fit+Clear+Measure share one gbar row with page nav (no orphan middle row) */
body.pdfstudio-mobile .gbar-group.nav-group {
  display: flex !important;
  flex-wrap: nowrap !important;
  flex: 0 1 auto !important;
  gap: 1px !important;
  align-items: center !important;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
body.pdfstudio-mobile .gbar-group.nav-group #btnFit,
body.pdfstudio-mobile .gbar-group.nav-group #btnClearAnnos,
body.pdfstudio-mobile .gbar-group.nav-group #btnMeasureTool,
body.pdfstudio-mobile .gbar-group.nav-group .measure-gbar-btn {
  flex: 0 0 auto !important;
}
/* deskparity150/151: Hand + Zoom−/+ in nav-group (151: Hand left of Clear) — compact icons */
body.pdfstudio-mobile .gbar-group.nav-group [data-tool="pan"],
body.pdfstudio-mobile .gbar-group.nav-group #btnZoomOut,
body.pdfstudio-mobile .gbar-group.nav-group #btnZoomIn,
body.pdfstudio-mobile .gbar-group.nav-group .tool-zoom-btn {
  flex: 0 0 auto !important;
  min-width: 24px !important;
  width: 26px !important;
  max-width: 28px !important;
}
body.pdfstudio-mobile .gbar-group.nav-group [data-tool="pan"] > span:not(.ico):not(.txt) {
  display: none !important;
}
body.pdfstudio-mobile .gbar-group.nav-group .zoom-label {
  flex: 0 0 auto;
  min-width: 32px;
  text-align: center;
}
/* empty legacy zoom-fit-group — do not create a blank row */
body.pdfstudio-mobile .gbar-group.zoom-fit-group[hidden],
body.pdfstudio-mobile .gbar-group.zoom-fit-group:empty {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  flex: 0 0 0 !important;
}


/* deskparity127: measure-mode toggles + Clear + Close + Apply ~0.8× (Fit/Clear/Measure gbar untouched) */
body.pdfstudio-mobile #measureCalibrateRow .measure-mode,
body.pdfstudio-mobile #measureToolsRow .measure-mode,
body.pdfstudio-mobile #measureToolsRow .measure-done,
body.pdfstudio-mobile #measureDone.measure-done,
body.pdfstudio-mobile #measureToolsRow .measure-points-done,
body.pdfstudio-mobile #measurePointsDone,
body.pdfstudio-mobile #measureToolsRow .measure-tools-clear,
body.pdfstudio-mobile #measureClear {
  font-size: 10px !important;
  min-height: 26px !important;
  padding: 4px 6px !important;
  line-height: 1.1 !important;
}
body.pdfstudio-mobile #measurePointsDone.measure-points-done {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: #059669; color: #fff; border: none; border-radius: 4px;
  font-weight: 600;
}
body.pdfstudio-mobile #measureClear.measure-tools-clear {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: #64748b; color: #fff; border: none; border-radius: 4px;
  font-weight: 600;
}
body.pdfstudio-mobile #measureCalibrateRow .measure-cal-apply,
body.pdfstudio-mobile .measure-cal-apply {
  font-size: 10px !important;
  min-height: 26px !important;
  padding: 3px 6px !important;
}
/* Keep Known length input readable (iOS 16px); unit slightly compact */
body.pdfstudio-mobile .measure-cal-unit {
  /* deskparity128: ~75% */
  min-height: 24px !important;
  font-size: 11px !important;
}
body.pdfstudio-mobile .measure-cal-length {
  /* deskparity128: ~75% of prior; font 12 */
  min-height: 24px !important;
  width: 36px !important;
  font-size: 12px !important;
}

/* deskparity137 Soft Bot: ≥768 — usable viewer, no fullscreen thumbs scrim over page */
@media (min-width: 768px) {
  body.pdfstudio-mobile .main.sidebar-collapsed {
    grid-template-columns: 1fr !important;
  }
  body.pdfstudio-mobile .main:not(.sidebar-collapsed) {
    display: grid !important;
    grid-template-columns: 180px 1fr !important;
  }
  body.pdfstudio-mobile .main:not(.sidebar-collapsed) .sidebar {
    position: relative !important;
    inset: auto !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    z-index: auto !important;
    box-shadow: none !important;
    border-right: 1px solid var(--border) !important;
    border-radius: 0 !important;
    padding-bottom: 0 !important;
    overflow: auto !important;
  }
  body.pdfstudio-mobile .thumbs-scrim {
    display: none !important;
    pointer-events: none !important;
  }
  /* Soft Bot: wide toolbar labels Edit/Highlight must not overlap */
  body.pdfstudio-mobile .tools-group .tool-btn > span:not(.ico):not(.txt),
  body.pdfstudio-mobile .tools-group .icon-btn > span:not(.ico):not(.txt) {
    display: none !important;
  }
}


/* deskparity146-icon-lock: iOS Safari SVG.ico without intrinsic size paints enormous
   when .find-box / .globalbar use overflow:visible. Hard-lock every toolbar icon. */
html.pdfstudio-mobile svg.ico,
body.pdfstudio-mobile svg.ico,
body.pdfstudio-mobile .ico {
  width: 15px !important;
  height: 15px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  display: block !important;
  overflow: hidden !important;
  box-sizing: content-box !important;
}
body.pdfstudio-mobile .find-box svg.ico,
html.pdfstudio-mobile .find-box svg.ico {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}
body.pdfstudio-mobile .find-box {
  height: 28px !important;
  max-height: 32px !important;
  overflow: hidden !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
}
body.pdfstudio-mobile .icon-btn,
body.pdfstudio-mobile .tool-btn,
body.pdfstudio-mobile label#btnOpen.icon-btn {
  overflow: hidden !important;
  max-width: 28px !important;
}
body.pdfstudio-mobile .tools-group .icon-btn,
body.pdfstudio-mobile .tools-group .tool-btn {
  max-width: 28px !important;
}
body.pdfstudio-mobile #btnThumbs .ico {
  width: 15px !important;
  height: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
}

@media (max-width: 767px) {
  html.pdfstudio-mobile svg.ico,
  body.pdfstudio-mobile svg.ico,
  body.pdfstudio-mobile .ico {
    width: 15px !important;
    height: 15px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    display: block !important;
    overflow: hidden !important;
  }
  body.pdfstudio-mobile .find-box svg.ico {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
  }
  body.pdfstudio-mobile .find-box {
    height: 28px !important;
    max-height: 32px !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
  }
  body.pdfstudio-mobile .icon-btn,
  body.pdfstudio-mobile .tool-btn,
  body.pdfstudio-mobile label#btnOpen.icon-btn {
    overflow: hidden !important;
    max-width: 28px !important;
  }
  body.pdfstudio-mobile .tools-group .icon-btn,
  body.pdfstudio-mobile .tools-group .tool-btn {
    max-width: 28px !important;
  }
}

/* deskparity154: Image Crop framing — clear inside, dim outside; interactive handles + OK/Cancel */
.image-crop-guide,
#imageCropGuide {
  position: absolute;
  box-sizing: border-box;
  border: 2px dashed #f59e0b;
  background: transparent; /* inside stays full-opacity / clear */
  /* classic photo-crop veil: dim everything outside the hole */
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.48);
  pointer-events: auto;
  z-index: 40;
  overflow: visible;
  touch-action: none;
}
.image-crop-guide .crop-move {
  position: absolute;
  inset: 10px;
  cursor: move;
  z-index: 1;
  touch-action: none;
}
.image-crop-guide .crop-edge {
  position: absolute;
  z-index: 2;
  touch-action: none;
  background: transparent;
}
.image-crop-guide .crop-edge-n { top: -6px; left: 18px; right: 18px; height: 14px; cursor: ns-resize; }
.image-crop-guide .crop-edge-s { bottom: -6px; left: 18px; right: 18px; height: 14px; cursor: ns-resize; }
.image-crop-guide .crop-edge-e { right: -6px; top: 18px; bottom: 18px; width: 14px; cursor: ew-resize; }
.image-crop-guide .crop-edge-w { left: -6px; top: 18px; bottom: 18px; width: 14px; cursor: ew-resize; }
.image-crop-guide .crop-corner,
#imageCropGuide .crop-corner {
  position: absolute;
  box-sizing: border-box;
  width: clamp(26px, 30%, 40px);
  height: clamp(26px, 30%, 40px);
  pointer-events: auto;
  z-index: 3;
  touch-action: none;
}
.image-crop-guide .crop-corner-tl,
#imageCropGuide .crop-corner-tl {
  top: -6px;
  left: -6px;
  border-top: 7px solid #ea580c;
  border-left: 7px solid #ea580c;
  border-right: none;
  border-bottom: none;
  cursor: nwse-resize;
  box-shadow:
    -2px -2px 0 2px #000,
    -1px -1px 0 1px #fff,
    inset 1px 1px 0 0 #fff;
}
.image-crop-guide .crop-corner-tr,
#imageCropGuide .crop-corner-tr {
  top: -6px;
  right: -6px;
  border-top: 7px solid #ea580c;
  border-right: 7px solid #ea580c;
  border-left: none;
  border-bottom: none;
  cursor: nesw-resize;
  box-shadow:
    2px -2px 0 2px #000,
    1px -1px 0 1px #fff,
    inset -1px 1px 0 0 #fff;
}
.image-crop-guide .crop-corner-bl,
#imageCropGuide .crop-corner-bl {
  bottom: -6px;
  left: -6px;
  border-bottom: 7px solid #ea580c;
  border-left: 7px solid #ea580c;
  border-right: none;
  border-top: none;
  cursor: nesw-resize;
  box-shadow:
    -2px 2px 0 2px #000,
    -1px 1px 0 1px #fff,
    inset 1px -1px 0 0 #fff;
}
.image-crop-guide .crop-corner-br,
#imageCropGuide .crop-corner-br {
  right: -6px;
  bottom: -6px;
  border-bottom: 7px solid #ea580c;
  border-right: 7px solid #ea580c;
  border-top: none;
  border-left: none;
  cursor: nwse-resize;
  box-shadow:
    2px 2px 0 2px #000,
    1px 1px 0 1px #fff,
    inset -1px -1px 0 0 #fff;
}
.image-crop-bar,
#imageCropBar {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.92);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}
.image-crop-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  min-width: 88px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.image-crop-btn--cancel {
  background: #374151;
  color: #fff;
}
.image-crop-btn--ok {
  background: #ea580c;
  color: #fff;
}

/* deskparity222: File pull-down — same width as Edit/View/Tools; NEVER full-page.
   CRITICAL: do NOT set inset/left/top/right/bottom here — positionMenu owns placement.
   deskparity159 inset:auto !important overrode JS left/top → menu opened off-screen (Sam: no pull-down). */
body.pdfstudio-mobile #fileMenu.popup-menu:not([hidden]) {
  position: fixed !important;
  z-index: 10060 !important;
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  width: max-content !important;
  min-width: min(16rem, 90vw) !important;
  max-width: min(22rem, 94vw) !important;
  height: auto !important;
  max-height: min(70vh, 28rem) !important;
  margin: 0 !important;
  border-radius: 2px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* deskparity155: Language list — same Word chrome, scroll inside */
body.pdfstudio-mobile #languageMenu.popup-menu:not([hidden]),
body.pdfstudio-mobile .language-menu:not([hidden]) {
  min-width: min(16rem, 90vw) !important;
  max-width: min(20rem, 94vw) !important;
  max-height: min(70vh, 28rem) !important;
  padding: 0 !important;
}
body.pdfstudio-mobile #languageMenu .lang-menu-head,
body.pdfstudio-mobile .language-menu .lang-menu-head {
  background: #f8fafc !important;
  border-bottom: 1px solid #e5e7eb !important;
  padding: 8px 10px 6px !important;
}
body.pdfstudio-mobile #languageMenu .lang-list,
body.pdfstudio-mobile .language-menu .lang-list {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  max-height: min(58vh, 22rem);
}
body.pdfstudio-mobile #languageMenu .lang-list button,
body.pdfstudio-mobile .language-menu .lang-list button {
  text-align: left !important;
  padding: 8px 16px !important;
  min-height: 36px !important;
  font-size: 13px !important;
}


/* ========== deskparity158: Word-like File Backstage (mobile) ========== */
body.pdfstudio-mobile #fileBackstage.file-backstage-backdrop,
#fileBackstage.file-backstage-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10120;
  display: none;
  align-items: stretch;
  justify-content: stretch;
  background: rgba(0, 0, 0, 0.38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 0;
  margin: 0;
}
body.pdfstudio-mobile #fileBackstage.file-backstage-backdrop:not([hidden]),
#fileBackstage.file-backstage-backdrop:not([hidden]),
body.pdfstudio-mobile #fileBackstage.file-backstage-backdrop.show,
#fileBackstage.file-backstage-backdrop.show {
  display: flex !important;
}
body.pdfstudio-mobile .file-backstage-panel,
.file-backstage-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  background: #f2f2f7;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Near-full sheet from bottom on taller phones: keep full height for Word backstage feel */
@media (min-width: 480px) and (min-height: 700px) {
  body.pdfstudio-mobile #fileBackstage.file-backstage-backdrop:not([hidden]),
  body.pdfstudio-mobile #fileBackstage.file-backstage-backdrop.show {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }
  body.pdfstudio-mobile .file-backstage-panel {
    /* deskparity158: wider sheet on tall phones/tablets — closer to pull-down comfort */
    width: min(100%, 36rem);
    max-height: min(96vh, 920px);
    height: min(96vh, 920px);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.22);
  }
}
.file-backstage-head {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 4px;
  min-height: 52px;
  padding: 6px 10px 6px 4px;
  background: #ffffff;
  border-bottom: 1px solid #d8d8dc;
  flex: 0 0 auto;
}
.file-backstage-back {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: #007aff;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.file-backstage-back:active { background: #e8f0fe; }
.file-backstage-head h2 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: #1c1c1e;
  letter-spacing: -0.01em;
}
.file-backstage-cancel {
  border: none;
  background: transparent;
  color: #007aff;
  font-size: 17px;
  font-weight: 400;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.file-backstage-cancel:active { background: #e8f0fe; }
.file-backstage-scroll {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 28px;
}
.file-bs-section-label {
  font-size: 13px;
  font-weight: 600;
  color: #6c6c70;
  text-transform: none;
  letter-spacing: 0.01em;
  padding: 14px 4px 8px;
}
.file-bs-group {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0.5px 0 rgba(0,0,0,0.04);
}
.file-bs-row {
  display: flex !important;
  align-items: center;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 12px 14px !important;
  margin: 0 !important;
  border: none !important;
  border-bottom: 1px solid #e5e5ea !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: #1c1c1e !important;
  -webkit-text-fill-color: #1c1c1e !important;
  text-align: left !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  line-height: 1.25;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.file-bs-group > .file-bs-row:last-child,
.file-bs-group > #fileBackstageRecent > .file-bs-row:last-child {
  border-bottom: none !important;
}
.file-bs-row:active:not(:disabled),
.file-bs-row:hover:not(:disabled) {
  background: #e8f2fc !important;
}
.file-bs-row:disabled {
  opacity: 0.55;
  cursor: default;
}
.file-bs-row.file-bs-primary {
  min-height: 64px;
}
.file-bs-ico {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #007aff;
}
.file-bs-ico-word { color: #2b579a; }
.file-bs-ico-excel { color: #217346; }
.file-bs-ico-ppt { color: #c43e1c; }
.file-bs-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.file-bs-label {
  font-size: 17px;
  font-weight: 400;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-bs-sub {
  font-size: 13px;
  color: #8e8e93;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-bs-row.file-bs-danger .file-bs-label,
.file-bs-row.file-bs-danger .file-bs-ico {
  color: #ff3b30;
}
.file-bs-empty {
  padding: 14px 14px;
  font-size: 15px;
  color: #8e8e93;
  text-align: left;
}
#fileBackstageRecent .file-bs-row .file-bs-ico {
  color: #8e8e93;
}
/* Desktop: backstage unused — keep hidden */
html:not(.pdfstudio-mobile) body:not(.pdfstudio-mobile) #fileBackstage {
  display: none !important;
}

/* deskparity159: File uses #fileMenu pull-down — suppress full-page backstage unless .force-show */
body.pdfstudio-mobile #fileBackstage.file-backstage-backdrop:not(.force-show),
#fileBackstage.file-backstage-backdrop:not(.force-show) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}




/* deskparity222: menubar full names + BIM toolbar one page */
/* 1) Menubar: show full File/Edit/View/Tools/BIM/Window/Membership/Help/Language — never F… */
body.pdfstudio-mobile .menubar {
  flex-wrap: wrap !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  justify-content: flex-start !important;
  gap: 0 2px !important;
  padding: 2px 4px !important;
  min-height: 28px !important;
  max-height: none !important;
  height: auto !important;
}
body.pdfstudio-mobile .menubar .menu-item {
  flex: 0 0 auto !important;
  min-width: unset !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 4px 5px !important;
  letter-spacing: -0.01em;
}
/* Kill data-short truncation (Member/Lang) — always show full button text */
body.pdfstudio-mobile .menubar .menu-item[data-short] {
  font-size: 11px !important;
}
body.pdfstudio-mobile .menubar .menu-item[data-short]::after {
  content: none !important;
  display: none !important;
}
@media (max-width: 767.98px) {
  body.pdfstudio-mobile .menubar {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    justify-content: flex-start !important;
    gap: 0 1px !important;
  }
  body.pdfstudio-mobile .menubar .menu-item,
  body.pdfstudio-mobile .menu-item {
    flex: 0 0 auto !important;
    min-width: unset !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: 10.5px !important;
    padding: 3px 4px !important;
  }
  body.pdfstudio-mobile .menubar .menu-item[data-short] {
    font-size: 10.5px !important;
  }
  body.pdfstudio-mobile .menubar .menu-item[data-short]::after {
    content: none !important;
    display: none !important;
  }
}

/* deskparity222: translated labels (de/el/ru/ta…) can be wider than the phone — cap pull-down menus to the
   viewport minus the 8px clamp margins and let a too-long item wrap onto a 2nd line (full name kept, never clipped). */
body.pdfstudio-mobile .popup-menu:not([hidden]),
body.pdfstudio-mobile #fileMenu:not([hidden]),
body.pdfstudio-mobile #editMenu:not([hidden]),
body.pdfstudio-mobile #viewMenu:not([hidden]),
body.pdfstudio-mobile #toolsMenu:not([hidden]),
body.pdfstudio-mobile #bimMenu:not([hidden]),
body.pdfstudio-mobile #windowMenu:not([hidden]),
body.pdfstudio-mobile #helpMenu:not([hidden]),
body.pdfstudio-mobile #languageMenu:not([hidden]),
body.pdfstudio-mobile #translateMenu:not([hidden]) {
  max-width: min(calc(100vw - 16px), 40rem) !important;
  min-width: min(18rem, calc(100vw - 16px)) !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}
body.pdfstudio-mobile .popup-menu:not([hidden]) > button,
body.pdfstudio-mobile .popup-menu:not([hidden]) > label,
body.pdfstudio-mobile .popup-menu:not([hidden]) > .menu-open-label {
  white-space: normal !important;
  overflow-wrap: break-word;
  text-align: start;
}

/* deskparity222 (Soft Bot 186 FAIL B): phone row-2 text buttons (Fit / Grid / Clear / Measure) size to their
   translated label instead of a fixed 28px box. js fitPhoneNavRow() shrinks the label font (10px → floor 8px),
   then compacts the icon buttons, then lets a long label wrap to 2 lines — never clipped, never ellipsised,
   row stays inside one screen width. */
body.pdfstudio-mobile .gbar-group.nav-group #btnFit,
body.pdfstudio-mobile .gbar-group.nav-group #btnFitGrid,
body.pdfstudio-mobile .gbar-group.nav-group #btnClearAnnos,
body.pdfstudio-mobile .gbar-group.nav-group #btnMeasureTool {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 26px !important;
  max-width: none !important;
  padding-left: 3px !important;
  padding-right: 3px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
body.pdfstudio-mobile .gbar-group.nav-group #btnFit span[data-i18n],
body.pdfstudio-mobile .gbar-group.nav-group #btnFit span,
body.pdfstudio-mobile .gbar-group.nav-group #btnFitGrid span.txt,
body.pdfstudio-mobile .gbar-group.nav-group #btnClearAnnos span.txt,
body.pdfstudio-mobile .gbar-group.nav-group #btnMeasureTool span.txt {
  font-size: var(--ps-nav-fs, 10px) !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
}
body.pdfstudio-mobile .gbar-group.nav-group.ps-nav-compact #btnPageUp,
body.pdfstudio-mobile .gbar-group.nav-group.ps-nav-compact #btnPageDown,
body.pdfstudio-mobile .gbar-group.nav-group.ps-nav-compact #btnZoomOut,
body.pdfstudio-mobile .gbar-group.nav-group.ps-nav-compact #btnZoomIn,
body.pdfstudio-mobile .gbar-group.nav-group.ps-nav-compact [data-tool="pan"] {
  min-width: 24px !important;
  width: 24px !important;
  padding-left: 1px !important;
  padding-right: 1px !important;
}
body.pdfstudio-mobile .gbar-group.nav-group.ps-nav-compact .zoom-label { min-width: 28px !important; }
body.pdfstudio-mobile .gbar-group.nav-group.ps-nav-wrap .ps-nav-wrapbtn,
body.pdfstudio-mobile .gbar-group.nav-group.ps-nav-wrap .ps-nav-wrapbtn span {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  text-align: center !important;
}

/* deskparity222-mime */

/* deskparity222 Sam t978: harder icon pack — kill stretch + group gaps on phone390 too */
body.pdfstudio-mobile .globalbar,
body.pdfstudio-mobile .gbar-group,
body.pdfstudio-mobile .gbar-group.tools-group,
body.pdfstudio-mobile .tools-group {
  gap: 0 !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
}
body.pdfstudio-mobile .gbar-spacer {
  flex: 0 0 0 !important;
  min-width: 0 !important;
  max-width: 4px !important;
}
body.pdfstudio-mobile .icon-btn .office-text-sym,
body.pdfstudio-mobile .tool-btn .office-text-sym,
body.pdfstudio-mobile .icon-btn .office-text-sym span,
body.pdfstudio-mobile .tool-btn .office-text-sym span {
  display: inline-flex !important;
}


/* deskparity222 */
body.pdfstudio-mobile #printModal .print-always-show{display:block!important}
body.pdfstudio-mobile #printModal .print-dialog-body{flex-direction:row!important;flex-wrap:nowrap!important}@media(min-width:721px){html body.pdfstudio-mobile #printModal .print-settings,html body.pdfstudio-mobile #printModal .pbs-settings,html body.pdfstudio-mobile #printModal .ios-print-groups,html body.pdfstudio-tablet #printModal .print-settings,html body.pdfstudio-desktop #printModal .print-settings{flex:0 0 190px!important;width:190px!important;max-width:190px!important;min-width:0!important}}@media(max-width:720px){html body.pdfstudio-mobile #printModal .print-settings,html body.pdfstudio-mobile #printModal .pbs-settings,html body.pdfstudio-mobile #printModal .ios-print-groups,html body #printModal[data-we-print] .print-settings,html body #printModal[data-we-print] .pbs-settings{flex:0 0 30%!important;width:30%!important;max-width:30%!important;min-width:104px!important;height:100%!important;overflow:auto!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;padding:8px 10px!important}}html body.pdfstudio-mobile #printModal .print-preview-pane,html body.pdfstudio-mobile #printModal .pbs-preview-wrap{min-height:0!important;max-height:none!important;flex:1 1 auto!important;background:#5b5b5b!important;padding:0!important;border-radius:0!important}html body.pdfstudio-mobile #printModal #printPrinter,html body.pdfstudio-mobile #printModal #printCopies,html body.pdfstudio-tablet #printModal #printPrinter,html body.pdfstudio-tablet #printModal #printCopies{font-size:12px!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;padding:4px 6px!important;border:1px solid #c8c8c8!important;border-radius:4px!important;background:#fff!important}
