/* スマホでルートを下に引っ張った際の pull-to-refresh による画面更新を無効化（HW-417）
   入力中の誤更新で内容が消えるのを防ぐ。スクロール上端で更新が走らないだけで通常スクロールには影響しない。 */
html,
body {
  overscroll-behavior-y: contain;
}

/* ミニアプリ（特に qsc_report 等、@tailwind base をフル導入しているもの）の
   preflight が html に font-family を設定すると、body → 全子孫に伝播する。
   host の body に明示的に font-family を設定することで、html からの継承を断ち
   ミニアプリのロードで画面全体が再描画されるのを防ぐ。
   html body の特異度(0,0,2) で単独の body(0,0,1) より確実に勝つ。 */
html body {
  font-family:
    'Noto Sans',
    'Noto Sans JP',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Roboto',
    'Hiragino Sans',
    'Hiragino Kaku Gothic ProN',
    'Yu Gothic',
    'Meiryo',
    sans-serif;
}

/* ミニアプリの tailwind preflight が html に設定する font-family の影響を受けないよう、
   サイドバー内の要素すべてに明示的に font-family を適用する。
   属性セレクタ(0,1,0) によりミニアプリ側の要素セレクタ(0,0,1) より高い特異度で勝つ。 */
[data-sidebar],
[data-sidebar] * {
  font-family:
    'Noto Sans',
    'Noto Sans JP',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Roboto',
    'Hiragino Sans',
    'Hiragino Kaku Gothic ProN',
    'Yu Gothic',
    'Meiryo',
    sans-serif;
}

/* miniアプリのルート要素にスコープを限定 */
.mini-app-root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color-scheme: light;
  color: rgba(0, 0, 0, 0.87);
  background-color: transparent;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* miniアプリのコンテナにスコープを限定 */
.mini-app-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
} 