@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;500;700;800&display=swap");

/*!
Theme Name: Cocoon Child Moushu
Description: A custom child theme for Moushu Bunko (Novel Posting).
Template:   cocoon-master
Version:    1.0.5
*/

/* ==============================================
   1. Financial Times Style (Base Colors)
   ============================================== */
:root {
    --ft-bg: #FFF1E5;
    /* Salmon/Off-white */
    --ft-text: #001f3f;
    /* Dark Navy (User Request) */
    --ft-accent: #9E2F50;
    /* Claret */
    --ft-header-bg: #E6D2B5;
    /* Darker Version of FT Background */
    --ft-link: #333333;
}

/* Reset margins to prevent white bars */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: var(--ft-bg) !important;
    color: var(--ft-text);
}

.main,
.content,
.wrap,
.entry-content,
.footer {
    background-color: transparent !important;
    /* Let body bg shine through */
    color: var(--ft-text);
}

/* Header Area */
.header {
    background-color: var(--ft-header-bg) !important;
    color: var(--ft-text) !important;
    /* Text color back to dark for beige bg */
    border-bottom: 4px solid var(--ft-accent);
    padding: 30px 0;
    width: 100%;
}

/* Ensure no white boxes remain */
.entry-card,
.widget,
.card-content {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Typography: Retro Title & Tagline */
.site-name-text {
    font-family: "Shippori Mincho", serif;
    font-weight: 800;
    font-size: 42px;
    /* Even Larger */
    color: var(--ft-text) !important;
    letter-spacing: 0.1em;
}

.tagline {
    font-family: "Shippori Mincho", serif;
    color: var(--ft-accent) !important;
    margin-top: 15px;
    font-weight: 700;
    font-size: 18px;
}

/* Header Layout: Series below Title (Flex Trick) */
.logo-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-name-text {
    order: 1;
}

.tagline {
    order: 2;
}

/* Links */
a {
    color: var(--ft-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==============================================
   2. Novel Reader Styles (Base)
   ============================================== */
.novel-body {
    font-family: "Shippori Mincho", serif;
    font-size: 19px;
    line-height: 2.2;
    text-align: justify;
    margin-bottom: 50px;
    color: var(--ft-text);
}

/* ==============================================
   3. Reader Toggles (State Classes)
   ============================================== */

/* Gothic Mode - Strong Selector */
body.is-gothic .novel-body,
body.is-gothic .novel-body p {
    font-family: "Helvetica Neue", Arial, sans-serif !important;
}

/* Vertical Mode (Tategaki) */
.novel-reader-container.is-vertical {
    writing-mode: vertical-rl;
    -ms-writing-mode: tb-rl;
    overflow-x: auto;
    overflow-y: hidden;
    height: 85vh;
    padding: 20px 40px;
    background: #fff8f0;
    border: 1px solid #eee;
    margin-bottom: 30px;
    font-family: "Shippori Mincho", serif;
}

/* Vertical Mode Image Handling */
.novel-reader-container.is-vertical .novel-featured-image {
    max-height: 90%;
    width: auto;
    margin-left: 50px;
    display: inline-block;
    vertical-align: top;
}

.novel-reader-container.is-vertical .novel-featured-image img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

/* ==============================================
   4. Reader Toolbar
   ============================================== */
.reader-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    justify-content: flex-end;
}

.reader-btn {
    background: transparent;
    border: 1px solid #333;
    color: #333;
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.reader-btn:hover,
.reader-btn.active {
    background: var(--ft-accent);
    color: #fff;
    border-color: var(--ft-accent);
}

/* ==============================================
   5. Novel Specific Components
   ============================================== */
.novel-featured-image {
    text-align: center;
    margin-bottom: 30px;
}

.novel-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ==============================================
   6. SNS Share Buttons Customization
   ============================================== */
/* Show only X (Twitter) and Copy Link */
.sns-facebook,
.sns-hatebu,
.sns-line,
.sns-pocket,
.sns-feedly,
.sns-pinterest {
    display: none !important;
}

/* ==============================================
   7. Top Page Series Navigation
   ============================================== */
.novel-series-nav {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.novel-series-nav .nav-btn {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    transition: all 0.2s;
}

.novel-series-nav .nav-btn:hover {
    background: #f0f0f0;
    text-decoration: none;
    color: #000;
}

.novel-series-nav .nav-first {
    border-color: #9E2F50;
    color: #9E2F50;
    font-weight: bold;
}

.novel-series-nav .nav-first:hover {
    background: #9E2F50;
    color: #fff;
}

.novel-series-nav .nav-latest {
    /* Standard Style */
}

.novel-series-nav .nav-toc {
    /* Standard Style */
}

/* Vertical Mode Navigation Adjustment */
.is-vertical-mode .novel-navigation {
    flex-direction: row-reverse;
}

/* ==============================================
   8. Tag Styles (Global)
   ============================================== */
.genre-tag,
.author-tag,
.reader-tag,
.novel-tag {
    display: inline-block;
    padding: 3px 8px;
    margin-right: 5px;
    margin-bottom: 5px;
    color: #555;
    background: #f1f1f1;
    border-radius: 4px;
    font-size: 0.8em;
    text-decoration: none;
    line-height: 1.4;
    vertical-align: middle;
}

.genre-tag {
    background: #e3f2fd;
    color: #0d47a1;
}

.author-tag {
    background: #e8f5e9;
    color: #1b5e20;
}

.reader-tag {
    background: #fff3e0;
    color: #e65100;
    border: 1px dashed #ffb74d;
}


.no-tag {
    color: #ccc;
    font-size: 0.8em;
}

/* ==============================================
   9. Feedback Button
   ============================================== */
.conversion-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    color: #333;
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.conversion-popup-btn:hover {
    background: #f0f0f0;
    text-decoration: none;
}

.moushu-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    margin-right: 10px;
    margin-bottom: 10px;
}

.moushu-share-btn:hover {
    opacity: 0.9;
    text-decoration: none;
}

.moushu-share-btn.is-x {
    background-color: #000;
    color: #fff;
    border-color: #000;
}


.moushu-share-btn.is-copy {
    background-color: #f0f0f0;
    color: #333;
}

/* Feedback Preview Table */
.feedback-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.feedback-preview-table tr {
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.feedback-preview-table tr:hover {
    background: #f9f9f9;
}

.feedback-preview-table tr:last-child {
    border-bottom: none;
}

.feedback-preview-table td {
    padding: 8px 12px;
    vertical-align: middle;
}

.feedback-preview-table .fb-date {
    width: 90px;
    color: #999;
    font-size: 0.85em;
    white-space: nowrap;
}

.feedback-preview-table .fb-author {
    width: 120px;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.feedback-preview-table .fb-author::after {
    content: "さん";
    font-weight: normal;
    font-size: 0.8em;
    color: #999;
    margin-left: 2px;
}

.feedback-preview-table .fb-content {
    color: #333;
}

@media (max-width: 600px) {
    .feedback-preview-table .fb-date {
        display: none;
    }

    .feedback-preview-table .fb-author {
        width: auto;
        max-width: 80px;
    }
}

/* ==============================================
   10. Site Ticker & Features (Front Page)
   ============================================== */

/* Ticker Area */
.site-ticker-area {
    width: 100%;
    /* Dark, elegant background (Deep reddish-charcoal) */
    background: #221b1b !important;
    color: #f2e8e8;
    overflow: hidden;
    position: relative;
    /* Adjust height */
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Elegant borders */
    border-top: 1px solid #584246;
    border-bottom: 1px solid #584246;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.site-ticker-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticker-text {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 500;
    font-family: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateX(50px);
    /* Start slightly offset instead of full width for cleaner fade */
    transition: transform 1s ease, opacity 1s ease;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ticker-text.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.ticker-text.leave {
    opacity: 0;
    transform: translateX(-50px);
    /* Leave slightly offset */
    z-index: 1;
    transition: transform 1s ease, opacity 1s ease;
}

.ticker-text.slow-anim {
    /* Just slower timing, no color change */
    transition: transform 2s ease, opacity 2s ease;
}

@media (max-width: 768px) {
    .site-ticker-area {
        height: 50px;
        padding: 10px 0;
    }

    .ticker-text {
        font-size: 1rem;
    }
}

/* Feature Cards Grid */
.site-features {
    max-width: 900px;
    margin: 30px auto 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Changed to 2 columns */
    gap: 20px;
}

.feature-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s;
}

.feature-card-link:hover {
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.feature-card {
    background: #fff;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: row;
    /* Horizontal layout for compactness */
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-height: 80px;
    /* Ensure uniform height */
    transition: box-shadow 0.2s, border-color 0.2s;
}

.feature-card-link:hover .feature-card {
    box-shadow: 0 4px 12px rgba(158, 47, 80, 0.15);
    /* Tint of accent color */
    border-color: var(--ft-accent);
}

.feature-icon {
    font-size: 2rem;
    color: var(--ft-accent);
    /* No margin bottom needed for row layout */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
}

.feature-card h3 {
    font-size: 1rem;
    margin: 0;
    color: #333;
    font-weight: 600;
    text-align: left;
    line-height: 1.3;
}

/* Responsive Features */
@media (max-width: 768px) {
    .site-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature-card {
        padding: 12px 15px;
    }
}

.ticker-item {
    animation-duration: 15s;
    /* Faster on mobile */
    font-size: 1rem;
}
}