﻿/* 包子漫画 · bzcomics.cn — 分格漫画版式 */

:root {
  --paper: #fbf6ec;
  --paper-2: #f6efe0;
  --ink: #191510;
  --ink-soft: #4c4339;
  --muted: #857a6b;
  --line: #e3d8c4;
  --pink: #ed5d8c;
  --pink-soft: #ffe4ec;
  --yellow: #ffca3a;
  --shadow: 6px 6px 0 rgba(25, 21, 16, 0.88);
  --width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, p, ol, dl, dd, dt, figure { margin: 0; }

ol { padding: 0; list-style: none; }

.paper {
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 26px;
}

/* ---------- 顶栏 ---------- */

.rail {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.rail-in {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 70px;
}

.stamp {
  display: flex;
  align-items: center;
  gap: 11px;
}

.stamp img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--ink);
}

.stamp span {
  display: flex;
  flex-direction: column;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.6px;
  line-height: 1.3;
}

.stamp em {
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.rail-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
  color: var(--ink-soft);
}

.rail-nav a:hover { color: var(--pink); }

.rail-btn {
  align-items: center;
  height: 40px;
  padding: 0 20px;
  background: var(--pink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.rail-btn:not([hidden]) { display: inline-flex; }

.rail-btn:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }

/* ---------- 首屏分格 ---------- */

.hero {
  padding: 40px 0 78px;
  background:
    radial-gradient(620px 320px at 82% 0%, rgba(255, 202, 58, 0.22), transparent 70%),
    var(--paper);
}

.panel-stage {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  background: #fffdf8;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

.panel-title {
  grid-column: span 6;
  padding: 34px 30px 30px;
}

.kicker {
  font-size: 11px;
  letter-spacing: 2.4px;
  color: var(--pink);
  font-weight: 700;
}

.panel-title h1 {
  margin-top: 14px;
  font-size: clamp(38px, 4.8vw, 58px);
  line-height: 1.1;
  letter-spacing: -1.4px;
  font-weight: 900;
}

.panel-title h1 span {
  display: block;
  margin-top: 12px;
  font-size: clamp(17px, 1.9vw, 21px);
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.hero-note {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
}

.panel-shot {
  grid-column: span 3;
  padding: 0;
  overflow: hidden;
}

.panel-shot img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  object-position: top center;
}

.panel-shot-alt { transform: rotate(1.4deg); }

.panel-lead {
  grid-column: span 7;
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.panel-lead > p {
  color: var(--ink-soft);
  font-size: 15.5px;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-ink {
  align-items: center;
  height: 48px;
  padding: 0 28px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  border: 2px solid var(--ink);
}

.btn-ink:not([hidden]) { display: inline-flex; }

.btn-ink:hover { background: #302a22; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  border: 2px solid var(--ink);
  font-weight: 700;
  background: #fffdf8;
}

.btn-outline:hover { background: var(--pink-soft); }

.panel-facts {
  grid-column: span 5;
  padding: 26px 28px;
  background: var(--pink-soft);
}

.panel-facts dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.panel-facts dt {
  font-size: 12px;
  color: var(--ink-soft);
}

.panel-facts dd {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.3;
  color: var(--pink);
}

/* ---------- 区头 ---------- */

.sec {
  max-width: 620px;
  margin-bottom: 32px;
}

.sec h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  letter-spacing: -0.8px;
  font-weight: 900;
}

.sec p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- 四格 ---------- */

.pages {
  padding: 76px 0 84px;
  border-top: 2px solid var(--ink);
  background: var(--paper-2);
}

.pages-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.page-card {
  grid-column: span 4;
  background: #fffdf8;
  border: 2px solid var(--ink);
  padding: 10px 10px 0;
  transition: transform 0.25s, box-shadow 0.25s;
}

.page-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(25, 21, 16, 0.85);
}

.page-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--line);
}

.page-card figcaption {
  display: flex;
  flex-direction: column;
  padding: 12px 4px 14px;
}

.page-card strong { font-size: 16px; }

.page-card span {
  font-size: 12.5px;
  color: var(--muted);
}

.page-wide { grid-column: span 8; }

.page-wide img { aspect-ratio: 16 / 10; }

/* ---------- 章节 ---------- */

.chapters { padding: 80px 0; }

.chapter-list { border-top: 2px solid var(--ink); }

.chapter {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 24px 6px;
  border-bottom: 1px solid var(--line);
}

.chapter-no {
  font-size: 22px;
  font-weight: 900;
  color: var(--pink);
  letter-spacing: -0.5px;
}

