/* 共通 */
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
}
p {
    font-family: 'Roboto', sans-serif;
    line-height: 1.8;
    margin: 0;
}
.inner {
    padding: 80px 20px;
    margin: 0 auto;
    max-width: 1000px;
}
h2 {
    display: inline-block;
    font-family: Crimson Text;
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
    margin-bottom: 80px;
    color: #4B0082;
    border-bottom: 1px solid #4B0082;
}
#gallery .inner,
#product .inner,
#special .inner,
#shop-perk .inner {
    text-align: center;
    padding-top: 0;
}
@media (max-width: 768px) {
    h2 {
        font-size: 24px;
        margin-bottom: 40px;
    }
    .inner {
        padding: 64px 20px;
    }
}
/* スクロールでふわっと表示するアニメーション */
.js-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.js-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .js-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
/* logo */
.logo {
    z-index: 1000;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    gap: 16px;
}
.logo .logo-switch {
    width: 80px;
    height: 80px;
}
.logo .logo-switch img {
    width: 100%;
    height: auto;
    transition-duration: .1s;
}
.logo .logo-ps4 {
    width: 160px;
    height: 80px;
    filter: drop-shadow(0 0 6px rgba(13, 40, 68, .8)) drop-shadow(0 2px 6px rgba(13, 40, 68, .5));
    display: flex;
    align-items: center;
}
.logo .logo-ps4 img {
    width: 100%;
    height: auto;
    transition-duration: .1s;
}
@media (max-width: 768px) {
    .logo .logo-switch {
        width: 60px;
        height: 60px;
    }
    .logo .logo-ps4 {
        width: 120px;
        height: 60px;
    }
}
/* header */
header {
    position: absolute;
    height: 80px;
    width: auto;
    right: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
header .hamburger {
    display: none;
}
header .menu-sp {
    display: none;
}
header .menu ul {
    list-style: none;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding: 4px 16px;
}
header .menu li {
    display: inline-block;
}
header .menu li a {
    text-decoration: none;
    font-size: 24px;
    font-family: Crimson Text;
    color: #fff;
    filter: drop-shadow(0 0 6px rgba(13, 40, 68, .8)) drop-shadow(0 2px 6px rgba(13, 40, 68, .5));
}
@media (max-width: 1024px) {
    header {
        height: 60px;
        position: fixed; /* 常に画面の同じ位置に固定 */
        top: 0;
        right: 0; /* 右上に配置 */
    }
    header .hamburger {
        display: block;
        z-index: 20; /* 他の要素より前面に表示 */
        width: 40px;
        height: 40px;
        margin-right: 16px;
        background: none;
        border: none;
        cursor: pointer;
        position: relative; /* span要素の基準 */
        filter: drop-shadow(0 0 2px rgba(13, 40, 68, .8)) drop-shadow(0 1px 2px rgba(13, 40, 68, .5));
    }
    header .hamburger span {
        background: #fff;
        display: block;
        width: 30px;
        height: 2px;
        left: 5px;
        position: absolute; /* 中央に配置するための準備 */
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    }
    header .hamburger span:nth-of-type(1) {
        top: 11px;
    }
    header .hamburger span:nth-of-type(2) {
        top: 19px;
    }
    header .hamburger span:nth-of-type(3) {
        top: 27px;
    }
    /* クリック時のハンバーガーアイコンの変化 */
    .hamburger.open span:nth-child(1) {
        transform: translateY(8px) rotate(-45deg);
    }
    .hamburger.open span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.open span:nth-child(3) {
        transform: translateY(-8px) rotate(45deg);
    }
    header .menu-sp {
        position: fixed; /* 画面全体を覆うように固定 */
        top: 0;
        right: -100%; /* 初期状態では画面外の右に配置 */
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.8); /* 半透明の背景 */
        color: white; /* メニューテキストの色 */
        z-index: 15; /* ボタンより下、コンテンツより上 */
        display: flex;
        justify-content: end;
        align-items: start;
        transition: right 0.3s ease-in-out; /* スライドインのアニメーション */
    }
    .menu-sp ul {
        padding-top: 80px;
        padding-right: 24px;
        list-style: none;
        margin: 0;
    }
    .menu-sp li a {
        font-family: Crimson Text;
        display: block;
        padding: 8px 16px;
        font-size: 24px;
        text-decoration: none;
        color: #fff;
    }
    header .menu-sp.open {
        right: 0; /* クリック時に画面内に移動 */
    }  
    .menu-sp li a:hover {
        background-color: #ddd;
      }
    header .menu {
        display: none;
        position: absolute;
        top: 60px;
        right: 20px;
    }
}

/* firstview */
.main-visual {
    position: relative;
    width: 100%;
    height: 100vh; /* または、適切な高さ */
    overflow: hidden; /* はみ出した部分を非表示にする */
}
.main-visual-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%; /* 垂直方向を20%上に調整 */
}
.logo-title {
    position: absolute;
    max-width: 80%;
    max-height: 35%;
    bottom: 7%;
    left: 0;
    right: 0;
    margin: 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(13, 40, 68, .7)) drop-shadow(0 0 3px rgba(13, 40, 68, .7)) drop-shadow(0 2px 6px rgba(13, 40, 68, .7));
}

