﻿/* 包子漫画 · bzcomics.net.cn
   夜间书架：深色底 + 暖黄光 + 分排书架 */

:root {
  --night: #131110;
  --night-2: #191614;
  --card: #1f1b18;
  --card-2: #262019;
  --cream: #f7f0e2;
  --dim: #a79b8c;
  --faint: #7d7368;
  --line: rgba(247, 240, 226, 0.1);
  --line-2: rgba(247, 240, 226, 0.18);
  --yellow: #f4c246;
  --yellow-deep: #d9a52c;
  --pink: #ed5d8c;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --shell: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.78;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(247, 240, 226, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
}

main, header, footer { position: relative; z-index: 1; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

p, h1, h2, h3, figure, blockquote { margin: 0; }

em { font-style: normal; }

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 32px;
}

::selection { background: rgba(244, 194, 70, 0.35); }

/* ---------- 顶栏 ---------- */

.night-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(19, 17, 16, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.night-head-in {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 72px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.badge span {
  display: flex;
  flex-direction: column;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.badge span em {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.badge img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(244, 194, 70, 0.5);
}

.head-links {
  display: flex;
  gap: 28px;
  font-size: 13.5px;
  color: var(--dim);
}

.head-links a {
  padding: 4px 0;
  transition: color 0.24s ease;
}

.head-links a:hover { color: var(--yellow); }

.head-pill {
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: background 0.24s ease, color 0.24s ease;
}

.head-pill:not([hidden]) { display: inline-flex; }

.head-pill:hover {
  background: var(--yellow);
  color: #17130c;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  padding: 80px 0 108px;
}

.hero::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -120px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 194, 70, 0.17), transparent 66%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--faint);
  text-transform: uppercase;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(244, 194, 70, 0.16);
}

.hero-copy h1 {
  margin-top: 24px;
  font-size: clamp(40px, 5.4vw, 66px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero-copy h1 span {
  display: block;
  margin-top: 18px;
  font-size: clamp(18px, 2.2vw, 25px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.hero-lead {
  max-width: 31em;
  margin-top: 24px;
  font-size: 15.5px;
  color: var(--dim);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-btn,
.ghost-btn {
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease;
}

.hero-btn:not([hidden]) { display: inline-flex; }

.hero-btn {
  background: var(--yellow);
  color: #17130c;
  font-weight: 600;
  box-shadow: 0 16px 36px -16px rgba(244, 194, 70, 0.8);
}

.hero-btn:hover {
  background: #ffd05c;
  transform: translateY(-2px);
}

.ghost-btn {
  display: inline-flex;
  border: 1px solid var(--line-2);
  color: var(--cream);
}

.ghost-btn:hover { border-color: var(--yellow); color: var(--yellow); }

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--faint);
}

.hero-notes li { position: relative; padding-left: 15px; }

.hero-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 1px;
  background: var(--yellow);
}

.hero-stack {
  position: relative;
  padding: 18px 0 74px;
}

.stack-glow {
  position: absolute;
  inset: 12% 6% 18% 12%;
  border-radius: 40px;
  background: radial-gradient(circle at 50% 40%, rgba(244, 194, 70, 0.22), transparent 70%);
  filter: blur(26px);
}

.stack-main {
  position: relative;
  width: 76%;
  margin-left: auto;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(244, 194, 70, 0.28);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}

.stack-main img {
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  object-position: top center;
}

.stack-side {
  position: absolute;
  left: 0;
  bottom: 18px;
  width: 40%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  transform: rotate(-4deg);
  box-shadow: 0 26px 50px -26px rgba(0, 0, 0, 0.92);
}

.stack-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
}

.stack-tag {
  position: absolute;
  top: 0;
  left: 4%;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
  transform: rotate(-3deg);
  box-shadow: 0 14px 26px -14px rgba(237, 93, 140, 0.9);
}

/* ---------- 通用标注 ---------- */

.sec-head {
  max-width: 720px;
}

.tag {
  font-size: 11.5px;
  letter-spacing: 0.28em;
  color: var(--yellow);
  margin-bottom: 16px;
}

.sec-head h2 {
  font-size: clamp(27px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.sec-note {
  margin-top: 14px;
  font-size: 14.5px;
  color: var(--faint);
}

/* ---------- 书架 ---------- */

.shelf { padding: 84px 0 92px; }

.shelf-rail {
  display: flex;
  gap: 20px;
  margin-top: 46px;
  padding: 4px max(32px, calc((100% - var(--shell)) / 2 + 32px)) 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 194, 70, 0.4) transparent;
}

.shelf-rail::-webkit-scrollbar { height: 6px; }

.shelf-rail::-webkit-scrollbar-thumb {
  background: rgba(244, 194, 70, 0.35);
  border-radius: 999px;
}

.shelf-card {
  flex: 0 0 248px;
  padding: 12px 12px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  scroll-snap-align: start;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.shelf-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 194, 70, 0.42);
  background: var(--card-2);
}

.shelf-pic {
  position: relative;
  border-radius: 13px;
  overflow: hidden;
  background: var(--night-2);
}

.shelf-pic img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
}

