/* 应用外壳兜底样式：确保脱离宿主后仍有整屏背景与安全区处理 */
html, body { height: 100%; }
body { min-height: 100dvh; background-attachment: fixed; }
#app { min-height: 100dvh; }

/* 无 --bar-h 时的顶部留白（app.js 启动后会覆盖为实测值） */
#app { padding-top: calc(var(--safe-top, env(safe-area-inset-top, 0px)) + var(--bar-h, 42px) + 8px); }

/* 输入框在 iOS 上避免自动放大 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  textarea, input, select { font-size: max(16px, var(--font-size, 14.5px)); }
  .composer textarea, .field { font-size: max(16px, 1em); }
}

/* 独立安装模式下的滚动条与选中色 */
html.pwa-standalone { overscroll-behavior-y: none; }
::selection { background: var(--accent-soft, #f3dde8); color: var(--ink, #4a3b46); }

/* 弹层滚动阻止穿透 */
.sheet-mask.show { touch-action: none; }
.sheet-mask.show .sheet { touch-action: pan-y; }
