/* =========================================
   試し読みページ: はじめは「あ」から。
   LPと完全同一のデザインシステム
   Reader: 縦スクロール方式
   ========================================= */

/* === Variables（LPから完全コピー） === */
:root {
    --primary: #1B2A4A;
    --primary-light: #2E4068;
    --cta: #E8553D;
    --cta-hover: #D04430;
    --cta-glow: rgba(232, 85, 61, 0.4);
    --accent: #C8A85C;
    --accent-light: #F0E4C4;
    --pop-yellow: #FFD93D;
    --bg-body: #FAF8F4;
    --bg-warm: #F3EDE2;
    --text-main: #1a1a1a;
    --text-sub: #444;
    --text-light: #888;
    --border-bold: 3px solid #000;
    --font-jp: 'Noto Sans JP', sans-serif;
    --font-serif: 'Noto Serif JP', serif;
    --font-en: 'Oswald', sans-serif;
    --shadow-comic: 5px 5px 0 rgba(0,0,0,0.15);
    --shadow-pop: 6px 6px 0 #000;
}

/* === Base（LPと同一） === */
html { scroll-behavior: smooth; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-jp);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.8;
    overflow-x: hidden;
    padding-top: clamp(56px, 10vw, 72px);
    background-image: radial-gradient(circle, #e0ddd5 1px, transparent 1px);
    background-size: 24px 24px;
}
body.reader-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%; left: 0; right: 0;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; transition: 0.3s; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* === Header（LPから完全コピー） === */
header {
    background: rgba(250, 248, 244, 0.95);
    border-bottom: var(--border-bold);
    height: clamp(56px, 10vw, 72px);
    display: flex; align-items: center;
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 99999;
    backdrop-filter: blur(10px);
}
.header-inner {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px;
}
.logo-area { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-img { height: clamp(20px, 5vw, 28px); width: auto; }
.project-name {
    font-family: var(--font-en);
    font-size: clamp(0.65rem, 2vw, 0.95rem);
    line-height: 1.1; color: var(--text-main);
    border-left: 3px solid var(--cta); padding-left: 10px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.project-name span { color: var(--cta); font-size: 0.85em; font-weight: 900; }
.header-nav { margin-left: auto; margin-right: 20px; }
.header-nav ul { display: flex; gap: 20px; align-items: center; }
.header-nav a {
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    font-weight: 900; color: var(--text-main); white-space: nowrap;
}
.header-nav a:hover { color: var(--cta); }
@media (max-width: 900px) { .header-nav { display: none; } }
.menu-toggle {
    display: block; font-size: 1.6rem; cursor: pointer;
    color: #000; border: none; background: none; z-index: 10001;
}
.mobile-menu-overlay {
    position: fixed; top: clamp(56px, 10vw, 72px); left: 0; width: 100%;
    height: calc(100vh - clamp(56px, 10vw, 72px));
    background: var(--bg-body); z-index: 10000;
    display: none; flex-direction: column; padding: 20px;
    border-top: var(--border-bold); overflow-y: auto;
}
.mobile-menu-overlay.open { display: flex; }
.mobile-menu-overlay ul { text-align: center; }
.mobile-menu-overlay li { margin: 14px 0; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.mobile-menu-overlay a { font-size: 1.1rem; font-weight: 900; color: #000; }

/* === Cover Section === */
.cover-section {
    max-width: 800px; margin: 0 auto;
    padding: 30px 20px; position: relative; z-index: 1;
}
.page-section {
    background: #fff; border: var(--border-bold);
    padding: 30px; margin-bottom: 24px;
    box-shadow: var(--shadow-comic); position: relative;
}

/* タイトル */
.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-weight: 700; font-size: 1rem; color: #fff;
    background: var(--primary); display: inline-block;
    padding: 4px 16px; transform: skewX(-8deg);
    margin-bottom: 14px; letter-spacing: 0.1em;
}
.hero-text .main-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 900; line-height: 1.2;
    color: var(--text-main); margin-bottom: 10px;
}
.hero-text .subtitle {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    color: var(--text-sub); margin-bottom: 12px;
    white-space: nowrap;
}
.hero-text .site-label {
    font-size: 0.9rem; font-weight: bold; color: var(--text-sub);
    border-top: 1px dashed #ccc; padding-top: 10px; margin-top: 10px;
    display: inline-block;
}

/* メインビジュアル（大きく表示） */
.manga-image {
    max-width: 100%; width: 100%;
    margin: 0 auto;
    border: 3px solid #000;
    box-shadow: 10px 10px 0 var(--accent);
}

/* ボタン（横並び） */
.reading-buttons {
    display: flex; gap: 14px;
    margin: 28px auto 16px;
}
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--cta); color: #fff;
    padding: 16px 20px; font-size: 1rem; font-weight: 900;
    font-family: var(--font-jp);
    border: 3px solid #000; box-shadow: var(--shadow-pop);
    transition: all 0.2s ease; cursor: pointer;
    text-align: center; position: relative; overflow: hidden;
    flex: 1;
}
.btn-primary::before {
    content: ''; position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
    transform: translateX(-100%); transition: transform 0.6s;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover {
    background: var(--cta-hover);
    transform: translate(3px, 3px); box-shadow: 2px 2px 0 #000; color: #fff;
}
.btn-primary.pulse { animation: ctaPulse 2s ease-in-out infinite; }
@keyframes ctaPulse {
    0%, 100% { box-shadow: var(--shadow-pop), 0 0 0 0 var(--cta-glow); }
    50% { box-shadow: var(--shadow-pop), 0 0 0 12px transparent; }
}

/* カラー（Coming Soon - 無効時） */
.btn-color {
    background: #999; border-color: #777;
    cursor: not-allowed; box-shadow: none; animation: none;
    overflow: visible;
}
.btn-color::before { display: none; }
.btn-color:hover { background: #999; transform: none; box-shadow: none; }

/* カラー（有効時） */
.btn-color-active {
    background: #6C4AB6; border-color: #000;
    overflow: visible;
}
.btn-color-active:hover { background: #5A3A9E; }
.btn-color-disabled {
    background: #aaa; border-color: #888; box-shadow: 3px 3px 0 #666;
    cursor: not-allowed; overflow: visible; position: relative;
}
.btn-color-disabled:hover { background: #aaa; transform: none; box-shadow: 3px 3px 0 #666; }
.btn-badge {
    position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: var(--primary);
    font-size: 0.6rem; font-weight: 900;
    padding: 2px 8px; letter-spacing: 0.05em;
    white-space: nowrap; z-index: 1;
}

.note-text {
    font-size: 0.78rem; color: var(--text-light);
    text-align: center; margin-top: 8px; line-height: 1.7;
}

/* === 作品概要・作家紹介 === */
.info-heading {
    font-family: var(--font-serif);
    font-size: 1.4rem; color: var(--text-main);
    margin-bottom: 16px; padding-bottom: 8px;
    border-bottom: 4px solid var(--cta);
    display: inline-block;
}
.info-text {
    font-size: 1rem; line-height: 2; color: var(--text-main);
    margin-bottom: 10px;
}

.tag-row { margin-bottom: 16px; }
.tag {
    display: inline-block; background: var(--primary); color: #fff;
    padding: 4px 14px; font-size: 0.75rem; margin-right: 6px;
    font-weight: bold; transform: skewX(-8deg); letter-spacing: 0.05em;
}

/* 作家プロフィール */
.artist-profile {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 24px;
}
.artist-icon {
    width: 80px; height: 80px; border-radius: 50%;
    border: 3px solid var(--accent); object-fit: cover;
}
.artist-name {
    font-family: var(--font-serif);
    font-size: 1.5rem; font-weight: 900; color: var(--text-main);
}

/* 作家ストーリー */
.artist-story { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }
.artist-story-item {
    display: flex; gap: 14px; align-items: flex-start;
}
.story-icon {
    flex-shrink: 0; width: 40px; height: 40px;
    background: var(--primary); color: var(--accent);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.artist-story-item h4 {
    font-size: 1rem; font-weight: 900; color: var(--primary);
    margin-bottom: 4px;
}
.artist-story-item p {
    font-size: 0.92rem; line-height: 1.8; color: var(--text-sub);
}

/* 作家メッセージ */
.message-card {
    background: var(--bg-warm); border: 2px solid var(--accent);
    padding: 0; margin-top: 24px; overflow: hidden;
}
.msg-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; background: var(--primary); color: #fff;
}
.msg-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    border: 2px solid var(--accent); object-fit: cover;
}
.msg-header strong { font-family: var(--font-en); font-size: 0.9rem; letter-spacing: 0.05em; }
.msg-sub { font-size: 0.75rem; color: rgba(255,255,255,0.6); }
.msg-body { padding: 20px; }
.msg-body p { font-size: 0.95rem; line-height: 1.9; margin-bottom: 8px; }
.msg-appeal {
    font-size: 1.1rem; font-weight: 900; color: var(--cta);
    margin-top: 8px;
}

/* ===================================================
   縦スクロール漫画リーダー
   =================================================== */
.manga-reader {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #111;
    z-index: 999999;
}
.manga-reader.active {
    display: block;
}

/* リーダーヘッダー */
.reader-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: 50px;
    background: #000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 12px;
    z-index: 1000001;
    border-bottom: 1px solid #333;
}
.reader-close-btn {
    background: none; border: none; color: #fff;
    font-size: 1.4rem; cursor: pointer; padding: 8px;
}
.reader-close-btn:hover { color: var(--cta); }
.reader-title {
    color: rgba(255,255,255,0.5); font-size: 0.8rem;
    font-weight: 700; letter-spacing: 0.05em;
}
.page-counter {
    color: #fff; font-size: 0.85rem; font-weight: 800;
    font-family: var(--font-en);
    background: rgba(255,255,255,0.1);
    padding: 4px 12px; letter-spacing: 1px;
}

/* 縦スクロールエリア */
.reader-scroll {
    position: fixed;
    top: 50px; left: 0; right: 0; bottom: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: #1a1a1a;
}

/* 漫画ページ画像 */
.manga-page {
    width: 100%; max-width: 540px;
    margin: 0 auto; display: block;
}
.manga-page img {
    display: block; width: 100%; height: auto;
    user-select: none; -webkit-user-drag: none;
}

/* 最終ページ（CTA） */
.final-page {
    background: linear-gradient(180deg, var(--primary) 0%, #0f1a30 100%);
    padding: 50px 20px 60px; text-align: center;
    display: flex; flex-direction: column; align-items: center;
}
.final-page h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    color: var(--accent); margin-bottom: 12px; line-height: 1.5;
}
.final-catchphrase {
    font-size: 1.1rem; font-weight: 900;
    color: rgba(255,255,255,0.85); margin-bottom: 28px; line-height: 1.8;
}
.cta-area {
    display: flex; flex-direction: row; gap: 10px;
    width: 100%; max-width: 600px; margin-bottom: 30px;
}
.cta-link {
    background: #2563EB; border-color: #fff;
    font-size: clamp(0.7rem, 3.2vw, 0.95rem); padding: 14px 12px;
    flex: 1; white-space: nowrap; text-align: center;
}
.cta-link:hover { background: #1D4ED8; border-color: #000; }
.cta-campfire { background: #E8553D; }
.cta-campfire:hover { background: #D04430; }

/* CAMPFIRE COMING SOON */
.cta-campfire-soon {
    background: #aaa !important;
    border-color: #888 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    position: relative;
    overflow: visible !important;
}
.cta-campfire-soon:hover {
    background: #aaa !important;
    transform: none !important;
}
.camp-soon-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #e63b2e;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
    line-height: 1.4;
    z-index: 1;
}

/* SNS */
.social-links-section { margin-top: 10px; width: 100%; }
.social-links-title { font-size: 0.9rem; font-weight: 900; margin-bottom: 12px; color: rgba(255,255,255,0.5); }
.social-icons { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.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);
}
.social-icons a:hover { transform: translateY(-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; }

/* トップへ戻る */
.scroll-top-btn {
    position: fixed; bottom: 20px; right: 20px;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0,0,0,0.7); border: 2px solid rgba(255,255,255,0.3);
    color: #fff; font-size: 1.1rem;
    cursor: pointer; z-index: 1000002;
    display: none; align-items: center; justify-content: center; transition: .2s;
}
.scroll-top-btn.visible { display: flex; }
.scroll-top-btn:hover { background: var(--primary); border-color: var(--accent); }

/* ===================================================
   カラー原稿ページめくりリーダー（右→左読み）
   =================================================== */
.color-reader {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #111;
    z-index: 999999;
    flex-direction: column;
}
.color-reader.active { display: flex; }

.color-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    margin-top: 50px;
}

.color-page-container {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}

.color-page {
    display: none;
    width: 100%; height: 100%;
    align-items: center; justify-content: center;
    padding: 8px 0;
}
.color-page img {
    max-width: 100%; max-height: calc(100vh - 100px - 16px);
    object-fit: contain;
    user-select: none; -webkit-user-drag: none;
}

/* タップエリア（透明・左右） */
.tap-area {
    position: absolute; top: 0; height: 100%;
    z-index: 10; cursor: pointer;
}
.tap-prev { right: 0; width: 35%; }
.tap-center { left: 35%; width: 30%; }
.tap-next { left: 0; width: 35%; }

/* ナビ矢印 */
.nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 20;
    background: rgba(0,0,0,0.5); border: none;
    color: #fff; font-size: 1.2rem;
    width: 44px; height: 44px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.nav-arrow:hover { background: rgba(0,0,0,0.8); }
.nav-arrow.nav-hidden { display: none; }
.nav-prev { right: 10px; }
.nav-next { left: 10px; }

/* カラーCTAページ */
.color-final {
    overflow-y: auto;
    width: 100%; flex: 1;
}

/* === レスポンシブ === */
@media (max-width: 600px) {
    .cover-section { padding: 16px 12px; }
    .page-section { padding: 20px 16px; }
    .reading-buttons { flex-direction: row; gap: 10px; }
    .btn-primary { font-size: 0.85rem; padding: 14px 10px; }
    .manga-page { max-width: 100%; }
    .artist-icon { width: 60px; height: 60px; }
    .hero-text .subtitle { font-size: clamp(0.7rem, 2.4vw, 1rem); }
    .cta-link { font-size: clamp(0.7rem, 3vw, 0.9rem); padding: 12px 8px; }
    .cta-area { gap: 8px; }
    .nav-arrow { width: 36px; height: 36px; font-size: 1rem; }
    .nav-prev { right: 6px; }
    .nav-next { left: 6px; }
}