.shelf-no {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(19, 17, 16, 0.78);
  color: var(--yellow);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.shelf-card h3 {
  margin-top: 16px;
  padding: 0 4px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.shelf-card p {
  margin-top: 6px;
  padding: 0 4px;
  font-size: 13.5px;
  color: var(--faint);
}

/* ---------- 阅读 bento ---------- */

.read {
  padding: 92px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--night-2);
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.bento > article {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  overflow: hidden;
}

.b-wide {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.bento-pic {
  flex: 1;
  min-height: 0;
  background: var(--night);
}

.bento-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.bento-text {
  padding: 22px 24px 24px;
  border-top: 1px solid var(--line);
}

.bento-text h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
}

.bento-text p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--dim);
}

.b-note {
  grid-column: span 2;
  padding: 24px 26px;
  transition: border-color 0.3s ease;
}

.b-note:hover { border-color: rgba(244, 194, 70, 0.38); }

.b-note h3 {
  position: relative;
  padding-left: 18px;
  font-size: 17px;
  font-weight: 700;
}

.b-note h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
}

.b-note p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--dim);
}

.b-span2 { grid-column: span 2; }

.b-pic {
  grid-column: span 2;
  position: relative;
}

.b-pic img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
}

.b-pic p {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(19, 17, 16, 0.84);
  font-size: 12.5px;
  color: var(--cream);
}

/* ---------- 数据条 ---------- */

.facts { padding: 64px 0; }

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.fact {
  padding-left: 20px;
  border-left: 1px solid var(--line-2);
}

.fact strong {
  display: block;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: var(--yellow);
  letter-spacing: -0.02em;
}

.fact span {
  display: block;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.6;
}

/* ---------- 夜话 ---------- */

.words { padding: 24px 0 96px; }

.word-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}

.word {
  padding: 26px 26px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}

.word p {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--cream);
}

.word p::before {
  content: "“";
  display: block;
  font-size: 40px;
  line-height: 0.6;
  margin-bottom: 12px;
  color: var(--yellow);
}

.word footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--dim);
}

.word footer em {
  font-size: 11.5px;
  color: var(--faint);
}

/* ---------- 问答 ---------- */

.ask { padding: 0 0 100px; }

.ask-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}

.qa {
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  transition: border-color 0.28s ease;
}

.qa[open] { border-color: rgba(244, 194, 70, 0.38); }

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.qa summary::-webkit-details-marker { display: none; }

.qa summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: var(--yellow);
}

.qa[open] summary::after { content: "−"; }

.qa p {
  padding: 0 10px 22px 0;
  font-size: 13.5px;
  color: var(--dim);
}

/* ---------- 下载 ---------- */

.get {
  padding: 88px 0 96px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 84% 0%, rgba(244, 194, 70, 0.14), transparent 52%),
    var(--night-2);
}

.get-head h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.get-head p {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--faint);
}

.get-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 40px;
}

.get-block {
  align-items: center;
  gap: 22px;
  padding: 24px 28px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: rgba(31, 27, 24, 0.72);
  transition: background 0.28s ease, border-color 0.28s ease, transform 0.28s ease;
}

.get-block:not([hidden]) { display: flex; }

.get-no {
  flex: 0 0 auto;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.get-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-right: auto;
}

