/* Novo One responsive contract. This final, route-scoped cascade owns reflow,
   zoom-equivalent layouts, touch targets, drawers, sheets, and dialog sizing. */

html.library-novo1 {
  --novo1-compact-appbar: 104px;
  --novo1-sheet-gutter: max(8px, env(safe-area-inset-left));
  --novo1-sheet-bottom: max(8px, env(safe-area-inset-bottom));
}

html.library-novo1 body.library-workspace-open,
html.library-novo1 body.library-workspace-open #app,
html.library-novo1 body.library-workspace-open .library-app,
html.library-novo1 body.library-workspace-open .main-panel,
html.library-novo1 body.library-workspace-open .command-bar,
html.library-novo1 body.library-workspace-open .command-cluster,
html.library-novo1 body.library-workspace-open .list-header,
html.library-novo1 body.library-workspace-open .content-grid,
html.library-novo1 body.library-workspace-open .reference-list {
  min-width: 0;
  max-width: 100%;
}

html.library-novo1 body.library-workspace-open .novo1-mobile-actions-toggle,
html.library-novo1 body.library-workspace-open .novo1-mobile-filters-toggle,
html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-heading,
html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-backdrop {
  display: none;
}

html.library-novo1 body.library-workspace-open .reference-title,
html.library-novo1 body.library-workspace-open .reference-authors,
html.library-novo1 body.library-workspace-open .reference-meta,
html.library-novo1 body.library-workspace-open .reference-card strong,
html.library-novo1 body.library-workspace-open .reference-card span {
  overflow-wrap: anywhere;
}

/* Use the exact production LC vector from novo-ui.js for the library empty
   state. The prior shared empty-state asset used an older, wider C path. */
html.library-novo1 body.library-workspace-open .empty-state[data-empty-kind="library"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' fill='none' stroke='%231468e8' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.1375 6.25H4.3875v23.5H10.1375M25.8625 6.25h5.75v23.5h-5.75'/%3E%3Cpath d='M10.3375 12.75v10.5h5.175M25.6125 14.55c-.82-1.17-1.9-1.8-3.32-1.8-2.82 0-4.68 2.08-4.68 5.25s1.86 5.25 4.68 5.25c1.42 0 2.5-.63 3.32-1.8'/%3E%3C/svg%3E") !important;
}

