/* ===================================================================
   里番漫画创作基地 — 全站样式表
   视觉风格：漫画分镜 + 手绘草稿
   主色 #FF8C00 漫画橙 / 辅助 #4CAF50 画笔绿 / #607D8B 铅笔灰
   背景 #FDFDFD 画稿纸白 / 卡片 #FFFFFF / 正文 #333333
   =================================================================== */

:root {
  --manga-orange: #FF8C00;
  --brush-green: #4CAF50;
  --pencil-gray: #607D8B;
  --paper-white: #FDFDFD;
  --card-white: #FFFFFF;
  --text-main: #333333;
  --text-soft: #5a5a5a;
  --line-ink: #222222;
  --orange-soft: #FFF1E0;
  --green-soft: #EAF6EB;
  --shadow-hand: 4px 4px 0 rgba(34, 34, 34, 0.12);
  --shadow-card: 0 6px 22px rgba(96, 96, 96, 0.12);
  --radius: 14px;
  --maxw: 1180px;
  --font-title: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--paper-white);
  background-image:
    linear-gradient(rgba(96,96,96,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,96,96,0.035) 1px, transparent 1px);
  background-size: 26px 26px;
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--manga-orange); text-decoration: none; transition: color .2s; }
a:hover { color: #e67c00; }

img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--line-ink);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.22rem; color: var(--line-ink); }
.brand img { width: 40px; height: 40px; border: 2px solid var(--line-ink); border-radius: 10px; background: #fff; }
.brand span { white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  display: inline-block; padding: 8px 12px; color: var(--text-main);
  font-weight: 600; border-radius: 8px; font-size: .95rem;
}
.nav-links a:hover { background: var(--orange-soft); color: var(--manga-orange); }
.nav-cta {
  background: var(--manga-orange); color: #fff !important;
  border: 2px solid var(--line-ink); box-shadow: var(--shadow-hand);
}
.nav-cta:hover { background: #ff9d1f; color: #fff !important; }
.nav-toggle { display: none; background: none; border: 2px solid var(--line-ink); border-radius: 8px;
  width: 42px; height: 38px; font-size: 1.3rem; cursor: pointer; }

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0; }
.section-title {
  font-family: var(--font-title); font-size: 1.85rem; font-weight: 800;
  color: var(--line-ink); margin-bottom: 8px; position: relative; display: inline-block;
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 64%; height: 6px;
  background: var(--manga-orange); border-radius: 4px; transform: rotate(-1deg);
}
.section-sub { color: var(--text-soft); margin-bottom: 30px; font-size: 1rem; }

/* 手绘边框卡片 */
.hand-card {
  background: var(--card-white);
  border: 2.5px solid var(--line-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hand);
  transition: transform .25s ease, box-shadow .25s ease;
}
.hand-card:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: 7px 9px 0 rgba(34,34,34,.16); }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 64px 0 70px;
  background: linear-gradient(135deg, var(--orange-soft) 0%, #fff 60%);
  border-bottom: 3px dashed var(--pencil-gray);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 2.7rem; line-height: 1.25; color: var(--line-ink); font-weight: 900; margin-bottom: 16px; }
