:root {
    --color-bg: #0d0d15;
    --color-text: #ffffff;
    --font-jp: dnp-shuei-nmincho-std, sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-jp);
    overflow: hidden;
    /* Prevent body scroll, use wrapper */
    width: 100vw;
    height: 100vh;
}

/* 2x Image Scaling Class */
.scale-half {
    transform: scale(0.5);
    transform-origin: center;
}

/* Fixed Background */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('../img/mv.jpg') no-repeat center center;
    background-size: cover;
}

.bg-layer img {
    display: none;
}

/* Intro Group & Sticky Frames */
.intro-group {
    position: relative;
    width: 100%;
}

.sticky-frames {
    position: fixed;
    /* Fixed over the whole page */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* Full viewport height */
    pointer-events: none;
    z-index: 101;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.fg-layer-l,
.fg-layer-r {
    /* position: sticky removed */
    height: 100%;
    display: flex;
    align-items: center;
}

.fg-layer-l {
    left: 0;
}

.fg-layer-r {
    right: 0;
}

.fg-layer-l img,
.fg-layer-r img {
    height: 100%;
    /* Fit height */
    width: auto;
    object-fit: contain;
    /* Ensure Aspect Ratio */
}

/* Ensure picture tag doesn't break flex/height layout */
.fg-layer-l picture,
.fg-layer-r picture {
    height: 100%;
    display: block;
}

/* Performer Dummy */
.performer-dummy {
    width: 100%;
    height: 800px;
    background-color: #fff;
    /* Dark placeholder */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #555;
    border-top: 1px solid #333;
}

/* =========================================
   Performer Section
   ========================================= */
.performer-section {
    position: relative;
    width: 100%;
    min-height: 60vh;
    /* Ensure enough space */
    background-color: #000;
    /* Base dark background */
    overflow: hidden;
    padding: 120px 0 0;
    text-align: center;
}

/* Curtains */
.performer-curtains .curtain-l,
.performer-curtains .curtain-r {
    position: absolute;
    top: 0;
    /* Match top of section */
    height: 100%;
    /* Match height of section */
    z-index: 100;
    /* Higher than header (90), lower than menu (200) */
    pointer-events: none;
    display: flex;
    align-items: center;
}

.performer-curtains .curtain-l {
    left: 0;
}

.performer-curtains .curtain-r {
    right: 0;
}

.performer-curtains img {
    height: 100%;
    /* Stretch to fill section height */
    width: auto;
    /* Maintain aspect ratio */
}

/* Title */
.performer-title {
    position: absolute;
    /* Overlay on carousel */
    top: 50px;
    /* Adjust vertical position */
    left: 0;
    width: 100%;
    z-index: 150;
    pointer-events: none;
    /* Allow clicks through to carousel? */
    display: flex;
    justify-content: center;
}

.performer-title img {
    zoom: 0.5;
    /* Keep 50% scaling for title */
    max-width: 80%;
    height: auto;
}

/* Carousel List */
.carousel-list {
    display: flex;
    /* Transformation handled by JS */
    will-change: transform;
    transition: transform 0.5s ease-out;
    /* Smooth transition for clicks */
    /* For dragging/auto-scroll we might override transition in JS */
}

.carousel-item {
    width: 220px;
    height: auto;
    /* background: #333; Remove placeholder bg */
    margin: 0 5px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s, opacity 0.5s;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Images might be transparent PNGs */
    pointer-events: none;
    /* Prevent drag issues on img */
}

/* Indicators */
.carousel-container p {
    width: 100%;
    position: absolute;
    bottom: 60px;
    left: 0;
    z-index: 150;
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateZ(0);
    /* Force GPU to fix Safari z-index/stacking issue */
    display: flex;
    gap: 10px;
    z-index: 150;
    /* Ensure visibility above carousel items and potential overlaps */
}

.indicator-dot {
    width: 13px;
    height: 26px;
    background: url('../img/indicators_off.png') no-repeat center center;
    background-size: contain;
    cursor: pointer;
    transition: background-image 0.3s;
    /* Removed border-radius and color */
}

.indicator-dot.active {
    background-image: url('../img/indicators_on.png');
    /* Removed box-shadow */
}

/* =========================================
   Performer Modal
   ========================================= */
.performer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
}

.performer-modal.active {
    opacity: 1;
    visibility: visible;
}

.performer-modal .modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.performer-modal .modal-content {
    position: relative;
    z-index: 2;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    /* Stack images */
    justify-content: center;
    align-items: center;
    pointer-events: none;
    /* Content container shouldn't block, but children should? */
}

