/* Small compatibility/ambient additions on top of the verbatim prototype tokens. */

/* Tailwind v3 has no `backdrop-blur-xs` utility by default; keep the exact look. */
.backdrop-blur-xs {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Keep touch targets comfortable on the landscape tablet. */
button,
select,
input,
textarea {
  touch-action: manipulation;
}

/* PWA standalone / kiosk: respect cutouts and gesture bar. */
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Prevent iOS/Android text-size inflation from breaking the fixed layout. */
textarea,
input {
  font-size: inherit;
}

/* ---------------------------------------------------------------------------
   PHONE LAYOUT
   The sidebar becomes an off-canvas drawer so the workspace gets full width.
   --------------------------------------------------------------------------- */
.mobile-menu-btn {
  display: none;
}

@media (max-width: 639px) {
  #leftSidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: 17rem;
    transform: translateX(-105%);
    background: var(--neu-bg);
    box-shadow: 12px 0 32px rgba(15, 23, 42, 0.22);
    transition: transform 180ms ease;
  }

  #leftSidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-menu-btn {
    display: flex;
  }

  #leftSidebar.mobile-open + .mobile-menu-btn {
    opacity: 0;
    pointer-events: none;
  }

  main {
    padding-top: 4.5rem !important;
  }
}
