@charset "UTF-8";

:root {
    --bg-color: #081021;
    /* 深い青みを帯びた夜空の色 */
    --text-color: #e6e9ed;
    /* 淡い月光色 */
    --accent-color: #d13028;
    /* 鮮やかな朱色 */
    --gold: #d4af37;
    /* 輝く黄金色 */
    --moon-light: rgba(212, 175, 55, .4);
    /* 月の柔らかな光 */
    --moon-base: #d9d0b8;
    /* 月の表面色 */
    --font-jp: 'Shippori Mincho', serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-jp);
    overflow: hidden;
    /* スクロール禁止 */
    height: 100vh;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 背景の夜空と満月演出 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 50% 50%, var(--moon-light) 0%, transparent 60%),
        radial-gradient(circle at 10% 20%, rgba(209, 48, 40, 0.05) 0%, transparent 30%);
    background-color: var(--bg-color);
    pointer-events: none;
    z-index: -1;
}

/* 言語切り替えロジック */
.lang-en {
    display: none;
}

body.en .lang-ja {
    display: none;
}

body.en .lang-en {
    display: inline;
}

p.lang-en {
    display: none;
}

body.en p.lang-en {
    display: block;
}

h1.vertical-text .lang-en {
    display: none;
}

body.en h1.vertical-text .lang-en {
    display: block;
}

#lang-switcher {
    position: fixed;
    top: 20px;
    left: 40px;
    z-index: 2000;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

#lang-switcher button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-family: var(--font-jp);
    transition: 0.3s;
    padding: 5px;
}

#lang-switcher button.active,
#lang-switcher button:hover {
    color: var(--accent-color);
    font-weight: bold;
}

#lang-switcher .separator {
    color: #ccc;
    margin: 0 5px;
}

.space-8{
    padding-top: 4px;
    padding-bottom: 4px;
}

.space-16{
    padding-top: 8px;
    padding-bottom: 8px;
}

/* ローディング画面 */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loader-content {
    text-align: center;
    width: 300px;
}

.loader-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    letter-spacing: 0.2em;
    color: var(--gold);
}

.progress-container {
    width: 100%;
    height: 2px;
    background: #333;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px var(--accent-color);
}

#progress-percent {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #888;
}

#main-content {
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    position: relative;
    min-height: 100vh;
    z-index: 100;
}

#main-content.visible {
    opacity: 1;
}

/* 年齢確認用ウィンドウ */
.age-gate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 16, 33, 0.98);
    backdrop-filter: blur(15px);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    transition: opacity 1.2s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

.age-gate-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.age-gate-modal .lang-ja,
.age-gate-modal .lang-en {
    display: block !important;
}

.age-gate-content {
    background: rgba(13, 13, 13, 0.9);
    padding: 60px 40px;
    border: 2px solid var(--accent-color);
    text-align: center;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(209, 48, 40, 0.3);
}

.age-gate-warning {
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.5em;
    margin-bottom: 20px;
}

.age-gate-content h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    letter-spacing: 0.2em;
    font-family: var(--font-jp);
}

.age-gate-content p {
    line-height: 1.8;
    margin-bottom: 30px;
}

.age-gate-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-confirm,
.btn-decline {
    padding: 15px 30px;
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    cursor: pointer;
    font-family: var(--font-jp);
    transition: 0.3s;
}

.btn-confirm {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-confirm:hover {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 20px var(--accent-color);
}

.btn-decline:hover {
    background: #444;
}

.age-gate-error {
    margin-top: 30px;
    color: #ff4d4d;
    padding: 20px;
    border-top: 1px solid #333;
}

/* 月・星・桜・波紋の背景演出 */
#moon {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 0;
    transition: all 1.2s cubic-bezier(0.76, 0, 0.24, 1);
    pointer-events: none;
}