.chapter-body h3 {
  font-size: 19px;
  font-weight: 700;
}

.chapter-body p {
  margin-top: 6px;
  max-width: 660px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.chapter-tag {
  font-size: 11.5px;
  padding: 3px 10px;
  border: 1px solid var(--ink);
  background: var(--yellow);
  white-space: nowrap;
}

/* ---------- 问答 ---------- */

.ask {
  padding: 70px 0 80px;
  border-top: 2px solid var(--ink);
  background: var(--paper-2);
}

.qa {
  border-bottom: 1px solid var(--line);
}

.qa summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  font-size: 16.5px;
  font-weight: 700;
}

.qa summary::-webkit-details-marker { display: none; }

.qa summary::after {
  content: "+";
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  font-weight: 400;
  line-height: 1;
}

.qa[open] summary::after { content: "−"; }

.qa p {
  padding: 0 4px 20px;
  max-width: 700px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* ---------- 下载目录 ---------- */

.get { padding: 80px 0 86px; }

.get-head { margin-bottom: 30px; }

.get-head h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 900;
  letter-spacing: -0.8px;
}

.get-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14.5px;
}

.toc { border-top: 2px solid var(--ink); }

.toc-row {
  align-items: baseline;
  gap: 4px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s, padding-left 0.2s;
}

.toc-row:not([hidden]) { display: flex; }

.toc-row:hover {
  background: var(--pink-soft);
  padding-left: 12px;
}

.toc-name {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.toc-dots {
  flex: 1;
  min-width: 30px;
  border-bottom: 2px dotted #c9bca6;
  transform: translateY(-5px);
  margin: 0 12px;
}

.toc-note {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.get-tip {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- 页脚 ---------- */

.foot {
  border-top: 2px solid var(--ink);
  padding: 34px 0 40px;
  background: #fffdf8;
}

.foot-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.foot-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--ink);
}

.foot-brand span {
  display: flex;
  flex-direction: column;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.3;
}

.foot-brand em {
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}

.foot-nav {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--ink-soft);
}

.foot-nav a:hover { color: var(--pink); }

.foot-copy {
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 出现 ---------- */

.slide {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.slide.on {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1000px) {
  .panel-title { grid-column: span 8; }
  .panel-shot { grid-column: span 2; }
  .panel-lead { grid-column: span 7; }
  .panel-facts { grid-column: span 5; }
  .page-card { grid-column: span 6; }
  .page-wide { grid-column: span 12; }
  .rail-nav { display: none; }
  .rail-btn { margin-left: auto; }
}

@media (max-width: 760px) {
  .paper { padding: 0 18px; }
  .hero { padding: 22px 0 56px; }
  .panel-stage { gap: 12px; }
  .panel-title, .panel-lead, .panel-facts { grid-column: span 12; }
  .panel-shot { grid-column: span 6; }
  .panel-shot img { min-height: 0; aspect-ratio: 3 / 4; }
  .panel-shot-alt { transform: none; }
  .panel-title { padding: 26px 22px; }
  .panel-title h1 { font-size: 38px; }
  .panel-lead { padding: 22px; }
  .panel-facts { padding: 22px; }
  .panel-facts dd { font-size: 22px; }
  .pages, .chapters, .ask, .get { padding: 56px 0; }
  .page-card { grid-column: span 12; }
  .page-wide img { aspect-ratio: 4 / 3; }
  .chapter { grid-template-columns: 52px 1fr; gap: 12px; }
  .chapter-tag { grid-column: 2; justify-self: start; }
  .toc-row:not([hidden]) { flex-wrap: wrap; gap: 4px 0; }
  .toc-dots { display: none; }
  .toc-note { width: 100%; text-align: left; }
  .foot-in { flex-direction: column; align-items: flex-start; }
  .foot-nav { flex-wrap: wrap; gap: 14px; }
}

/* ---------- 404 ---------- */

.gone {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  background:
    radial-gradient(560px 300px at 50% 0%, rgba(255, 202, 58, 0.26), transparent 70%),
    var(--paper);
}

.gone-in {
  max-width: 460px;
  padding: 40px 34px;
  background: #fffdf8;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

.gone-code {
  font-size: 12px;
  letter-spacing: 5px;
  color: var(--pink);
  font-weight: 700;
}

.gone h1 {
  margin-top: 16px;
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 900;
  line-height: 1.3;
}

.gone p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.gone .btn-ink { margin-top: 28px; }
