@supports (-webkit-touch-callout: none) {
    .container,
    body,
    html {
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    .container {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}

:root {
    --vh: 1vh;
    --real-vh: 1vh;
    --frame-border-width: 2.5px;
    --corner-size: 20px;
    --transition-duration: 0.3s;
}


* {
    box-sizing: border-box;
}

html, body {
  height: auto;
  min-height: 100%;
}

html {
    height: -webkit-fill-available;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    min-height: calc(var(--real-vh, 1vh) * 100);
    background-color: #000000;
    color: white;
    font-family: 'Shippori Mincho', Arial, sans-serif;
    font-weight: 400;
    overflow-x: hidden;
    width: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}



.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-inner__child {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-tag {
    width: 100%;
    max-width: 30px;
    font-size: 9px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: white;
}

.header-logo {
    max-width: 200px;
    width: 100%;
}

.hamburger {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem .5rem 0 .5rem;
}

.hamburger .bar {
    width: 30px;
    height: 2px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

.navbar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(32, 32, 32, 0.6);
    backdrop-filter: blur(10px);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.navbar.show {
    background-color: #202020;
    max-height: 350px;
}

.navbar ul {
    text-align: right;
    list-style: none;
    margin: 0;
    padding: 1rem 0;
}

.navbar li {
    padding: 0.5rem 2rem;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
}



.scroll-container {
    height: calc(var(--vh, 1vh) * 1000); ;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow-x: hidden;
    pointer-events: none;
}

.container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100);
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

.scrolling-content {
    position: absolute;
    top: calc(var(--vh, 1vh) * 810);
    left: 0;
    width: 100%;
    margin-top: calc(var(--vh, 1vh) * 5);
    min-height: calc(var(--vh, 1vh) * 100);
    z-index: 1;
    opacity: 1;
    overflow-x: hidden;
    will-change: transform;
    backface-visibility: hidden;
}

.container-spacer {
    display: none;
    height: calc(var(--vh, 1vh) * 15);
    width: 100vw;
}


.frame {
    width: 65vmin;
    height: 15vmin;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateY(5px);
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
    z-index: 2;
}

.frame.normal-scroll {
    position: relative !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    margin: 0 auto;
    display: block;
}

.border-corner {
    position: absolute;
    width: var(--corner-size);
    height: var(--corner-size);
    border-style: solid;
    border-color: white;
    border-width: var(--frame-border-width);
    box-sizing: border-box;
    transition: all var(--transition-duration) ease;
}

.border-corner.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.border-corner.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.border-corner.bottom-left {
    bottom: 0;
    left: 0;
    border-top: none;
    border-right: none;
}

.border-corner.bottom-right {
    bottom: 0;
    right: 0;
    border-top: none;
    border-left: none;
}



.japanese-word {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
}

.japanese-letter {
    font-size: 2rem;
    color: white;
    line-height: 1;
    display: inline-block;
}

.frame-text {
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    padding: 1vmin;
    font-size: 2.5vmin;

    opacity: 0;
    visibility: hidden;
}

body.loaded .frame-text {
    visibility: visible; 
}

.text-line {
    display: block;
    width: 100%;
    line-height: 1.6;
    transform: translateZ(0);
    font-size: inherit; 
    white-space: nowrap;
}

.char {
    display: inline-block;
    opacity: 0;
}



.content-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: calc(var(--vh, 1vh) * 5) 0;
    height: 100%;
    margin-bottom: calc(var(--vh, 1vh) * 10);
    overflow: visible;
    gap: 2vmin;
    position: relative;
    margin-top: calc(var(--vh, 1vh) * 30);
}

#contentRow1 {
    padding-top: calc(var(--vh, 1vh) * 20);
}

#contentRow4 {
        margin-bottom: calc(var(--vh, 1vh) * 40);
    }

.content-row:nth-child(odd) {
    justify-content: flex-end;
}

.content-row:nth-child(odd) .info-div {
    text-align: right;
    align-items: flex-end;
    justify-content: flex-end;
}



   .characters-line {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-image-container {
    transform: rotate(-12deg);
}

.footer-image-container img {
    position: relative;
    transform: rotate(12deg);
}

.content-row,
.video-div,
.info-div,
.graphic-div {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.video-div, .info-div, .graphic-div {
    opacity: 0;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.video-div {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: 2;
    transition: all var(--transition-duration) ease;
    cursor: none;
}

.video-div img,
.video-div video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-duration) ease;
}

.video-div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: all var(--transition-duration) ease;
    z-index: 1;
}

