/* =========================================================
   official-character.css  – テンプレート用デザイン
========================================================= */

main {
    overflow: hidden;
}

/* 全体レイアウト */
#official-character {
    font-family: "Noto Sans JP", sans-serif;
    color: #333;
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

/* ------------------------------
   KVセクション
------------------------------ */
.kv-section {
    padding: 60px 20px;
    text-align: center;
    position: relative;
}

.kv-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 120px 32px calc(26px + 3rem);
}
.kv-section h1 {
    width: 100%;
    max-width: 599px;
    background: #FFFFFF;
    border-radius: 9999px;
    color: #27292D;
    position: relative;
    margin: 0 auto -21px;
    padding: 8px 16px;
    font-size: 2rem;
    line-height: 1.1875;
    text-align: center;
    z-index: 10;
}
.kv-section h1::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 9999px;
    border: 3px solid transparent;
    background: linear-gradient(84deg, #2376D0, #25ACCA 43%, #20CD7A) border-box border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0) border-box;
    -webkit-mask-composite: destination-out;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0) border-box;
    mask-composite: exclude;
}
.kv-section .content {
    width: 100%;
    max-width: 888px;
    max-height: 648px;
    background: linear-gradient(53deg, #2376D0, #25ACCA 43%, #20CD7A);
    box-shadow: 0px 4px 30px 2px rgba(0, 0, 0, 0.15);
    border-radius: 24px;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    padding: 3px;
    z-index: 5;
}
.kv-section .content .inner {
    background: url("../img/bg_official_character_1.png") center top/100% no-repeat, #FFFFFF;
    border-radius: 21px;
    padding-top: 30px;
    position: relative;
    height: 642px;
}
.kv-section .content .inner .act-image {
    position: absolute;
    top: 34px;
    left: 178px;
}
.kv-section .content .inner .introduce {
    position: absolute;
    top: 116px;
    right: 54px;
    max-width: 327px;
}
.kv-section .content .inner .serif {
    position: absolute;
    left: 190px;
    bottom: 5px;
}
.kv-section .content .inner .image1 {
    position: absolute;
    right: 270px;
    bottom: 24px;
}
.kv-section .content .inner .image2 {
    position: absolute;
    right: 150px;
    bottom: 24px;
}
.kv-section .content .inner .image3 {
    position: absolute;
    right: 32px;
    bottom: 24px;
}
.kv-section .content .inner .logo {
    position: absolute;
    left: 34px;
    bottom: 12px;
}
.kv-section .kv-section-more {
    text-align: center;
    margin-top: 3rem;
}
.kv-section .kv-section-more .detail-button {
    display: inline-block;
    background: #1F2023;
    color: #C6C6C6;
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 172, 202, 0.3);
    width: 342px;
}
.kv-section .kv-section-more .detail-button:hover {
    background: #27292D;
    color: #EEEEEE;
}
@media screen and (max-width: 435px) {
    .kv-section .kv-section-more .detail-button {
        width: 100%;
    }
}
@media screen and (max-width: 952px) {
    .kv-section {
        padding-top: 9.033vw;
        padding-right: 3.26vw;
        padding-left: 3.26vw;
    }
    .kv-section h1 {
        width: 62.92vw;
        font-size: 3.3625vw;
        margin-bottom: -2.2vw;
        padding: 0.84vw 1.89vw;
    }
    .kv-section .content .inner {
        height: 67.4366vw;
    }
    .kv-section .content .inner .act-image {
        width: 35.81vw;
        top: 3.57vw;
        left: 18.7vw;
    }
    .kv-section .content .inner .introduce {
        width: 34.34vw;
        top: 12.175vw;
        right: 5.67vw;
    }
    .kv-section .content .inner .serif {
        width: 10.18vw;
        left: 19.95vw;
        bottom: 0.52vw;
    }
    .kv-section .content .inner .image1 {
        width: 10.5vw;
        right: 28.35vw;
        bottom: 2.52vw;
    }
    .kv-section .content .inner .image2 {
        width: 10.5vw;
        right: 15.75vw;
        bottom: 2.52vw;
    }
    .kv-section .content .inner .image3 {
        width: 10.5vw;
        right: 3.36vw;
        bottom: 2.52vw;
    }
    .kv-section .content .inner .logo {
        width: 20.16vw;
        left: 3.55vw;
        bottom: 1.25vw;
    }
}

html[lang=en-US] .kv-section .content .inner .serif {
    left: 28px;
    top: 66px;
}
@media screen and (max-width: 952px) {
    html[lang=en-US] .kv-section .content .inner .serif {
        width: 30.47vw;
        left: 2.95vw;
        top: 6.95vw;
    }
}

/* ------------------------------
   Movie セクション
------------------------------ */
.movie-section {
    background-color: #1F2023;
    padding-bottom: 26px;
}