.performer-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
}

.performer-image-container .modal-char-img {
    max-height: 80vh;
    width: auto;
}

.performer-image-container .modal-name-img {
    max-width: 72%;
    max-height: 20vh;
    width: auto;
    position: absolute;
    bottom: 10vh;
}

.performer-image-container img {
    max-width: 100%;
    max-height: 80vh;
}

/* Shared Modal Close Button Style */
.modal-close {
    position: absolute;
    /* Relative to fixed modal container */
    top: 0;
    right: 100px;
    width: 116px;
    height: 203px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    /* Above modal content */
    pointer-events: auto;
}

.modal-close img {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    zoom: 0.5;
    display: block;
    transition: opacity 0.3s ease;
}

.modal-close:hover {
    opacity: 0.7;
}

/* Remove specific performer styling if it conflicts, but I am replacing the block */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    /* Adjust as needed */
    z-index: 160;
    /* Lower than sticky-frames (100) */
    pointer-events: none;
    transition: background 0.3s ease;
    /* Let clicks pass through except on interactive elements */
}

/* When menu is open, remove header background and hide logo */
body.menu-open .site-header {
    background: none;
}

body.menu-open .header-logo {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.header-logo {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
}

.header-logo img {
    zoom: 0.5;
    /* Simple 50% scaling */
    display: block;
}

.menu-toggle {
    position: fixed;
    /* Fixed to break out of lower header z-index */
    top: 0px;
    right: 100px;
    z-index: 200;
    /* Higher than sticky-frames */
    pointer-events: auto;
    transition: top 0.3s ease;
    width: 116px;
    /* Approximate width */
    height: 203px;
}

.menu-toggle button {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 202;
}

.menu-toggle img {
    position: absolute;
    top: 50%;
    right: 0;
    /* Right aligned */
    transform: translateY(-50%);
    zoom: 0.5;
    /* 50% scaling */
    display: block;
    transition: opacity 0.3s ease;
}

/* Icon States */
.icon-menu {
    opacity: 1;
}

.icon-close {
    opacity: 0;
}

/* When menu is open */
body.menu-open .icon-menu {
    opacity: 0;
}

body.menu-open .icon-close {
    opacity: 1;
}

/* Main Content (Index) */
.wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    /* z-index: 10; Removed to allow sticky-frames to interlayer with header */
}

.hero-logo {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    /* For absolute positioning of info-bar */
}

.hero-logo img {
    zoom: 0.5;
    /* 50% scaling for 2x asset */
}

/* Info Bar (Bottom of Hero) */
.info-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #000 url('../img/bg_infomation.png') no-repeat center center;
    background-size: auto 100%;
    /* Fits the height */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.info-bar p {
    color: #d5b778;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.overlay-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    background: rgba(0, 0, 0, 0.6);
}

.overlay-menu.active {
    opacity: 1;
    visibility: visible;
}

/* Menu Background Layers */
.menu-bg-layers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.menu-bg-layers img {
    position: absolute;
    top: 0;
    height: 100%;
    width: auto;
    object-fit: cover;
}

.bg-l {
    left: 0;
}

.bg-c {
    left: 50%;
    transform: translateX(-50%);
}

.bg-r {
    right: 0;
}

/* Menu Items (Vertical List) */
.menu-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.menu-inner nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.menu-inner nav li {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s ease;
}

.overlay-menu.active nav li {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delay */
.overlay-menu.active nav li:nth-child(1) {
    transition-delay: 0.1s;
}

.overlay-menu.active nav li:nth-child(2) {
    transition-delay: 0.2s;
}

.overlay-menu.active nav li:nth-child(3) {
    transition-delay: 0.3s;
}

.overlay-menu.active nav li:nth-child(4) {
    transition-delay: 0.4s;
}

.overlay-menu.active nav li:nth-child(5) {
    transition-delay: 0.5s;
}

.overlay-menu.active nav li:nth-child(6) {
    transition-delay: 0.6s;
}

.menu-inner nav img,
.menu-inner nav a img {
    zoom: 0.5;
    /* 50% display size */
    transition: transform 0.2s;
    display: block;
}

.menu-inner nav a:hover img {
    transform: scale(1.1);
}

/* =========================================
   Main Section (Story & Trailer)
   ========================================= */
.main-section-bg {
    position: relative;
    width: 100%;
    /* bg_illust.png is 28MB! Assuming it covers the area */
    background: #000 url('../img/bg_illust.jpg') no-repeat center -150px;
    background-size: 1915px;
    padding: 60px 0 0;
    overflow: hidden;
}

.content-section {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 60px;
    text-align: center;
    padding: 0 20px;
}

.section-title {
    margin-bottom: 0px;
}

.section-title img {
    zoom: 0.5;
}

/* Story Text */
.story-text {
    background: url('../img/ef_shadow.png') no-repeat center center;
    background-size: contain;
}

.story-text p {
    font-size: 1rem;
    line-height: 2.5;
    margin-bottom: 1em;
    font-feature-settings: "palt";
}

/* Trailer */
.trailer-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s;
}