/* 月の本体（擬似要素に分離してアニメーションと位置調整を独立させる） */
#moon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--moon-base);
    border-radius: 50%;
    background-image:
        radial-gradient(circle at 30% 20%, rgba(0, 0, 0, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 60% 40%, rgba(0, 0, 0, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 40% 70%, rgba(0, 0, 0, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.03) 0%, transparent 15%);
    box-shadow:
        inset -25px -25px 50px rgba(0, 0, 0, 0.1),
        inset 10px 10px 30px rgba(255, 255, 255, 0.8),
        0 0 100px var(--moon-light),
        0 0 200px rgba(255, 255, 255, 0.05);
    filter: blur(0.5px);
    transition: all 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

body.about-active #moon {
    top: 15%;
    transform: translate(-50%, -50%) scale(0.8);
}

body.about-active #moon::after {
    opacity: 1;
    filter: blur(0.5px);
}

body.artworks-active #moon {
    top: 40%;
    transform: translate(-50%, -50%) scale(1);
}

body.artworks-active #moon::after {
    filter: blur(2px) brightness(0.8);
    opacity: 0.7;
    /* 親のtransitionが終わる頃にアニメーションを開始 */
    animation: moonReflect 6s ease-in-out infinite alternate;
    animation-delay: 1.2s;
}

@keyframes moonReflect {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05) translateY(-20px) skew(1deg);
    }
}

#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.star {
    position: absolute;
    z-index: -1;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--duration) infinite ease-in-out var(--delay);
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: var(--opacity);
        transform: scale(1.2);
    }
}

#sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 1.5s ease;
}

body.links-active #sakura-container {
    opacity: 0;
    visibility: hidden;
}

.sakura {
    position: absolute;
    background: #fff9e6;
    border-radius: 100% 0 100% 100%;
    opacity: 0.8;
    box-shadow: 0 0 10px rgba(255, 249, 230, 0.5);
    animation:
        sakura-fall var(--fall-duration) linear forwards,
        sakura-sway var(--sway-duration) ease-in-out infinite alternate;
}

@keyframes sakura-fall {
    0% {
        top: -10%;
        transform: translateX(0) rotate(0deg);
    }

    100% {
        top: 110%;
        transform: translateX(var(--drift)) rotate(720deg);
    }
}

@keyframes sakura-sway {
    0% {
        margin-left: 0;
    }

    100% {
        margin-left: 50px;
    }
}

#ripple-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.5s ease;
}

body.artworks-active #ripple-container {
    opacity: 1;
}

.ripple {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    pointer-events: none;
    animation: ripple-animation 4s ease-out forwards;
}

@keyframes ripple-animation {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0);
    }

    100% {
        width: 800px;
        height: 800px;
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 縁側背景のスタイル */
#veranda-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.76, 0, 0.24, 1);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

body.about-active #veranda-container {
    opacity: 1;
}

.engawa-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: #0d0803;
    background-image: linear-gradient(to bottom, #2a1b0a 0%, #1a0f05 100%);
    box-shadow: inset 0 20px 30px rgba(0, 0, 0, 0.9);
    background-image:
        repeating-linear-gradient(90deg, transparent 0, transparent 40px, rgba(0, 0, 0, 0.3) 41px, transparent 42px),
        linear-gradient(to bottom, #2a1b0a 0%, #1a0f05 100%);
    z-index: 5;
    transform: translateY(100%);
    transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

body.about-active .engawa-floor {
    transform: translateY(0);
}

.engawa-roof {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: #1a0f05;
    background-image: linear-gradient(to bottom, #050a14 0%, #1a0f05 100%);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.9);
    z-index: 5;
    transform: translateY(-100%);
    transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

body.about-active .engawa-roof {
    transform: translateY(0);
}

.engawa-roof::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: #2a1b0a;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 1);
}

.engawa-oc {
    position: absolute;
    bottom: -50px;
    left: 25%;
    transform: translateX(-50%) translateY(30px);
    width: 600px;
    z-index: 6;
    opacity: 0;
    transition: all 1.5s cubic-bezier(0.76, 0, 0.24, 1);
    transition-delay: 0.8s;
    pointer-events: none;
}

body.about-active .engawa-oc {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.engawa-oc img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.8)) brightness(0.9);
}

/* LINKSセクション用：竹林と蛍 */
#bamboo-container {
    position: fixed;
    top: -10%;
    left: 0;
    width: 100%;
    height: 120%;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2s ease;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    filter: blur(2px);
    overflow: hidden;
}