.movie-section h2.section-title {
    width: 100%;
    max-width: 599px;
    background: #FFFFFF;
    border-radius: 9999px;
    color: #27292D;
    position: relative;
    margin: 0 auto -21px;
    padding: 8px 16px;
    font-size: 2rem;
    line-height: 1.1875;
    text-align: center;
    z-index: 10;
    top: -26px;
}
.movie-section h2.section-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 9999px;
    border: 3px solid transparent;
    background: linear-gradient(84deg, #2376D0, #25ACCA 43%, #20CD7A) border-box border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0) border-box;
    -webkit-mask-composite: destination-out;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0) border-box;
    mask-composite: exclude;
}
@media screen and (max-width: 952px) {
    .movie-section h2.section-title {
        width: 62.92vw;
        font-size: 3.3625vw;
        margin-bottom: -2.2vw;
        padding: 0.84vw 1.89vw;
        top: -2.5vw;
    }
}

.movie-section .inner {
    max-width: 736px;
    margin: 0 auto;
}
@media (max-width: 767px) {
    /* 画面幅が767px以下の時のスタイル */
    .movie-section .inner {
        padding: 0 16px;
    }
}

.movie-section .movie-section-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0;
    color: #4DE878;
}

.movie-section .text {
    margin-top: 0;
    color: #EEEEEE;
    font-weight: 500;
}

/* Movieリスト：スマホ1列、タブレット以上2列 */
.movie-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    justify-content: center;
    margin-bottom: 12px;
}

/* タブレット以上で2列 */
@media (min-width: 768px) {
    .movie-list {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        margin: 0 auto 12px;
    }
}

/* 動画アイテムの基本サイズ */
.movie-item {
    width: 100%;
}

.movie-embed iframe {
    width: 100%;
    height: 240px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.movie-title {
    margin-top: 10px;
    font-weight: bold;
    text-align: center;
    color: #EEEEEE;
}

.movie-section .channel {
    background-image: url('../img/bg_official_charactor_channel.png');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 16px 0;
}

.movie-section .channel .channel-content {
    display: flex;
    color: #1F2023;
    font-weight: 700;
    text-decoration: none;
    max-width: 594px;
    margin: 0 auto;
    justify-content: space-between;
}

.movie-section .channel .channel-info p {
    margin: 0;
}
.movie-section .channel .channel-info p a {
    color: #44C167;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.movie-section .channel .channel-info p a::after {
    content: url('../img/jump_link.svg');
    display: inline-block;  /* ← 追加 */
    width: 25px;            /* ← SVGサイズに合わせて調整 */
    height: 24px;           /* ← SVGサイズに合わせて調整 */
}

/* ① まずは全体を縦並びに */
@media (max-width: 768px) {
    .channel .channel-content {
        flex-direction: column;   /* 上下へ積み重ねる */
        align-items: center;      /* 中央寄せ */
        gap: 12px;                /* アイコン/テキスト と 画像 の間隔 */
    }
    /* channel-info 内は横並びにしてアイコンとテキストを揃える */
    .channel-info {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* 画像を最大幅で表示 */
    .channel .image img {
        width: 100%;
        max-width: 280px;   /* 必要に応じて調整 */
    }
}

/* デスクトップ/タブレットでは既存レイアウトを維持（横並び） */
@media (min-width: 769px) {
    .channel-info {
        display: flex;
        align-items: center;
        justify-content: space-between; /* 画像とテキストの間に余白を作る */
        gap: 16px;
    }
}

/* ------------------------------
   SNSセクション
------------------------------ */
.sns-section {
    position: relative;
    padding: 130px 20px 80px;
}

.sns-section-title {
    position: relative;
    max-width: 886px;
    margin: 0 auto;
}

.sns-section h2.section-title {
    width: 100%;
    max-width: 799px;
    background: #FFFFFF;
    border-radius: 9999px;
    color: #27292D;
    position: relative;
    margin: 0 auto -21px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 24px;
    text-align: center;
    z-index: 10;
    top: 0px;
}
.sns-section h2.section-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 9999px;
    border: 3px solid transparent;
    background: linear-gradient(84deg, #2376D0, #25ACCA 43%, #20CD7A) border-box border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0) border-box;
    -webkit-mask-composite: destination-out;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0) border-box;
    mask-composite: exclude;
}
@media (min-width: 768px) and (max-width: 940px) {
  /* 画面幅が768px以上940px以下の時のスタイル */
    .sns-section h2.section-title {
        width: 85vw;
        font-size: 2.126vw;
        margin-bottom: -2.2vw;
        padding: 0.84vw 1.89vw;
        top: 0;
    }
}

/* ② タイトル画像を h2 の上へ配置 */
.title-image {
    position: absolute;
    top: -130px;                 /* 上方向にずらす距離（調整してください） */
    left: 70px;                   /* 中央寄せ（左端から半分） */
    transform: translateX(-50%);   /* 完全中央へ */
    z-index: 20;                  /* タイトルより前面に表示 */
    height: auto;
}

.sns-section .content {
    width: 100%;
    max-width: 888px;
    max-height: 648px;
    background: linear-gradient(53deg, #2376D0, #25ACCA 43%, #20CD7A);
    box-shadow: 0px 4px 30px 2px rgba(0, 0, 0, 0.15);
    border-radius: 24px;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 100px;
    padding: 3px;
    z-index: 5;
}
.sns-section .content .inner {
    background: url("../img/bg_official_character_2.png") center top/100% no-repeat;
    border-radius: 21px;
    padding-top: 30px;
    position: relative;
    height: 642px;
}
@media screen and (max-width: 952px) {
    .sns-section .content .inner {
        height: 67.4366vw;
    }
}
@media (max-width: 767px) {
    /* 画面幅が767px以下の時のスタイル */
    .sns-section {
        padding-top: 16.945vw;
    }
    .title-image {
        width: 12.12vw;
        top: -16.95vw;
        left: 5vw;
    }
    .sns-section .content {
        max-height: none;
    }
    .sns-section .content .inner {
        height: auto;
        background-position: bottom;
        background-size: cover;
    }
}

/* ---------- X埋め込みにグラデーションボーダー ---------- */
.sns-embed {
    position: absolute;
    display: inline-block;
    max-width: 382px;
    margin: 0 auto 30px;
    text-align: center;
    padding: 4px; /* ボーダー幅 */
    background: linear-gradient(84deg, #2376D0, #25ACCA 43%, #20CD7A);
    border-radius: 16px;
    max-height: 445px;
    overflow: hidden;
    top: 90px;
    left: 40px;
    z-index: 20;
    box-shadow: 0px 4px 30px 2px rgba(0, 0, 0, 0.15);
}

.sns-embed .inner-embed {
    background: #FFFFFF;
    border-radius: 12px;
    width: 100%;
    max-height: 436px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    clip-path: inset(0 round 12px);
}

/* カスタムスクロールバー：角丸に馴染ませる */
.sns-embed .inner-embed::-webkit-scrollbar {
    width: 8px;
}
.sns-embed .inner-embed::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 0 12px 12px 0;  /* 右側の角丸を inner-embed に合わせる */
}
.sns-embed .inner-embed::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}
.sns-embed .inner-embed::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}
/* スクロールバーの上下ボタン（矢印）を非表示にする */
.sns-embed .inner-embed::-webkit-scrollbar-button {
    display: none;
}

