/* =========================================
   1. Base Settings & Variables
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg-color: #FAF9F7;
    --text-color: #2b2b2b;
    --accent-color: #8C3A3A;
    --line-color: #E0E0E0;
    --footer-bg: #1a1a1a;
    --footer-text: #f0f0f0;
    --font-main: 'DM Sans', "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
    --font-size-base: clamp(15px, 2vw, 18px);
}

body {
    margin: 0; padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

/* Worksページ用: スクロール制御のためoverflow隠す */
body.works-page-body {
    overflow: hidden;
    background-color: #f4f4f4;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; margin: 0; }


/* =========================================
   2. Opening Animation
   ========================================= */
.opening-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #fff;
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    animation: openingSequence 4.5s ease-in-out 0s 1 forwards;
    pointer-events: none;
}
.opening-overlay.hidden { display: none; }

.opening-title {
    color: #333;
    font-family: var(--font-main); font-weight: 700;
    letter-spacing: 4px;
    font-size: 1.8rem;
    opacity: 0;
    animation: textFadeInOut 4s ease-in-out 0s 1 forwards;
}

@keyframes openingSequence {
    0%, 85% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}
@keyframes textFadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    25%, 75% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}


/* =========================================
   3. Header & Navigation
   ========================================= */
.site-header {
    padding: 30px 40px;
    display: flex; justify-content: space-between; align-items: center;
    position: fixed; top: 0; left: 0; width: 100%; box-sizing: border-box;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.brand-name {
    font-size: 1.5rem; font-weight: 700; letter-spacing: 1px; margin: 0;
    color: #fff; text-transform: uppercase;
    transition: color 0.3s ease;
    z-index: 1002;
}

.site-nav { display: flex; align-items: center; }
.site-nav ul { display: flex; gap: 40px; align-items: center; }
.site-nav a {
    font-size: 1rem;
    font-weight: 700; color: #fff; letter-spacing: 1px;
    text-transform: uppercase; opacity: 1;
    transition: color 0.3s ease, opacity 0.3s ease;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.site-nav a:hover { opacity: 0.7; }
.icon-link svg { width: 22px; height: 22px; fill: #fff; transition: fill 0.3s ease; }

/* Scrolled State */
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); padding: 20px 40px;
}
.site-header.scrolled .brand-name { color: #2b2b2b; }
.site-header.scrolled .site-nav a { color: #2b2b2b; text-shadow: none; }
.site-header.scrolled .icon-link svg { fill: #2b2b2b; }

/* Hamburger Button */
.hamburger {
    display: none; cursor: pointer; z-index: 1002;
    width: 30px; height: 24px; position: relative;
}
.hamburger span {
    display: block; position: absolute; height: 2px; width: 100%;
    background: #fff; border-radius: 2px; transition: .3s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { top: 22px; }

.site-header.scrolled .hamburger span { background: #2b2b2b; box-shadow: none; }

.hamburger.active span:nth-child(1) { top: 11px; transform: rotate(45deg); background: #2b2b2b; box-shadow: none; }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { top: 11px; transform: rotate(-45deg); background: #2b2b2b; box-shadow: none; }


/* =========================================
   4. Hero Section
   ========================================= */
.hero-section {
    position: relative; width: 100%;
    height: 70vh;
    min-height: 500px;
    overflow: hidden; background-color: #111;
}
.hero-slider { width: 100%; height: 100%; position: relative; }
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; 
    opacity: 0; transition: opacity 2s ease-in-out;
}
.slide.active { opacity: 1; z-index: 2; }


/* =========================================
   5. Section Common & Grids
   ========================================= */
.section-container {
    padding: 120px 6%;
    max-width: 1600px; margin: 0 auto;
    scroll-margin-top: 100px;
}
.collection-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 40px; border-bottom: 2px solid var(--line-color);
    padding-bottom: 20px; flex-wrap: wrap; gap: 20px;
}
.section-title {
    font-family: var(--font-main); font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    font-size: 2.5rem;
    margin: 0; color: var(--text-color);
}

/* Controls & Switch */
.header-controls { display: flex; align-items: center; gap: 30px; }
.control-label {
    font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 1px;
    margin-right: 10px; color: #555; font-weight: 600;
}
.toggle-wrapper { display: flex; align-items: center; }
.toggle-switch { position: relative; width: 50px; height: 26px; display: inline-block; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: transparent; border: 2px solid #999;
    border-radius: 30px; transition: .4s;
}
.slider:before {
    position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px;
    background-color: #999; border-radius: 50%; transition: .4s;
}
input:checked + .slider:before { transform: translateX(24px); background-color: var(--accent-color); }
input:checked + .slider { border-color: var(--accent-color); }

/* Grids */
.day-night-grid { 
    display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); 
    width: 100% !important; margin-left: 0 !important; transform: none !important;
}
.grid-drum { 
    display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); 
    width: 100% !important; margin-left: 0 !important; transform: none !important;
}
#section-1994 .grid-1994 { 
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; 
    width: 100% !important; margin-left: 0 !important; transform: none !important;
}

.img-box, .blog-thumb {
    position: relative; background: #E0E0E0; color: #888;
    display: flex; justify-content: center; align-items: center;
    font-weight: 700; letter-spacing: 1px; transition: all 0.5s ease; overflow: hidden;
}
.img-box img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.5s ease; }

.day-night-grid .img-box { aspect-ratio: 1 / 1; }
.grid-drum .img-box { aspect-ratio: 3 / 2; } 
.grid-1994 .img-box { aspect-ratio: 16 / 9; font-size: 1.5rem; }

.img-box.day-night-box.is-night { background: #1a1a2e; color: #fff; }
.img-box.day-night-box.is-night img { opacity: 0.5; }

.grid-item { position: relative; }
.item-info { font-size: 0.95rem; font-weight: 500; color: #444; letter-spacing: 0.5px; margin-top: 8px; }

/* 1994 View More */
.works-wrapper {
    position: relative; width: 100%; max-height: 40vw; 
    overflow: hidden; transition: max-height 0.8s ease;
}
.works-wrapper.is-expanded { max-height: 5000px; }
.fade-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 150px;
    background: linear-gradient(to bottom, rgba(250, 249, 247, 0), rgba(250, 249, 247, 1));
    z-index: 2; pointer-events: none; transition: opacity 0.5s;
}
.works-wrapper.is-expanded .fade-overlay { opacity: 0; }
.more-btn-container { margin-top: -20px; position: relative; z-index: 3; text-align: center; }
.view-more-action-btn {
    background-color: transparent; border: none; border-bottom: 2px solid #2b2b2b;
    color: #2b2b2b; font-family: var(--font-main); font-size: 1rem; font-weight: 600;
    letter-spacing: 2px; padding-bottom: 5px; cursor: pointer; text-transform: uppercase;
    transition: all 0.3s ease;
}
.view-more-action-btn:hover { color: var(--accent-color); border-color: var(--accent-color); }
.archive-note {
    font-size: 0.85rem; color: #999; margin: -20px 0 30px;
    font-weight: 500; letter-spacing: 0.5px; text-align: left;
}


/* =========================================
   6. DailyDiary List & Article
   ========================================= */
.blog-list { display: flex; flex-direction: column; max-width: 900px; margin: 0 auto; }
.blog-item {
    display: flex; align-items: center; gap: 30px; padding: 25px 0;
    border-bottom: 1px solid #eee; cursor: pointer; transition: background-color 0.2s ease;
}
.blog-item:hover { background-color: #fcfcfc; }
.blog-thumb { width: 150px; aspect-ratio: 3 / 2; flex-shrink: 0; border-radius: 4px; font-size: 0.9rem; }
.blog-item:hover .blog-thumb { transform: scale(1.05); }
.blog-info { flex: 1; }
.blog-date { font-size: 0.85rem; color: #888; display: block; margin-bottom: 8px; font-weight: 500; }
.blog-title {
    font-size: 1.3rem; font-weight: 600; margin: 0;
    font-family: var(--font-main); color: var(--text-color); line-height: 1.4;
}
.btn-container { margin-top: 60px; text-align: center; }
.view-all-btn {
    font-size: 1rem; font-weight: 600;
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 6px; letter-spacing: 2px; text-transform: uppercase;
}
.view-all-btn:hover { color: var(--accent-color); border-color: var(--accent-color); }

/* Diary Page */
.diary-header { padding-top: 150px; text-align: center; margin-bottom: 80px; }
.diary-title-main { font-size: 3rem; font-family: var(--font-serif); letter-spacing: 2px; font-weight: 400; margin-bottom: 20px; }
.diary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px; max-width: 1200px; margin: 0 auto 100px; padding: 0 6%; }
.diary-card { display: block; text-decoration: none; color: var(--text-color); transition: transform 0.3s ease, opacity 0.3s ease; }
.diary-card:hover { transform: translateY(-5px); opacity: 0.9; }
.diary-card-thumb { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background-color: #eee; border-radius: 4px; margin-bottom: 15px; }
.diary-card-date { font-size: 0.85rem; color: #888; display: block; margin-bottom: 5px; font-family: var(--font-main); }
.diary-card-title { font-size: 1.2rem; font-weight: 600; line-height: 1.4; margin: 0; font-family: var(--font-serif); }

.article-container { max-width: 800px; margin: 150px auto 100px; padding: 0 20px; }
.article-header { text-align: center; margin-bottom: 80px; }
.article-date { display: block; color: #888; margin-bottom: 10px; font-family: var(--font-main); }
.article-title { font-size: 2.5rem; font-family: var(--font-serif); font-weight: 400; line-height: 1.2; margin: 0; }
.diary-block { margin-bottom: 60px; }
.block-text { 
    font-family: 'Cormorant Garamond', 'Yu Mincho', serif; font-size: 1rem; line-height: 2; 
    color: #333; font-feature-settings: "palt"; text-align: justify; 
}
.block-text p { margin-bottom: 1.5em; }
.block-image-full img { width: 100%; height: auto; display: block; border-radius: 2px; }
.caption { font-size: 0.8rem; color: #888; margin-top: 10px; text-align: center; }
.block-split { display: flex; align-items: center; gap: 40px; }
.block-split img { width: 50%; height: auto; object-fit: cover; border-radius: 2px; }
.split-text { width: 50%; font-size: 0.95rem; line-height: 1.9; font-family: 'Cormorant Garamond', serif; }
.block-split.reverse { flex-direction: row-reverse; }

.smart-gallery { display: grid; gap: 10px; width: 100%; }
.smart-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; transition: opacity 0.3s; }
.smart-gallery img:hover { opacity: 0.9; }
.smart-gallery[data-count="2"] { grid-template-columns: 1fr 1fr; aspect-ratio: 16/9; }
.smart-gallery[data-count="3"] { grid-template-columns: 1fr 1fr 1fr; aspect-ratio: 5/2; }
.smart-gallery[data-count="4"] { grid-template-columns: 1fr 1fr; aspect-ratio: 1/1; }
.smart-gallery[data-count="5"] { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr); aspect-ratio: 16/9; }
.smart-gallery[data-count="5"] img:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }


/* =========================================
   7. Footer
   ========================================= */
.site-footer {
    background-color: var(--footer-bg); color: var(--footer-text);
    padding: 100px 6% 50px; margin-top: 150px;
}
.footer-content { max-width: 800px; margin: 0 auto 80px; }
.footer-links { display: flex; flex-direction: column; width: 100%; }
.footer-link-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 25px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.4rem; font-weight: 300; transition: padding-left 0.3s;
    color: #f0f0f0;
}
.footer-link-item:first-child { border-top: 1px solid rgba(255,255,255,0.1); }
.footer-link-item:hover { padding-left: 20px; background-color: rgba(255,255,255,0.05); }
.link-arrow { font-size: 1rem; opacity: 0.6; transition: transform 0.3s; }
.footer-link-item:hover .link-arrow { transform: translate(5px, -5px); opacity: 1; }
.copyright {
    text-align: center; font-size: 0.85rem; color: #777;
    border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px;
}


/* =========================================
   8. About Page
   ========================================= */
.about-container { padding: 180px 6% 100px; max-width: 800px; margin: 0 auto; display: block; }
.about-video-placeholder {
    width: 100%; aspect-ratio: 16 / 9; background-color: #E0E0E0;
    display: flex; justify-content: center; align-items: center;
    color: #888; font-weight: 700; letter-spacing: 1px;
    margin-bottom: 60px; border-radius: 4px; overflow: hidden;
}
.about-video-placeholder video { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-header { margin-bottom: 50px; }
.about-name-jp { font-size: 1.4rem; font-weight: 700; margin: 0 0 5px; letter-spacing: 2px; }
.bio-block { margin-bottom: 60px; }

.bio-text {
    font-size: 0.95rem; line-height: 2; color: #444; text-align: left;
    font-feature-settings: "palt"; font-weight: 500; font-family: var(--font-main);
}
.en-text { font-size: 0.95rem; letter-spacing: 0.2px; }

.bio-list {
    display: grid; grid-template-columns: 3.5em 1fr; gap: 0 1.5em; margin-bottom: 2em;
    font-family: var(--font-main); color: #444; font-size: 0.95rem; font-weight: 500;
}
.bio-dt { font-weight: 500; font-feature-settings: "palt"; text-align: right; }
.bio-dd { margin: 0; margin-bottom: 1em; font-weight: 500; line-height: 2; text-align: left; font-feature-settings: "palt"; }

.about-footer-info {
    border-top: 2px solid var(--text-color); padding-top: 50px;
    display: flex; gap: 60px; flex-wrap: wrap; margin-top: 100px;
}
.about-footer-info h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 15px; font-weight: 700; }
.about-footer-info p { margin: 0; font-size: 1rem; }
.about-footer-info a { text-decoration: underline; text-underline-offset: 4px; transition: color 0.3s; }
.about-footer-info a:hover { color: var(--accent-color); }

.about-contact-section { margin-top: 120px; padding-top: 80px; border-top: 1px solid #eee; }
.contact-heading { font-size: 1.2rem; font-family: var(--font-main); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 30px; text-align: center; }
.contact-message-text {
    text-align: center; font-size: 0.95rem; line-height: 2; margin-bottom: 50px;
    font-weight: 500; color: #444; font-family: var(--font-main);
}
.contact-message-text .en { font-size: 0.85rem; color: #888; font-weight: 400; display: block; margin-top: 5px; font-family: var(--font-main); }
.contact-form-box { max-width: 700px; margin: 0 auto; }
.input-row { display: flex; gap: 30px; margin-bottom: 30px; }
.input-group { flex: 1; display: flex; flex-direction: column; }
.contact-form-box label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: #999; margin-bottom: 8px; font-weight: 600; font-family: var(--font-main); }
.contact-form-box input, .contact-form-box textarea {
    border: none; border-bottom: 1px solid #ddd; background: transparent; padding: 10px 0;
    font-size: 1rem; color: var(--text-color); transition: border-color 0.3s; border-radius: 0;
    font-family: var(--font-main);
}
.contact-form-box input:focus, .contact-form-box textarea:focus { outline: none; border-bottom-color: var(--accent-color); }
.form-submit-area { text-align: center; margin-top: 50px; }
.submit-btn {
    background: transparent; border: none; border-bottom: 2px solid var(--text-color);
    padding-bottom: 5px; font-size: 1rem; font-weight: 600; letter-spacing: 2px;
    cursor: pointer; transition: all 0.3s; font-family: var(--font-main); text-transform: uppercase; color: var(--text-color);
}
.submit-btn:hover { color: var(--accent-color); border-color: var(--accent-color); }
.form-status-message { margin-top: 30px; text-align: center; font-size: 0.95rem; font-weight: 700; font-family: var(--font-main); min-height: 1.5em; transition: opacity 0.3s ease; }
.form-status-message.success { color: var(--text-color); }
.form-status-message.error { color: #c0392b; }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.mail-icon-only { display: inline-block; color: var(--text-color); transition: all 0.3s ease; margin-top: -5px; }
.mail-icon-only svg { width: 32px; height: 32px; }
.mail-icon-only:hover { color: var(--accent-color); transform: scale(1.1); }


/* =========================================
   9. Works Detail Overlay & Common UI
   ========================================= */
#work-detail-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #fff; z-index: 2000; overflow-y: auto;
    opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; padding: 0;
}
#work-detail-overlay.active { opacity: 1; visibility: visible; }

/* 閉じるボタン */
#close-detail {
    position: fixed; top: 110px; right: 40px; z-index: 2001;
    background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(5px);
    border: 1px solid #333; color: #333;
    font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 700;
    letter-spacing: 2px; padding: 10px 24px; border-radius: 30px;
    cursor: pointer; transition: all 0.3s ease; text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
#close-detail:hover { background: #333; color: #fff; transform: translateY(-2px); }

.detail-content { max-width: 1400px; margin: 0 auto; padding: 120px 6% 100px; position: relative; }
.detail-text-area { text-align: center; margin-bottom: 80px; max-width: 800px; margin-left: auto; margin-right: auto; }
#detail-title { font-family: var(--font-serif); font-size: 2.5rem; margin-bottom: 10px; }
#detail-date { font-family: var(--font-main); color: #888; margin-bottom: 20px; letter-spacing: 1px; }
#detail-meta { font-size: 0.85rem; color: #555; margin-bottom: 30px; font-family: var(--font-main); }
#detail-desc { max-width: 600px; margin: 0 auto; line-height: 1.8; color: #333; }

/* Masonry Layout */
.album-gallery { column-count: 3; column-gap: 20px; width: 100%; }
.album-item { break-inside: avoid; margin-bottom: 20px; opacity: 0; animation: fadeUp 0.6s ease forwards; }
.album-item img { width: 100%; height: auto; display: block; border-radius: 4px; transition: transform 0.3s ease, filter 0.3s ease; }
.album-item img:hover { transform: scale(1.02); filter: brightness(1.05); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Password Modal */
#password-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    z-index: 3000; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s;
}
#password-modal.active { opacity: 1; visibility: visible; }
.modal-box { background: #fff; padding: 50px; width: 90%; max-width: 400px; text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.2); border-radius: 4px; }
.modal-msg { font-family: var(--font-main); font-weight: 700; margin-bottom: 20px; letter-spacing: 2px; }
#unlock-pass { width: 100%; padding: 10px; margin-bottom: 20px; border: 1px solid #ddd; text-align: center; font-size: 1.2rem; }
#unlock-btn { width: 100%; padding: 12px; background: #333; color: #fff; border: none; font-weight: 700; cursor: pointer; letter-spacing: 1px; }
#close-modal { margin-top: 15px; background: none; border: none; text-decoration: underline; cursor: pointer; color: #888; }
.error-msg { color: #c0392b; font-size: 0.8rem; margin-top: 10px; min-height: 1.2em; }


/* =========================================
   10. Film Library
   ========================================= */
.film-page-container { padding-top: 150px; min-height: 100vh; background-color: var(--bg-color); }
.film-header { text-align: center; margin-bottom: 80px; }
.film-title { font-family: 'Cormorant Garamond', serif; font-size: 3rem; font-weight: 400; color: var(--text-color); }
.film-header p { color: #888; font-family: 'DM Sans', sans-serif; }
.film-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); align-items: end; gap: 40px;
    max-width: 1200px; margin: 0 auto; padding: 0 6% 100px;
}
.film-item-container {
    perspective: 1000px; width: 100%; aspect-ratio: 3 / 2; cursor: pointer;
    position: relative; display: flex; justify-content: center; align-items: center;
}
.film-box-face {
    width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 2;
    transform-origin: bottom center; box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-radius: 2px; transition: transform 0.3s ease;
}
.film-canister-element {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
    width: 60px; z-index: 1; opacity: 1; pointer-events: none; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.film-item-container:hover .film-canister-element { transform: translate(-50%, -85%) scale(0.6) rotate(0deg); }
a.film-item-container { display: block; text-decoration: none; color: inherit; transition: transform 0.3s ease; }
a.film-item-container:hover { transform: translateY(-5px); }
a.film-item-container:hover .film-canister-element { transform: translate(-50%, -85%) scale(0.6) rotate(0deg) !important; }
#index-film-grid {
    display: grid; grid-template-columns: repeat(4, 1fr) !important; gap: 20px !important;
    width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important;
}

/* Film Viewer */
.film-viewer {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: rgba(255, 255, 255, 0.98); z-index: 9999;
    display: flex; visibility: hidden; opacity: 0; transition: opacity 0.5s;
}
.film-viewer.active { visibility: visible; opacity: 1; }
.canister-dock-container {
    width: 300px; height: 100%; background-color: #f4f4f4; border-right: 1px solid #ddd;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; z-index: 10; flex-shrink: 0;
}
.active-canister-dock { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.active-canister-dock img {
    width: 140px !important; height: auto !important; position: static !important;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3)); transform: translate(0, 0) scale(1) rotate(-90deg) !important;
}
.close-btn {
    position: absolute; bottom: 40px; background: transparent; border: 1px solid #333; color: #333;
    padding: 12px 30px; cursor: pointer; transition: all 0.3s;
    font-family: 'DM Sans', sans-serif; font-size: 0.9rem; letter-spacing: 1px;
}
.close-btn:hover { background: #333; color: #fff; border-color: #333; }
.film-strip-wrapper { flex: 1; height: 100%; overflow-x: auto; overflow-y: hidden; display: flex; align-items: center; background-color: #fff; cursor: grab; }
.film-strip-wrapper:active { cursor: grabbing; }
.film-strip-track { 
    display: flex;
     height: 400px; 
     padding-left: 50px; 
     padding-right: 50px; 
     transform: translateX(0); 
    
    }
.strip-frame {
    height: 100%; aspect-ratio: 3 / 2; padding: 45px 20px; background-color: #000;
    position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center; margin-right: 2px;
}
.strip-frame.vertical { aspect-ratio: 2 / 3; }
.strip-frame::before, .strip-frame::after {
    content: ""; position: absolute; left: 0; width: 100%; height: 20px;
    background-image: repeating-linear-gradient(90deg, transparent 0, transparent 8px, #fff 8px, #fff 16px, transparent 16px, transparent 24px); opacity: 0.7;
}
.strip-frame::before { top: 12px; }
.strip-frame::after { bottom: 12px; }
.strip-photo { height: 100%; width: auto; object-fit: contain; border: 2px solid #000; filter: contrast(1.1); }

.view-mode-toggle {
    position: absolute; top: 40px; left: 40px; z-index: 1002;
    display: flex; gap: 8px; background: rgba(0, 0, 0, 0.3); border-radius: 8px; padding: 6px;
    backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.1);
}
.toggle-btn {
    background: none; border: none; color: rgba(255, 255, 255, 0.4);
    width: 36px; height: 36px; border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.3s ease;
}
.toggle-btn:hover { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.8); }
.toggle-btn.active { background: rgba(255, 255, 255, 0.9); color: #333; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

#film-viewer.view-mode-grid .film-strip-wrapper {
    overflow-x: hidden; overflow-y: auto; flex-direction: column; align-items: center;
    padding-top: 100px; padding-bottom: 100px; height: 100%; display: flex;
}
#film-viewer.view-mode-grid #film-strip-track {
    display: grid; grid-template-columns: repeat(5, 1fr); column-gap: 0; row-gap: 15px;
    width: 95%; max-width: 1400px; height: auto !important; transform: none !important; margin: 0 auto; padding: 0;
}
#film-viewer.view-mode-grid .strip-frame {
    width: 100% !important; height: auto !important; margin: 0; padding: 0;
    grid-column: span 1 !important; opacity: 1 !important; visibility: visible !important;
    transform: none !important; aspect-ratio: 1.5; background-color: #111;
    border-radius: 0; box-shadow: none; border: none;
    position: relative; display: flex; align-items: center; justify-content: center;
    padding: 8% 2%; box-sizing: border-box;
}
#film-viewer.view-mode-grid .strip-frame::before,
#film-viewer.view-mode-grid .strip-frame::after {
    content: ""; display: block; position: absolute; left: 0; width: 100%; height: 8%;  
    background-image: linear-gradient(to right, transparent 15%, rgba(255,255,255,0.4) 15%, rgba(255,255,255,0.4) 30%, transparent 30%, transparent 45%);
    background-size: 16px 100%; background-repeat: repeat-x; background-position: left center;
    pointer-events: none; z-index: 10;
}
#film-viewer.view-mode-grid .strip-frame::before { top: 2%; }
#film-viewer.view-mode-grid .strip-frame::after { bottom: 2%; }
#film-viewer.view-mode-grid .strip-photo { width: 95%; height: 100%; object-fit: cover; border: 1px solid #000; background-color: #000; border-radius: 1px; }

/* =========================================
   Image Modal (Lightbox) & Swipe
   ========================================= */
.image-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95); z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: grab; /* スワイプできることを示唆 */
    touch-action: pan-y; /* 縦スクロールは許可、横はJSで制御 */
}
.image-modal.active { opacity: 1; visibility: visible; }

.image-modal img {
    max-width: 95%; max-height: 90vh; 
    object-fit: contain; 
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    transform: scale(0.95); 
    transition: transform 0.3s ease, opacity 0.2s ease; 
    border: 1px solid #333;
    user-select: none; /* 画像選択を防ぐ */
    pointer-events: none; /* 画像自体へのタッチイベントを親に透過させる */
}
.image-modal.active img { transform: scale(1); }

/* モーダル内のローディング表示 */
.modal-loader {
    position: absolute; color: #fff; font-family: var(--font-main);
    font-size: 0.9rem; letter-spacing: 2px;
}

/* =========================================
   11. Drum Page
   ========================================= */
.drum-page { background-color: #fff; color: #333; }
.drum-content { max-width: 1000px; margin: 0 auto; padding: 120px 20px 100px; }
.current-band { margin-bottom: 150px; text-align: center; }
.band-hero img {
    width: 100%; height: auto; max-height: 60vh; object-fit: cover;
    border-radius: 2px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); margin-bottom: 30px;
}
.band-name { font-size: 2.5rem; font-weight: 500; letter-spacing: 0.2em; margin-bottom: 0.5rem; }
.band-role { font-size: 0.9rem; color: #666; margin-bottom: 2rem; font-family: 'Inter', sans-serif; }
.social-links { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.sns-link {
    display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 50%;
    background-color: #fff; color: #2b2b2b; border: 1px solid #2b2b2b; transition: all 0.3s ease;
}
.sns-link svg { width: 20px; height: 20px; stroke-width: 1.5; }
.sns-link:hover { background-color: #2b2b2b; color: #fff; transform: translateY(-3px); }

.history-section { margin-bottom: 100px; width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; }
.history-section .section-title { max-width: 1000px; margin: 0 auto 2rem; padding-left: 20px; text-align: left; }
.past-band-group { margin-bottom: 80px; }
.past-band-name {
    font-size: 1.1rem; margin-bottom: 20px; font-weight: 400;
    max-width: 1000px; margin-left: auto; margin-right: auto; padding-left: 20px; text-align: left;
}
.marquee-wrap { width: 100%; overflow: hidden; padding: 20px 0; background-color: #fff; }
.marquee-track { display: flex; width: max-content; gap: 20px; animation: marquee-scroll 40s linear infinite; }
.marquee-track.slow-reverse { animation-direction: reverse; }
.marquee-track:hover { animation-play-state: paused; }
.marquee-item { flex-shrink: 0; }
.marquee-item img {
    height: 250px; width: auto; object-fit: cover; border-radius: 2px;
    filter: grayscale(100%); transition: filter 0.3s ease, transform 0.3s ease; display: block;
}
.marquee-item img:hover {
    filter: grayscale(0%); transform: scale(1.05); z-index: 2; position: relative; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.band-search-link {
    color: #333; text-decoration: none; position: relative; transition: color 0.3s ease; display: inline-flex; align-items: center; gap: 8px;
}
.band-search-link:hover { color: #000; text-decoration: underline; text-underline-offset: 4px; }
.band-search-link:hover .link-arrow { transform: translate(3px, -3px); color: #333; }

.gear-section { max-width: 800px; margin: 0 auto; }
.gear-intro { font-size: 0.9rem; color: #888; margin-bottom: 30px; font-family: 'Inter', sans-serif; font-style: italic; }
.gear-list { list-style: none; border-top: 1px solid #eee; }
.gear-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; border-bottom: 1px solid #eee;
    text-decoration: none; color: #333; transition: background-color 0.2s;
}
.gear-item:hover { background-color: #fafafa; padding-left: 10px; }
.gear-name { font-weight: 500; }
.gear-category { font-size: 0.8rem; color: #999; }


/* =========================================
   12. Clap Button
   ========================================= */
.clap-section { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 80px 0 40px; position: relative; height: 120px; }
.clap-btn {
    width: 70px; height: 70px; border-radius: 50%; background-color: #fff; border: 1px solid #ddd; color: #888;
    cursor: pointer; position: relative; transition: all 0.1s ease;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); outline: none; user-select: none; z-index: 10;
}
.clap-btn:active { transform: scale(0.9); background-color: #fafafa; }
.clap-btn.disabled { cursor: default; border-color: var(--accent-color); color: var(--accent-color); background-color: #fff; }
.clap-icon { width: 28px; height: 28px; margin-bottom: 2px; transition: stroke 0.3s; }
.clap-count { font-size: 0.8rem; font-weight: 700; font-family: var(--font-main); }
.clap-bubble {
    position: absolute; font-size: 1.2rem; font-weight: bold; color: var(--accent-color);
    pointer-events: none; opacity: 0; animation: floatUp 0.8s ease-out forwards; z-index: 5;
}
@keyframes floatUp { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-50px) scale(1.5); opacity: 0; } }
.clap-thanks {
    margin-top: 15px; font-family: var(--font-serif); font-size: 1.5rem; color: var(--accent-color);
    opacity: 0; transform: translateY(10px); transition: all 0.5s ease; pointer-events: none;
}
.clap-thanks.visible { opacity: 1; transform: translateY(0); }


/* =========================================
   13. Works Page (3D Stream) - Base Styles (Desktop)
   ========================================= */
#works-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    perspective: 2000px; overflow: hidden; cursor: grab; z-index: 10;
}
#works-container:active { cursor: grabbing; }
#gallery-stream {
    position: absolute; top: 50%; left: 50%; transform-style: preserve-3d; width: 0; height: 0;
}

/* 個々の作品カード（ガラス風ブロック・スクエア3D表現） */
.work-item-3d {
    position: absolute;
    top: 50%; left: 50%; /* 基準を完全に画面中央へ */
    
    /* PCサイズ定義 */
    width: 50vh; height: 65vh;
    max-width: 600px; max-height: 800px;
    
    /* マージンで中心をずらす (width/heightの半分) */
    margin-top: -32.5vh; margin-left: -25vh;
    
    background-size: cover; background-position: center;
    border-radius: 0; /* ★角をスクエアに（修正） */

    /* 厚みとガラス感を表現する影とボーダー */
    box-shadow:
        /* 左側に「厚み」のような断面を作る (ガラスのエッジ) */
        -4px 0 0 rgba(255, 255, 255, 0.4),
        /* 全体の深いドロップシャドウ */
        15px 20px 40px rgba(0,0,0,0.6),
        /* 表面の光沢 */
        inset 0 0 0 1px rgba(255,255,255,0.2);
    
    /* 少しだけ背景を透過させてガラス感を出す */
    background-color: #000;
    
    /* 背景色が漏れないように */
    background-clip: padding-box;
    overflow: hidden;
    
    transform-origin: center center;
    will-change: transform;
}

.work-item-info { display: none !important; }

/* 鍵付きアイテム（角丸削除に合わせて調整） */
.work-item-3d.locked { filter: none !important; overflow: hidden; }
.work-item-3d.locked::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    z-index: 5; 
    border-radius: 0; /* ★ここもスクエアに */
}
.work-item-3d.locked::after {
    content: "🔒"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 3rem; filter: drop-shadow(0 4px 15px rgba(0,0,0,0.3)); z-index: 10; opacity: 1;
}
.work-item-3d.unlocked::before, .work-item-3d.unlocked::after { display: none; }
.work-item-3d.hidden-virtual { display: none !important; }

/* 詳細画面の拍手ボタンエリア */
#detail-clap-area {
    margin-top: 60px; padding-top: 40px; border-top: 1px solid #eee;
    width: 100%; display: flex; justify-content: center;
}

/* =========================================
   Works Hover Info (Desktop & Common)
   ========================================= */

/* 右下の情報エリアコンテナ */
#works-hover-info {
    position: fixed;
    bottom: 50px;
    right: 6%;
    z-index: 100;
    text-align: right; /* 右寄せ */
    pointer-events: none;
    
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    
    font-family: var(--font-main);
    color: var(--text-color);
}

/* 表示時の状態 */
#works-hover-info.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 日付 */
.info-date {
    font-size: 0.9rem; /* 小さく戻す */
    color: #666;
    margin-bottom: 5px;
    letter-spacing: 1px;
    font-feature-settings: "palt";
}

/* タイトル */
.info-title {
    font-family: var(--font-serif);
    font-size: 1.6rem; /* 2.5remから適切なサイズへ縮小 */
    font-weight: 400;
    margin: 0 0 15px 0; /* 下線との余白 */
    line-height: 1.2;
    color: #2b2b2b;
}

/* 下線（ライン）のデザイン */
.info-line {
    content: "";
    display: block;
    height: 3px;
    background-color: #333;
    width: 0; /* 最初は幅0 */
    margin-left: auto; /* 右寄せにする */
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); /* スッと伸びるアニメーション */
}

/* 表示時にラインを伸ばす */
#works-hover-info.visible .info-line {
    width: 180px; /* 固定幅で伸ばす（好みに応じて調整可） */
}

/* 写真の中のテキストは非表示 */
.work-item-info {
    display: none !important;
}

/* =========================================
   14. Responsive Settings (Tablet & Mobile)
   ========================================= */
@media (max-width: 1024px) {
    .site-header { padding: 20px; }
    .site-header.scrolled { padding: 15px 20px; }
    .brand-name { font-size: 1.3rem; }
    
    .hamburger { 
        display: block; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
        margin: 0; z-index: 1002; 
    }
    
    .site-nav { position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background: #fff; flex-direction: column; justify-content: center; transition: 0.4s; z-index: 1001; }
    .site-nav.active { right: 0; }
    .site-nav ul { flex-direction: column; gap: 30px; }
    .site-nav a { color: #2b2b2b; font-size: 0.9rem; letter-spacing: 2px; text-shadow: none; }
    .icon-link svg { fill: #2b2b2b; width: 32px; height: 32px; }
    
    .section-container { padding: 80px 20px; }
    .section-title { font-size: 2rem; }
    .day-night-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .grid-drum { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .grid-drum .img-box { aspect-ratio: 16 / 9; }
    #section-1994 .grid-1994 { gap: 4px; }
    .blog-item { flex-direction: column; align-items: flex-start; gap: 15px; }
    .blog-thumb { width: 100%; }
    .blog-title { font-size: 1.1rem; line-height: 1.4; }
    .footer-link-item { font-size: 1.1rem; padding: 20px 0; }
    .site-footer { padding: 60px 20px 30px; }
    .hero-section { height: 45vh; min-height: auto; }
    .about-container { padding-top: 120px; }
    .about-footer-info { flex-direction: column; gap: 40px; }
    .social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; width: 100%; padding: 0; margin-top: 20px; }
    .sns-link { width: 40px; height: 40px; font-size: 0; padding: 0; flex: 0 0 auto; }
    .sns-link svg { width: 18px; height: 18px; }
    .current-band { margin-bottom: 180px; }
    .input-row { flex-direction: column; gap: 30px; }
    .about-contact-section { margin-top: 80px; padding-top: 60px; }
    .view-mode-toggle { top: 20px; left: 20px; }
    
    /* ▼▼▼ 修正: タブレット以下でも3列表示にする ▼▼▼ */
    .album-gallery { column-count: 3; }
    /* ▲▲▲ 修正ここまで ▲▲▲ */
}

@media (max-width: 768px) {
    #index-film-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; }
    .film-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 0 4%; }
    .film-viewer { flex-direction: column; }
    .canister-dock-container {
        width: 100%; height: 180px; border-right: none; border-bottom: 1px solid #ddd;
        flex-direction: row; justify-content: space-between; padding: 0 20px; overflow: hidden;
    }
    .active-canister-dock img { width: 80px !important; height: auto !important; transform: rotate(90deg) !important; margin-left: 10px; }
    .close-btn { position: static; bottom: auto; padding: 8px 12px; font-size: 0.75rem; }
    .film-strip-wrapper { width: 100%; height: auto; flex: 1; overflow-x: hidden; overflow-y: auto; display: block; padding-top: 20px; }
    .film-strip-track { flex-direction: column; width: 100%; height: auto; padding: 0 0 50px 0; transform: translateY(-100%); }
    .strip-frame { width: 100%; height: auto; aspect-ratio: auto; padding: 10px 30px; margin-bottom: 2px; }
    .strip-photo { width: 100%; height: auto; }
    .strip-frame::before, .strip-frame::after {
        width: 15px; height: 100%; top: 0;
        background-image: repeating-linear-gradient(0deg, transparent 0, transparent 6px, #fff 6px, #fff 12px, transparent 12px, transparent 18px);
    }
    .strip-frame::before { left: 5px; }
    .strip-frame::after { right: 5px; left: auto; }
    #film-viewer.view-mode-grid #film-strip-track {
        grid-template-columns: repeat(4, 1fr); column-gap: 0; row-gap: 20px;
        width: 100%; padding: 20px 0 50px 0; box-sizing: border-box;
    }
    #film-viewer.view-mode-grid .strip-frame { padding: 15% 4%; border-right: none; border-left: none; }
    #film-viewer.view-mode-grid .strip-frame::before,
    #film-viewer.view-mode-grid .strip-frame::after { background-size: 8px 100%; height: 12%; }
    #film-viewer.view-mode-grid .strip-frame::before { top: 0; }
    #film-viewer.view-mode-grid .strip-frame::after { bottom: 0; }
    #film-viewer.view-mode-grid .strip-photo { width: 100%; height: 100%; border: none; }
    .works-wrapper { max-height: 80vw; }
    .block-split, .block-split.reverse { flex-direction: column; gap: 20px; }
    .block-split img, .split-text { width: 100%; }
    .marquee-item img { height: 180px; }
    .marquee-track { gap: 15px; animation-duration: 30s; }
    
    /* About Page Mobile Fixes */
    .about-container { padding-left: 4%; padding-right: 4%; }
    .bio-text, .bio-list { font-size: 11px; letter-spacing: 0; line-height: 1.7; }
    .bio-list { gap: 0 10px; grid-template-columns: 2.5em 1fr; }
    .bio-dd { margin-bottom: 1.2em; text-align: left; }
    .contact-message-text { font-size: 11px; letter-spacing: 0; line-height: 1.8; padding: 0 5px; text-align: center; }
    .contact-message-text .en { font-size: 10px; margin-top: 4px; }
    
    /* Works Page Mobile Specifics */
    #close-detail { top: 90px; right: 20px; padding: 8px 16px; font-size: 0.8rem; }
    .detail-content { padding-top: 100px; }
    .album-gallery { column-count: 3; column-gap: 10px; }
    
    /* 3D Item Size for Mobile */
    .work-item-3d {
        top: 50%; left: 50%; /* ★修正: 中央基準に統一 */
        width: 65vw; height: 85vw;        
        max-width: 600px; max-height: 800px; 
        
        /* マージンで中心合わせ (width/heightの半分) */
        margin-top: -42.5vw; margin-left: -32.5vw;
        
        background-size: cover; background-position: center;
        
        /* ★モバイル版もスクエア・厚み表現に対応 */
        border-radius: 0;
        box-shadow: 
            -2px 0 0 rgba(255, 255, 255, 0.4), /* モバイル用は少し薄めに */
            5px 10px 25px rgba(0,0,0,0.5);
    }
    
    /* Works Hover Info Mobile */
    #works-hover-info { bottom: 40px; right: 5%; }
    .info-date { font-size: 0.9rem; }
    .info-title { font-size: 1.5rem; margin-bottom: 10px; }
    #works-hover-info.visible .info-line { width: 150px; }
}