/* overview */
#overview .inner {
    max-width: 800px;
    padding-top: 64px;
    padding-bottom: 64px;
}
#overview p {
    text-align: center;
    font-size: 20px;
}
/* 画面幅が768px以下の場合 */
@media (max-width: 768px) {
    #overview p {
        font-size: 16px;
    }
}

/* movie */
#movie {
    position: relative;
    overflow: hidden;
}
#movie:before {
    content: "";
    position: absolute;
    inset: -16px;
    background-image: url(../img/dungeon-artifact/main-visual.png);
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: blur(16px);
    opacity: .9;
}
#movie .inner-wrap {
    max-width: 1000px;
    margin: 0 auto;
}
#movie .youtube {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    display: block;
}

/* character */
#character .inner {
    text-align: center;
}
#character .character-detail {
    display: flex;
    flex-direction: row;
    align-items: center;
}
#character .character-detail .picture {
    width: 50%;
}
#character .character-detail .picture img {
    width: 100%;
    height: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: 50% 0;
}
#character .character-detail .text {
    width: 50%;
    padding: 0 24px;
}
#character .character-detail .text p {
    text-align: left;
}
#character .character-detail .text .name {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: bold;
}
#character .character-detail .text .quote {
    margin-bottom: 16px;
    font-size: 16px;
    font-style: italic;
    color: #4B0082;
}
#character .character-detail .text .description {
    margin-bottom: 12px;
    font-size: 14px;
}
#character .character-detail .text .description:last-child {
    margin-bottom: 0;
}
#character .character-detail + .character-detail {
    margin-top: 64px;
}
@media (min-width: 769px) {
    #character .character-detail.second {
        flex-direction: row-reverse;
    }
}
@media (max-width: 768px) {
    #character .character-detail {
        flex-direction: column;
    }
    #character .character-detail.second {
        flex-direction: column;
    }
    #character .character-detail .picture {
        width: calc(280 / 390 * 100%);
    }
    #character .character-detail .text {
        width: 100%;
        padding: 24px 0 0;
    }
    #character .character-detail .text .name {
        font-size: 16px;
    }
    #character .character-detail .text .quote {
        font-size: 12px;
    }
    #character .character-detail .text .description {
        font-size: 11px;
    }
}

/* gallery */
#gallery .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}
#gallery .wrapper {
    width: fit-content;
    overflow: hidden;
    box-shadow: 3px 3px 6px #38454e80;
}
#gallery .wrapper img {
    max-width: 480px;
    height: 100%;
}
#gallery .wrapper img:hover {
    cursor: pointer;
  }
.overlay {
    display: none; /* 最初は非表示 */
    position: fixed; /* 画面全体に固定 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* 半透明の背景 */
    z-index: 1000; /* 他の要素より前面に表示 */
    justify-content: center; /* 水平方向中央揃え */
    align-items: center; /* 垂直方向中央揃え */
}
.overlay.show {
    display: flex; /* 表示する際に display: flex; を適用 */
}
.overlay img {
    max-width: 90%; /* 拡大画像の最大幅 */
    max-height: 90%; /* 拡大画像の最大高さ */
    opacity: 0; /* 最初は透明にする */
    transform: scale(0.9); /* 少し縮小した状態で開始 */
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out; /* opacityとtransformにトランジション */
}
.overlay img.show {
    opacity: 1; /* 表示時に不透明にする */
    transform: scale(1); /* 元のサイズに戻す */
}
.close-button {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}
@media (max-width: 768px) {
    #gallery .container {
        gap: 24px;
    }
    #gallery .wrapper img {
        width: 100%;
    }
}

/* product */
#product .container {
    display: flex;
    justify-content: space-around;
    align-items: center;
}
#product .container .package {
    width: 440px;
    flex-direction: row;
    flex-shrink: 1;
    gap: 24px;
    display: flex;
    align-items: flex-start;
}
#product .container .package-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
#product .container .package img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 4px rgba(13, 40, 68, .5)) drop-shadow(0 2px 4px rgba(13, 40, 68, .5));
}
#product .container .package-label {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: normal;
    color: #333;
}
#product .container .table {
    flex-shrink: 0;
}
#product .container .table table {
    margin: 0 auto;
    max-width: 520px;
}
#product .container .table table th,
#product .container .table table td {
    padding: 8px 0;
    font-family: 'Roboto', sans-serif;
}
#product .container .table table th {
    width: 100px;
}
#product .container .table table td {
    text-align: start;
}
@media (max-width: 768px) {
    #product .container {
        flex-direction: column;
    }
    #product .container .package {
        width: 100%;
        gap: 12px;
        margin-bottom: 24px;
    }
    #product .container .package img {
        width: 100%;
    }
    #product .container .package-label {
        font-size: 13px;
    }
}

#product .reserve-cta {
    display: block;
    width: fit-content;
    margin: 48px auto 0;
    padding: 20px 72px;
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    background: #4B0082;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(13, 40, 68, .4);
    transition: opacity .2s ease-out;
}
#product .reserve-cta:hover {
    opacity: .85;
}
@media (max-width: 768px) {
    #product .reserve-cta {
        margin-top: 32px;
        padding: 16px 48px;
        font-size: 16px;
    }
}

