@charset "UTF-8";

/* ========================================
   東京都繰子の事件簿 ～File02：淫獣～
   リメイク版公式サイト CSS

   Color Scheme:
   - Black (漆黒): #0a0a0a, #1a1a1a, #0d0d0d
   - Gold (金): #D4AF37, #B8860B, #FFD700, #C9A227
   - Silver (銀): #C0C0C0, #A8A8A8, #8B8B8B
   ======================================== */

/* ----------------------------------------
   CSS Variables
---------------------------------------- */
:root {
    /* 漆黒 - Jet Black (半透明で背景パターンを見せる) */
    --black-deep: rgba(5, 5, 5, 0.9);
    --black-main: rgba(10, 10, 10, 0.85);
    --black-light: rgba(26, 26, 26, 0.9);
    --black-surface: rgba(21, 21, 21, 0.9);

    /* 金 - Gold */
    --gold-bright: #FFD700;
    --gold-main: #D4AF37;
    --gold-dark: #B8860B;
    --gold-muted: #C9A227;
    --gold-gradient: linear-gradient(135deg, #FFD700 0%, #D4AF37 50%, #B8860B 100%);
    --gold-gradient-text: linear-gradient(180deg, #FFF8DC 0%, #FFD700 20%, #D4AF37 50%, #B8860B 80%, #8B6914 100%);
    --gold-gradient-shine: linear-gradient(135deg, #FFF8DC 0%, #FFD700 25%, #D4AF37 50%, #B8860B 75%, #FFD700 100%);
    --gold-gradient-border: linear-gradient(135deg, #FFD700, #D4AF37, #B8860B, #D4AF37, #FFD700);

    /* 銀 - Silver */
    --silver-bright: #E8E8E8;
    --silver-main: #C0C0C0;
    --silver-dark: #8B8B8B;
    --silver-muted: #A8A8A8;

    /* Text Colors */
    --text-primary: #E8E8E8;
    --text-secondary: #A8A8A8;
    --text-gold: #D4AF37;

    /* Fonts */
    --font-main: 'Shippori Mincho', 'Noto Serif JP', 'Yu Mincho', serif;
    --font-accent: 'Noto Serif JP', serif;

    /* Spacing */
    --section-padding: 80px 0;
    --container-width: 1200px;
}

/* ----------------------------------------
   Reset & Base
---------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ----------------------------------------
   Eye Transition
---------------------------------------- */
.eye-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.eye-transition.active {
    pointer-events: all;
}

.eyelid {
    position: absolute;
    left: -5%;
    width: 110%;
    height: 58%;
    background: #000;
    transition: none;
}

.eyelid-top {
    top: 0;
    border-radius: 0 0 50% 50% / 0 0 30% 30%;
    box-shadow: 0 30px 60px 20px rgba(0, 0, 0, 0.9);
}

.eyelid-bottom {
    bottom: 0;
    border-radius: 50% 50% 0 0 / 30% 30% 0 0;
    box-shadow: 0 -30px 60px 20px rgba(0, 0, 0, 0.9);
}

.eye-slit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 6px;
    background: radial-gradient(ellipse, rgba(139, 0, 0, 0.9), rgba(139, 0, 0, 0.3) 60%, transparent);
    border-radius: 50%;
    opacity: 1;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 30px 10px rgba(139, 0, 0, 0.3);
}

/* Opening animation */
.eye-transition.opening .eyelid-top {
    animation: eyelid-open-top 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.eye-transition.opening .eyelid-bottom {
    animation: eyelid-open-bottom 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.eye-transition.opening .eye-slit {
    animation: slit-fade 0.4s ease forwards;
}

/* Closing animation */
.eye-transition.closing .eyelid-top {
    animation: eyelid-close-top 0.6s cubic-bezier(0.7, 0, 1, 0.5) forwards;
}

.eye-transition.closing .eyelid-bottom {
    animation: eyelid-close-bottom 0.6s cubic-bezier(0.7, 0, 1, 0.5) forwards;
}

.eye-transition.closing .eye-slit {
    animation: slit-appear 0.3s ease 0.2s forwards;
}

/* Fully open - hidden */
.eye-transition.open .eyelid-top {
    transform: translateY(-100%);
}

.eye-transition.open .eyelid-bottom {
    transform: translateY(100%);
}

.eye-transition.open .eye-slit {
    opacity: 0;
}

@keyframes eyelid-open-top {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

@keyframes eyelid-open-bottom {
    0% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

@keyframes eyelid-close-top {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(0); }
}

@keyframes eyelid-close-bottom {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
}

@keyframes slit-fade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes slit-appear {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: #0a0a0a;
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ----------------------------------------
   Peeping Eye - 背景の覗く目
---------------------------------------- */
.peeping-eye {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120vw;
    height: 120vh;
    z-index: -1;
    pointer-events: none;
    opacity: 1;
}

.peeping-eye-img {
    width: 100%;
    height: 100%;
    background: url('../images/eye_bg.webp') center / cover no-repeat;
    animation: eye-blink 6s infinite;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at center, black 30%, transparent 80%);
    mask-image: radial-gradient(ellipse 70% 60% at center, black 30%, transparent 80%);
}

@keyframes eye-blink {
    0%   { transform: scaleY(1); }
    46%  { transform: scaleY(1); }
    48%  { transform: scaleY(0.05); }
    52%  { transform: scaleY(0.05); }
    54%  { transform: scaleY(1); }
    100% { transform: scaleY(1); }
}



/* ----------------------------------------
   Typography
---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-accent);
    font-weight: 700;
    color: var(--gold-main);
}

a {
    color: var(--gold-main);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--gold-bright);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.gold-link {
    display: inline-block;
    padding: 10px 30px;
    border: 1px solid var(--gold-dark);
    color: var(--gold-main);
    font-size: 14px;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.gold-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.5s ease;
}

.gold-link:hover::before {
    left: 100%;
}

.gold-link:hover {
    border-color: var(--gold-bright);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

/* ----------------------------------------
   Header
---------------------------------------- */
.site-header {
    position: relative;
    background: linear-gradient(180deg, var(--black-deep) 0%, var(--black-main) 100%);
    padding: 30px 50px 50px;
    border-bottom: 3px solid;
    border-image: var(--gold-gradient) 1;
    z-index: 10;
}

.breadcrumb {
    text-align: left;
    font-size: 12px;
    color: var(--silver-dark);
    margin-bottom: 30px;
}

.breadcrumb a {
    color: var(--silver-muted);
}

.breadcrumb a:hover {
    color: var(--gold-main);
}

.breadcrumb .separator {
    margin: 0 8px;
    color: var(--gold-dark);
}

.breadcrumb .current {
    color: var(--gold-main);
}

.logo-container {
    text-align: center;
    padding: 20px 0;
}

.site-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.title-sub {
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    color: var(--silver-main);
    font-weight: 400;
}

/* 東京都繰子 カラー */
.c-yellow { color: #FFD700; }
.c-green { color: #00FF7F; }
.c-blue { color: #00BFFF; }
.c-red { color: #FF4500; }
.c-purple { color: #DA70D6; }
.c-white { color: #FFFFFF; }

.title-main {
    font-size: 1.6rem;
    letter-spacing: 0.15em;
    background: url('../images/gold_texture.jpg') center/cover;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.4));
}

.title-file {
    font-size: 16px;
    letter-spacing: 5px;
    color: var(--silver-dark);
    font-weight: 400;
}

.subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    margin-top: 4px;
    font-style: italic;
    background: url('../images/gold_texture.jpg') center/cover;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ----------------------------------------
   Navigation
---------------------------------------- */
.main-nav {
    background: var(--black-surface);
    border-bottom: 1px solid var(--gold-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    max-width: var(--container-width);
    margin: 0 auto;
}

.main-nav li {
    border-right: 1px solid rgba(212, 175, 55, 0.2);
}

.main-nav li:last-child {
    border-right: none;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 40px;
    color: var(--silver-main);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gold-gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--gold-main);
    background: rgba(212, 175, 55, 0.05);
}

.nav-jp {
    font-size: 14px;
    letter-spacing: 3px;
}

.nav-en {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--silver-dark);
    margin-top: 2px;
}

/* ----------------------------------------
   Main Content
---------------------------------------- */
.main-content {
    position: relative;
    z-index: 1;
}

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.title-text {
    font-size: 28px;
    letter-spacing: 10px;
    background: url('../images/gold_texture.jpg') center/cover;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(184, 134, 11, 0.5));
}

.title-ornament {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFD700, #D4AF37, #B8860B, #D4AF37, #FFD700, transparent);
    position: relative;
}

.title-ornament::before {
    content: '❖';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    background: var(--gold-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-ornament.left::before {
    right: -20px;
}

.title-ornament.right::before {
    left: -20px;
}

/* 和風装飾線 */
.title-ornament::after {
    content: '';
    position: absolute;
    top: -3px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
}

/* ----------------------------------------
   Key Visual Section
---------------------------------------- */
.key-visual {
    padding: 60px 20px;
    background: linear-gradient(180deg, var(--black-main) 0%, var(--black-deep) 50%, var(--black-main) 100%);
    text-align: center;
}

.visual-frame {
    position: relative;
    display: inline-block;
    padding: 20px;
    max-width: 600px;
}

/* 金の額縁 */
.visual-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid var(--gold-dark);
    pointer-events: none;
}

.visual-frame::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid var(--gold-muted);
    pointer-events: none;
}

/* 角飾り */
.frame-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--gold-bright);
    z-index: 2;
}

.frame-corner.tl { top: -5px; left: -5px; border-right: none; border-bottom: none; }
.frame-corner.tr { top: -5px; right: -5px; border-left: none; border-bottom: none; }
.frame-corner.bl { bottom: -5px; left: -5px; border-right: none; border-top: none; }
.frame-corner.br { bottom: -5px; right: -5px; border-left: none; border-top: none; }

.visual-frame img {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.visual-caption {
    margin-top: 40px;
}

.catch-copy {
    font-size: 18px;
    letter-spacing: 5px;
    color: var(--silver-main);
    font-style: italic;
    position: relative;
    display: inline-block;
    padding: 0 30px;
}

.catch-copy::before,
.catch-copy::after {
    content: '「';
    position: absolute;
    color: var(--gold-dark);
    font-size: 24px;
}

.catch-copy::before {
    left: 0;
    content: '';
}

.catch-copy::after {
    right: 0;
    content: '';
}

/* ----------------------------------------
   Remake Intro
---------------------------------------- */
.remake-intro {
    padding: 40px 24px;
    background: var(--black-deep);
}

.remake-intro .container {
    max-width: 800px;
    margin: 0 auto;
}

.remake-intro p {
    font-size: 0.95rem;
    line-height: 2;
    color: var(--silver);
    text-align: center;
}

.remake-intro strong {
    color: var(--gold);
    font-weight: 700;
}

.remake-intro a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.4);
}

.remake-intro a:hover {
    color: var(--gold-light);
    border-bottom-color: var(--gold-light);
}

/* ----------------------------------------
   News Section
---------------------------------------- */
.news-section {
    padding: var(--section-padding);
    background: var(--black-surface);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.news-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-list {
    background: var(--black-deep);
    border: 1px solid var(--gold-dark);
    padding: 30px;
    max-height: 300px;
    overflow-y: auto;
}

.news-list dt {
    color: var(--gold-main);
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.news-list dd {
    color: var(--text-secondary);
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--silver-dark);
    padding-left: 20px;
}

.news-list dd:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* スクロールバー */
.news-list::-webkit-scrollbar {
    width: 8px;
}

.news-list::-webkit-scrollbar-track {
    background: var(--black-main);
}

.news-list::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 4px;
}

/* ----------------------------------------
   Story Section
---------------------------------------- */
.story-section {
    padding: var(--section-padding);
    background:
        linear-gradient(180deg, var(--black-main) 0%, var(--black-deep) 50%, var(--black-main) 100%);
    position: relative;
}

/* 物語セクション左右装飾 */
.story-section::before,
.story-section::after {
    content: '༜༜༜༜༜༜༜༜༜༜';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    font-size: 20px;
    color: rgba(212, 175, 55, 0.15);
    letter-spacing: 30px;
}

.story-section::before {
    left: 50px;
}

.story-section::after {
    right: 50px;
}

.story-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 60px;
    background: rgba(5, 5, 5, 0.6);
    border: 1px solid var(--gold-dark);
    position: relative;
}

/* 物語枠の四隅装飾 */
.story-content::before {
    content: '࿇';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: var(--gold-main);
    background: var(--black-main);
    padding: 0 15px;
}

.story-content::after {
    content: '࿇';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: var(--gold-main);
    background: var(--black-main);
    padding: 0 15px;
}

.story-text {
    text-align: center;
    line-height: 2.5;
}

.story-text p {
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--silver-main);
}

.story-text .story-spacer {
    height: 10px;
    margin-bottom: 0;
}

.story-text .story-highlight {
    color: var(--gold-main);
    font-weight: 700;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.story-fear {
    color: #dc143c;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.7), 0 0 25px rgba(220, 20, 60, 0.4);
}

.story-more {
    margin-top: 40px;
}

/* ----------------------------------------
   Character Section
---------------------------------------- */
.character-section {
    padding: var(--section-padding);
    background: var(--black-surface);
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.character-card {
    text-align: center;
}

.card-frame {
    background: var(--black-deep);
    border: 1px solid var(--gold-dark);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.card-frame::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    pointer-events: none;
}

.card-frame:hover {
    border-color: var(--gold-bright);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    transform: translateY(-5px);
}

.card-image {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 15px;
}

.card-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.card-info {
    padding-top: 15px;
    border-top: 1px solid var(--gold-dark);
}

.chara-name {
    font-size: 18px;
    letter-spacing: 3px;
    background: var(--gold-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.chara-role {
    font-size: 12px;
    color: var(--silver-dark);
    letter-spacing: 2px;
}

/* ----------------------------------------
   Stage Section (舞台背景)
---------------------------------------- */
.stage-section {
    padding: var(--section-padding);
    background: var(--black-main);
}

.stage-grid {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stage-thumb {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid var(--gold-dark);
    transition: all 0.3s ease;
}

.stage-thumb:hover {
    border-color: var(--gold-bright);
    transform: scale(1.03);
}

.stage-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.thumb-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 12px;
    padding: 8px;
    text-align: center;
    letter-spacing: 2px;
    background: var(--gold-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.thumb-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: -1;
}

/* モーダル */
.stage-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    display: flex;
    pointer-events: none;
    opacity: 0;
    transition: background 0.6s ease, opacity 0.4s ease;
}

.stage-modal.active {
    background: rgba(0, 0, 0, 0.95);
    pointer-events: auto;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.85);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.stage-modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-content img {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}


.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--gold-main);
    font-size: 36px;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--gold-bright);
}

/* 舞台背景モーダル閉じるボタン */
.stage-modal-close-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--gold-main);
    color: var(--gold-main);
    font-size: 16px;
    padding: 12px 40px;
    cursor: pointer;
    z-index: 1100;
    font-family: var(--font-main);
}

.stage-modal-close-btn:hover {
    background: var(--gold-main);
    color: var(--black-deep);
}

.modal-title {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 36px;
    letter-spacing: 8px;
    color: var(--silver-bright);
    font-weight: 700;
    text-shadow:
        3px 3px 0 #000,
        -3px -3px 0 #000,
        3px -3px 0 #000,
        -3px 3px 0 #000,
        0 0 10px rgba(0, 0, 0, 1),
        0 0 20px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.stage-modal.active .modal-title {
    opacity: 1;
    transform: translateY(0);
}

.modal-description {
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.9) 30%);
    padding: 40px 20px 20px;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: var(--silver-main);
    font-size: 14px;
    line-height: 2;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.stage-modal.active .modal-description {
    opacity: 1;
    transform: translateY(0);
}

/* ----------------------------------------
   Gallery Section (画廊)
---------------------------------------- */
.gallery-section {
    padding: var(--section-padding);
    background: var(--black-main);
}

.gallery-grid {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.gallery-thumb {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid var(--gold-dark);
    transition: all 0.3s ease;
    aspect-ratio: 16/9;
}

.gallery-thumb:hover {
    border-color: var(--gold-bright);
    transform: scale(1.03);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 画廊モーダル */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.gallery-modal.active {
    display: flex;
}

.gallery-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 20px;
}

.gallery-modal-close {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--gold-main);
    color: var(--gold-main);
    font-size: 16px;
    padding: 12px 40px;
    cursor: pointer;
    z-index: 1100;
    font-family: var(--font-main);
}

.gallery-modal-close:hover {
    background: var(--gold-main);
    color: var(--black-deep);
}

.gallery-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gallery-image-container img {
    max-width: 100%;
    max-height: 50vh;
    object-fit: contain;
}

.gallery-text-box {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.gallery-text-line {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 2;
    text-align: left;
    margin: 0;
}

.gallery-click-hint {
    color: var(--gold-muted);
    font-size: 12px;
    margin-top: 20px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 1; }
}

/* ----------------------------------------
   Voice Sample Button
---------------------------------------- */
.voice-sample-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.voice-sample-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--black-deep);
    border: 1px solid var(--gold-dark);
    color: var(--gold-main);
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.voice-sample-btn:hover {
    background: var(--gold-dark);
    color: var(--black-deep);
}

.voice-sample-btn.playing {
    background: var(--gold-main);
    color: var(--black-deep);
}

.voice-sample-btn::before {
    content: '▶';
    font-size: 10px;
}

.voice-sample-btn.playing::before {
    content: '■';
}

/* Character Detail Layout (詳細版) */
.character-list {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.character-detail {
    display: flex;
    gap: 40px;
    background: var(--black-deep);
    border: 2px solid var(--gold-dark);
    padding: 30px;
    position: relative;
}

.character-detail:nth-child(even) {
    flex-direction: row-reverse;
}

.chara-image-container {
    flex-shrink: 0;
    cursor: pointer;
    width: 250px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--gold-dark);
    background: var(--black-main);
}

.chara-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.chara-info-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chara-name-detail {
    font-size: 28px;
    letter-spacing: 5px;
    background: url('../images/gold_texture.jpg') center/cover;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(184, 134, 11, 0.5));
}

