/* --- Base Variables & Reset --- */
:root {
    --color-luna: #4A6FA5; /* くすみネイビー */
    --color-luna-light: #EBF2FA;
    --color-coyo: #D98E55; /* アンバーオレンジ */
    --color-coyo-light: #FFF5EB;
    
    --text-main: #4a4a4a;
    --text-light: #7a7a7a;
    --bg-white: rgba(255, 255, 255, 0.85);
    
    --font-base: "Zen Kaku Gothic New", "Helvetica Neue", "Arial", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    --shadow: 0 8px 24px rgba(149, 157, 165, 0.1);
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    color: var(--text-main);
    line-height: 1.7;
    background: linear-gradient(135deg, #F3E7FF 0%, #E0F7FA 50%, #FFFDE7 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ノイズテクスチャ（外部画像なしで再現） */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.4'/%3E%3C/svg%3E");
    opacity: 0.08; /* 薄く調整 */
    z-index: -1;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout Components --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 50px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-main);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, var(--color-luna), var(--color-coyo));
    margin: 10px auto 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: bold;
    letter-spacing: 0.05em;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(to right, var(--color-luna), #6b8cce);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--color-luna);
    border: 1px solid var(--color-luna);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    height: 60px;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    color: var(--color-luna);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.nav-btn-highlight {
    color: var(--color-coyo) !important;
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    background-color: var(--text-main);
    transition: 0.3s;
}

/* --- Hero --- */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 60px;
}

.hero-title {
    font-size: 4rem;
    letter-spacing: 0.15em;
    background: linear-gradient(45deg, var(--color-luna), var(--color-coyo));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.hero-sub {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* --- Concept --- */
.concept-box {
    text-align: center;
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.concept-text {
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.concept-list {
    display: inline-block;
    text-align: left;
}

.concept-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.concept-list li::before {
    content: "✦";
    color: var(--color-coyo);
    position: absolute;
    left: 0;
    top: 2px;
}

/* --- Characters --- */
.char-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.char-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.char-card:hover {
    transform: translateY(-5px);
}

.char-img-area {
    width: 100%;
    aspect-ratio: 3/4;
    background: #eee;
}

/* Placeholder Colors */
.luna-bg { background-color: var(--color-luna-light); color: var(--color-luna); }
.coyo-bg { background-color: var(--color-coyo-light); color: var(--color-coyo); }

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
}

.char-info {
    padding: 30px;
}

.char-name {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.char-name .en {
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--text-light);
    margin-left: 10px;
}

.char-tag {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: #f5f5f5;
}

.char-detail dt {
    float: left;
    clear: left;
    width: 3em;
    font-weight: bold;
    color: var(--color-luna);
}
.char-coyo .char-detail dt { color: var(--color-coyo); }

.char-detail dd {
    margin-left: 3.5em;
    margin-bottom: 10px;
}

.char-quote {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
    font-style: italic;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Gallery --- */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    border: none;
    background: transparent;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-light);
    border-radius: 20px;
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--color-luna);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    background: white;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.placeholder-thumb {
    width: 100%;
    aspect-ratio: 1;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

/* ギャラリープレースホルダー色分け */
[data-category="illust"] .placeholder-thumb { background: #e3f2fd; }
[data-category="comic"] .placeholder-thumb { background: #fff3e0; }
[data-category="movie"] .placeholder-thumb { background: #f3e5f5; }

.caption {
    padding: 10px;
    font-size: 0.9rem;
    text-align: center;
}

.hide {
    display: none;
}

/* --- Story --- */
.bg-glass {
    background: rgba(255, 255, 255, 0.5);
}

.story-content {
    max-width: 800px;
    margin: 0 auto;
}

.story-block {
    margin-bottom: 40px;
    text-align: center;
}

.story-block h3 {
    font-size: 1.2rem;
    color: var(--color-luna);
    margin-bottom: 10px;
}

/* --- Guide --- */
.guide-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.guide-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.guide-card h3 {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.ok-card h3 { color: var(--color-luna); border-color: var(--color-luna); }
.ng-card h3 { color: #d9534f; border-color: #d9534f; }

.guide-card ul {
    list-style: disc;
    padding-left: 20px;
}

.guide-card li {
    margin-bottom: 8px;
}

.credit-note {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* --- FAQ --- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    font-weight: bold;
    list-style: none; /* 三角を消す */
    position: relative;
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 20px;
    font-weight: normal;
    color: var(--color-coyo);
}

details[open] .faq-question::after {
    content: "-";
}

.faq-answer {
    padding: 0 20px 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

/* --- Footer --- */
.footer {
    background: #fff;
    padding: 60px 0 20px;
    text-align: center;
}

.footer-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-luna);
}

.footer-msg {
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.sns-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.sns-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--color-luna);
    transition: 0.3s;
}

.sns-icon:hover {
    background: var(--color-luna);
    color: white;
}

.contact-btn {
    min-width: 250px;
}

.copyright {
    display: block;
    margin-top: 50px;
    color: #ccc;
    font-size: 0.8rem;
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    position: relative;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.modal-img-container .large {
    width: 600px;
    max-width: 100%;
    aspect-ratio: 16/9;
    background: #eee;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1002;
    }

    .hamburger.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background: white;
        width: 100%;
        height: 100vh;
        justify-content: center;
        align-items: center;
        transition: 0.3s;
        box-shadow: none;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title { font-size: 2.5rem; }
    
    .char-grid {
        grid-template-columns: 1fr;
    }

    .guide-wrapper {
        grid-template-columns: 1fr;
    }

}
/* Characters の画像枠を「比率固定」にして、画像をピッタリ埋める */
.char-img-area{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;   /* ← 好みで変えてOK（4/3 や 1/1） */
  overflow: hidden;
  border-radius: 18px;
  background: rgba(0,0,0,0.06);
}

.char-img-area .char-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;      /* 余白ゼロで埋める（少しトリミング） */
  display: block;
}
#modalImg{
  max-width: 90vw;
  max-height: 70vh;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
}

