/* Heirloom Family Cookbook — Custom Styles & Native Mobile PWA Polish */

[x-cloak] {
  display: none !important;
}

html,
body {
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

button,
a,
label {
  touch-action: manipulation;
}

/* Smooth horizontal pill scrolling on mobile */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Native iOS / Android frosted glass surfaces */
.mobile-glass {
  background-color: rgba(250, 247, 242, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.mobile-tabbar-glass {
  background-color: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

/* Native bottom-sheet grab handle */
.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 9999px;
  background-color: #d6cec0;
  margin: 0 auto 12px auto;
}

/* Pan & Zoom scan viewport */
.scan-viewport {
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  background-image: radial-gradient(#dfd7ca 1px, transparent 1px);
  background-size: 16px 16px;
}

.scan-viewport img {
  will-change: transform;
  transform-origin: center center;
  transition: transform 0.08s ease-out;
}

.scan-viewport.dragging img {
  transition: none;
}

/* Subtle paper grain border accent */
.heirloom-divider {
  background: linear-gradient(90deg, transparent, #d9cfc0 20%, #d9cfc0 80%, transparent);
  height: 1px;
}

/* Safe area padding for iOS & Android standalone PWA */
.safe-top {
  padding-top: env(safe-area-inset-top, 0px);
}

.safe-bottom {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

.mobile-content-pad {
  padding-bottom: calc(6.25rem + env(safe-area-inset-bottom, 0px));
}

/* Subtle card press feel */
.native-press {
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.14s ease;
}
.native-press:active {
  transform: scale(0.975);
}
