/* =========================================================
   Web public series page
   ========================================================= */

.web-series-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 32px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
}

/* ---------------------------------------------------------
   Header image
   --------------------------------------------------------- */
.web-series-header-image {
    width: 100%;
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 8px;
    aspect-ratio: 16 / 6;
    background: #f5f5f5;
}

.web-series-header-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ---------------------------------------------------------
   Work information
   --------------------------------------------------------- */
.web-series-hero {
    padding-bottom: 28px;
    border-bottom: 1px solid #eee;
}

.web-series-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.web-series-title {
    min-width: 0;
    margin: 0;
    color: #333;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-word;
}

.web-series-status-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
}

.web-series-status-badge.is-serializing {
    border-color: #c9dcff;
    background: #eef5ff;
    color: #315d9a;
}

.web-series-status-badge.is-completed {
    border-color: #cfe8d3;
    background: #eefaf0;
    color: #2f7a43;
}

.web-series-subtitle {
    margin-bottom: 16px;
    color: #444;
    font-size: 18px;
    line-height: 1.7;
    word-break: break-word;
}

.web-series-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 28px;
    margin: 16px 0 22px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.web-series-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.web-series-meta-detail {
    display: grid;
    row-gap: 5px;
    justify-items: end;
    min-width: 0;
}

.web-series-meta-row {
    display: grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    justify-content: end;
    column-gap: 8px;
}

.web-series-meta-label,
.web-series-meta-value {
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    white-space: nowrap;
}

.web-series-meta-value--author {
    color: #334155;
    font-weight: 700;
}

.web-series-summary {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #f8f8f8;
    color: #444;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ---------------------------------------------------------
   Table of contents
   --------------------------------------------------------- */
.web-series-toc {
    margin: 30px 0;
    overflow: hidden;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    background: #fff;
}

.web-series-toc-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 18px 22px;
    border: 0;
    background: #fff;
    color: #333;
    text-align: left;
    cursor: pointer;
}

.web-series-toc-head:hover,
.web-series-toc-head:focus {
    background: #fafafa;
    color: #333;
    outline: none;
}

.web-series-toc-icon {
    flex: 0 0 auto;
    color: #666;
    font-size: 12px;
    line-height: 1;
}

.web-series-toc-title {
    color: #333;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.web-series-toc-body {
    border-top: 1px solid #f0f0f0;
}

.web-series-toc-body[hidden] {
    display: none;
}

.web-series-toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.web-series-toc-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color .15s ease;
}

.web-series-toc-item:last-child {
    border-bottom: 0;
}

.web-series-toc-item:hover,
.web-series-toc-item:focus-within {
    background: #fafafa;
}

.web-series-toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 16px 12px 16px 22px;
    color: #444;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    text-decoration: none;
}

.web-series-toc-link:hover,
.web-series-toc-link:focus {
    color: #111;
    text-decoration: none;
}

.web-series-toc-bullet {
    flex: 0 0 auto;
    color: #666;
    font-size: 12px;
    transform: translateY(-1px);
}

.web-series-toc-episode-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.web-series-toc-paid-meta {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    white-space: nowrap;
}

.web-series-toc-paid-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border: 1px solid #e7b36a;
    border-radius: 4px;
    background: #fff8ed;
    color: #9a5a08;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.web-series-toc-price {
    color: #8a5a18;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.web-series-toc-date {
    padding: 0 22px 0 8px;
    color: #777;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
}

.web-series-toc-empty {
    padding: 20px 22px;
    color: #777;
    font-size: 14px;
    line-height: 1.7;
}

/* ---------------------------------------------------------
   Purchase notice
   --------------------------------------------------------- */
.web-series-purchase {
    max-width: 680px;
    margin: 30px auto 0;
    padding: 22px;
    border: 1px solid #e3d4ab;
    border-radius: 10px;
    background: #f8f4e9;
    text-align: center;
}

.web-series-purchase-title {
    margin-bottom: 8px;
    color: #6b4a12;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}

.web-series-purchase-price {
    margin-bottom: 15px;
    color: #d9534f;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
}

.web-series-purchase-price span {
    font-size: 12px;
    font-weight: 400;
}

.web-series-purchase-note {
    margin-top: 10px;
    color: #666;
    font-size: 13px;
    line-height: 1.7;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 767px) {
    .web-series-card {
        padding: 18px;
    }

    .web-series-title {
        font-size: 24px;
    }

    .web-series-subtitle {
        font-size: 16px;
    }

    .web-series-meta {
        display: block;
        margin-top: 12px;
        margin-bottom: 18px;
    }

    .web-series-meta-detail {
        justify-items: start;
        margin-top: 8px;
    }

    .web-series-meta-row {
        justify-content: start;
    }

    .web-series-summary {
        font-size: 15px;
    }

    .web-series-toc-item {
        display: block;
    }

    .web-series-toc-link {
        flex-wrap: wrap;
        padding: 14px 16px 8px;
    }

    .web-series-toc-paid-meta {
        margin-left: 22px;
    }

    .web-series-toc-date {
        display: block;
        padding: 0 16px 12px 38px;
    }
}