/* special */
#special h2,
#shop-perk h2 {
    margin-bottom: 40px;
}
#special .lead,
#shop-perk .lead {
    font-size: 18px;
    margin-bottom: 40px;
}
#special .special-visual {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    aspect-ratio: 640 / 432; /* 画像の重なりが収まる比率(幅に対して自動で高さが決まる) */
}
#special .special-visual img {
    position: absolute;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(13, 40, 68, .45));
}
#special .special-visual .perk-tapestry {
    aspect-ratio: 1651 / 2603;
    width: 40.625%;
    left: 29.6875%;
    top: 2%;
    z-index: 1;
}
#special .special-visual .perk-cd {
    aspect-ratio: 1 / 1;
    width: 34%;
    left: 3%;
    top: 45%;
    transform: rotate(-10deg);
    z-index: 2;
}
#special .special-visual .perk-sticker01 {
    aspect-ratio: 1 / 1;
    width: 20%;
    left: 61%;
    top: 43%;
    transform: rotate(12deg);
    z-index: 3;
}
#special .special-visual .perk-sticker02 {
    aspect-ratio: 1 / 1;
    width: 20%;
    left: 73%;
    top: 57%;
    transform: rotate(-10deg);
    z-index: 4;
}
#special .perk-labels {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}
#special .perk-labels span {
    font-size: 18px;
    font-weight: bold;
    color: #4B0082;
    padding: 0 16px;
}
#special .perk-labels span:not(:first-child) {
    border-left: 1px solid #4B0082;
}
@media (max-width: 768px) {
    #special .lead,
    #shop-perk .lead {
        font-size: 14px;
        margin-bottom: 24px;
    }
    #special .perk-labels {
        flex-direction: column;
        gap: 4px;
        margin-top: 16px;
    }
    #special .perk-labels span {
        font-size: 14px;
        padding: 0;
        border-left: none !important;
    }
}

/* shop perk */
#shop-perk .shop-perk-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    text-align: left;
}
#shop-perk .shop-perk-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(13, 40, 68, .15);
}
#shop-perk .shop-perk-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #d8d8e6, #b8b8cc);
    color: #6a6a80;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: .05em;
}
#shop-perk .shop-perk-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
#shop-perk .shop-perk-body {
    padding: 20px 24px 24px;
}
#shop-perk .shop-name {
    font-family: Crimson Text;
    font-size: 22px;
    font-weight: bold;
    color: #4B0082;
    margin-bottom: 8px;
}
#shop-perk .shop-item {
    font-size: 15px;
    margin-bottom: 16px;
}
#shop-perk .shop-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #4B0082;
    text-decoration: none;
}
#shop-perk .shop-link .chevron {
    font-size: 18px;
    line-height: 1;
}
#shop-perk .shop-link:hover {
    text-decoration: underline;
}
@media (max-width: 768px) {
    #shop-perk .shop-perk-list {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    #shop-perk .shop-perk-image {
        font-size: 14px;
    }
    #shop-perk .shop-name {
        font-size: 18px;
    }
    #shop-perk .shop-item {
        font-size: 13px;
    }
}

/* footer */
footer {
    background: #4B0082;
    color: #fff;
}
footer .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
footer .container .circle-name {
    font-family: Crimson Text;
    font-size: 40px;
    font-weight: bold;
}
footer .container .license {
    margin-top: 24px;
    text-align: center;
}
footer .container .license img {
    display: inline-block;
    vertical-align: baseline;
    height: 10px;
    width: auto;
}
footer .container .license p {
    font-size: 16px;
}
footer .container .copy {
    margin-top: 24px;
}
@media (max-width: 768px) {
    footer .container {
        padding: 24px 20px;
    }
    footer .container .circle-name {
        font-size: 24px;
    }
    footer .container .license {
        margin-top: 16px;
    }
}

.fixed-button {
    width: 80px;
    position: fixed;
    right: 0px;
    bottom: 20px;
    background-color: rgba(75, 0, 130, 0.5);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 5px 0 0 5px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s, background-color 0.3s;
    z-index: 1000; /* 他の要素の上に表示 */
}
.button-icon {
    display: flex; /* SVGがflexアイテムとして正しく配置されるように */
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}
.button-icon img {
    width: 24px;
}
.button-text {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
}
.fixed-button:hover {
    background-color: rgba(75, 0, 130, 0.8);
}
/* 初期状態（設定セクションへ遷移）のボタン */
.initial-state {
    opacity: 1;
    visibility: visible;
}
/* 一番上へ戻るボタン */
.back-to-top-state {
    background-color: rgba(75, 0, 130, 0.7); /* 戻るボタン用の色 */
}
.back-to-top-state:hover {
    background-color: rgba(75, 0, 130, 0.9);
}
/* 非表示状態 */
.hidden {
    opacity: 0;
    visibility: hidden;
}
/* 非表示にするアイコンのスタイル */
.hidden-icon {
    display: none;
}