/* =========================================
   Design Theme: Beanstalkking (Orange/Black)
   ========================================= */
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}

:root{
    /* LPのデザイン変数を適用 */
    --primary: #FF6D00;       /* メインカラー（オレンジ） */
    --primary-light: #FFF8E1;
    --accent: #0056b3;        /* アクセント（青） */
    --text-main: #111111;     /* テキスト黒 */
    --text-sub: #444444;
    --bg-body: #ffffff;
    --font-jp: 'Noto Sans JP', sans-serif;
    --font-en: 'Oswald', sans-serif;
    
    /* Base Template Variables Override */
    --light-bg: radial-gradient(#e5e5e5 1px, transparent 1px); /* ドット背景 */
    --dark: var(--text-main);
    --btn-start: var(--primary);
    --btn-end: #ff8f00;
}

body{
    font-family: var(--font-jp);
    background-color: var(--bg-body);
    background-image: var(--light-bg);
    background-size: 20px 20px;
    color: var(--text-main);
    line-height: 1.8;
    overflow-x: hidden;
    min-height: 100dvh;
    position: relative;
    display:flex;
    flex-direction:column;
    /* ヘッダー固定分の余白 */
    padding-top: clamp(60px, 10vw, 80px);
    animation: pageFadeIn 0.6s ease forwards;
}

/* 閲覧モード中はbodyの動きを完全に停止させ、固定配置の基準ズレを防ぐ */
body.reader-open {
    transform: none !important;
    animation: none !important;
    overflow: hidden !important;
    position: fixed !important; /* 追加：body自体を固定 */
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

@keyframes pageFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   Header Style (LP共通)
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 3px solid #000;
    height: clamp(60px, 10vw, 80px);
    display: flex; 
    align-items: center;
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 9999;
}
.header-inner {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; max-width: 1200px; margin: 0 auto; 
    padding: 0 10px;
}
.logo-area { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-img { height: clamp(20px, 5vw, 28px); width: auto; }
.project-name {
    font-family: var(--font-en); 
    font-size: clamp(0.7rem, 2.2vw, 1.2rem);
    line-height: 1.1;
    color: var(--text-main); border-left: 2px solid #000;
    padding-left: 8px;
    text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
}
.project-name span { color: var(--primary); font-size: 0.8em; display: block; }
.header-nav { margin-left: auto; margin-right: 20px; }
.header-nav ul { display: flex; gap: 20px; align-items: center; list-style: none; }
.header-nav a { 
    font-size: clamp(0.75rem, 1.2vw, 0.95rem); 
    font-weight: 900; color: var(--text-main); 
    position: relative; font-family: var(--font-jp);
    white-space: nowrap; text-decoration: none;
}
.header-nav a:hover { color: var(--primary); }
.menu-toggle { 
    display: block; font-size: 1.8rem; cursor: pointer; color: #000; border: none; background: none; 
    z-index: 10001;
}
@media (max-width: 900px) { .header-nav { display: none; } }

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed; 
    top: clamp(60px, 10vw, 80px);
    left: 0; width: 100%; 
    height: calc(100vh - clamp(60px, 10vw, 80px));
    background: #fff; z-index: 10000;
    display: none; flex-direction: column; padding: 20px;
    border-top: 3px solid #000; overflow-y: auto;
}
.mobile-menu-overlay.open { display: flex; }
.mobile-menu-overlay ul { list-style: none; padding: 0; text-align: center; }
.mobile-menu-overlay li { margin: 15px 0; border-bottom: 1px dashed #eee; padding-bottom: 10px; }
.mobile-menu-overlay a { font-size: 1.2rem; font-weight: 900; color: #000; font-family: var(--font-jp); text-decoration: none; }


/* =========================================
   Main Content Style
   ========================================= */
.cover-section{max-width:900px;margin:0 auto;padding:40px 20px;position:relative;z-index:1}

.page-section{
    background:#fff;
    border:3px solid #000; /* コミック調の太枠 */
    padding:30px;
    margin-bottom:40px;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.1); /* ハードな影 */
    position: relative;
}
.page-section:last-child{margin-bottom:0}

/* タイトルセクション */
.title-section{
    text-align:center;
    border: 4px solid #000;
    box-shadow: 10px 10px 0 var(--primary);
    background: rgba(255,255,255,0.95);
}

.hero-text .edition{
    font-family: var(--font-en);
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1em;
    letter-spacing: 0.1em;
    background: #000;
    color: #fff;
    display: inline-block;
    padding: 2px 10px;
    transform: skewX(-10deg);
    margin-bottom: 10px;
}
.hero-text .main-title{
    font-family: var(--font-en);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1;
    color: var(--text-main);
    text-transform: uppercase;
    margin-bottom: 5px;
}
.hero-text .subtitle{
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}
.hero-text .site-label{
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-sub);
    border-top: 1px dashed #ccc;
    padding-top: 10px;
    margin-top: 10px;
    display: inline-block;
}

/* 表紙画像 */
.manga-image{
    display:block;
    max-width:100%;
    height:auto;
    margin:0 auto;
    border: 3px solid #000;
    box-shadow: 10px 10px 0 var(--accent);
}

/* 試し読みボタン */
.start-reading-btn{
    display:flex; align-items: center; justify-content: center;
    width:280px; margin:30px auto 20px; padding:18px 26px;
    background: var(--primary);
    border: 2px solid #000;
    border-radius: 0; /* 角丸なし */
    color:#fff;
    font-size:1.3rem;
    font-weight:900;
    font-family: var(--font-en);
    text-decoration:none;
    cursor:pointer;
    transition:.2s;
    box-shadow: 6px 6px 0 #000;
    letter-spacing: 0.05em;
}
.start-reading-btn:hover{
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 #000;
    background: #ff8f00;
}
.start-reading-btn i{margin-left:10px;}

/* 情報エリア */
.cover-info{margin-top:40px;text-align:left}
.cover-info h3{
    font-size:1.4rem;
    color:var(--text-main);
    margin-bottom:15px;
    padding-bottom:5px;
    border-bottom:4px solid var(--primary);
    font-family: var(--font-en);
    display: inline-block;
}
.cover-info p{font-size:1rem;line-height:1.8;color:var(--text-main); margin-bottom: 20px;}

/* ハイライト（作家紹介用） */
.text-highlight {
    background: linear-gradient(transparent 60%, #ffeb3b 60%);
    font-weight: bold;
    padding: 0 2px;
    display: inline;
}

/* =========================================
   Manga Reader Overlay (Full Screen & Mobile Size)
   ========================================= */
.manga-reader {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    background: #111; /* 背景は黒 */
    z-index: 999999; /* 最前面 */
}
.manga-reader.active { display: block; }

/* リーダーのヘッダー */
.reader-header {
    position: absolute; top: 0; left: 0; width: 100%; height: 60px;
    background: rgba(0,0,0,0.9);
    display: flex; align-items: center; justify-content: space-between; padding: 0 15px;
    z-index: 1001; border-bottom: 1px solid #333;
    color: #fff;
}
.reader-close-btn { background: none; border: none; color: #fff; font-size: 1.5em; cursor: pointer; padding: 10px; transition: .3s; }
.reader-close-btn:hover { color: var(--primary); }
.page-counter { color: #fff; font-size: 1.1em; font-weight: 800; font-family: var(--font-en); letter-spacing: 1px; }

.zoom-controls { display: flex; align-items: center; gap: 10px; color: #fff; flex-grow: 1; justify-content: center; margin: 0 15px; }
.zoom-controls input[type=range] { appearance: none; width: 100%; max-width: 200px; height: 4px; background: #555; border-radius: 2px; outline: none; }
.zoom-controls input[type=range]::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; background: var(--primary); cursor: pointer; border-radius: 50%; }

/* リーダーのコンテンツエリア（スマホサイズに制限） */
.reader-content {
    width: 100%; 
    height: 100%; 
    position: relative; 
    overflow: hidden; 
    touch-action: pan-y; 
    padding-top: 60px; 
    background: #222;
    
    /* ▼▼▼ PCでもスマホサイズで表示するための設定 ▼▼▼ */
    max-width: 500px; /* スマホ幅程度に制限 */
    margin: 0 auto;   /* 中央寄せ */
    border-left: 1px solid #333;
    border-right: 1px solid #333;
}

.manga-pages-container { display: flex; height: 100%; transition: transform 0.3s ease; }

/* ページ設定 */
.manga-page-full {
    min-width: 100%;
    height: calc(100% - 0px);
    display: flex; align-items: center; justify-content: center; /* centerに戻す */
    position: relative; overflow: hidden;
}
.manga-page-full img {
    --boost: 1;
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    /* 以下を追加：画像のドラッグを無効化しスワイプを有効にする */
    user-select: none;
    -webkit-user-drag: none;
}

/* Final page CTA */
.final-page {
    min-width: 100%;
    height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    background: #fff;
    padding: 60px 15px 100px; /* 上部を60pxに増やし、下部も100px確保 */
    text-align: center;
    overflow-y: auto;
}
.final-page h2 { font-size: 1.8em; color: var(--text-main); margin-bottom: 10px; font-weight: 900; font-family: var(--font-en); }
.final-catchphrase { font-size: 1.2em; font-weight: 900; margin-bottom: 15px; color: var(--text-main); border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 5px; }

.cta-grid { display: grid; gap: 15px; margin: 0 auto 20px; max-width: 900px; grid-template-columns: 1fr 1fr; width: 100%; }
@media(max-width: 600px) { .cta-grid { grid-template-columns: 1fr; } }

/* CTA Card Style Modified */
.cta-card {
    display: block; 
    background: #fff; border: 2px solid #000; padding: 15px;
    position: relative; box-shadow: 4px 4px 0 #000;
    /* リンクではなくなったため、ホバー時の挙動を控えめに */
}

.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cta-title { font-weight: 900; font-size: 1.1em; font-family: var(--font-en); color: #000; }
.cta-img { width: 100%; height: auto; border: 1px solid #eee; }

/* 特典説明テキスト */
.cta-desc {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-sub);
    margin-bottom: 5px;
}

/* CTA Button Style (New) */
.cta-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    padding: 8px;
    font-weight: 900;
    font-family: var(--font-en);
    text-decoration: none;
    border: 1px solid #000;
    transition: all 0.2s ease;
    font-size: 1rem;
}

/* Inactive State (Coming Soon) */
.cta-btn.disabled {
    background: #999;
    color: #fff;
    cursor: not-allowed;
    pointer-events: none; /* クリック無効化 */
    box-shadow: none;
    border-color: #777;
}

/* Active State (Support) - 活性化時に .active クラスを付与 */
.cta-btn.active {
    color: #fff;
    cursor: pointer;
    box-shadow: 2px 2px 0 #000;
}
.cta-btn.active:hover {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #000;
    opacity: 0.9;
}

/* === 各プランのカラー設定 (Active時のボタン色) === */

/* PLAN 1: ピンク */
.cta-card.p1 .cta-title { color: #E91E63; }
.cta-card.p1 .cta-btn.active { background: #E91E63; }

/* PLAN 2: 青 */
.cta-card.p2 .cta-title { color: #2196F3; }
.cta-card.p2 .cta-btn.active { background: #2196F3; }

/* PLAN 3: オレンジ */
.cta-card.p3 .cta-title { color: #FF9800; }
.cta-card.p3 .cta-btn.active { background: #FF9800; }

/* PLAN 4: 緑 */
.cta-card.p4 .cta-title { color: #4CAF50; }
.cta-card.p4 .cta-btn.active { background: #4CAF50; }


/* SNS & Footer in Reader */
.social-links-section { margin-top: 20px; width: 100%; max-width: 600px; }
.social-links-title { font-size: 1rem; font-weight: 900; margin-bottom: 10px; color: #000; }
.social-icons { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 20px; }
.social-icons a {
    width: 40px; height: 40px; font-size: 18px; display: inline-flex; justify-content: center; align-items: center;
    border-radius: 50%; color: #fff; text-decoration: none; transition: .2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* SNSアイコンのホバーアニメーション */
.social-icons a:hover {
    transform: translateY(-5px); /* 上に5px浮き上がる */
    box-shadow: 0 6px 12px rgba(0,0,0,0.3); /* 影を広げて浮遊感を出す */
}
.social-x { background: #000; } .social-line { background: #06C755; } .social-discord { background: #5865F2; } 
.social-mail { background: #1E90FF; } .social-tiktok { background: #000; } .social-youtube { background: #FF0000; }

/* ▼▼▼ UI表示切り替え用（スマホで矢印を消す） ▼▼▼ */
.manga-reader.ui-hidden .nav-arrow,
.manga-reader.ui-hidden .reader-header {
    opacity: 0;
    pointer-events: none; /* 見えていない時は押せないようにする */
}
.nav-arrow, .reader-header {
    transition: opacity 0.3s ease; /* ふわっと消えるアニメーション */
}

.cta-primary-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: 15px 30px; text-decoration: none; font-weight: 900; font-size: 1.1rem;
    color: #fff; background: var(--primary); border: 2px solid #000;
    box-shadow: 4px 4px 0 #000; font-family: var(--font-en);
    transition: .2s;
}
.cta-primary-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; background: #ff8f00; }

/* Navigation Arrows */
.nav-arrow {
    position: fixed; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); color: #fff;
    font-size: 2em; width: 60px; height: 60px; border-radius: 50%;
    cursor: pointer; z-index: 1002; transition: .2s; border: 2px solid #fff;
    display: none; align-items: center; justify-content: center;
}
.nav-arrow:hover { background: var(--primary); border-color: #000; color: #000; }
/* PC表示時、リーダーコンテンツの外側に矢印を配置するための調整 */
.nav-prev { left: calc(50% - 250px - 80px); } /* コンテンツ幅500pxの半分 + 余白 */
.nav-next { right: calc(50% - 250px - 80px); }

@media(max-width: 768px) {
    .hero-text .main-title { font-size: 2.5rem; }
    .page-section { padding: 20px; }
    .start-reading-btn { width: 100%; }
    
    /* 矢印を表示し、画面端に配置 */
    .nav-arrow { 
        display: flex !important; 
        width: 50px; height: 50px; /* 少し大きくして押しやすく */
        font-size: 1.5rem;
        
        /* 視認性対策：濃い黒背景 ＋ 白い枠線 */
        background-color: rgba(0, 0, 0, 0.85); 
        color: #ffffff;
        border: 2px solid #ffffff;
        
        /* 影をつけてさらに浮き立たせる */
        box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    }
    /* 位置を画面端に寄せる */
    .nav-prev { left: 10px; }
    .nav-next { right: 10px; }
    
    .reader-content { max-width: 100%; border: none; }
    .manga-page-full { align-items: flex-start; }
}

/* 言語選択ボタンエリア */
.language-select-area {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px auto 20px;
    width: 100%;
    max-width: 600px;
}

/* 言語ボタンごとの調整 */
.start-reading-btn.lang-btn {
    margin: 0; /* 既存のマージンをリセット */
    width: 48%; /* 横並び用に幅を調整 */
    padding: 15px 10px;
    font-size: 1.1rem;
}

/* スマホ表示時の調整 */
@media (max-width: 480px) {
    .language-select-area {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .start-reading-btn.lang-btn {
        width: 100%;
        max-width: 280px;
    }
}

/* 英語ボタン（青） */
.start-reading-btn.btn-en {
    background: #0056b3; /* サイト内のアクセントカラー（青）を使用 */
}
.start-reading-btn.btn-en:hover {
    background: #004494; /* ホバー時は少し濃い青へ */
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 #000;
}

/* 日本語ボタン（赤） */
.start-reading-btn.btn-jp {
    background: #E63737; /* 日本のイメージ、かつCAMPFIREボタンと同じ赤 */
}
.start-reading-btn.btn-jp:hover {
    background: #c41e1e; /* ホバー時は少し濃い赤へ */
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 #000;
}