/* Veftr Tablet UX v1 — active only on the classic browser shell (641–1100 CSS px). */
@media all {
  #app.tm-tablet { --tm-tablet-rail:76px; --tm-tablet-panel:242px; display:flex!important; flex-direction:row!important; width:100vw!important; height:100dvh!important; overflow:hidden!important; }
  #app.tm-tablet #nav-sidebar { display:flex!important; position:relative!important; inset:auto!important; top:auto!important; bottom:auto!important; left:auto!important; transform:none!important; width:var(--tm-tablet-rail)!important; min-width:var(--tm-tablet-rail)!important; height:100%!important; padding:12px 8px!important; flex:0 0 var(--tm-tablet-rail)!important; z-index:241!important; box-shadow:none!important; transition:none!important; }
  #app.tm-tablet #nav-sidebar .nav-icon { min-width:48px!important; min-height:48px!important; }
  #app.tm-tablet #detail-sidebar { position:fixed!important; top:0!important; bottom:0!important; left:var(--tm-tablet-rail)!important; width:var(--tm-tablet-panel)!important; max-width:var(--tm-tablet-panel)!important; min-width:0!important; height:100dvh!important; max-height:100dvh!important; transform:translateX(calc(-100% - var(--tm-tablet-rail)))!important; z-index:239!important; box-shadow:12px 0 36px rgba(0,0,0,.3)!important; transition:transform .18s ease!important; }
  #app.tm-tablet.nav-open:not(.tm-tablet-expanded) #detail-sidebar { transform:translateX(0)!important; }
  #app.tm-tablet.tm-tablet-expanded #detail-sidebar { position:relative!important; inset:auto!important; top:auto!important; bottom:auto!important; left:auto!important; transform:none!important; flex:0 0 var(--tm-tablet-panel)!important; box-shadow:none!important; }
  #app.tm-tablet #main-content { position:relative!important; inset:auto!important; display:flex!important; flex:1 1 0!important; min-width:0!important; width:auto!important; height:100dvh!important; overflow:hidden!important; padding:0!important; }
  #app.tm-tablet #main-action-dock, #app.tm-tablet #main-content > #main-action-dock { position:relative!important; display:flex!important; top:auto!important; right:auto!important; left:auto!important; bottom:auto!important; width:100%!important; max-width:none!important; min-height:58px!important; flex:0 0 58px!important; margin:0!important; padding:7px 10px!important; transform:none!important; border-radius:0!important; border:0!important; border-bottom:1px solid var(--border-1)!important; box-shadow:none!important; background:color-mix(in srgb,var(--surface-1) 85%,transparent)!important; z-index:220!important; gap:8px!important; }
  #app.tm-tablet #menu-toggle { display:inline-flex!important; flex:0 0 44px!important; width:44px!important; height:44px!important; min-width:44px!important; min-height:44px!important; font-size:20px!important; }
  #app.tm-tablet #context-chip { flex:1 1 auto!important; min-width:0!important; max-width:none!important; padding:10px 12px!important; }
  #app.tm-tablet #header-name { max-width:none!important; }
  #app.tm-tablet #header-action-btn, #app.tm-tablet #member-toggle { display:none!important; }
  body[data-tm-tablet-context="friends"] #app.tm-tablet #header-action-btn { display:inline-flex!important; min-height:44px!important; }
  /* Member list toggle is intentionally absent from the tablet action dock.
     Retain the existing member controls on the dedicated phone shell. */
  #app.tm-tablet .sidebar-overlay { position:fixed!important; top:0!important; bottom:0!important; left:var(--tm-tablet-rail)!important; right:0!important; z-index:230!important; display:none!important; }
  #app.tm-tablet.nav-open:not(.tm-tablet-expanded) .sidebar-overlay, #app.tm-tablet.members-open .sidebar-overlay { display:block!important; }
  #app.tm-tablet.tm-tablet-expanded.nav-open:not(.members-open) .sidebar-overlay { display:none!important; }
  #app.tm-tablet #member-sidebar { position:fixed!important; right:0!important; top:0!important; bottom:0!important; width:min(330px,75vw)!important; max-width:min(330px,75vw)!important; height:100dvh!important; z-index:240!important; }
  #app.tm-tablet #friends-view, #app.tm-tablet #native-store-view, #app.tm-tablet #chat-view, #app.tm-tablet #app-channel-container { min-height:0!important; min-width:0!important; flex-shrink:1; }
  #app.tm-tablet #native-store-grid.tmux-marketplace { width:100%!important; max-width:1600px!important; padding:clamp(12px,2vw,26px)!important; }
  #app.tm-tablet .tmux-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr))!important; }
  #app.tm-tablet #message-form { margin-bottom:calc(8px + env(safe-area-inset-bottom))!important; }
  /* Tablet dialogs remain centered instead of inheriting the phone full-screen override. */
  #app.tm-tablet .modal-overlay, body:has(#app.tm-tablet) > .modal-overlay { padding:16px!important; align-items:center!important; justify-content:center!important; }
  #app.tm-tablet .modal-card:not(.tm-user-settings-workspace), body:has(#app.tm-tablet) > .modal-overlay .modal-card:not(.tm-user-settings-workspace) { min-height:0!important; height:auto; max-height:calc(100dvh - 32px)!important; border-radius:18px!important; overflow-y:auto; }
  #app.tm-tablet #auth-overlay .modal-card { width:min(380px,calc(100vw - 32px))!important; max-width:380px!important; }
  #app.tm-tablet #settings-modal .modal-card { width:min(700px,calc(100vw - 32px))!important; max-width:700px!important; }
  #app.tm-tablet #auth-overlay input[type="checkbox"], #app.tm-tablet #auth-overlay input[type="radio"] { appearance:auto!important; display:inline-block!important; flex:0 0 19px!important; box-sizing:border-box!important; width:19px!important; min-width:19px!important; max-width:19px!important; height:19px!important; min-height:19px!important; max-height:19px!important; margin:0!important; padding:0!important; }
  #app.tm-tablet #auth-overlay .tm-signin-prefs > label { display:flex!important; align-items:center!important; gap:12px!important; min-height:44px!important; text-align:left!important; }
  #app.tm-tablet #user-settings-modal .tm-settings-close { width:44px!important; height:44px!important; flex:0 0 44px!important; }
  #app.tm-tablet .user-footer-icon, #app.tm-tablet .user-settings-button { min-width:44px!important; min-height:44px!important; }
  #app.tm-tablet button:focus-visible, #app.tm-tablet [role="button"]:focus-visible { outline:2px solid var(--accent)!important; outline-offset:3px!important; }
}
@media (min-width:641px) and (max-width:799px) {
  #app.tm-tablet { --tm-tablet-panel:min(260px,calc(100vw - 110px)); }
  #app.tm-tablet #header-action-btn { max-width:120px; overflow:hidden; white-space:nowrap; }
}
@media (hover:none) and (pointer:coarse) and (min-width:641px) {
  #app.tm-tablet .nav-icon:hover, #app.tm-tablet .list-item:hover { filter:none!important; }
  #app.tm-tablet button, #app.tm-tablet .nav-icon, #app.tm-tablet .list-item { touch-action:manipulation; }
}
@media (prefers-reduced-motion:reduce) {
  #app.tm-tablet #detail-sidebar { transition:none!important; }
}


/* Tablet reuses the desktop Views popover and bottom-of-rail shelf. */
#app.tm-tablet #nav-sidebar{padding-bottom:84px!important}
body.tm-tablet-workspace-controls-active #app.tm-tablet #main-action-dock #tm-view-toolbar{display:none!important}