.video-div:hover::before {
    background: rgba(0, 0, 0, 0.3);
}

.info-graphic-column {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    margin-top: 2.5vmin;
}

.info-div {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    font-size: 3vmin;
    color: white;
    position: relative;
    z-index: 2;
    white-space: normal;
    overflow: visible;
}

.info-div br {
    display: block;
}

.info-div p {
    margin: 0;
}

.graphic-div {
    width: 100%;
    height: 25vw;
    max-height: 35vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.graphic-div img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.content-row:nth-child(even) .graphic-div img {
    transform: scale(1.5) translate(-2vh, -5vh);
}

.content-row:nth-child(odd) .graphic-div img {
    transform: scale(1.5) translate(3vh, -1vh);
}



.text-line {
    display: block;
    line-height: 1.2;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: visible;
}

.text-line:last-child {
    line-height: 2;
    margin-bottom: 0;
}

.text-char {
    display: inline-block;
    opacity: 0;
    transform-origin: center center;
    will-change: transform, opacity;
    font-size: inherit;
    backface-visibility: hidden;
    perspective: 1000;
    transform-style: preserve-3d;
}

.text-char.larger-text {
    font-size: 4vmin;
}

.text-char.space {
    min-width: 0.3em;
}



.video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-duration) ease;
    overflow: hidden;
}

.video-popup.show {
    opacity: 1;
    visibility: visible;
}

.video-popup-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform var(--transition-duration) ease;
    margin: auto;
}

.video-popup.show .video-popup-content {
    transform: scale(1);
}

.video-popup iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-duration) ease;
    z-index: 10001;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.close-popup:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}



.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    position: relative;
    height: calc(var(--vh, 1vh) * 100);
}

.footer-content1 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.footer-content2 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    margin-top: calc(var(--vh, 1vh) * 25); 
    margin-bottom: calc(var(--vh, 1vh) * 10); 
}

.footer-image-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    transform: rotate(-12deg);
}

.footer-image-container img {
    position: relative;
    width: clamp(60px, 10vw, 120px);
    height: clamp(60px, 10vw, 120px);
    object-fit: contain;
    z-index: 10;
    opacity: 0;
    flex-shrink: 0;
    transform: rotate(12deg);
}

.footer-image-container img:nth-child(3) {
    width: clamp(50px, 8vw, 100px);
    height: clamp(50px, 8vw, 100px);
}

.footer-english-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: clamp(16px, 4.5vw, 48px);;
}

.footer-links-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 850px;
    margin: 2vh 0;
}

.footer-links-container a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    white-space: nowrap;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.footer-links-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
    flex: 0 1 auto;

}

.footer-links-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 3rem;
}


.footer-links-container a:hover {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.footer-links-container a:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 2px;
}

.english-subtitle {
    font-family: sans-serif;
    font-size: 0.785rem;
    letter-spacing: 1em;
    text-transform: uppercase;
    margin-top: -20px;
    transform-origin: center;
    position: relative;
    padding-top: 1vh;
    opacity: 0;
}

.english-subtitle::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-60%) rotate(0deg);
    width: 500px;
    height: 2px;
    background: linear-gradient(to right, #601d80 0%, #000000 50%, #601d80 100%);
}

.footer-logo-container {
    width: 100%;
    max-width: 300px;
}

.footer-logo-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 1rem;
}


.scroll-arrow {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    opacity: 0.7;
    gap: 1vmin;
    align-items: center;
    cursor: pointer;
}

.scroll-arrow img {
    width: 30px;
    height: 60px;
    transition: transform var(--transition-duration) ease;
}

.scroll-arrow.scrolling {
    animation: arrowBounce 0.6s ease-out;
}

@keyframes arrowBounce {
    0% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-8px); }
    100% { transform: translateX(-50%) translateY(0px); }
}



