/* Dokuvara 3.5 Preview 41 — mobile suite foundation.
   Scoped to the chooser; never changes desktop layouts or auth/security APIs. */
.dv41-suite-nav { display: none; }
@media (max-width: 720px) {
  #suiteChooser.dv41-enhanced {
    box-sizing: border-box;
    max-width: 100vw;
    padding: max(7px, env(safe-area-inset-top)) 7px max(16px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  #suiteChooser.dv41-enhanced .suite-card {
    padding: 12px;
    width: 100%;
    max-width: 100%;
    border-radius: 17px;
    overflow: visible;
  }
  #suiteChooser.dv41-enhanced .suite-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding-bottom: 12px;
  }
  #suiteChooser.dv41-enhanced .suite-header .brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
  }
  #suiteChooser.dv41-enhanced .suite-header .brand-logo {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }
  #suiteChooser.dv41-enhanced .suite-header .brand > div { min-width: 0; }
  #suiteChooser.dv41-enhanced .suite-header .brand strong {
    font-size: 18px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
  }
  #suiteChooser.dv41-enhanced .suite-header .brand small { font-size: 11px; line-height: 1.3; }
  #suiteChooser.dv41-enhanced .suite-header .werk-version-badge {
    margin-left: 0;
    padding: 1px 5px;
    font-size: 9px;
  }
  #suiteChooser.dv41-enhanced .suite-user {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    margin: 0;
    min-width: 0;
  }
  #suiteChooser.dv41-enhanced .suite-user > span:first-child { display: none; }
  #suiteChooser.dv41-enhanced .suite-user > strong {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    font-size: 15px;
    color: #e7ecff;
  }
  #suiteChooser.dv41-enhanced .suite-user > strong::before {
    content: 'ID ';
    color: #aab6d4;
    font-weight: 500;
  }
  #suiteChooser.dv41-enhanced .suite-user .button {
    display: grid;
    place-items: center;
    grid-column: auto;
    width: 43px;
    min-width: 43px;
    max-width: 43px;
    height: 43px;
    min-height: 43px;
    padding: 8px;
    margin: 0;
    border-radius: 12px;
    flex: 0 0 43px;
  }
  #suiteChooser.dv41-enhanced .suite-user .button img {
    display: block;
    width: 23px;
    height: 23px;
    max-width: 100%;
  }
  #suiteChooser.dv41-enhanced #suiteDeviceLabel,
  #suiteChooser.dv41-enhanced #suiteSecurityButton > span:last-child,
  #suiteChooser.dv41-enhanced #suiteLogoutButton > span:last-child { display: none; }

  #suiteChooser.dv41-enhanced .dv41-suite-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 6px;
    padding: 9px 0 10px;
    background: #191e27;
    border-bottom: 1px solid #313c50;
  }
  #suiteChooser.dv41-enhanced .dv41-suite-nav button,
  #suiteChooser.dv41-enhanced .dv41-suite-nav a {
    display: flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 9px 11px;
    border: 1px solid #354257;
    border-radius: 12px;
    background: #222b39;
    color: #e3eaff;
    font: 650 13px/1.25 system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
  }
  #suiteChooser.dv41-enhanced .dv41-suite-nav button[aria-pressed='true'] {
    background: #3b5699;
    border-color: #7797f7;
    color: #fff;
  }
  #suiteChooser.dv41-enhanced .dv41-suite-nav a {
    padding-inline: 10px;
    color: #aebcda;
  }
  #suiteChooser.dv41-enhanced .dv41-suite-nav button:focus-visible,
  #suiteChooser.dv41-enhanced .dv41-suite-nav a:focus-visible {
    outline: 3px solid #96b3ff;
    outline-offset: 2px;
  }
  #suiteChooser.dv41-enhanced[data-dv41-view='tools'] > .suite-card > #suiteWorkspace { display: none; }
  #suiteChooser.dv41-enhanced[data-dv41-view='workspace'] > .suite-card > .suite-intro,
  #suiteChooser.dv41-enhanced[data-dv41-view='workspace'] > .suite-card > .suite-grid { display: none !important; }
  #suiteChooser.dv41-enhanced .suite-intro { padding: 16px 0 12px; }
  #suiteChooser.dv41-enhanced .suite-intro .eyebrow { font-size: 11px; }
  #suiteChooser.dv41-enhanced .suite-intro h1 {
    margin-block: 5px;
    font-size: clamp(21px, 6.5vw, 26px);
    line-height: 1.2;
  }
  #suiteChooser.dv41-enhanced .suite-intro > .muted {
    margin-block: 0;
    color: #afbacb;
    font-size: 12px;
    line-height: 1.5;
  }
  #suiteChooser.dv41-enhanced .suite-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 8px;
  }
  #suiteChooser.dv41-enhanced .suite-module {
    width: 100%;
    min-width: 0;
    min-height: 80px;
    display: grid;
    grid-template-columns: 47px minmax(0,1fr) 20px;
    gap: 11px;
    padding: 11px;
    align-items: center;
    border-radius: 14px;
    text-align: left;
    grid-column: auto !important;
    transform: none;
  }
  #suiteChooser.dv41-enhanced .suite-module .suite-module-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
  }
  #suiteChooser.dv41-enhanced .suite-module .suite-module-mark .app-icon { width: 27px !important; height: 27px !important; }
  #suiteChooser.dv41-enhanced .suite-module .suite-module-mark .native-suite-icon { width: 31px; height: 31px; object-fit: contain; }
  #suiteChooser.dv41-enhanced .suite-module .suite-module-copy { min-width: 0; gap: 4px; }
  #suiteChooser.dv41-enhanced .suite-module .suite-module-copy strong {
    font-size: clamp(16px, 4.4vw, 18px);
    line-height: 1.22;
    overflow-wrap: anywhere;
  }
  #suiteChooser.dv41-enhanced .suite-module .suite-module-copy small {
    font-size: 11px;
    line-height: 1.4;
    color: #b8c3d5;
  }
  #suiteChooser.dv41-enhanced .suite-module .werk-version-badge { font-size: 9px; vertical-align: middle; }
  #suiteChooser.dv41-enhanced .suite-module-arrow { width: 20px; height: 20px; }
  #suiteChooser.dv41-enhanced .suite-module-arrow img { width: 18px; height: 18px; }

  #suiteChooser.dv41-enhanced .suite-workspace {
    margin: 12px 0 8px;
    padding: 11px;
    border-radius: 14px;
    min-width: 0;
  }
  #suiteChooser.dv41-enhanced .suite-workspace-header {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 10px;
  }
  #suiteChooser.dv41-enhanced .suite-workspace-header h1 { font-size: 19px; line-height: 1.3; }
  #suiteChooser.dv41-enhanced .suite-workspace-header .muted { font-size: 12px; line-height: 1.5; }
  #suiteChooser.dv41-enhanced .workspace-header-actions {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 7px;
  }
  #suiteChooser.dv41-enhanced .workspace-header-actions .button {
    grid-column: auto;
    min-width: 0;
    min-height: 44px;
    font-size: 12px;
    padding-inline: 7px;
  }
  #suiteChooser.dv41-enhanced .workspace-header-actions .button:last-child:nth-child(odd) { grid-column: 1/-1; }
  #suiteChooser.dv41-enhanced .suite-workspace-overview { grid-template-columns: minmax(0,1fr); }
  #suiteChooser.dv41-enhanced .workspace-panels { display: grid; grid-template-columns: minmax(0,1fr); gap: 9px; }
  #suiteChooser.dv41-enhanced .workspace-panel { min-width: 0; padding: 11px; }
  #suiteChooser.dv41-enhanced .workspace-panel > header { flex-wrap: wrap; }
  #suiteChooser.dv41-enhanced .workspace-project-list { grid-template-columns: minmax(0,1fr); }
  #suiteChooser.dv41-enhanced .workspace-quick-actions { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #suiteChooser.dv41-enhanced .workspace-quick-actions button {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 64px;
    justify-content: center;
    gap: 5px;
    padding: 7px 4px;
    text-align: center;
    font-size: 11px;
  }
  #suiteChooser.dv41-enhanced .workspace-control-actions { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #suiteChooser.dv41-enhanced .workspace-control-actions button {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    min-width: 0;
    text-align: center;
  }
  #suiteChooser.dv41-enhanced .workspace-control-actions span:last-child { justify-items: center; }
  #suiteChooser.dv41-enhanced .workspace-global-search input { min-width: 0; width: 100%; font-size: 16px; }
  #suiteChooser.dv41-enhanced .workspace-file-list { max-height: none; }

  #suiteChooser.dv41-enhanced button,
  #suiteChooser.dv41-enhanced a,
  #suiteChooser.dv41-enhanced select { touch-action: manipulation; }
}
@media (max-width: 360px) {
  #suiteChooser.dv41-enhanced .dv41-suite-nav button,
  #suiteChooser.dv41-enhanced .dv41-suite-nav a { font-size: 12px; padding-inline: 5px; }
  #suiteChooser.dv41-enhanced .suite-card { padding: 9px; }
  #suiteChooser.dv41-enhanced .suite-module { gap: 8px; padding: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  #suiteChooser.dv41-enhanced *,
  #suiteChooser.dv41-enhanced *::before,
  #suiteChooser.dv41-enhanced *::after { scroll-behavior: auto !important; }
}