.trailer-btn:hover {
    transform: scale(1.05);
}

.trailer-btn img {
    width: 100%;
    max-width: 600px;
    /* Adjust based on trailer_movie.png size */
    height: auto;
}

.trailer-comingsoon {
    background: none;
    border: none;
}

.trailer-comingsoon img {
    width: 100%;
    max-width: 600px;
    /* Adjust based on trailer_movie.png size */
    height: auto;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1;
}

/* Specific to Video Modal */
.video-modal .modal-content {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 800px;
    background: #000;
}

/* Conflicting styles removed */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =========================================
   News & SNS Section
   ========================================= */
.news-sns-section {
    position: relative;
    width: 100%;
    /* bg_illust2.jpg */
    background: #000 url('../img/bg_illust2.jpg') no-repeat center -200px;
    background-size: 1920px;
    padding: 100px 0 140px;
    overflow: hidden;
    color: #fff;
}

.news-sns-wrapper {
    width: 100%;
    max-width: 1000px;
    /* Fits two 450px cols + gap */
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 40px;
    /* Space between columns */
    flex-wrap: wrap;
    /* Stack on smaller screens if needed */
}

.news-col,
.sns-col {
    width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Titles */
.news-col .section-title,
.sns-col .section-title {
    margin-bottom: 30px;
}

.news-col .section-title img,
.sns-col .section-title img {
    zoom: 0.5;
    /* Consistent scaling */
}

/* Placeholders */
/* Placeholders */
.sns-content-placeholder {
    width: 100%;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.sns-content-placeholder img {
    width: 100%;
    height: 350px;
    border: 1px solid #333;
}

/* News List Container */
.news-content-placeholder {
    width: 100%;
    height: 350px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border: 1px solid #333;
}

/* Scrollbar Customization */
.news-content-placeholder::-webkit-scrollbar {
    width: 8px;
}

.news-content-placeholder::-webkit-scrollbar-track {
    background: #111;
}

.news-content-placeholder::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    /* Ensure text aligns left */
}

.news-list li {
    display: grid;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #999;
    font-size: 1rem;
}

.news-list li:last-child {
    /* border-bottom: none; */
}

.news-list .date {
    width: 120px;
    flex-shrink: 0;
    color: #e0c17e;
    /* font-family if needed */
}

.news-list .text {
    flex: 1;
    line-height: 1.6;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    width: 100%;
    height: 120px;
    background-color: #000;
    color: #d3d3d3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0px;
    font-size: 1.0rem;
}

.footer-links a {
    color: #d3d3d3;
    text-decoration: none;
    margin: 0 5px;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.7;
}

.footer-note {
    margin-top: 10px;
    font-size: 0.9rem;
    line-height: 1.5rem;
    text-align: center;
    opacity: 0.7;
}

/* =========================================
   Responsive Design
   ========================================= */
/* Tablet (max-width: 1024px) */
@media screen and (max-width: 1024px) {

    /* Background Image Swap for Tablet/Mobile if needed */
    .bg-layer {
        /* background-image: url('../img/mv_sp.jpg'); */
        background-position: center top;
    }

    /* Menu & Modal Close Button Adjustment */
    /* Target: approx 20% smaller than PC */
    .menu-toggle,
    .modal-close {
        /* Position Adjustment */
        top: 0;
        right: 80px;
        /* Container Size Adjustment (Optional, if needed) */
        width: 93px;
        /* 80% of 116px */
        height: 162px;
        /* 80% of 203px */
    }

    .menu-toggle img,
    .modal-close img {
        /* Scale down the image itself */
        /* PC is zoom: 0.5. Here 0.5 * 0.8 = 0.4 */
        zoom: 0.4;
    }

    .news-sns-wrapper {
        width: 730px;
        gap: 20px;
    }

    .news-col,
    .sns-col {
        width: 48%;
    }

    .news-content-placeholder,
    .sns-content-placeholder {
        height: 272px;
    }

    .sns-content-placeholder img {
        height: 272px;
    }

    /* Carousel Adjustment: 70% size */
    .carousel-item {
        width: 154px;
        margin: 0 3.5px;
    }

    /* Adjust Curtain Size to prevent overlap */
    .curtain-l img,
    .curtain-r img {

        height: auto;
        width: auto;
        max-width: 20vw;
        /* Limit width to 20% of viewport */
        max-height: 80vh;
        /* Prevent being too tall if that matters */
        position: absolute;
        top: 0;
    }

    .curtain-l img {
        left: 0;
    }

    .curtain-r img {
        right: 0;
    }

    .performer-section {
        min-height: 48vh;
    }

    .main-section-bg {
        background: #000 url(../img/bg_illust.jpg) no-repeat center -100px;
        background-size: 1500px;
        padding: 60px 0 0;
    }

    .trailer-comingsoon img {
        width: 70%;
    }
}

/* Mobile (max-width: 767px) */
@media screen and (max-width: 767px) {
    .wrapper {
        height: 100svh;
    }

    .site-header {
        height: 70px;
    }

    .header-logo img {
        zoom: 0.4;
    }

    /* Carousel Item - 80% of Tablet size */
    .carousel-item {
        width: 123px;
        margin: 0 2.8px;
    }

    .bg-layer {
        position: absolute;
        /* Revert to fixed if needed, or keep absolute */
        /* Scroll with content on mobile */
        height: 100svh;
        /* Full screen height */
        width: 100%;
        background-image: url('../img/mv_sp.jpg');
        background-position: center -40px;
        background-size: auto 100vh;
        /* Adjust as needed */
    }

    .hero-logo {
        height: 100svh;
        /* Full screen */
    }

    .hero-logo img {
        zoom: 0.22;
        position: absolute;
        bottom: 480px;
    }

    .info-bar p {
        font-size: 1.0rem;
    }

    .main-section-bg {
        background: #000 url(../img/bg_illust_sp.jpg) no-repeat;
        background-position: center -5px;
        background-size: cover;
        padding: 60px 0 0;
    }

    .trailer-comingsoon img {
        width: 90%;
    }

    /* Menu & Modal Close Button Adjustment */
    /* Target: approx 20% smaller than PC */
    .menu-toggle,
    .modal-close {
        /* Position Adjustment */
        top: 0;
        right: 20px;
        /* Container Size Adjustment (Optional, if needed) */
        width: 68px;
        /* 80% of 116px */
        height: 120px;
        /* 80% of 203px */
    }

    .menu-toggle img,
    .modal-close img {
        /* Scale down the image itself */
        /* PC is zoom: 0.5. Here 0.5 * 0.8 = 0.4 */
        zoom: 0.3;
    }

    .menu-inner {
        height: 90%;
    }

    .menu-inner nav ul {
        gap: 20px;
    }

    .fg-layer-l,
    .fg-layer-r {
        height: auto;
    }

    /* Adjust Sticky Frame Size */
    .fg-layer-l img,
    .fg-layer-r img {

        height: auto;
        width: 12vw;
        /* Relative to screen width */
        min-width: 90px;
        /* Minimum size readability */
        max-width: 120px;
        /* Maximum size constraint */
        object-fit: contain;
    }

    /* Adjust alignment for sticky frames if needed (since height is no longer 100vh) */
    .sticky-frames {
        align-items: flex-start;
        /* Ensure they start at top */
    }

    .fg-layer-l,
    .fg-layer-r {
        align-items: flex-start;
        /* Pin to top for frame-like behavior if they are corners */
    }

    .section-title img,
    .performer-title img,
    .news-col .section-title img,
    .sns-col .section-title img {
        zoom: 0.35;
    }

    .content-section {
        margin: 0 auto 40px;
    }

    .story-text p {
        font-size: 0.9rem;
        line-height: 1.8;
        margin-bottom: 1em;
    }

    .news-sns-wrapper {
        width: 100%;
        padding: 0 20px;
        flex-direction: column;
        align-items: center;
        gap: 60px;
    }

    .news-sns-section {
        padding: 100px 0 80px;
    }

    .news-content-placeholder {
        height: auto;
    }

    .sns-content-placeholder {
        height: auto;
        background: none;
    }

    .sns-content-placeholder img {
        height: auto;
    }

    .news-col,
    .sns-col {
        width: 100%;
        max-width: 450px;
    }

    .site-footer {
        height: auto;
        padding: 1rem 0 0;
        font-size: 0.85rem;
    }

    .footer-note {
        margin: 10px 0;
        font-size: 0.75rem;
        line-height: 1.0rem;
    }
}

.phrase {
    display: inline-block;
}

@media screen and (max-width: 767px) {
    .phrase {
        display: inline-block;
    }
}