@layer base {

  /* ----------------------------------------
     ① リセット
  ---------------------------------------- */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  /* ----------------------------------------
     ② html / body
  ---------------------------------------- */
  html {
    overflow-x: hidden;
  }

  body {
    font-family: var(--font-ja);
    font-size: var(--text-base);
    line-height: var(--leading-160);
    letter-spacing: var(--tracking-base);
    background-color: var(--color-bg);
    color: var(--color-text);
  }

  /* ----------------------------------------
     ③ 基本要素
  ---------------------------------------- */
  picture {
    display: block;
    width: 100%;
    height: 100%;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  button {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
  }

  label {
    cursor: pointer;
  }

  ul,
  ol {
    list-style: none;
  }

  img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    pointer-events: none;
  }

  th,
  td {
    vertical-align: top;
    text-align: left;
    font-weight: 400;
  }

  /* ----------------------------------------
     ④ ヘッダー表示制御
  ---------------------------------------- */

  /* PC：スクロールで出現するアニメーション */
  @media (min-width: 769px) {
    .header-container {
      transform: translateY(-100%);
      transition: transform 0.3s ease;
    }

    .header-container.visible {
      transform: translateY(0);
    }
  }

  /* SP：常に表示 */
  @media (max-width: 768px) {
    .header-container {
      transform: translateY(0);
      transition: transform 0.3s ease;
    }
  }

  /* ----------------------------------------
     ⑤ 表示制御
  ---------------------------------------- */
  /* checkbox hack用のinputは display:none にするとChecked検知が効かないためvisually-hidden方式に */
  input.hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* それ以外の .hidden は従来通り */
  :not(input).hidden { display: none; }
  .pc-only { display: block; }
  .sp-only { display: none; }

  /* ----------------------------------------
     ⑥ ユーティリティ
  ---------------------------------------- */
  /* WordPress コア（the_post_navigation 等）の .screen-reader-text 用（wp-block-library 無効時） */
  .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
  }

  .tracking-0  { letter-spacing: 0; }
  .leading-100 { line-height: 1; }
  .leading-140 { line-height: 1.4; }
  .leading-200 { line-height: 2; }
  .font-bold   { font-weight: 700; }

  /* Tailwind-style フォントファミリー */
  .font-\[Noto_serif_KR\] { font-family: var(--font-kr); }

  /* ----------------------------------------
     ⑦ SP対応（768px以下）
  ---------------------------------------- */
  @media (max-width: 768px) {
    .pc-only { display: none; }
    .sp-only { display: block; }
  }

}