/* Firefox 用 */
.sns-embed .inner-embed {
    scrollbar-width: thin;
    scrollbar-color: #c0c0c0 #f0f0f0;
}

/* Twitter埋め込みの背景を白に */
.sns-embed .twitter-tweet {
    margin: 0 !important;
}

/* Twitter iframeが読み込まれた後の対応 */
.sns-section .content h3 {
    position: absolute;
    top: 40px;
    right: 30px;
    width: 100%;
    max-width: 398px;
    height: 100%;
    max-height: 65px;
    background-color: #fff;
    border-radius: 9999px;
    display: inline-flex;
    justify-content: center;   /* 水平方向（主軸）中央揃え */
    align-items: center;       /* 垂直方向（副軸）中央揃え */
    font-size: 0.875rem;
}
.sns-section .content h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 75%;
    border-style: solid;
    border-width: 29px 14.5px 0 14.5px;
    border-color: #fff transparent transparent;
    translate: -50% 100%;
}
.sns-section .content p {
    position: absolute;
    right: 0;
    bottom: -32px;
}
@media (min-width: 768px) and (max-width: 940px) {
  /* 画面幅が768px以上940px以下の時のスタイル */
    .sns-section .content h3 {
        top: 4.25vw;
        right: 3.19vw;
        width: 42.34vw;
        height: 6.9vw;
        font-size: 1.48vw;
    }
    .sns-section .content p {
        width: 59.0425vw;
    }
    .sns-embed {
        width: 40.425vw;
        height: 47.335vw;
        top: 9.574vw;
        left: 4.25vw;
    }
    .sns-embed .twitter-tweet-rendered,
    .sns-embed iframe {
        height: 46.275vw;
    }
}
@media (max-width: 767px) {
    /* 画面幅が767px以下の時のスタイル */
    .sns-section .content h3 {
        position: relative;
        top: 0;
        right: initial;
        left: 50%;
        transform: translateX(-50%);
    }
    .sns-section .content p {
        position: relative;
        bottom: -7px;
        right: -1.5vw;
        margin: 0;
    }
    .sns-embed {
        position: relative;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ------------------------------
   レスポンシブ対応
------------------------------ */
@media (max-width: 768px) {
    .movie-embed iframe {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .movie-embed iframe {
        height: 180px;
    }
}