.get-body strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.get-body em {
  font-size: 12.5px;
  color: var(--faint);
}

.get-arrow {
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--yellow);
  transition: transform 0.28s ease;
}

.get-block:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  transform: translateX(4px);
}

.get-block:hover .get-no,
.get-block:hover .get-body em,
.get-block:hover .get-arrow { color: #17130c; }

.get-block:hover .get-body strong { color: #17130c; }

.get-block:hover .get-arrow { transform: translateX(4px); }

/* ---------- 页脚 ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 32px 0 44px;
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.foot-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
}

.foot-brand span {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.foot-brand span em {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12.5px;
  color: var(--dim);
}

.foot-nav a:hover { color: var(--yellow); }

.foot-copy {
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.04em;
}

/* ---------- 出现动画 ---------- */

.rise {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.72s ease, transform 0.72s cubic-bezier(0.22, 0.68, 0.28, 1);
}

.rise.on { opacity: 1; transform: none; }

/* ---------- 404 ---------- */

.miss {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 60px 28px;
}

.miss-card {
  width: 100%;
  max-width: 520px;
  padding: 44px 36px 40px;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background: var(--card);
  text-align: center;
}

.miss-card img {
  width: 62px;
  height: 62px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 1px solid rgba(244, 194, 70, 0.4);
}

.miss-code {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--yellow);
}

.miss-card h1 {
  margin-top: 14px;
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 800;
  line-height: 1.35;
}

.miss-card p {
  margin-top: 14px;
  font-size: 14px;
  color: var(--dim);
}

.miss-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  margin-top: 30px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--yellow);
  color: #17130c;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.miss-link:hover { background: #ffd05c; }

/* ---------- 响应式 ---------- */

@media (max-width: 1040px) {
  .hero-grid { gap: 40px; }
  .hero-stack { padding-bottom: 56px; }
  .shelf-card { flex-basis: 228px; }
}

@media (max-width: 900px) {
  .head-links { display: none; }

  .hero { padding: 56px 0 84px; }

  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }

  .hero-stack {
    max-width: 420px;
    padding-bottom: 60px;
  }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .b-wide { grid-column: span 2; grid-row: auto; }

  .bento-pic img { aspect-ratio: 4 / 3; height: auto; }

  .word-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .word-grid .word:last-child { grid-column: span 2; }

  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }

  .ask-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }

  .night-head-in { height: 64px; gap: 14px; }

  .badge span { font-size: 15px; }

  .badge span em { font-size: 9px; letter-spacing: 0.1em; }

  .head-pill { height: 34px; padding: 0 16px; font-size: 12.5px; }

  .hero-copy h1 { font-size: clamp(34px, 10vw, 46px); }

  .hero-copy h1 span { margin-top: 14px; font-size: 16.5px; letter-spacing: 0.04em; }

  .hero-actions a { flex: 1 1 auto; }

  .hero-stack { padding-bottom: 46px; }

  .stack-main { width: 82%; border-radius: 16px; }

  .stack-side { width: 42%; }

  .stack-tag { font-size: 11px; padding: 6px 13px; left: 0; }

  .shelf { padding: 64px 0 68px; }

  .shelf-rail {
    gap: 14px;
    padding: 4px 20px 18px;
  }

  .shelf-card { flex-basis: 210px; }

  .read { padding: 68px 0; }

  .bento { grid-template-columns: minmax(0, 1fr); gap: 12px; }

  .b-wide,
  .b-note,
  .b-span2,
  .b-pic { grid-column: span 1; }

  .bento-pic img { aspect-ratio: 3 / 2; }

  .b-pic img { aspect-ratio: 3 / 2; }

  .facts { padding: 48px 0; }

  .fact strong { font-size: 34px; }

  .words { padding: 12px 0 68px; }

  .word-grid { grid-template-columns: minmax(0, 1fr); }

  .word-grid .word:last-child { grid-column: span 1; }

  .ask { padding-bottom: 72px; }

  .get { padding: 64px 0 72px; }

  .get-block { padding: 20px 20px; gap: 16px; }

  .get-body strong { font-size: 16px; }

  .foot-in { gap: 14px; }

  .foot-nav { gap: 16px; }
}