.chara-name-detail ruby {
    ruby-position: over;
}

.chara-name-detail rt {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--silver-main);
    -webkit-text-fill-color: var(--silver-main);
}

.chara-sub-name {
    font-size: 18px;
    letter-spacing: 2px;
}

.chara-cv {
    font-size: 14px;
    color: var(--gold-main);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.chara-description {
    font-size: 14px;
    line-height: 2;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: justify;
}

.chara-quote {
    font-size: 15px;
    font-style: italic;
    color: var(--silver-bright);
    padding: 15px 20px;
    background: rgba(212, 175, 55, 0.05);
    border-left: 3px solid var(--gold-main);
    line-height: 1.8;
}

/* ----------------------------------------
   Spec Section
---------------------------------------- */
.spec-section {
    padding: var(--section-padding);
    background: linear-gradient(180deg, var(--black-surface) 0%, var(--black-main) 100%);
}

.spec-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid var(--gold-dark);
}

.spec-table th,
.spec-table td {
    padding: 15px 20px;
    border: 1px solid var(--gold-dark);
    text-align: left;
}

.spec-table th {
    background: var(--black-deep);
    color: var(--gold-main);
    font-weight: 700;
    width: 150px;
    text-align: center;
    letter-spacing: 2px;
}

.spec-table td {
    background: var(--black-surface);
    color: var(--silver-main);
}