body.links-active #bamboo-container {
    opacity: 0.6;
}

.bamboo {
    width: var(--width, 30px);
    height: var(--height, 100%);
    background: linear-gradient(to right, #050a14 0%, #0d1a33 50%, #050a14 100%);
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    transform: rotate(var(--rotate, 0deg));
}

/* 竹の節 */
.bamboo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(to bottom,
            transparent 0,
            transparent 15%,
            rgba(0, 0, 0, 0.5) 15.1%,
            transparent 15.2%);
}

#firefly-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

body.links-active #firefly-container {
    opacity: 1;
}

.firefly {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #d4ff80;
    border-radius: 50%;
    box-shadow: 0 0 10px #d4ff80, 0 0 20px #d4ff80;
    animation: firefly-move var(--duration) ease-in-out var(--delay) infinite alternate;
}

@keyframes firefly-move {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    50% {
        opacity: 1;
        transform: translate(var(--x1), var(--y1)) scale(1.2);
    }

    100% {
        transform: translate(var(--x2), var(--y2)) scale(0.8);
        opacity: 0.3;
    }
}

.shoji-left,
.shoji-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    height: 850px;
    background-image: url('../img/syouzi.jpg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 10;
    filter: brightness(0.3) contrast(1.2);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
    transition: all 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

.shoji-left {
    left: -120px;
    transform: translateY(-50%) translateX(-400px);
}

.shoji-right {
    right: -120px;
    transform: translateY(-50%) translateX(400px);
}

body.about-active .shoji-left,
body.about-active .shoji-right {
    transform: translateY(-50%) translateX(0);
}

/* ナビゲーション & メニュー */
#side-nav {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

#side-nav ul {
    list-style: none;
}

#side-nav li {
    margin: 20px 0;
    text-align: right;
}

#side-nav a {
    color: rgba(230, 233, 237, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: 0.3s;
    padding-right: 15px;
    border-right: 2px solid transparent;
}

#side-nav a:hover,
#side-nav a.active {
    color: var(--gold);
    border-right: 2px solid var(--accent-color);
    text-shadow: 0 0 10px var(--gold);
}

#menu-toggle {
    display: none;
    position: fixed;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 3000;
}

#menu-toggle span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--text-color);
    margin: 6px auto;
    transition: 0.3s;
}

#menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* セクション共通スタイル */
.section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease-in-out, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(30px) scale(0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 100px;
}

.section.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    position: relative;
    z-index: 5;
}

body.about-active #about.section.active {
    transition-delay: 1.2s;
}

.section-inner {
    width: 100%;
    max-width: 1200px;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.9), 2px 2px 5px rgba(0, 0, 0, 1);
    letter-spacing: 0.1em;
}

/* スクロールバーのカスタマイズ */
.section::-webkit-scrollbar {
    width: 6px;
}

.section::-webkit-scrollbar-track {
    background: transparent;
}

.section::-webkit-scrollbar-thumb {
    background: rgba(196, 48, 43, 0.3);
    border-radius: 10px;
}

.section::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* 各セクション固有スタイル */
.vertical-text {
    writing-mode: vertical-rl;
    font-family: 'Hannari', serif;
    font-size: 4.5rem;
    position: absolute;
    left: 0;
    top: 5px;
    height: 100%;
    letter-spacing: 0.5em;
    color: var(--text-color);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.8), 2px 2px 10px rgba(0, 0, 0, 0.9);
    z-index: 5;
}

