/* Desktop-like polish applied in standalone PWA mode */
body.pwa-standalone {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none; /* prevent pull-to-refresh/bounce */
  touch-action: manipulation;
}

/* Re-enable selection and context features where it matters */
body.pwa-standalone input,
body.pwa-standalone textarea,
body.pwa-standalone [contenteditable="true"],
body.pwa-standalone .selectable {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* Prevent image/link dragging that feels non-native in apps */
body.pwa-standalone img,
body.pwa-standalone a {
  -webkit-user-drag: none;
  user-drag: none;
}

/* Subtle window-chrome vibes in standalone */
body.pwa-standalone .main-header {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  backdrop-filter: saturate(160%) blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Reduce tap highlight artifacts for buttons/links */
body.pwa-standalone a,
body.pwa-standalone button,
body.pwa-standalone .btn,
body.pwa-standalone .btn-ghost,
body.pwa-standalone .header-btn {
  -webkit-tap-highlight-color: transparent;
}

/* Enhanced hover affordances in standalone */
body.pwa-standalone .nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Consistent text selection appearance */
::selection {
  background: var(--primary-cyan);
  color: #fff;
}
::-moz-selection {
  background: var(--primary-cyan);
  color: #fff;
}

/* Command palette item highlight */
.cp-item.active { background: var(--primary-silver); }