.ai-notice {
    margin-top: 20px;
    color: #DC143C;
    font-size: 13px;
    text-align: center;
}

/* ----------------------------------------
   Purchase Section
---------------------------------------- */
.purchase-section {
    padding: var(--section-padding);
    background: var(--black-deep);
    text-align: center;
}

.purchase-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.coming-soon {
    font-size: 24px;
    letter-spacing: 5px;
    color: var(--silver-dark);
    font-style: italic;
}

/* ----------------------------------------
   Footer
---------------------------------------- */
.site-footer {
    background: var(--black-deep);
    border-top: 2px solid;
    border-image: var(--gold-gradient) 1;
    padding: 40px 20px;
    text-align: center;
    position: relative;
}

.footer-nav {
    margin-bottom: 30px;
}

.footer-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px 30px;
    list-style: none;
}

.footer-nav a {
    color: var(--silver-muted);
    font-size: 13px;
    letter-spacing: 2px;
}

.footer-nav a:hover {
    color: var(--gold-main);
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links .divider {
    color: var(--silver-dark);
    margin: 0 15px;
}

.circle-link {
    color: var(--silver-dark);
    font-size: 12px;
}

.footer-logo {
    height: 40px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #999;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}
.footer-social a:hover { color: #fff; }
.footer-social svg { width: 14px; height: 14px; }

.copyright {
    color: var(--silver-dark);
    font-size: 11px;
    letter-spacing: 1px;
}

/* ----------------------------------------
   Responsive
---------------------------------------- */
@media (max-width: 768px) {
    .title-main {
        font-size: 1.4rem;
        letter-spacing: 0.1em;
    }

    .title-sub {
        font-size: 0.8rem;
        letter-spacing: 0.2em;
    }

    .subtitle {
        font-size: 0.7rem;
    }

    /* ナビゲーション整列 */
    .main-nav {
        padding: 10px;
    }

    .main-nav ul {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
        width: 100%;
    }

    .main-nav li {
        border-right: 1px solid rgba(212, 175, 55, 0.2);
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    }

    .main-nav li:nth-child(3n) {
        border-right: none;
    }

    .main-nav li:nth-last-child(-n+3) {
        border-bottom: none;
    }

    .nav-link {
        padding: 12px 8px;
        width: 100%;
        text-align: center;
    }

    .nav-jp {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .nav-en {
        font-size: 8px;
        letter-spacing: 0;
    }

    .section-title {
        flex-direction: column;
        gap: 10px;
    }

    .title-ornament {
        display: none;
    }

    .character-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .character-detail {
        flex-direction: column !important;
        padding: 20px;
        gap: 20px;
    }

    .chara-image-container {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }

    .chara-name-detail {
        font-size: 22px;
        text-align: center;
    }

    .chara-cv {
        text-align: center;
    }

    .voice-sample-list {
        justify-content: center;
    }

    .spec-table th,
    .spec-table td {
        display: block;
        width: 100%;
    }

    .spec-table th {
        border-bottom: none;
    }

    /* 舞台背景 - 縦1列 */
    .stage-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 400px;
    }

    .stage-thumb {
        width: 100%;
    }

    .stage-thumb img {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        object-fit: cover;
    }

    /* 画廊 - 縦1列 */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 400px;
    }

    .gallery-thumb {
        width: 100%;
    }

    .gallery-modal {
        padding: 0;
    }

    .gallery-modal-content {
        width: 100%;
        height: 100%;
    }

    .gallery-modal-content {
        padding: 15px;
        justify-content: center;
    }

    .gallery-image-container img {
        max-height: 45vh;
    }

    .gallery-text-box {
        padding: 15px 10px;
    }

    .gallery-text-line {
        font-size: 14px;
        line-height: 1.8;
    }

    .gallery-click-hint {
        font-size: 10px;
        margin-top: 10px;
    }

    .gallery-modal-close {
        bottom: 15px;
        padding: 10px 30px;
        font-size: 14px;
    }

    /* キービジュアル */
    .visual-frame {
        margin: 20px;
    }

    /* 舞台背景モーダル */
    .modal-content {
        max-width: 100%;
        max-height: 100%;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .modal-content img {
        max-width: 95%;
        max-height: 50vh;
        object-fit: contain;
    }

    .modal-title {
        position: static;
        font-size: 24px;
        letter-spacing: 4px;
        text-align: center;
        margin-bottom: 10px;
        padding-top: 50px;
    }

    .modal-description {
        position: static;
        background: transparent;
        padding: 15px 20px;
        font-size: 13px;
        line-height: 1.8;
    }

    .modal-close {
        position: fixed;
        top: 10px;
        right: 10px;
        font-size: 28px;
        z-index: 1001;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 30px 15px;
    }

    .title-main {
        font-size: 1.3rem;
        letter-spacing: 0.08em;
    }

    .title-sub {
        font-size: 0.75rem;
        letter-spacing: 0.15em;
    }

    .subtitle {
        font-size: 0.65rem;
    }

    /* ナビゲーション - 2列に変更 */
    .main-nav {
        padding: 5px;
    }

    .main-nav ul {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-nav li:nth-child(3n) {
        border-right: 1px solid rgba(212, 175, 55, 0.2);
    }

    .main-nav li:nth-child(2n) {
        border-right: none;
    }

    .main-nav li:nth-last-child(-n+3) {
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    }

    .main-nav li:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .nav-link {
        padding: 10px 5px;
    }

    .nav-jp {
        font-size: 10px;
    }

    .nav-en {
        display: none;
    }

    .character-grid {
        grid-template-columns: 1fr;
    }

    .character-list {
        gap: 30px;
    }

    .chara-image-container {
        width: 180px;
        height: 180px;
    }

    .chara-name-detail {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .chara-description {
        font-size: 13px;
    }

    .chara-quote {
        font-size: 13px;
        padding: 10px 15px;
    }

    .voice-sample-btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    /* 舞台背景・画廊 - 幅制限なし */
    .stage-grid,
    .gallery-grid {
        max-width: 100%;
    }

    /* 画廊モーダル */
    .gallery-modal-content {
        padding: 10px;
    }

    .gallery-image-container img {
        max-height: 40vh;
    }

    .gallery-text-box {
        padding: 10px 5px;
    }

    .gallery-text-line {
        font-size: 13px;
        line-height: 1.7;
    }

    .gallery-modal-close {
        bottom: 10px;
        padding: 8px 25px;
        font-size: 12px;
    }

    /* 物語 */
    .story-text p {
        font-size: 14px;
    }

    /* セクション */
    section {
        padding: 50px 0;
    }

    .section-title .title-text {
        font-size: 24px;
    }

    /* フッター - 2列グリッド */
    .footer-nav ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px 20px;
        text-align: center;
    }
}

/* ----------------------------------------
   Animations
---------------------------------------- */
/* スムーズなフェードイン */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.key-visual,
.news-section,
.story-section,
.character-section,
.spec-section,
.purchase-section {
    animation: fadeInUp 0.8s ease-out;
}

/* キャラクター登場スライドインエフェクト */
.character-detail {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.character-detail:nth-child(even) {
    transform: translateX(60px);
}

.character-detail.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ----------------------------------------
   Back to Top Button
---------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: 2px solid var(--gold-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 20px;
    color: var(--gold-main);
    background: var(--black-deep);
    font-family: var(--font-main);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    border-color: var(--gold-bright);
    color: var(--gold-bright);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.1);
}
