:root {
  --navy: #272e70;
  --navy-deep: #111c47;
  --orange: #ff9446;
  --paper: #f5f6fa;
  --ink: #182039;
  --white: #fff;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

body {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
}

.sec_livedouga_video {
  padding: 50px 0 64px;

  @media (max-width: 780px) { padding: 32px 0 42px; }

  .wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;

    @media (max-width: 780px) { padding: 0 20px; }
    @media (max-width: 400px) { padding: 0 12px; }
  }

  .head {
    margin-bottom: 26px;

    @media (max-width: 780px) { margin-bottom: 18px; }

    .eyebrow {
      margin-bottom: 10px;
      color: var(--navy);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: .13em;
    }

    h1 {
      margin-bottom: 10px;
      font-size: 32px;
      font-weight: 800;
      line-height: 1.4em;

      @media (max-width: 1200px) { font-size: 28px; }
      @media (max-width: 780px) { font-size: 24px; }
      @media (max-width: 400px) { font-size: 22px; }
    }

    .lead {
      color: #58627a;
      font-size: 14px;
      line-height: 1.8em;
    }
  }

  .player {
    padding: 14px;
    border: 1px solid #e0e2ea;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 16px 48px rgba(25, 35, 77, .12);

    @media (max-width: 780px) { padding: 8px; border-radius: 12px; }

    .stage {
      position: relative;
      overflow: hidden;
      aspect-ratio: 16 / 9;
      display: grid;
      border-radius: 10px;
      background: var(--navy-deep);
      isolation: isolate;
      container-type: inline-size;

      @media (max-width: 1000px) { aspect-ratio: 16 / 10; }
      @media (max-width: 780px) { aspect-ratio: 4 / 3; }
      @media (max-width: 700px) { aspect-ratio: 3 / 5; }
      @media (max-width: 500px) { aspect-ratio: 4 / 9; }
      @media (max-width: 360px) { aspect-ratio: 2 / 5; }

      .image {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transform-origin: center;

        @media (max-width: 1000px) { object-fit: contain; }
        object-position: center calc(50% + var(--photo-shift, 0px));

        @media (prefers-reduced-motion: reduce) { transform: none !important; }
      }

      .shade {
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(8, 20, 57, .92), rgba(8, 20, 57, .68) 39%, rgba(8, 20, 57, .08) 78%),
          linear-gradient(0deg, rgba(8, 16, 43, .8), transparent 36%);
        pointer-events: none;

        @media (max-width: 600px) {
          background: linear-gradient(180deg, rgba(8, 20, 57, .7), rgba(8, 20, 57, .16) 44%, rgba(8, 16, 43, .86));
        }
      }

      .main {
        position: relative;
        z-index: 1;
        min-height: 100%;
        padding: 32px 38px 30px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 30%);
        grid-template-rows: auto minmax(0, 1fr) 94px;
        column-gap: 24px;

        @media (max-width: 700px) { grid-template-columns: minmax(0, 1fr) 130px; grid-template-rows: auto minmax(0, 1fr) 270px 86px; column-gap: 12px; }
        color: var(--white);

        @media (max-width: 1200px) { padding: 28px 30px 26px; }
        @media (max-width: 780px) { padding: 22px 24px 20px; }
        @media (max-width: 400px) { padding: 18px 16px 16px; }

        .brand {
          grid-column: 1 / -1;
          width: fit-content;
          padding: 8px 12px;
          border: 1px solid rgba(255, 255, 255, .5);
          border-radius: 4px;
          background: rgba(16, 28, 72, .5);
          font-size: 12px;
          font-weight: 700;
          letter-spacing: .05em;

          @media (max-width: 400px) { font-size: 10px; }
        }

        .copy {
          grid-column: 1;
          grid-row: 2;
          align-self: center;
          max-width: 680px;
          padding: 26px 0;
          animation: copy-in .6s ease both;

          @media (max-width: 700px) { grid-column: 1 / -1; padding: 12px 0; }

          .number {
            margin-bottom: 16px;
            color: #ffbc83;
            font-size: 14px;
            font-weight: 800;
            letter-spacing: .2em;

            @media (max-width: 780px) { margin-bottom: 10px; font-size: 12px; }
          }

          .ttl {
            min-height: 2.7em;
            margin-bottom: 16px;
            font-size: 40px;
            font-weight: 800;
            line-height: 1.35em;
            text-shadow: 0 3px 20px rgba(0, 0, 0, .32);

            @media (max-width: 1200px) { font-size: 36px; }
            @media (max-width: 1000px) { font-size: 32px; }
            @media (max-width: 780px) { font-size: 36px; }
            @media (max-width: 700px) { min-height: 0; margin-bottom: 12px; font-size: 28px; }
            @media (max-width: 400px) { font-size: 26px; }
            @media (max-width: 360px) { font-size: 24px; }
          }

          .sub {
            padding-left: 14px;
            border-left: 4px solid var(--orange);
            font-size: 18px;
            font-weight: 700;
            line-height: 1.6em;

            &[hidden] { display: none; }
            &.is-pending { visibility: hidden; }

            @media (max-width: 780px) { font-size: 16px; }
            @media (max-width: 400px) { font-size: 14px; }
          }

          .stage-cta {
            width: fit-content;
            min-height: 52px;
            margin-top: 24px;
            padding: 0 20px;
            display: inline-flex;
            align-items: center;
            gap: 18px;
            border-radius: 7px;
            background: var(--orange);
            color: #202442;
            font-size: 17px;
            font-weight: 800;
            box-shadow: 0 10px 25px rgba(0, 0, 0, .25);

            &[hidden] { display: none; }
            &:hover { background: #ffb074; }
            &:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

            @media (max-width: 780px) { min-height: 46px; margin-top: 18px; font-size: 14px; }
            @media (max-width: 400px) { min-height: 42px; margin-top: 14px; padding: 0 13px; font-size: 13px; }

            span { font-size: 23px; }
          }

          .cta-hint {
            margin: 9px 0 0;
            display: none;
            color: var(--white);
            font-size: 16px;
            font-weight: 800;
            letter-spacing: .04em;
            text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
            visibility: hidden;
            opacity: 0;
            transform: translateY(6px);
            transition: opacity .3s ease, transform .3s ease, visibility .3s ease;

            span { color: #ffd08d; font-size: 20px; }

            @media (max-width: 780px) { font-size: 14px; }
          }
        }

        .logo {
          grid-column: 1;
          grid-row: 2;
          margin: 0;
          padding: 24px 28px;
          max-width: 360px;
          display: flex;
          flex-direction: column;
          align-items: center;
          align-self: center;
          gap: 14px;
          color: #07364b;
          background: rgba(255, 255, 255, .97);
          border-radius: 16px;
          box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
          visibility: hidden;
          opacity: 0;

          @media (max-width: 700px) { grid-column: 1 / -1; padding: 12px; gap: 6px; img { width: 96px; } p { font-size: 18px; } }

          img { width: 160px; height: auto; display: block; }
          p { font-size: 20px; font-weight: 800; line-height: 1.5em; text-align: center; }

          @media (max-width: 780px) {
            padding: 18px 16px;
            gap: 10px;
            img { width: 140px; }
            p { font-size: 20px; }
          }
          @media (max-width: 400px) {
            padding: 16px 12px;
            img { width: 112px; }
            p { font-size: 18px; }
          }
        }

        .caption {
          position: absolute;
          right: 30px;
          bottom: 30px;
          left: 30px;
          margin: 0 auto;
          width: fit-content;
          max-width: min(100%, 900px);
          padding: 12px 18px;
          border: 1px solid rgba(255, 255, 255, .28);
          border-radius: 7px;
          background: rgba(5, 10, 28, .86);
          box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
          font-size: 20px;
          font-weight: 800;
          line-height: 1.5em;
          text-align: center;
          text-wrap: pretty;

          &[hidden] { display: none; }

          @media (max-width: 1000px) { font-size: 18px; }
          @media (max-width: 1200px) { right: 26px; bottom: 26px; left: 26px; }
          @media (max-width: 780px) { right: 20px; bottom: 20px; left: 20px; padding: 10px 12px; font-size: 16px; }
          @media (max-width: 400px) { right: 16px; bottom: 16px; left: 16px; padding: 9px 8px; font-size: 14px; }
        }
      }
    }

    .timeline {
      height: 6px;
      margin: 14px 2px 10px;
      overflow: hidden;
      border-radius: 5px;
      background: #e3e6ef;

      span {
        width: 0;
        height: 100%;
        display: block;
        border-radius: inherit;
        background: var(--orange);
      }
    }

    .controls {
      display: grid;
      grid-template-columns: 92px 180px 92px 1fr;
      align-items: center;
      gap: 10px;

      @media (max-width: 600px) { grid-template-columns: 1fr 1.4fr 1fr; gap: 6px; }

      .control {
        min-height: 44px;
        padding: 0 14px;
        border: 1px solid #cdd3e3;
        border-radius: 8px;
        background: #f8f9fc;
        color: var(--navy-deep);
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;

        &:hover { background: #eceff8; }
        &:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

        &.primary {
          border-color: var(--navy);
          background: var(--navy);
          color: var(--white);

          &:hover { background: #1b225e; }
        }
      }

      .time {
        justify-self: end;
        color: #69728a;
        font-size: 12px;
        font-variant-numeric: tabular-nums;

        @media (max-width: 600px) { grid-column: 1 / -1; justify-self: center; }
      }
    }

    .below {
      margin-top: 16px;
      padding: 16px 2px 2px;
      border-top: 1px solid #edf0f5;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;

      @media (max-width: 780px) { flex-direction: column; align-items: stretch; }

      .notes {
        display: grid;
        gap: 4px;

        .note {
          color: #69728a;
          font-size: 12px;
          line-height: 1.7em;
        }
      }

      .btn_ptn_1 {
        min-height: 50px;
        padding: 0 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        border-radius: 7px;
        background: var(--orange);
        color: #202442;
        font-size: 14px;
        font-weight: 800;
        white-space: nowrap;
        transition: background .2s ease;

        &:hover { background: #ffb074; }
        &:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

        span { font-size: 22px; }
      }
    }

    .stage[data-scene="howling"] { @media (max-width: 400px) { --photo-shift: -24px; } }

    .stage[data-scene="price"] {
      .shade { background: rgba(8, 20, 57, .76); }
      .main .copy {
        margin: 0;
        padding: 28px 36px;
        width: 100%;
        max-width: 64%;
        grid-column: 1 / -1;
        justify-self: center;
        align-self: center;
        margin-bottom: 64px;
        animation: price-in .6s ease both;
        color: var(--navy-deep);
        background: rgba(255, 255, 255, .98);
        text-align: center;
        border: 2px solid #ffbb83;
        border-radius: 18px;
        box-shadow: 0 18px 60px rgba(0, 0, 0, .36);

        @media (max-width: 1000px) { padding: 18px 24px; }
        @media (max-width: 780px) { padding: 14px 12px; align-self: start; }
        @media (max-width: 700px) { max-width: 100%; margin-bottom: 0; padding: 12px; align-self: center; }
        @media (max-width: 400px) { padding: 14px 16px; }
        @media (max-width: 360px) { padding: 10px 12px; }

        .number { display: none; }
        .ttl {
          margin-bottom: 12px;
          min-height: 0;
          display: grid;
          gap: 8px;
          text-shadow: none;

          @media (max-width: 400px) { margin-bottom: 8px; gap: 6px; }

          .term {
            font-size: 28px;
            font-weight: 800;
            line-height: 1.3em;
            @media (max-width: 780px) { font-size: 24px; }
            @media (max-width: 400px) { font-size: 20px; }
          }
          .amount {
            display: flex;
            align-items: baseline;
            justify-content: center;
            gap: 8px;
            color: #d95508;
            line-height: 1.1em;
            white-space: nowrap;
            strong {
              font-size: 96px;
              font-weight: 900;
              line-height: 1.1em;
              font-variant-numeric: lining-nums tabular-nums;
              @media (max-width: 1200px) { font-size: 92px; }
              @media (max-width: 1000px) { font-size: 88px; }
              @media (max-width: 780px) { font-size: 64px; }
              @media (max-width: 700px) { font-size: 84px; }
              @media (max-width: 600px) { font-size: 80px; }
              @media (max-width: 400px) { font-size: 76px; }
              @media (max-width: 360px) { font-size: 64px; }
            }
            span {
              font-size: 32px;
              line-height: 1.3em;
              @media (max-width: 780px) { font-size: 28px; }
              @media (max-width: 600px) { font-size: 24px; }
              @media (max-width: 400px) { font-size: 20px; }
            }
            @media (max-width: 700px) { flex-direction: column; align-items: center; gap: 0; }
          }
          .tax {
            color: #58627a;
            font-size: 18px;
            font-weight: 700;
            line-height: 1.3em;
            @media (max-width: 400px) { font-size: 16px; }
          }
        }
        .sub {
          padding: 0;
          min-height: 1.6em;
          border: 0;
          @media (max-width: 360px) { font-size: 12px; }
        }
      }
    }

    .stage[data-scene="price"] .guide .chr { max-width: 48%; @media (max-width: 600px) { max-width: 80px; } }

    .stage[data-scene="free-video"] .main .copy .cta-hint { display: block; }

    &.logo-on .stage .main {
      .copy { visibility: hidden; }
      .logo { visibility: visible; opacity: 1; animation: logo-in .35s ease both; }
    }

    &.cta-invite {
      .stage .main .copy {
        .stage-cta {
          background: linear-gradient(110deg, #ff9946 20%, #ffe0a7 48%, #ff9946 75%);
          background-size: 220% 100%;
          animation: cta-glow 2s ease-in-out infinite;
        }

        .cta-hint { visibility: visible; opacity: 1; transform: none; }
      }

      .below .btn_ptn_1 {
        background: linear-gradient(110deg, #ff9946 20%, #ffe0a7 48%, #ff9946 75%);
        background-size: 220% 100%;
        animation: cta-glow 2s ease-in-out infinite;
      }
    }
  }
}

@keyframes copy-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logo-in {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes price-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cta-glow {
  0%, 100% { background-position: 100% 50%; box-shadow: 0 0 0 0 rgba(255, 185, 100, .1), 0 10px 25px rgba(0, 0, 0, .25); }
  50% { background-position: 0 50%; box-shadow: 0 0 0 7px rgba(255, 185, 100, .28), 0 0 32px rgba(255, 166, 72, .7); }
}

@media (prefers-reduced-motion: reduce) {
  .sec_livedouga_video .player .stage .copy { animation: none; }
  .sec_livedouga_video .player .stage .cta-hint { transition: none; }
  .sec_livedouga_video .player.cta-invite .stage .stage-cta,
  .sec_livedouga_video .player.cta-invite .below .btn_ptn_1 {
    animation: none;
    background: #ffb25f;
    box-shadow: 0 0 0 4px rgba(255, 185, 100, .28), 0 0 28px rgba(255, 166, 72, .55);
  }
}