.js-reveal span {
    opacity: 0;
    display: inline-block;
    transform: translateY(20px) scale(1.2);
    filter: blur(10px);
    transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-reveal.active span {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.main-visual {
    width: 100%;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-visual img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* スクロールボタンのスタイル */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
}

.scroll-indicator a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    opacity: 0.7;
}

.scroll-indicator a:hover {
    opacity: 1;
    color: var(--gold);
}

.scroll-indicator span {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-indicator .arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) rotate(45deg);
    }

    40% {
        transform: translateY(10px) rotate(45deg);
    }

    60% {
        transform: translateY(5px) rotate(45deg);
    }
}

#artworks.section {
    align-items: flex-start;
    padding: 120px 100px 60px;
    overflow-y: auto;
}

.year-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

@media (min-width: 1024px) {
    .year-filter {
        justify-content: flex-start;
    }
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 5px 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--gold);
    color: #050a14;
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    aspect-ratio: 16 / 9;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(230, 233, 237, 0.4);
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
    transition: 0.5s;
    cursor: pointer;
    /* border: 3px white solid; */
}

.gallery-item:hover {
    border-color: var(--accent-color);
    color: var(--gold);
    transform: translateY(-5px);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.gallery-item:hover::before {
    left: 100%;
}

.gallery-item.hidden{
    display: none;
}

.gallery-item img{
    width: 100%;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image-wrapper {
    display: inline-block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.about-image-wrapper:hover {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.1);
}

.about-image-wrapper img {
    width: auto;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-text p {
    line-height: 2;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-name {
    font-family: 'Hannari', serif;
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    border-left: 5px solid var(--accent-color);
    padding-left: 20px;
    line-height: 1;
}

.warning-tag {
    display: inline-block;
    padding: 5px 15px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: bold;
}

.link-list {
    list-style: none;
    margin-top: 40px;
}

.link-list li {
    margin: 15px 0;
}

.link-list a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 400px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.link-list a:hover {
    background: var(--gold);
    color: #050a14;
    padding-left: 30px;
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold);
}

/* 墨の一筆書きエフェクト */
#ink-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

#ink-transition.active {
    opacity: 1;
}

.ink-stroke {
    width: 100%;
    height: 100%;
    fill: #1a1a1a;
    transform-origin: center;
    transform: scaleX(0);
    transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
}

#ink-transition.animate .ink-stroke {
    transform: scaleX(1.5);
}

/* タブレット対応 (1024px以下) */
@media (max-width: 1024px) {
    #side-nav {
        position: fixed;
        right: -100%;
        top: 0;
        width: 100%;
        height: 100%;
        background: rgba(8, 16, 33, 0.95);
        backdrop-filter: blur(10px);
        transform: none;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.76, 0, 0.24, 1);
        z-index: 2000;
    }

    #side-nav.active {
        right: 0;
    }

    #side-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    #side-nav a {
        font-size: 1.5rem;
    }

    #menu-toggle {
        display: block !important;
        right: 30px;
        top: 30px;
        z-index: 4000;
    }

    .about-container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .about-name {
        font-size: 2.2rem;
    }

    .section {
        padding: 0 50px;
    }

    .engawa-oc {
        width: 650px;
        /* 主様による調整値 */
        bottom: -80px;
        left: 35%;
    }

    .shoji-left,
    .shoji-right {
        height: 120vh;
        width: 450px;
    }

    body.about-active .shoji-left {
        transform: translateY(-50%) translateX(-150px);
    }

    body.about-active .shoji-right {
        transform: translateY(-50%) translateX(150px);
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .link-list a {
        padding: 15px 25px;
        font-size: 1.1rem;
    }
}

/* 900px以下で1カラムへ */
@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr;
        max-height: 70vh;
        overflow-y: auto;
        padding-right: 15px;
    }
}