.hero h1 .hl { color: var(--manga-orange); }
.hero p.lead { font-size: 1.12rem; color: var(--text-soft); margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px;
  font-weight: 700; border-radius: 10px; border: 2.5px solid var(--line-ink);
  cursor: pointer; font-size: 1rem; box-shadow: var(--shadow-hand);
  transition: transform .15s;
}
.btn:hover { transform: translate(-2px,-2px); }
.btn-primary { background: var(--manga-orange); color: #fff; }
.btn-secondary { background: var(--brush-green); color: #fff; }
.btn-ghost { background: #fff; color: var(--line-ink); }
.hero-figure {
  position: relative; border: 3px solid var(--line-ink); border-radius: 18px; overflow: hidden;
  box-shadow: 8px 10px 0 rgba(34,34,34,.14); transform: rotate(1deg);
}
.hero-figure img { width: 100%; }
.hero-badges { display: flex; gap: 22px; margin-top: 28px; flex-wrap: wrap; }
.hero-badge { text-align: center; }
.hero-badge b { display: block; font-size: 1.6rem; color: var(--manga-orange); font-weight: 900; }
.hero-badge span { font-size: .85rem; color: var(--pencil-gray); }

/* ---------- 漫画轮播 ---------- */
.carousel { position: relative; }
.carousel-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.carousel-track::-webkit-scrollbar { height: 8px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--manga-orange); border-radius: 8px; }
.comic-card { flex: 0 0 auto; width: 210px; scroll-snap-align: start; overflow: hidden; }
.comic-card .cover { position: relative; }
.comic-card .cover img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.comic-card .tag {
  position: absolute; top: 10px; left: 10px; background: var(--manga-orange); color: #fff;
  font-size: .72rem; padding: 3px 9px; border-radius: 6px; font-weight: 700; border: 2px solid var(--line-ink);
}
.comic-card .meta { padding: 12px 14px; }
.comic-card .meta h3 { font-size: 1.02rem; color: var(--line-ink); margin-bottom: 4px; }
.comic-card .meta p { font-size: .82rem; color: var(--pencil-gray); }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* 模块卡片（首页内容模块 → 详情页） */
.module-card { overflow: hidden; display: flex; flex-direction: column; }
.module-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-bottom: 2.5px solid var(--line-ink); }
.module-card .body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.module-card .body h3 { font-size: 1.12rem; color: var(--line-ink); margin-bottom: 8px; }
.module-card .body p { font-size: .92rem; color: var(--text-soft); margin-bottom: 14px; flex: 1; }
.module-card .more { font-weight: 700; color: var(--manga-orange); }

/* 漫画家卡片 */
.artist-card { text-align: center; padding: 22px 16px; }
.artist-card img { width: 92px; height: 92px; border-radius: 50%; border: 3px solid var(--line-ink); margin: 0 auto 12px; object-fit: cover; }
.artist-card h3 { font-size: 1.08rem; color: var(--line-ink); }
.artist-card .role { font-size: .82rem; color: var(--brush-green); font-weight: 700; margin-bottom: 8px; }
.artist-card p { font-size: .86rem; color: var(--text-soft); }

/* ---------- 标签/胶囊 ---------- */
.chip { display: inline-block; background: var(--green-soft); color: var(--brush-green);
  border: 2px solid var(--brush-green); padding: 4px 12px; border-radius: 20px; font-size: .8rem; font-weight: 700; margin: 3px; }
.chip.orange { background: var(--orange-soft); color: var(--manga-orange); border-color: var(--manga-orange); }
.chip.gray { background: #eef1f3; color: var(--pencil-gray); border-color: var(--pencil-gray); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--line-ink); color: #d6d6d6; padding: 50px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid ul li a { color: #bdbdbd; font-size: .9rem; }
.footer-grid ul li a:hover { color: var(--manga-orange); }
.footer-brand p { font-size: .9rem; color: #aaa; margin-top: 12px; }
.footer-bottom { border-top: 1px solid #444; margin-top: 30px; padding-top: 18px; text-align: center; font-size: .82rem; color: #999; }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding: 16px 0; font-size: .85rem; color: var(--pencil-gray); }
.breadcrumb a { color: var(--pencil-gray); }
.breadcrumb a:hover { color: var(--manga-orange); }
.breadcrumb span { margin: 0 6px; }

/* ---------- 内页通用 ---------- */
.page-head { background: linear-gradient(135deg, var(--green-soft), #fff); border-bottom: 3px dashed var(--pencil-gray); padding: 40px 0; }
.page-head h1 { font-size: 2.1rem; color: var(--line-ink); font-weight: 900; }
.page-head p { color: var(--text-soft); margin-top: 8px; max-width: 760px; }
.prose { max-width: 880px; }
.prose h2 { font-size: 1.5rem; color: var(--line-ink); margin: 30px 0 12px; border-left: 6px solid var(--manga-orange); padding-left: 12px; }
.prose h3 { font-size: 1.18rem; color: var(--line-ink); margin: 22px 0 10px; }
.prose p { margin-bottom: 14px; color: var(--text-main); }
.prose ul, .prose ol { margin: 0 0 16px 22px; }
.prose li { margin-bottom: 7px; }
.prose blockquote { border-left: 5px solid var(--brush-green); background: var(--green-soft); padding: 12px 18px; border-radius: 8px; margin: 16px 0; color: var(--text-soft); }

.content-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.sidebar .hand-card { padding: 18px; margin-bottom: 22px; }
.sidebar h4 { font-size: 1.05rem; color: var(--line-ink); margin-bottom: 12px; }
.sidebar ul { list-style: none; }
.sidebar ul li { margin-bottom: 9px; font-size: .9rem; border-bottom: 1px dashed #ddd; padding-bottom: 9px; }

/* FAQ */
.faq-item { border: 2px solid var(--line-ink); border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.faq-q { padding: 14px 18px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--line-ink); }
.faq-q:hover { background: var(--orange-soft); }
.faq-a { padding: 0 18px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; color: var(--text-soft); font-size: .92rem; }
.faq-item.open .faq-a { max-height: 400px; padding: 0 18px 16px; }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-q .icon { transition: transform .3s; color: var(--manga-orange); font-size: 1.3rem; }

/* 阅读器（详情页） */
.reader { background: #fafafa; border: 2.5px solid var(--line-ink); border-radius: 12px; padding: 16px; }
.reader.night { background: #1c1c1c; }
.reader.night img { filter: brightness(.9); }
.reader-toolbar { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 12px; }
.reader-toolbar button { background: #fff; border: 2px solid var(--line-ink); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; }
.reader img { width: 100%; margin-bottom: 10px; border-radius: 6px; }

/* 分镜评论区 */
.panel-comments { margin-top: 24px; }
.comment { display: flex; gap: 12px; padding: 14px; border: 2px dashed #ddd; border-radius: 10px; margin-bottom: 12px; background: #fff; }
.comment img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line-ink); }
.comment .c-body b { color: var(--line-ink); }
.comment .c-body .panel-ref { font-size: .76rem; color: var(--manga-orange); font-weight: 700; }
.comment .c-body p { font-size: .9rem; color: var(--text-soft); margin-top: 4px; }
.emoji-bar { margin-top: 8px; }
.emoji-bar span { cursor: pointer; font-size: 1.2rem; margin-right: 6px; }

/* 搜索 */
.search-box { display: flex; gap: 10px; max-width: 640px; margin: 0 auto 24px; }
.search-box input { flex: 1; padding: 13px 16px; border: 2.5px solid var(--line-ink); border-radius: 10px; font-size: 1rem; }
.search-results .result-item { padding: 16px 0; border-bottom: 1px dashed #ddd; }
.search-results .result-item h3 { color: var(--manga-orange); font-size: 1.1rem; }
.search-results .result-item .url { font-size: .8rem; color: var(--brush-green); }

/* 404 */
.error-wrap { text-align: center; padding: 80px 0; }
.error-wrap .code { font-size: 6rem; font-weight: 900; color: var(--manga-orange); line-height: 1; }

/* 工具 / 步骤 */
.step-list { counter-reset: step; list-style: none; }
.step-list li { position: relative; padding: 14px 14px 14px 60px; margin-bottom: 14px; background: #fff; border: 2px solid var(--line-ink); border-radius: 10px; }
.step-list li::before { counter-increment: step; content: counter(step); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; background: var(--manga-orange); color: #fff; border: 2px solid var(--line-ink); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; margin: 16px 0; background: #fff; }
.tbl th, .tbl td { border: 2px solid var(--line-ink); padding: 10px 12px; text-align: left; font-size: .9rem; }
.tbl th { background: var(--orange-soft); color: var(--line-ink); }

/* CTA 横幅 */
.cta-banner { background: linear-gradient(135deg, var(--manga-orange), #ffb04d); border: 3px solid var(--line-ink); border-radius: 18px;
  padding: 38px; text-align: center; color: #fff; box-shadow: var(--shadow-hand); }
.cta-banner h2 { font-size: 1.8rem; margin-bottom: 10px; }
.cta-banner p { margin-bottom: 18px; }

/* 点赞爱心爆裂 */
.like-btn { background: #fff; border: 2px solid var(--line-ink); border-radius: 20px; padding: 6px 14px; cursor: pointer; font-weight: 700; }
.like-btn.liked { background: var(--orange-soft); color: var(--manga-orange); }
.heart-burst { position: fixed; pointer-events: none; font-size: 1.5rem; animation: burst .8s ease-out forwards; }
@keyframes burst { 0% { opacity: 1; transform: scale(.5) translateY(0);} 100% { opacity: 0; transform: scale(1.4) translateY(-60px);} }

/* 动画 */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式断点 ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links { position: fixed; top: 66px; right: 0; width: 70%; height: calc(100vh - 66px);
    background: #fff; flex-direction: column; align-items: flex-start; padding: 20px; gap: 4px;
    border-left: 3px solid var(--line-ink); transform: translateX(105%); transition: transform .3s; }
  .nav-links.open { transform: none; }
  .nav-links a { width: 100%; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 2rem; }
  .section-title { font-size: 1.5rem; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
