/* Shared chrome also loaded by isolated format viewers; component width, not device sniffing. */
.anko-toolbar { overflow:visible; flex:0 0 auto; }
.anko-toolbar > .app-attachment-viewer-toolbar-inner,.anko-toolbar > .format-viewer-toolbar-inner { min-width:0; flex-wrap:nowrap; gap:8px; }
.anko-tool-menu { display:contents; color:inherit; }
.anko-toolbar .toolbar-divider,.anko-toolbar .format-viewer-divider,.anko-tool-menu > :empty { display:none!important; }
.anko-sheet-title { display:none; }
.anko-pages { order:10; }
.anko-zoom { order:20; }
.anko-rotation { order:40; }
.anko-download,[data-anko-extra],[data-anko-context] { order:70; }
.anko-more { order:80; }
.anko-toolbar svg { width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.anko-toolbar button,.anko-toolbar a { gap:6px; white-space:nowrap; }
.anko-toolbar .anko-pages label span,.anko-toolbar .anko-pages label b { color:#dce2ea; opacity:1; }
.anko-toolbar .anko-pages label { display:inline-flex; align-items:center; gap:5px; }
.anko-toolbar .anko-pages input { height:36px; box-sizing:border-box; border:1px solid #626b77; border-radius:6px; }
.anko-toolbar:not(.is-compact) button,.anko-toolbar:not(.is-compact) a { min-height:36px; box-sizing:border-box; }
.anko-toolbar:not(.is-compact) .anko-pages,.anko-toolbar:not(.is-compact) .anko-zoom { padding-right:12px; margin-right:4px; border-right:1px solid #59616b; }
.anko-toolbar button[aria-pressed="true"] { background:#536171; border-color:#95a7bc; }
.anko-toolbar svg { width:18px; height:18px; }
.anko-more { display:none!important; }
[data-anko-extra] { display:inline-flex; align-items:center; gap:6px; flex-wrap:wrap; }
.anko-download,.anko-toolbar [data-attachment-download] { display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:0 10px; border:1px solid #555b62; border-radius:5px; color:#fff; background:#3b3f44; text-decoration:none; white-space:nowrap; font:inherit; font-size:12px; }
.anko-toolbar .is-hidden { display:none!important; }
.anko-toolbar.is-compact .anko-more { display:inline-flex!important; min-width:36px; min-height:44px; }
.anko-toolbar.is-compact .anko-pages button,.anko-toolbar.is-compact .anko-zoom button,.anko-toolbar.is-compact .anko-rotation button { min-width:36px; width:36px; min-height:40px; height:40px; padding:0; }
.anko-toolbar.is-compact .anko-more { min-height:40px; height:40px; }
.anko-toolbar.is-compact .anko-pages,.anko-toolbar.is-compact .anko-zoom { gap:3px; flex:none; }
.anko-toolbar.is-compact .anko-pages input { width:30px; min-width:0; padding:0; font-size:16px; text-align:center; appearance:textfield; }
.anko-toolbar.is-compact .anko-pages input::-webkit-inner-spin-button { appearance:none; }
.anko-toolbar.is-compact .anko-pages label { gap:2px; }
.anko-toolbar.is-compact .anko-pages label span { white-space:nowrap; font-size:11px; }
.anko-toolbar.is-compact .anko-zoom > span { min-width:34px; font-size:12px; }
.anko-toolbar.is-compact .anko-rotation button > span { display:none; }
.anko-toolbar.is-compact > div { flex-wrap:nowrap; width:100%; justify-content:center; gap:4px; }
.anko-toolbar.is-compact .anko-tool-menu { display:none; }
.anko-toolbar.is-compact .anko-tool-menu:popover-open,.anko-toolbar.is-compact .anko-tool-menu.is-open { display:flex; position:fixed; inset:auto 0 0; margin:0 auto; box-sizing:border-box; width:min(480px,100%); max-height:65dvh; overflow:auto; overscroll-behavior:contain; flex-direction:column; align-items:stretch; gap:0; padding:16px 20px; padding-bottom:max(16px,env(safe-area-inset-bottom)); border:0; border-radius:16px 16px 0 0; background:#fff; color:#182238; box-shadow:0 -8px 32px #0003; z-index:120; }
.anko-toolbar.is-compact .anko-sheet-title { display:block; padding:4px 0 12px; text-align:left; font-size:16px; }
.anko-toolbar.is-compact .anko-sheet-title { order:-1; }
.anko-toolbar.is-compact .anko-tool-menu button,.anko-toolbar.is-compact .anko-tool-menu a { display:flex; width:100%; justify-content:flex-start; text-align:left; padding:10px 12px; gap:12px; }
.anko-frame-shell > .anko-toolbar > .app-attachment-viewer-toolbar-inner { justify-content:flex-end; }
.anko-frame-shell > .anko-toolbar .anko-tool-menu { display:contents; }
.anko-frame-shell > .anko-toolbar .anko-more,.anko-frame-shell > .anko-toolbar .anko-sheet-title { display:none!important; }
.app-attachment-dialog[data-attachment-render-mode="pdf"][data-attachment-pdf-mode="native"] .anko-frame-shell > .anko-toolbar { display:none; }
.app-attachment-dialog[data-attachment-render-mode="pdf"][data-attachment-pdf-mode="native"] .anko-frame-shell > .anko-toolbar:has([data-library-preview-select]) { display:block; }
.app-attachment-dialog[data-attachment-render-mode="pdf"][data-attachment-pdf-mode="native"] .anko-frame-shell [data-attachment-download] { display:none!important; }
.anko-toolbar.is-compact .anko-tool-menu .app-attachment-viewer-tool-group,.anko-toolbar.is-compact .anko-tool-menu .format-viewer-tool-group { display:flex; flex-wrap:wrap; gap:8px; padding:8px 0; border-top:1px solid #e7eaf0; justify-content:flex-start; }
.anko-tool-menu::backdrop { background:#0005; }
.anko-toolbar.is-compact .anko-tool-menu .toolbar-divider,.anko-toolbar.is-compact .anko-tool-menu .format-viewer-divider { display:none; }
.anko-toolbar.is-compact .anko-tool-menu [data-anko-extra] { flex-direction:column; align-items:stretch; }
.anko-toolbar.is-compact .anko-tool-menu button,.anko-toolbar.is-compact .anko-tool-menu a { min-height:44px; background:#fff; color:#182238; border:1px solid transparent; font-size:14px; }
.anko-toolbar.is-compact .anko-tool-menu button:hover,.anko-toolbar.is-compact .anko-tool-menu a:hover { background:#f3f5f9; }
.anko-toolbar.is-compact .anko-tool-menu button.is-active,.anko-toolbar.is-compact .anko-tool-menu button[aria-pressed="true"] { color:#ff3b30; background:#fff0ef; }
.anko-toolbar.is-compact .anko-tool-menu input,.anko-toolbar.is-compact .anko-tool-menu select { background:#f3f5f9; color:#182238; border:1px solid #cbd3df; }
.anko-toolbar.is-compact .anko-tool-menu input,.anko-toolbar.is-compact .anko-tool-menu select { font-size:16px; }
.anko-frame-shell { height:100%; min-height:0; min-width:0; display:flex; flex-direction:column; overflow:hidden; }
.anko-frame-shell > iframe { flex:1 1 0; height:0; width:100%; min-height:0; border:0; }
.anko-frame-shell [hidden] { display:none!important; }
.anko-frame-shell > .universal-preview-status { flex:1; }
.app-attachment-body.has-review-pane > .anko-frame-shell { grid-column:1; grid-row:1; }
.anko-progress { display:grid; justify-items:center; gap:12px; width:min(320px,100%); margin:12px auto; text-align:center; }
.anko-progress progress { appearance:auto; width:100%; height:8px; accent-color:#ff3b30; }
.anko-progress small { font-size:12px; line-height:1.5; opacity:.85; }
.format-viewer-loading > span { display:none; }
.format-viewer-studio-progress { display:none; }
.format-viewer-studio-loading .anko-progress { color:#fff; }
.format-viewer-loading[data-level="error"] .anko-progress { display:none; }
.app-attachment-pdf-status:not([hidden]) { position:absolute; inset:0; display:grid; place-content:center; justify-items:center; padding:24px; background:#4b4e52; color:white; margin:0; border-radius:0; transform:none; text-align:center; z-index:2; }
.app-attachment-pdf-scroll,.app-attachment-image-scroll { position:relative; }
.app-attachment-dialog [data-library-preview-select] { width:auto; white-space:nowrap; flex:0 0 auto; }
.files-preview-content:not([hidden]) { display:flex!important; flex-direction:column; }
.files-preview-content > header,.files-preview-content > dl,.files-preview-content > section { flex:0 0 auto; }
.files-preview-content > .files-preview-stage { flex:1 1 0; min-height:0; }
.files-preview-content > header > [data-preview-expand] { flex:0 0 auto; display:inline-flex; align-items:center; gap:5px; white-space:nowrap; font-size:12px; }
.files-preview-mode-host { display:inline-flex; align-items:center; flex:0 0 auto; }
.files-preview-mode-host:empty { display:none; }
.files-preview-content > header > [data-preview-expand] { position:relative; width:auto; min-width:34px; margin-left:4px; padding:0 7px 0 13px; color:var(--text); }
.files-preview-content > header > [data-preview-expand]::before { content:""; position:absolute; left:0; top:7px; bottom:7px; width:1px; background:var(--border); }
.files-preview-content > header > [data-preview-expand] span { font-size:12px; white-space:nowrap; }
.files-preview-stage.has-shared-viewer { display:block; width:100%; max-width:100%; min-width:0; padding:0; overflow:hidden; }
.app-attachment-dialog.is-docked[open] { box-sizing:border-box; position:relative; inset:auto; top:auto; left:auto; width:100%; min-width:0; max-width:100%; height:100%; min-height:0; max-height:none; margin:0; padding:0; overflow:hidden; transform:none; border:0; border-radius:0; box-shadow:none; }
.app-attachment-dialog.is-docked > .workspace-modal-head { display:none!important; }
.app-attachment-dialog.is-docked[open] { z-index:0; }
.files-preview-stage.has-shared-viewer { isolation:isolate; }
.files-preview-content > header > [data-preview-window] { flex:0 0 auto; display:inline-flex; align-items:center; gap:5px; width:auto; padding:0 7px; white-space:nowrap; font-size:12px; }
@media (max-width:767px) { .files-preview-content > header > [data-preview-window] { display:none!important; } }
.app-attachment-dialog.is-docked > .app-attachment-body,.app-attachment-dialog.is-docked .app-attachment-pdf-viewer,.app-attachment-dialog.is-docked .app-attachment-image-viewer,.app-attachment-dialog.is-docked .anko-frame-shell { box-sizing:border-box; width:100%; min-width:0; max-width:100%; overflow:hidden; }
.app-attachment-dialog.is-docked > .app-attachment-body { flex:1 1 0; height:100%; min-height:0; }
.app-attachment-dialog.is-docked .app-attachment-viewer-toolbar { box-sizing:border-box; width:100%; min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
.app-attachment-dialog.is-docked :is(.app-attachment-pdf-scroll,.app-attachment-image-scroll) { box-sizing:border-box; width:100%; min-width:0; max-width:100%; }
.app-attachment-dialog.is-docked::backdrop { display:none; }
.files-preview-mode-host > .attachment-pdf-mode-switch { display:inline-flex; align-items:center; gap:2px; margin:0; padding:3px; border:1px solid var(--border); border-radius:24px; background:var(--surface-subtle); white-space:nowrap; }
.files-preview-mode-host > .attachment-pdf-mode-switch button { width:auto; min-width:0; height:34px; min-height:34px; padding:0 12px; border:0; border-radius:20px; display:inline-flex; align-items:center; justify-content:center; gap:5px; background:transparent; color:var(--muted); font-size:12px; font-weight:600; white-space:nowrap; }
.files-preview-mode-host > .attachment-pdf-mode-switch button svg { width:16px; height:16px; margin:0; }
.files-preview-mode-host > .attachment-pdf-mode-switch button span { display:inline; }
.files-preview-mode-host > .attachment-pdf-mode-switch button.is-active { background:var(--brand); color:var(--on-accent); }
.app-attachment-dialog .workspace-modal-head { display:flex; align-items:center; gap:16px; }
.app-attachment-dialog .workspace-modal-head > div { flex:1; min-width:0; }
.app-attachment-dialog .workspace-modal-head p,.app-attachment-dialog .workspace-modal-icon { display:none!important; }
.app-attachment-dialog .workspace-modal-head .attachment-pdf-mode-switch { flex:none; display:inline-flex; padding:3px; border:1px solid #c6ceda; background:#eef0f5; border-radius:24px; white-space:nowrap; }
.app-attachment-dialog .workspace-modal-head .attachment-pdf-mode-switch.is-hidden { display:none; }
.app-attachment-dialog .workspace-modal-head .attachment-pdf-mode-switch button { min-height:34px; padding:0 16px; border:0; border-radius:20px; background:transparent; color:#182238; font-size:13px; font-weight:600; white-space:nowrap; }
.app-attachment-dialog .workspace-modal-head .attachment-pdf-mode-switch button svg { width:16px; height:16px; margin-right:5px; vertical-align:-3px; }
.app-attachment-dialog .workspace-modal-head .attachment-pdf-mode-switch button.is-active { background:#ff3b30; color:#fff; }
.app-attachment-dialog[data-attachment-loading="1"] [data-attachment-download] { display:none!important; }
@media (max-width:767px) {
  .app-attachment-dialog .workspace-modal-head .workspace-modal-icon { display:none!important; }
  .app-attachment-body.has-review-pane:has(.app-attachment-mobile-tabs:not([hidden])) > .anko-frame-shell { grid-row:2; }
  .app-attachment-dialog[data-attachment-tab="memo"] .anko-frame-shell { display:none; }
  .app-attachment-dialog .workspace-modal-head { display:flex!important; align-items:center!important; min-height:56px!important; padding:8px 10px!important; flex-wrap:nowrap!important; gap:6px!important; }
  .app-attachment-dialog .workspace-modal-head .dialog-heading-icon,.app-attachment-dialog .workspace-modal-head .app-dialog-icon,.app-attachment-dialog .workspace-modal-head p,.app-attachment-dialog .workspace-modal-head small,.app-attachment-dialog .workspace-modal-head [data-attachment-expand] { display:none!important; }
  .app-attachment-dialog .workspace-modal-head > div { min-width:0; width:auto!important; flex:1 1 0!important; }
  .app-attachment-dialog [data-attachment-dialog-title] { display:block; font-size:15px!important; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .app-attachment-dialog .attachment-dialog-head-actions { width:auto!important; flex:0 0 auto; }
  .app-attachment-dialog .workspace-modal-head .attachment-pdf-mode-switch:not(.is-hidden) { order:0; margin:0; }
  .app-attachment-dialog .workspace-modal-head .attachment-pdf-mode-switch:not(.is-hidden) { gap:2px; padding:2px; border-radius:8px; background:var(--surface-subtle); }
  .app-attachment-dialog .workspace-modal-head .attachment-pdf-mode-switch button { width:36px; min-width:36px; height:36px; min-height:36px; padding:0; border-radius:6px; display:grid; place-items:center; }
  .app-attachment-dialog .workspace-modal-head .attachment-pdf-mode-switch button svg { width:16px; height:16px; margin:0; }
  .app-attachment-dialog .workspace-modal-head .attachment-pdf-mode-switch button span { display:none; }
  .files-preview-content > header small { display:none; }
  .files-preview-mode-host,.files-preview-content > header > [data-preview-expand] { display:none!important; }
}
