/* 故事详情页（由 scripts/build.mjs 生成）。共享 token 与组件见 base.css。 */

/* ============================================================
   Hero：模糊原画铺底 + 清晰海报
   ============================================================ */

.story-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    /* 原画铺到半透明顶栏下面 */
    margin-top: calc(-1 * var(--topbar-h));
    padding-top: var(--topbar-h);
    background: #0b0c10;
    color: var(--on-art);
}

.story-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}
.story-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .6;
    filter: blur(32px) saturate(140%);
    transform: scale(1.2);
}
.story-hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(11, 12, 16, .92) 0%, rgba(11, 12, 16, .7) 55%, rgba(11, 12, 16, .5) 100%),
        linear-gradient(0deg, var(--hero-fade) 0%, rgba(11, 12, 16, 0) 30%);
}

.story-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
    align-items: center;
    gap: clamp(32px, 6vw, 80px);
    padding-block: clamp(40px, 6vw, 72px) clamp(48px, 7vw, 88px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--on-art-3);
    font-size: .85rem;
}
.breadcrumb a {
    color: var(--on-art-2);
    text-decoration: none;
    transition: color .2s;
}
.breadcrumb a:hover { color: var(--gold-text); }

.story-hero__tags {
    margin: 24px 0 12px;
    color: var(--gold-text);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .08em;
}

.story-hero h1 {
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    font-weight: 700;
    line-height: 1.15;
    text-wrap: balance;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .45);
}

.story-hero__lede {
    max-width: 30em;
    margin: 0 0 10px;
    color: var(--on-art-2);
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    line-height: 1.8;
}

.story-hero__meta { margin: 0 0 28px; color: var(--on-art-3); font-size: .9rem; }

.story-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.story-poster {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .1);
}

/* ============================================================
   正文
   ============================================================ */

.story-body {
    max-width: calc(760px + 2 * var(--gutter));
    padding-block: clamp(48px, 7vw, 80px) 16px;
}

.story-body section + section { margin-top: 44px; }

.story-body h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.35;
}
.story-body section h2::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 1px;
    background: var(--accent);
    transform: rotate(45deg);
}

.story-body p {
    margin: 0;
    color: var(--text-2);
    font-family: var(--font-display);
    font-size: 1.08rem;
    line-height: 2;
}

.story-body h3 {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}
.story-sub { margin: 24px 0 10px !important; color: var(--text); }

.story-body ul,
.story-body ol { margin: 0; padding: 0; list-style: none; }

/* 开场试读：小说正文的排版，左侧一道强调色引线 */
.story-opening__note,
.story-opening__ask {
    font-family: var(--font-ui) !important;
    font-size: .9rem !important;
    color: var(--text-3) !important;
    line-height: 1.7 !important;
}
.story-opening__text {
    margin: 16px 0 20px;
    padding: 4px 0 4px 20px;
    border-left: 2px solid var(--accent-soft);
}
.story-opening__text p { color: var(--text); }
.story-opening__text p + p { margin-top: .9em; }
.story-opening__choices {
    display: grid;
    gap: 8px;
    margin: 10px 0 20px !important;
}
.story-opening__choices li {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: .95rem;
    line-height: 1.6;
}
.story-opening__choices li::before { content: "▸ "; color: var(--accent-text); }

/* 主要角色 */
.story-cast { display: grid; gap: 12px; }
.story-cast li {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}
.story-cast h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; color: var(--text); }
.story-cast__tag { color: var(--accent-text); font-size: .82rem; font-weight: 500; }
.story-cast p { font-size: .98rem; line-height: 1.85; }
.story-cast .story-cast__meta {
    margin-top: 6px;
    color: var(--text-3);
    font-family: var(--font-ui);
    font-size: .85rem;
    line-height: 1.7;
}

/* 章节：带序号竖线的时间轴 */
.story-chapters { margin-bottom: 16px !important; }
.story-chapters li {
    position: relative;
    padding: 0 0 16px 22px;
    border-left: 1px solid var(--line-strong);
}
.story-chapters li:last-child { padding-bottom: 0; border-left-color: transparent; }
.story-chapters li::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 7px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
}
.story-chapters h3 { color: var(--text); }
.story-chapters p { font-size: .98rem; line-height: 1.8; }

.story-list li {
    position: relative;
    padding-left: 18px;
    color: var(--text-2);
    font-size: .98rem;
    line-height: 1.85;
}
.story-list li + li { margin-top: 6px; }
.story-list li::before { content: "·"; position: absolute; left: 4px; color: var(--accent-text); font-weight: 700; }
.story-list strong { color: var(--text); font-weight: 600; }

.story-about {
    margin-top: 56px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--surface), var(--bg-soft));
}
.story-about h2 { font-family: var(--font-ui); font-size: 1.1rem; }
.story-about p { font-family: var(--font-ui); font-size: .95rem; line-height: 1.85; }
.story-about .btn { margin-top: 20px; }

/* ============================================================
   相关推荐
   ============================================================ */

.related { padding-block: clamp(48px, 7vw, 80px); }

.related__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.related__head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    font-weight: 700;
}
.related__more {
    color: var(--accent-text);
    font-size: .9rem;
    text-decoration: none;
    white-space: nowrap;
}
.related__more:hover { text-decoration: underline; text-underline-offset: 3px; }

.related__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 860px) {
    .story-hero__inner { grid-template-columns: 1fr; }
    .story-poster { order: -1; width: min(56vw, 240px); }
    .related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .story-hero__ctas .btn { flex: 1 1 auto; }
    .story-about { padding: 22px; }
    .story-body p { font-size: 1.02rem; }
}