.japanese-letter-svg-container {
    display: inline-block;
    vertical-align: middle;
    position: relative;
    width: 4em;
    height: 4em;
    transform-origin: center center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.japanese-letter-svg {
    width: 100%;
    height: 100%;
    display: block;
    shape-rendering: geometricPrecision;
    text-rendering: optimizeLegibility;
    fill: currentColor;
    color: inherit;
    transform-origin: center center;
}

.japanese-letter-svg path,
.japanese-letter-svg g {
    fill: inherit;
    color: inherit;
}

.japanese-letter-fallback {
    display: inline-block;
    vertical-align: middle;
    font-family: 'Shippori Mincho', serif;
    font-weight: normal;
    line-height: 1;
    transform-origin: center center;
}

.japanese-letter {
    display: inline-block;
    vertical-align: middle;
    position: relative;
    transform-origin: center center;
    width: 1em;
    height: 1em;
    transition: all 0.3s ease;
}

.japanese-letter.loading {
    opacity: 0.5;
    animation: svgPulse 1.5s infinite;
}

@keyframes svgPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.japanese-letter.error {
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px dashed rgba(255, 0, 0, 0.3);
}

@media (prefers-contrast: high) {
    .japanese-letter-svg {
        filter: contrast(1.5);
    }
}

@media (prefers-reduced-motion: reduce) {
    .japanese-letter,
    .japanese-letter-svg-container,
    .japanese-letter-svg {
        transition: none;
        animation: none;
    }
}



.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity var(--transition-duration) ease;
}

.custom-cursor.show {
    opacity: 1;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 12px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.rotating-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    animation: rotate 8s linear infinite;
}

.rotating-text svg {
    width: 100%;
    height: 100%;
}

.rotating-text text {
    fill: rgba(255, 255, 255, 0.8);
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(-360deg); }
}



.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(50, 50, 50, 0.9);
    color: white;
    padding: 20px;
    border-radius: 8px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}



.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}



.high-contrast {
    --frame-border-width: 3px;
}

.high-contrast .border-corner {
    border-color: #ffffff;
    border-width: 3px;
}

.high-contrast .video-div::before {
    background: rgba(255, 255, 255, 0.1);
}


@media screen and (max-width: 1024px) and (min-width: 769px) {
    :root {
        --corner-size: 18px;
        --frame-border-width: 2.2px;
    }
    
    .frame {
        width: 85vmin;
        height: 18vmin;
    }
    
    .frame-text {
        font-size: 2.4vmin;
        line-height: 2.0;
        padding: 4vmin;
    }
    
    .content-row {
        gap: 3vmin;
        padding: 4vh 3vw;
    }
    
}

