/*!
Theme Name: Cocoon Child Moushu
Description: A custom child theme for Moushu Bunko (Novel Posting).
Template:   cocoon-master
Version:    1.0.9
*/

@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;500;700;800&display=swap");

/* ==============================================
   1. 基本カラー (Financial Times)
   ============================================== */
:root {
    --ft-bg: #FFF1E5;
    --ft-text: #001f3f;
    --ft-accent: #9E2F50;
    --ft-header-bg: #E6D2B5;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--ft-bg) !important;
    color: var(--ft-text);
    font-family: "Shippori Mincho", serif;
}

.main, .content, .wrap {
    background-color: transparent !important;
}

/* ==============================================
   2. ヘッダー構造（まともだった頃の配置に復元）
   ============================================== */
.header {
    background-color: var(--ft-header-bg) !important;
    color: var(--ft-text) !important;
    border-bottom: 4px solid var(--ft-accent);
    padding: 24px 0 0 0 !important; /* 下パディングを0にしてカルーセルと密着 */
    width: 100%;
}

.logo-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* 要素の順序を正常化（タイトルが上、タグが下） */
.site-name-text {
    order: 1;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.0;
    margin-bottom: 4px !important; /* 詰めた: 12→4 */
}

.tagline {
    order: 2;
    font-size: 16px;
    font-weight: 700;
    color: var(--ft-accent) !important;
    margin-bottom: 8px !important; /* 詰めた: 25→8 */
    position: relative;
    padding-bottom: 24px !important;
}

.tagline::after {
    content: '作家が本当に書きたい物語を投じるサイト';
    display: block;
    font-family: "Shippori Mincho", serif;
    font-size: 14px;
    font-weight: 500;
    color: #8a6d5a;
    letter-spacing: 0.12em;
    margin-top: 8px;
}

/* ==============================================
   3. プロフィールボタン（印章スタイル）
   ============================================== */
#navi, .navi, li#menu-item-281 {
    position: absolute !important;
    top: 55px !important;
    right: 24px !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

#navi a, .navi a, li#menu-item-281 a {
    background: transparent !important;
    border: 2px solid #9E2F50 !important;
    border-radius: 4px !important;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0 !important; /* テキスト非表示 */
    text-decoration: none !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

#navi a:hover, .navi a:hover, li#menu-item-281 a:hover {
    background: #9E2F50 !important;
}

#navi a::before, .navi a::before {
    content: "主";
    font-family: "Shippori Mincho", serif !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    color: #9E2F50 !important;
    line-height: 1 !important;
}

#navi a:hover::before, .navi a:hover::before {
    color: #ffffff !important;
}

/* ボタン内テキスト・アイコン非表示 */
#navi a *, .navi a *, li#menu-item-281 a * {
    display: none !important;
}


/* ==============================================
   4. カルーセル（ヘッダー直下に配置）
   ============================================== */
body.home #content, body.home .content, body.home #main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.moushu-carousel-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
    max-width: 800px;
    height: 450px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 5;
    overflow: hidden;
    border-radius: 4px;
    background: var(--ft-bg);
}

.moushu-carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    height: 100%;
}

.moushu-carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moushu-carousel-slide img {
    width: auto !important;
    max-width: 100% !important;
    height: 450px !important;
    max-height: 450px !important;
    display: block !important;
    object-fit: contain !important;
    margin: 0 auto;
}

/* カルーセルナビボタン */
.moushu-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 12px 16px;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
    transition: background 0.3s;
}

.moushu-carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.moushu-carousel-prev {
    left: 10px;
}

.moushu-carousel-next {
    right: 10px;
}

/* キャプション非表示（表紙画像にタイトルが含まれるため） */
.moushu-carousel-caption {
    display: none !important;
}

/* ==============================================
   5. フィーチャーセクション（音声・イラスト一覧リンク）
   ============================================== */
.site-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
}

.feature-card-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    max-width: 350px;
}

.feature-card {
    background: #fff;
    border: 1px solid #e0d5c7;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 12px;
    color: var(--ft-accent);
}

.feature-icon-emoji {
    font-size: 42px;
    margin-bottom: 10px;
    line-height: 1;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--ft-text);
    font-family: "Shippori Mincho", serif;
}

.feature-card-desc {
    font-size: 12px;
    color: #888;
    margin: 0;
    line-height: 1.5;
}

/* ==============================================
   6. その他調整（リンクの重なり解消）
   ============================================== */
.entry-card {
    margin-bottom: 20px !important;
}

.sns-facebook, .sns-hatebu, .sns-line, .sns-pocket, .sns-feedly, .sns-pinterest {
    display: none !important;
}

/* ==============================================
   7. 新着小説ナビボタン
   ============================================== */
.novel-series-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.nav-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-btn:hover {
    opacity: 0.8;
}

.nav-toc {
    background: var(--ft-accent);
    color: #fff;
}

.nav-audio {
    background: #ff9900;
    color: #fff;
}

.nav-first {
    background: #28a745;
    color: #fff;
}

.nav-latest {
    background: #333;
    color: #fff;
}

/* ==============================================
   8. タグ表示
   ============================================== */
.author-tag {
    display: inline-block;
    background: #f0e6d8;
    color: #8B6914;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    margin: 2px 2px;
}

.reader-tag {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    margin: 2px 2px;
}

/* ==============================================
   9. シェアエリア
   ============================================== */
.moushu-share-area {
    display: flex;
}

.moushu-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #555;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.moushu-share-btn:hover {
    background: #f5f5f5;
}

.moushu-share-icon {
    font-size: 16px;
}

/* ==============================================
   10. モバイル対応
   ============================================== */
@media (max-width: 600px) {
    .site-features {
        flex-direction: column;
        align-items: center;
    }

    .feature-card-link {
        max-width: 100%;
        width: 100%;
    }

    .moushu-carousel-wrapper {
        max-width: 100%;
        border-radius: 0;
    }

    .moushu-carousel-btn {
        padding: 8px 12px;
        font-size: 18px;
    }
}