/* モバイル対応 (768px以下) */
@media (max-width: 768px) {
    #moon {
        width: 380px;
        height: 380px;
        top: 35%;
        opacity: 0.95;
    }

    .engawa-oc {
        width: 450px;
        bottom: 0px;
        left: 30%;
    }

    .shoji-left {
        left: -50px;
        transform: translateY(-50%) translateX(-300px);
    }

    .shoji-right {
        right: -50px;
        transform: translateY(-50%) translateX(300px);
    }

    body.about-active .shoji-left {
        transform: translateY(-50%) translateX(-200px);
    }

    body.about-active .shoji-right {
        transform: translateY(-50%) translateX(200px);
    }

    .engawa-floor {
        height: 180px;
    }

    .engawa-roof {
        height: 80px;
    }

    .shoji-left,
    .shoji-right {
        width: 320px;
        height: 120%;
        z-index: 10;
    }

    .vertical-text {
        font-size: 2.5rem;
        left: 20px;
        top: 70px;
        letter-spacing: 0.3em;
    }

    .main-visual {
        height: 75vh;
        overflow: hidden;
    }

    .main-visual img {
        width: 100%;
        height: auto;
        max-height: 70vh;
        object-fit: contain;
        transform: none;
    }

    .section {
        padding: 60px 0px;
        align-items: flex-start;
        overflow-y: auto;
    }

    .section#about,
    .section#artworks,
    .section#links {
        padding: 60px 20px;
    }

    .section-inner {
        padding-top: 40px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .about-text p {
        font-size: 1rem;
        line-height: 1.8;
        margin-bottom: 15px;
    }

    .link-list li {
        text-align: center;
    }

    .link-list a {
        font-size: 1rem;
        padding: 12px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    #lang-switcher {
        left: 20px;
        top: 20px;
    }

    #menu-toggle {
        right: 20px;
        top: 20px;
    }
}

/* 小さなスマホ用 (480px以下) */
@media (max-width: 480px) {

    .shoji-left,
    .shoji-right {
        width: 180px !important;
    }

    .shoji-left {
        left: -50px !important;
    }

    .shoji-right {
        right: -50px !important;
    }

    body.about-active .shoji-left {
        transform: translateY(-50%) translateX(-80px) !important;
    }

    body.about-active .shoji-right {
        transform: translateY(-50%) translateX(80px) !important;
    }

    .engawa-oc {
        width: 500px !important;
        /* 主様による調整値 */
        left: 30% !important;
        bottom: -40px !important;
    }

    #about.section {
        padding: 0 40px !important;
    }
}

/* WQHD & 4K (1921px以上) */
@media (min-width: 1921px) {
    .section-inner {
        max-width: 1600px;
    }

    .section-title {
        font-size: 3.5rem;
        margin-bottom: 60px;
    }

    /* 背景要素のスケーリング */
    #moon {
        width: 850px;
        height: 850px;
    }

    .engawa-oc {
        width: 800px;
        bottom: -60px;
        left: 30%;
    }

    .shoji-left,
    .shoji-right {
        width: 650px;
        height: 120vh;
    }

    .shoji-left {
        left: -200px;
    }

    .shoji-right {
        right: -200px;
    }

    .engawa-floor {
        height: 200px;
    }

    .engawa-roof {
        height: 130px;
    }

    /* テキストのスケーリング */
    .vertical-text {
        font-size: 6rem;
    }

    .about-name {
        font-size: 4rem;
    }

    .about-text p {
        font-size: 1.4rem;
        line-height: 2.2;
    }

    .link-list a {
        font-size: 1.5rem;
        max-width: 500px;
        padding: 15px 30px;
    }

    /* ギャラリーの調整 */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 40px;
    }

    /* UI要素の配置微調整 */
    #lang-switcher {
        top: 40px;
        left: 60px;
        font-size: 1rem;
    }

    #side-nav {
        right: 60px;
    }

    #side-nav a {
        font-size: 1.1rem;
    }
}