@media screen and (max-width: 768px) {
    :root {
        --corner-size: 15px;
        --frame-border-width: 2px;
    }
    
    html {
        height: calc(100% + 6svh);
        min-height: calc(100% + 6svh);
    }
    
    .hamburger {
        display: flex;
    }
    
    .frame {
        width: 90vmin;
        height: 12vmin;
    }

    .japanese-letter-svg {
        shape-rendering: optimizeSpeed;
    }

    .japanese-word {
        top: 50%;
    }
    
    .japanese-letter {
        font-size: 1.8rem;
    }
    
    .frame {
        width: 90vmin;
        height: 18vmin;
    }
    
    .frame-text {
        font-size: 3.2vmin;
        line-height: 1.8;
        padding: 2vmin;
    }

    .scroll-container {
        height: calc(var(--vh, 1vh) * 850);
    }

    .scrolling-content {
        top: calc(var(--vh, 1vh) * 680); 
    }
    
    .container-spacer {
        display: block;
    }

    #contentRow1 {
        padding-top: 0;
    }

    #contentRow2 {
    margin-bottom: calc(var(--vh, 1vh) * 30);    
    }

    
    .content-row {
        flex-direction: column;
        gap: 3vmin;
        padding: calc(var(--vh, 1vh) * 3) 4vw; 
        margin-bottom: 0vh;
        justify-content: center !important;
    }
    
    .content-row:nth-child(odd) .info-graphic-column {
        flex-direction: column-reverse;
    }
    
    
    .video-div, .info-div, .graphic-div {
        width: 100%;
    }
    
    .video-div {
        margin: 0 auto !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .video-div:hover::before {
        background-color: transparent;
    }
    
    .graphic-div {
        height: 60vw;
        max-height: 40vh;
    }
    
    .content-row:nth-child(even) .graphic-div img {
        transform: scale(1.3) translateY(-14vh);
    }
    
    .content-row:nth-child(odd) .graphic-div img {
        transform: scale(1.3) translateY(17vh);
    }
    
    .info-div {
        font-size: 4vmin;
        min-height: calc(var(--vh, 1vh) * 15); 
    }
    
    .text-char.larger-text {
        font-size: 5vmin;
    }
    
    .text-line {
        white-space: normal;
    }
    
    .english-subtitle {
        padding-top: 1vh;
    }
    
    .english-subtitle::before {
        transform: translateX(-58%) rotate(0deg);
        width: 365px;
        margin-top: 1vh;
    }
    
    
    .scroll-arrow {
        bottom: 1vh;
        font-size: 12px;
    }
    
    .scroll-arrow img {
        width: 16px;
        height: 32px;
    }
    
    .video-popup-content {
        width: 95%;
        max-width: none;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .close-popup {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    .footer-content2 {
        flex-direction: column;
        margin-top: calc(var(--vh, 1vh) * 15);

    }

    .footer-links-container {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }
    
    .footer-links-container ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        align-items: center;
        gap: 0.8rem;
    }
    
    .footer-links-container li {
        width: 100%;
        text-align: center;
    }
    
    .footer-links-container a {
        font-size: 0.9rem;
        display: block;
        padding: 0.8rem 1rem;
        white-space: normal;
        line-height: 1.4;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --corner-size: 12px;
        --frame-border-width: 1.5px;
    }

    .navbar a {
        font-size: 0.75rem;
    }
    
   .frame {
        width: 90vmin;
        height: 22vmin; 
    }
    
    .frame-text {
        font-size: 3vmin;
        padding: 3vmin;
        line-height: 1.6;
    }

    .scroll-container {
        height: calc(var(--vh, 1vh) * 800);
    }

    .scrolling-content {
        top: calc(var(--vh, 1vh) * 640); 
    }

    
    .content-row {
        gap: 2vmin;
        padding: 2vh 2vw;
        margin-bottom: 0;
    }
    
    
    .info-div {
        font-size: 5vmin;
    }
    
    .text-char.larger-text {
        font-size: 6vmin;
    }
    
    .english-subtitle {
        padding-top: 2vh;
    }
    
    .english-subtitle::before {
        transform: translateX(-53%) rotate(0deg);
        margin-top: 2vh;
        width: 370px;
    }

    .footer-content2 {
        margin-top: calc(var(--vh, 1vh) * 20); 

    }

    .footer-links-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .footer-links-container ul {
        gap: 0.6rem;
    }
    
    .footer-links-container a {
        font-size: 0.65rem;
        padding: 0.7rem 0rem;
    }

    .content-row:nth-child(odd) .graphic-div img {
        transform: scale(1.3) translateY(15vh);
    }
    
    .scroll-arrow {
        bottom: 3vh;
        font-size: 10px;
    }
    
    .scroll-arrow img {
        width: 14px;
        height: 28px;
    }

    .video-div img {
        max-width: 400px;
        height: auto;
    }
    
    .video-popup-content {
        width: 95%;
        margin: 15px;
        border-radius: 8px;
        max-height: calc(100vh - 30px);
    }
}

@media screen and (max-width: 384px) {
    .english-subtitle {
        font-size: 0.6rem;
    }
}

@media screen and (max-height: 500px) and (orientation: landscape) {
    .japanese-letter {
        font-size: 1.3rem;
    }
    
    .frame-text {
        font-size: 2.2vmin;
        line-height: 1.4;
    }
    
    .content-row {
        flex-direction: row;
        min-height: 70vh;
        gap: 2vmin;
    }
    
    .video-popup-content {
        width: 90%;
        height: 80vh;
        max-height: 80vh;
        aspect-ratio: 16/9;
        margin: 10px;
    }
    
    .close-popup {
        top: -35px;
        right: 0px;
    }

    .scroll-arrow img {
        width: 14px;
        height: 28px;
    }
}


@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
    
    .video-div:hover::before {
        background-color: transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .text-char {
        transition: opacity var(--transition-duration) ease;
        transform: none !important;
    }
    
    .rotating-text {
        animation: none;
    }
    
    .scroll-arrow {
        animation: none;
    }
}



@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .japanese-letter-svg {
        shape-rendering: geometricPrecision;
    }
}

@media (prefers-color-scheme: dark) {
    .japanese-letter-svg {
        fill: white;
        color: white;
    }
}


@media screen and (max-width: 1024px) and (min-width: 769px) {
    .footer-links-container {
        padding: 0 1.5rem;
    }
    
    .footer-links-container ul {
        gap: 1rem 2rem;
    }
    
    .footer-links-container a {
        font-size: 0.85rem;
    }
}