@media (max-width: 1180px) {
  html.library-novo1 body.library-workspace-open .library-app {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
  }

  html.library-novo1 body.library-workspace-open .sidebar {
    position: fixed !important;
    z-index: 2200;
    inset: 0 auto 0 0;
    width: min(340px, calc(100vw - 64px)) !important;
    max-width: 100vw;
    height: var(--library-visual-height, 100dvh) !important;
    grid-column: auto !important;
    grid-row: auto !important;
    transform: translate3d(-102%, 0, 0);
    transition: transform 180ms ease;
    border-right: 1px solid var(--novo1-line) !important;
    box-shadow: 18px 0 44px rgba(13, 35, 54, .16) !important;
    visibility: hidden;
  }

  html.library-novo1 body.library-workspace-open #app.mobile-library-open .sidebar {
    transform: translate3d(0, 0, 0);
    visibility: visible;
  }

  html.library-novo1 body.library-workspace-open .mobile-sidebar-header {
    min-height: 52px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: max(6px, env(safe-area-inset-top)) 10px 6px;
  }

  html.library-novo1 body.library-workspace-open .mobile-sidebar-close {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  html.library-novo1 body.library-workspace-open .mobile-sidebar-backdrop {
    position: fixed !important;
    z-index: 2100;
    inset: 0;
    display: block !important;
    width: 100vw;
    height: var(--library-visual-height, 100dvh);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(13, 29, 43, .46);
    border: 0;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  html.library-novo1 body.library-workspace-open #app.mobile-library-open .mobile-sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  html.library-novo1 body.library-workspace-open .main-panel {
    width: 100%;
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  html.library-novo1 body.library-workspace-open .command-bar {
    grid-template-columns: minmax(180px, 1fr) minmax(0, 520px) !important;
    grid-template-rows: var(--novo1-command-height) auto !important;
    height: auto !important;
    min-height: calc(var(--novo1-command-height) + 42px) !important;
    gap: 4px 6px !important;
    padding: 0 var(--novo1-content-gutter) 6px 0 !important;
  }

  html.library-novo1 body.library-workspace-open .novo1-topbar-brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
  }

  html.library-novo1 body.library-workspace-open .command-cluster {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100%;
  }

  html.library-novo1 body.library-workspace-open #app .command-bar > .toolbar {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-height: 36px;
    justify-content: flex-end;
    overflow: visible !important;
  }

  html.library-novo1 body.library-workspace-open .mobile-library-toggle {
    box-sizing: border-box;
    width: auto;
    min-width: 82px;
    height: var(--novo1-control-height);
    min-height: var(--novo1-control-height);
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 9px;
    color: var(--novo1-text);
    background: #fff;
    border: 1px solid var(--novo1-line-strong);
    border-radius: 7px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  html.library-novo1 body.library-workspace-open .mobile-library-toggle .sidebar-icon {
    width: 18px;
    min-width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--novo1-blue);
  }

  html.library-novo1 body.library-workspace-open #app .command-cluster > .floating-menu.add-menu,
  html.library-novo1 body.library-workspace-open #app .command-cluster > .search-popover {
    width: min(650px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
  }

  html.library-novo1 body.library-workspace-open .reference-card,
  html.library-novo1 body.library-workspace-open .empty-state {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  html.library-novo1 body.library-workspace-open {
    overflow: hidden;
  }

  html.library-novo1 body.library-workspace-open.novo1-mobile-sheet-open {
    overscroll-behavior: none;
  }

  html.library-novo1 body.library-workspace-open .library-app {
    grid-template-rows: var(--novo1-compact-appbar) minmax(0, 1fr) !important;
  }

  html.library-novo1 body.library-workspace-open .command-bar {
    position: relative;
    z-index: 40;
    height: var(--novo1-compact-appbar) !important;
    min-height: var(--novo1-compact-appbar) !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    grid-template-rows: 52px 44px !important;
    gap: 4px 0 !important;
    padding: 0 8px 4px !important;
    box-sizing: border-box;
  }

  html.library-novo1 body.library-workspace-open .novo1-topbar-brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 44px !important;
    height: 52px !important;
    min-height: 52px !important;
    overflow: hidden;
  }

  html.library-novo1 body.library-workspace-open .brand-row {
    width: 44px !important;
    height: 52px !important;
    min-height: 52px !important;
    display: grid !important;
    place-items: center;
    padding: 0 !important;
  }

  html.library-novo1 body.library-workspace-open .brand-row .brand-copy,
  html.library-novo1 body.library-workspace-open .brand-row .library-status-row,
  html.library-novo1 body.library-workspace-open .brand-row .account-menu-toggle {
    display: none !important;
  }

  html.library-novo1 body.library-workspace-open .brand-row > .sidebar-brand-mark.novo-live-workspace-mark,
  html.library-novo1 body.library-workspace-open .brand-row > .sidebar-brand-mark.novo-live-workspace-mark .novo-wordmark-symbol {
    display: block !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
  }

  html.library-novo1 body.library-workspace-open .command-cluster {
    grid-column: 2 !important;
    grid-row: 1 / 3 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: 40px auto minmax(0, 1fr) 40px;
    grid-template-rows: 52px 44px;
    align-items: center;
    gap: 4px;
  }

  html.library-novo1 body.library-workspace-open .mobile-library-toggle {
    grid-column: 1;
    grid-row: 1;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    justify-content: center;
  }

  html.library-novo1 body.library-workspace-open .mobile-library-toggle > span:last-child {
    display: none !important;
  }

  html.library-novo1 body.library-workspace-open .topbar-add {
    grid-column: 2;
    grid-row: 1;
    min-width: 64px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding-inline: 8px !important;
    font-size: 12.5px !important;
  }

  html.library-novo1 body.library-workspace-open .command-cluster .top-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: calc(100% + 44px) !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    margin-left: -44px;
    align-self: end;
  }

  html.library-novo1 body.library-workspace-open .top-search > input {
    height: 44px !important;
    min-height: 44px !important;
    padding-inline: 12px 48px !important;
    font-size: 16px !important;
  }

  html.library-novo1 body.library-workspace-open #app .command-bar .top-search > .toolbar-icon {
    width: 36px !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 0 !important;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-actions-toggle {
    grid-column: 4;
    grid-row: 1;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--novo1-text);
    background: #fff;
    border: 1px solid var(--novo1-line-strong);
    border-radius: 9px;
    cursor: pointer;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-actions-toggle[aria-expanded="true"] {
    color: var(--novo1-blue);
    background: #edf5ff;
    border-color: #91bdf4;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-actions-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-actions-toggle > span {
    display: none;
  }

  html.library-novo1 body.library-workspace-open #app .command-bar > .toolbar {
    display: none !important;
  }

  html.library-novo1 body.library-workspace-open #app .novo1-mobile-toolbar-portal {
    display: none !important;
  }

  html.library-novo1 body.library-workspace-open #app .novo1-mobile-filter-portal {
    display: none !important;
  }

  html.library-novo1 body.library-workspace-open .main-panel {
    grid-row: 2 !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
  }

  html.library-novo1 body.library-workspace-open .list-header {
    position: relative;
    z-index: 20;
    height: 56px !important;
    min-height: 56px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 8px !important;
  }

  html.library-novo1 body.library-workspace-open .list-header > div:first-child {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
    overflow: hidden;
  }

  html.library-novo1 body.library-workspace-open .list-header h1,
  html.library-novo1 body.library-workspace-open .list-header > div:first-child > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-filters-toggle {
    display: inline-flex;
    min-width: 118px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 11px;
    color: var(--novo1-text);
    background: #fff;
    border: 1px solid var(--novo1-line-strong);
    border-radius: 9px;
    font: 700 12.5px/1 Inter, sans-serif;
    cursor: pointer;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-filters-toggle[aria-expanded="true"] {
    color: var(--novo1-blue);
    background: #edf5ff;
    border-color: #91bdf4;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-filters-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  html.library-novo1 body.library-workspace-open .sort-row {
    display: none !important;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-backdrop {
    position: fixed;
    z-index: 3500;
    inset: 0;
    display: block;
    width: 100vw;
    height: var(--library-visual-height, 100dvh);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(13, 29, 43, .52);
    border: 0;
    transition: opacity 160ms ease, visibility 160ms ease;
  }

  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-actions-open .novo1-mobile-sheet-backdrop,
  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .novo1-mobile-sheet-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar.novo1-mobile-toolbar-portal {
    position: fixed !important;
    z-index: 3600;
    inset: auto var(--novo1-sheet-gutter) var(--novo1-sheet-bottom) var(--novo1-sheet-gutter) !important;
    grid-column: auto !important;
    grid-row: auto !important;
    grid-area: auto !important;
    align-self: auto !important;
    justify-self: auto !important;
    right: var(--novo1-sheet-gutter);
    bottom: var(--novo1-sheet-bottom);
    left: var(--novo1-sheet-gutter);
    width: auto !important;
    max-width: 520px;
    max-height: calc(var(--library-visual-height, 100dvh) - 24px);
    margin-inline: auto;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    grid-auto-rows: minmax(44px, auto) !important;
    gap: 8px !important;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    color: var(--novo1-text);
    background: #fff;
    border: 1px solid #afc4d8;
    border-radius: 16px;
    box-shadow: 0 22px 60px rgba(13, 35, 54, .28);
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-heading {
    grid-column: 1 / -1;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--novo1-text);
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-heading strong {
    font-size: 15px;
    font-weight: 800;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-heading button {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    display: grid !important;
    place-items: center;
    padding: 0 !important;
    color: #536b7d;
    background: #f7faff !important;
    border: 1px solid var(--novo1-line-strong) !important;
    border-radius: 9px !important;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-heading button span {
    position: relative;
    width: 18px;
    height: 18px;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-heading button span::before,
  html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-heading button span::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 1px;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-heading button span::before {
    transform: rotate(45deg);
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-heading button span::after {
    transform: rotate(-45deg);
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar > button,
  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar > .bulk-folder-control,
  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar > .bulk-label-control,
  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar > .ref-capture-sync-control,
  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar .folder-picker-button,
  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar .label-picker-button,
  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar .ref-capture-sync-button {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    flex: 1 1 auto !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding-inline: 10px !important;
    font-size: 12px !important;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar > .selection-organize-cluster {
    grid-column: 1 / -1;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar > .primary-action-cluster {
    grid-column: 1 / -1;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 88px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar > .primary-action-cluster > .primary-action-button {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    border-right: 1px solid #e1e8ee !important;
    border-bottom: 1px solid #e1e8ee !important;
    border-radius: 0 !important;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar > .primary-action-cluster > .primary-action-button:nth-child(even) {
    border-right: 0 !important;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar > .primary-action-cluster > .primary-action-button:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar > .selection-organize-cluster > .bulk-taxonomy-control {
    width: 100% !important;
    min-width: 0 !important;
    height: 41px !important;
    min-height: 41px !important;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar .selection-organize-cluster .folder-picker-button,
  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar .selection-organize-cluster .label-picker-button,
  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar .selection-organize-cluster .selection-trash-button {
    width: 100% !important;
    min-width: 0 !important;
    height: 41px !important;
    min-height: 41px !important;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar .mobile-action-text,
  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar [data-ref-capture-sync-label] {
    display: inline !important;
    width: auto !important;
    height: auto !important;
    font-size: 12px !important;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar [data-ref-capture-sync-label]::after {
    content: none !important;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar > [data-action="open-export"] {
    color: #fff !important;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-filters-open > .sort-row.novo1-mobile-filter-portal {
    position: fixed !important;
    z-index: 3600;
    inset: auto var(--novo1-sheet-gutter) var(--novo1-sheet-bottom) var(--novo1-sheet-gutter) !important;
    grid-column: auto !important;
    grid-row: auto !important;
    grid-area: auto !important;
    align-self: auto !important;
    justify-self: auto !important;
    right: var(--novo1-sheet-gutter);
    bottom: var(--novo1-sheet-bottom);
    left: var(--novo1-sheet-gutter);
    width: auto !important;
    max-width: 520px;
    max-height: calc(var(--library-visual-height, 100dvh) - 24px);
    margin-inline: auto;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 52px !important;
    grid-template-areas:
      "heading heading"
      "trash trash"
      "filters direction"
      "sort sort"
      "type type"
      "selected selected" !important;
    gap: 8px !important;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom)) !important;
    overflow: visible !important;
    color: var(--novo1-text);
    background: #fff;
    border: 1px solid #afc4d8;
    border-radius: 16px;
    box-shadow: 0 22px 60px rgba(13, 35, 54, .28);
  }

  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row > .novo1-mobile-sheet-heading {
    grid-area: heading;
  }

  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row > .trash-actions {
    grid-area: trash;
    width: 100%;
  }

  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row > .quick-filter-select {
    grid-area: filters;
  }

  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row > .sort-direction-button {
    grid-area: direction;
  }

  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row > [data-custom-select="sort"] {
    grid-area: sort;
  }

  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row > [data-custom-select="type"] {
    grid-area: type;
  }

  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row > [data-selected-count] {
    grid-area: selected;
    min-height: 36px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #60778a;
    font-size: 12px;
  }

  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row .quick-filter-select,
  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row > [data-custom-select="sort"],
  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row > [data-custom-select="type"] {
    width: auto !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row .sf-select-trigger,
  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row > .sort-direction-button {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-filters-open .sort-row .sf-select-content {
    top: auto !important;
    right: auto !important;
    bottom: calc(100% + 6px) !important;
    left: 0 !important;
    width: min(260px, calc(100vw - 40px)) !important;
    min-width: min(220px, calc(100vw - 40px)) !important;
    max-width: calc(100vw - 40px) !important;
    max-height: min(320px, calc(var(--library-visual-height, 100dvh) - 180px));
    overflow-y: auto !important;
  }

  html.library-novo1 body.library-workspace-open #app .command-cluster > .floating-menu.add-menu,
  html.library-novo1 body.library-workspace-open #app .command-cluster > .search-popover {
    position: fixed !important;
    z-index: 3400;
    top: calc(var(--novo1-compact-appbar) + 8px) !important;
    right: 8px !important;
    bottom: auto !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(var(--library-visual-height, 100dvh) - var(--novo1-compact-appbar) - 16px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border-radius: 12px !important;
  }

  html.library-novo1 body.library-workspace-open #app[data-has-selection="true"] .library-app.novo1-mobile-actions-open .bulk-folder-menu,
  html.library-novo1 body.library-workspace-open #app[data-has-selection="true"] .library-app.novo1-mobile-actions-open .bulk-taxonomy-menu,
  html.library-novo1 body.library-workspace-open .library-app.novo1-mobile-actions-open .ref-capture-sync-popover {
    position: fixed !important;
    z-index: 3700;
    top: auto !important;
    right: 8px !important;
    bottom: var(--novo1-sheet-bottom) !important;
    left: 8px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 520px !important;
    max-height: calc(var(--library-visual-height, 100dvh) - 24px) !important;
    margin-inline: auto;
    overflow-y: auto !important;
    border-radius: 16px !important;
  }

  html.library-novo1 body.library-workspace-open .reference-list {
    padding: 8px !important;
    overscroll-behavior: contain;
  }

  html.library-novo1 body.library-workspace-open .reference-card {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    border-radius: 12px !important;
  }

  html.library-novo1 body.library-workspace-open .empty-state {
    min-height: 100% !important;
    gap: 12px !important;
    padding: 24px 16px !important;
  }

  html.library-novo1 body.library-workspace-open .empty-state > div {
    width: 100%;
    max-width: 460px;
  }

  html.library-novo1 body.library-workspace-open .empty-state h2 {
    font-size: clamp(22px, 7vw, 26px) !important;
  }

  html.library-novo1 body.library-workspace-open .empty-state p {
    max-width: 36ch;
    font-size: 14px !important;
  }

  html.library-novo1 body.library-workspace-open .empty-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  html.library-novo1 body.library-workspace-open .empty-actions button {
    width: 100%;
    min-height: 44px;
  }

  html.library-novo1 body.library-workspace-open .sidebar {
    width: min(360px, calc(100vw - 44px)) !important;
  }

  html.library-novo1 body.library-workspace-open .sidebar .nav-item,
  html.library-novo1 body.library-workspace-open .sidebar .folder-row,
  html.library-novo1 body.library-workspace-open .sidebar .section-toggle,
  html.library-novo1 body.library-workspace-open .sidebar .organizer-add-button,
  html.library-novo1 body.library-workspace-open .sidebar .organizer-hub button {
    min-height: 44px;
  }

  html.library-novo1 body.library-workspace-open .sidebar .account-menu,
  html.library-novo1 body.library-workspace-open .sidebar .folder-menu {
    max-width: calc(100vw - 24px);
  }

  html.library-novo1 body.library-workspace-open dialog[data-dialog="editor"][open],
  html.library-novo1 body.library-workspace-open dialog[data-dialog="import"][open],
  html.library-novo1 body.library-workspace-open dialog[data-dialog="online"][open],
  html.library-novo1 body.library-workspace-open dialog[data-dialog="share"][open],
  html.library-novo1 body.library-workspace-open dialog[data-dialog="settings"][open],
  html.library-novo1 body.library-workspace-open dialog[data-dialog="export"][open],
  html.library-novo1 body.library-workspace-open dialog[data-dialog="organizer"][open],
  html.library-novo1 body.library-workspace-open dialog[data-dialog="smart-folder"][open],
  html.library-novo1 body.library-workspace-open dialog[data-dialog="library-status"][open] {
    position: fixed !important;
    inset: 0 auto auto 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    height: var(--library-visual-height, 100dvh) !important;
    min-height: 100% !important;
    max-height: var(--library-visual-height, 100dvh) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  html.library-novo1 body.library-workspace-open dialog[data-dialog="editor"] > .modal-card,
  html.library-novo1 body.library-workspace-open dialog[data-dialog="import"] > .modal-card,
  html.library-novo1 body.library-workspace-open dialog[data-dialog="online"] > .modal-card,
  html.library-novo1 body.library-workspace-open dialog[data-dialog="share"] > .modal-card,
  html.library-novo1 body.library-workspace-open dialog[data-dialog="settings"] > .modal-card,
  html.library-novo1 body.library-workspace-open dialog[data-dialog="export"] > .modal-card,
  html.library-novo1 body.library-workspace-open dialog[data-dialog="organizer"] > .modal-card,
  html.library-novo1 body.library-workspace-open dialog[data-dialog="smart-folder"] > .modal-card,
  html.library-novo1 body.library-workspace-open dialog[data-dialog="library-status"] > .modal-card {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    height: var(--library-visual-height, 100dvh) !important;
    max-height: var(--library-visual-height, 100dvh) !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  html.library-novo1 body.library-workspace-open dialog[data-dialog="organizer"] button:not([role="option"]),
  html.library-novo1 body.library-workspace-open dialog[data-dialog="organizer"] input,
  html.library-novo1 body.library-workspace-open dialog[data-dialog="organizer"] .novo1-select-trigger {
    min-height: 44px;
  }

  html.library-novo1 body.library-workspace-open dialog[data-dialog="taxonomy"][open] {
    position: fixed !important;
    inset: auto 0 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: min(85dvh, 720px) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 16px 16px 0 0 !important;
  }

  html.library-novo1 body.library-workspace-open dialog[data-dialog="taxonomy"] > .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(85dvh, 720px) !important;
    overflow-y: auto !important;
    border-radius: 16px 16px 0 0 !important;
  }

  html.library-novo1 body.library-workspace-open dialog[data-dialog="confirm"][open] {
    width: min(440px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(var(--library-visual-height, 100dvh) - 32px) !important;
    margin: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  html.library-novo1 body.library-workspace-open dialog[data-dialog="confirm"] > .confirm-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 14px !important;
  }
}

@media (max-width: 480px) {
  html.library-novo1 body.library-workspace-open .sidebar {
    width: 100vw !important;
    max-width: 100vw !important;
    border-right: 0 !important;
  }

  html.library-novo1 body.library-workspace-open .list-header > div:first-child > span {
    display: none;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-filters-toggle {
    min-width: 112px;
    padding-inline: 9px;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar.novo1-mobile-toolbar-portal,
  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-filters-open > .sort-row.novo1-mobile-filter-portal {
    right: 8px;
    left: 8px;
  }

  html.library-novo1 body.library-workspace-open .reference-card {
    padding: 12px 10px !important;
  }
}

@media (max-width: 360px) {
  html.library-novo1 body.library-workspace-open .topbar-add {
    min-width: 60px !important;
    padding-inline: 6px !important;
  }

  html.library-novo1 body.library-workspace-open .list-header {
    gap: 6px !important;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-filters-toggle {
    min-width: 44px;
    width: 44px;
    padding: 0;
  }

  html.library-novo1 body.library-workspace-open .novo1-mobile-filters-toggle span {
    display: none;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-actions-open > .toolbar.novo1-mobile-toolbar-portal {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html.library-novo1 body.library-workspace-open #app .library-app.novo1-mobile-filters-open > .sort-row.novo1-mobile-filter-portal {
    grid-template-columns: minmax(0, 1fr) 48px !important;
  }
}

@media (hover: none), (pointer: coarse) {
  html.library-novo1 body.library-workspace-open button,
  html.library-novo1 body.library-workspace-open [role="button"],
  html.library-novo1 body.library-workspace-open .sf-select-trigger {
    touch-action: manipulation;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.library-novo1 body.library-workspace-open .sidebar,
  html.library-novo1 body.library-workspace-open .mobile-sidebar-backdrop,
  html.library-novo1 body.library-workspace-open .novo1-mobile-sheet-backdrop {
    transition: none !important;
  }
}
