.subscription-plan-outer {
  backdrop-filter: blur(20px);

  .subscription-plan-container {
    padding-block: 120px;

    @media screen and (max-width: 768px) {
      padding-block: 100px;
    }

    .plan-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr); /* PCは4列 */
      gap: 20px;
      align-items: stretch;

      @media screen and (max-width: 990px) {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
      }

      .plan-card {
        background: #fff;
        border: 1px solid #e0e0e0; /* 通常の枠線 */
        border-radius: 8px;
        padding: 30px 15px;
        position: relative;
        text-align: center;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;

        @media screen and (max-width: 768px) {
          padding: 12px;
        }
      }
    }

    /* おすすめプラン (Standard) のスタイル */

    .plan-card.recommended {
      background-color: #FFFAE8;
      border: 3px solid #e87a41; /* オレンジの太い枠 */
      box-shadow: 0 4px 15px rgba(232, 122, 65, 0.2);
      z-index: 1; /* 重なり順を上へ */
      transform: scale(1.02); /* 少し大きく強調 */

      .plan-btn {
        background-color: #FF6D2C;
      }
    }

    /* おすすめバッジ */

    .badge-recommended {
      position: absolute;
      top: -15px;
      left: -15px;
      background-color: #e87a41;
      color: white;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      transform: rotate(-15deg);
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      z-index: 2;

      & > svg {
        width: 100%;
      }
    }

    .plan-header {
      margin-bottom: 16px;

      @media screen and (max-width: 768px) {
        margin-bottom: 8px;
      }
    }

    .plan-name-en {
      font-size: 28px;
      font-weight: 900;
      margin: 0 0 5px 0;
      color: #333;
      display: inline-block;
      padding: 0 5px;

      @media screen and (max-width: 768px) {
        font-size: 20px;
      }
    }

    .plan-name-jp {
      font-size: 18px;
      font-weight: bold;
      color: #666;
      margin: 0;

      @media screen and (max-width: 768px) {
        font-size: 12px;
      }
    }

    .plan-divider {
      border: none;
      border-top: 1px solid #eee;
      margin: 16px 0;
      width: 100%;

      @media screen and (max-width: 768px) {
        margin: 8px 0;
      }
    }

    /* 価格エリア */

    .plan-price {
      font-size: 42px;
      font-weight: bold;
      color: #333;
      line-height: 1;
      margin-bottom: 5px;

      @media screen and (max-width: 768px) {
        font-size: 32px;
      }

      .currency {
        font-size: 40px;
        vertical-align: top;
        margin-right: 2px;

        @media screen and (max-width: 768px) {
          font-size: 24px;
        }
      }
    }

    .plan-price .tax {
      font-size: 12px;
      color: #333;
      font-weight: normal;
      margin-left: 5px;
    }

    .plan-discount {
      font-size: 16px;
      color: #FF0505; /* 赤文字 */
      margin-bottom: 15px;
      font-weight: normal;

      @media screen and (max-width: 768px) {
        font-size: 12px;
      }
    }

    .plan-tags {
      display: flex;
      justify-content: center;
      gap: 4px;
      flex-wrap: wrap;
      margin-bottom: 10px;
    }

    .tag-green {
      width: fit-content;
      height: 34px;

      @media screen and (max-width: 768px) {
        height: 24px;

        & > svg {
          width: 100%;
          height: 100%;
        }
      }

      @media screen and (max-width: 480px) {
        height: 18px;
      }
    }

    /* スペック表 */

    .plan-specs {
      margin-bottom: 16px;

      @media screen and (max-width: 768px) {
        margin-bottom: 8px;
      }
    }

    .spec-row {
      display: flex;
      justify-content: space-between;
      font-size: 14px;
      padding: 6px 10px;
      border-bottom: 1px dotted #eee;
      font-family: Hiragino Kaku Gothic ProN, 'Meiryo', sans-serif;

      @media screen and (max-width: 768px) {
        font-size: 10px;
        padding: 5px 3px;
      }
    }

    .spec-row:last-child {
      border-bottom: none;
    }

    .spec-label {
      color: #888;
    }

    .spec-value {
      font-weight: bold;
      color: #333;

      @media screen and (max-width: 768px) {
        font-size: 12px;
      }
    }

    /* 特典リボンエリア */

    .plan-benefit-ribbon {
      margin: 10px -15px; /* カードのパディングを相殺して横幅いっぱいに */
      text-align: center;
    }

    .ribbon-shape {
      background-color: #bfa875; /* ゴールド */
      color: white;
      font-size: 14px;
      font-weight: bold;
      display: inline-block;
      padding: 2px 40px;
      position: relative;
      margin-bottom: 6px;

      /* リボンの端を尖らせる処理 */
      clip-path: polygon(100% 0, 96% 50%, 100% 100%, 0% 100%, 4% 50%, 0% 0%);
      width: 80%;
    }

    .benefit-text {
      font-size: 14px;
      color: #bfa875;
      line-height: 1.4;
      padding: 0 10px;
      font-weight: bold;
      font-family: Hiragino Kaku Gothic ProN, 'Meiryo', sans-serif;

      @media screen and (max-width: 768px) {
        font-size: 12px;
        margin: 6px 0;

        > br {
          padding-block: 10px;
        }
      }
    }

    /* 初回セット内容 */

    .plan-contents {
      text-align: left;
      padding: 0 10px;
      flex-grow: 1; /* 高さを揃えるための余白調整 */
      margin-bottom: 20px;

      @media screen and (max-width: 768px) {
        margin-bottom: 0;
      }

      .contents-title {
        text-align: center;
        font-size: 14px;
        font-weight: bold;
        margin-bottom: 10px;
        color: #333;
        pointer-events: none;

        @media screen and (max-width: 768px) {
          pointer-events: unset;
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin-top: 10px;
        }

        .content-title-caret-wrapper {
          display: none;
          transform: rotate(-90deg);
          transform-origin: center;
          width: 20px;
          height: 20px;
          background-color: black;
          border-radius: 50%;

          > svg {
            color: white;
            display: block;
            width: 12px;
            height: 12px;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
          }

          @media screen and (max-width: 768px) {
            display: flex;
            justify-content: center;
            align-items: center;
          }
        }
      }

      &[open] {
        .content-title-caret-wrapper {
          transform: rotate(0deg);
        }
      }
    }

    .contents-list {
      list-style: none;
      padding: 0;
      margin: 0;

      .contents-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        margin-bottom: 6px;
        color: #333;
        font-weight: bold;

        @media screen and (max-width: 768px) {
          font-size: 12px;
        }

        .check-icon {
          width: 20px;
          height: 20px;

          & > svg {
            width: 100%;
            height: 100%;
          }
        }
      }
    }


    .check-icon {
      flex-shrink: 0;
    }

    /* ボタン */

    .plan-btn {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
      background-color: #000;
      color: #fff;
      text-decoration: none;
      border-radius: 50px;
      font-size: 16px;
      font-weight: bold;
      transition: opacity 0.3s;
      width: 100%;
      height: 64px;
      margin-top: auto; /* 一番下に配置 */

      @media screen and (max-width: 768px) {
        font-size: 12px;
        border-radius: 32px;
        height: 48px;
      }
    }

    .plan-btn:hover {
      opacity: 0.8;
    }

    @media (max-width: 767px) {
      .plan-heading {
        font-size: 36px;
        margin-bottom: 40px;
      }

      .plan-card.recommended {
        transform: none; /* スマホでは拡大しない */
      }
    }
  }
}