:root{
  --vw: clamp(375px, 100vw, 1400px);

  --fs-body: clamp(
    0.875rem,
    calc(
      0.875rem + 
      ( (1rem - 0.875rem) * ((var(--vw) - 375px) / 1025) )
    ),
    1rem
  );
}

body{
  font-size: var(--fs-body);
  line-height: 1.5;
}


/* --- Ruby基本設定（.v-baseline-up 内のみベースライン補正）--- */

/*
  .v-baseline-up を付けたコンテナ内だけでベースライン補正を行う。
  アイコンなどのレイアウトを崩さないよう、
  「テキストを持つ要素」に限定して position 調整する。
*/

.v-baseline-up{
  --ruby-offset: 0.25em; /* 必要に応じて微調整 */
}

/* テキスト要素のみ対象（span は除外して Elementor での誤爆を防ぐ） */

.v-baseline-up :where(
  .elementor-button-text,
  p,
  li,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6
):has(ruby){
  position: relative;
  top: calc(-1 * var(--ruby-offset));
}

/* ルビ自体の設定 */

ruby{
  line-height: 1.8; /* 10pxグリッド維持 */
}

rt{
  font-size: clamp(10px, 0.5em, 0.5em);
  line-height: 1;
  margin-bottom: 1px;
}