 .btn-style {
    display: inline-block;
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
  }

  .link-style {
    background: none;
    border: none;
    padding: 0;
    color: #7CC0A8;
    text-decoration: underline;
    font-size: inherit;
    cursor: pointer;
  }

  /* ===== ここからがpopoverの本体 ===== */

  /* popover要素自体はブラウザのトップレイヤーに表示されるため、
     position/z-index の管理が一切不要 */
  [popover] {
    border: none;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);

    /* 中央配置。position:fixedを自前で書かなくてよい */
    margin: auto;
  }

  /* 背景の半透明オーバーレイもCSSだけで指定できる */
  [popover]::backdrop {
    background: rgba(0, 0, 0, 0.5);
  }

  /* 開閉アニメーション（対応ブラウザのみ効く。非対応でも表示自体は問題なし） */
  [popover] {
    transition: opacity 0.2s ease, transform 0.2s ease, display 0.2s allow-discrete;
    opacity: 0;
    transform: scale(0.95);
  }
  [popover]:popover-open {
    opacity: 1;
    transform: scale(1);
  }
  @starting-style {
    [popover]:popover-open {
      opacity: 0;
      transform: scale(0.95);
    }
  }

  .modal-box h2 {
    margin-top: 0;
    font-size: 18px;
  }
  .modal-box p {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
  }

  .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f1f1;
    border: none;
    color: #333;
    font-size: 18px;
    cursor: pointer;
  }
  .close-btn:hover { background: #e5e5e5; }

  @media (max-width: 480px) {
    [popover] { max-width: none; }
    .close-btn { width: 40px; height: 40px; } /* タップ領域を広めに */
  }
