  .share-buttons {
    text-align: center;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    /* --- Flexboxでレイアウトを制御 --- */
    display: flex; /* Flexboxを有効にする */
    flex-direction: row; /* PCでは横並び（初期値） */
    justify-content: center; /* 中央揃え */
    align-items: center; /* 垂直方向の中央揃え */
    flex-wrap: wrap; /* 画面が狭い時に折り返す */
    gap: 10px; /* ボタン間の隙間 */
  }

  .share-buttons p {
    width: 100%; /* 「この記事をシェアする」を常に上部に配置 */
    margin: 0;
    margin-bottom: 10px;
  }

  .share-btn {
    display: inline-block;
    padding: 10px 20px;
    /* marginはgapで設定するため不要に */
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border: none;
    cursor: pointer;
    flex-shrink: 0; /* ボタンが縮まないようにする */
  }

  .x-btn { background-color: #000000; }
  .fb-btn { background-color: #1877F2; }
  .line-btn { background-color: #06C755; }
  .copy-btn { background-color: #777777; }

  .share-btn:hover {
    opacity: 0.9;
  }

  /* --- ▼▼▼ レスポンシブ対応の核となる部分 ▼▼▼ --- */
  /* 画面幅が600px以下の場合に適用されるスタイル */
  @media (max-width: 600px) {
    .share-buttons {
      /* ボタンを縦並びにする */
      flex-direction: column;
    }

    .share-btn {
      /* ボタンの幅をコンテナに合わせる */
      width: 90%; 
    }
  }