@font-face {
  font-family: "KuaiLe";
  src: url("zcool-kuaile.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #2c2a28;
  --paper: #fbf3e4;
  --card: #fffdf7;
  --red: #e8453c;
  --blue: #2f6fd0;
  --yellow: #ffd23f;
  --green: #5db85c;
  --orange: #ff9d3c;
  --muted: #8a7a68;
  --radius: 28px;
  --shadow: 0 10px 0 rgba(44, 42, 40, 0.12), 0 18px 40px rgba(90, 60, 30, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 15% -10%, #fff6d8 0%, rgba(255, 246, 216, 0) 60%),
    radial-gradient(900px 500px at 100% 0%, #dff0ff 0%, rgba(223, 240, 255, 0) 55%),
    var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

.kids { font-family: "KuaiLe", "PingFang SC", sans-serif; }

.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }

/* ---------- 首页 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: "KuaiLe", sans-serif; font-size: 22px; }
.brand-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #ffd5dd 0 40%, #ff9fb2 41% 100%);
  border: 3px solid var(--ink);
  position: relative;
}
.brand-dot::after {
  content: ""; position: absolute; inset: 9px 7px auto 7px; height: 8px;
  border: 2px solid var(--ink); border-radius: 50%;
}
.top-link { font-size: 15px; color: var(--muted); }

.hero { padding: 64px 0 34px; text-align: center; }
.hero-kicker {
  display: inline-block; padding: 7px 20px 10px; border: 3px solid var(--ink);
  border-radius: 999px; background: var(--yellow); font-family: "KuaiLe", sans-serif;
  font-size: 17px; transform: rotate(-1.5deg);
}
.hero h1 {
  margin: 22px 0 10px; font-family: "KuaiLe", sans-serif;
  font-size: clamp(40px, 7vw, 76px); line-height: 1.05; letter-spacing: 2px;
}
.hero h1 .c1 { color: var(--blue); }
.hero h1 .c2 { color: var(--red); }
.hero p { margin: 0 auto; max-width: 620px; color: var(--muted); font-size: 17px; line-height: 1.7; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px; padding: 26px 0 70px;
}
.card {
  background: var(--card); border: 4px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease;
}
.card:hover { transform: translateY(-4px) rotate(-0.4deg); }
.card-cover { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #eee; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; left: 14px; top: 14px; background: var(--red); color: #fff;
  font-family: "KuaiLe", sans-serif; font-size: 16px; padding: 5px 14px 7px;
  border-radius: 999px; border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,.12);
}
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-family: "KuaiLe", sans-serif; font-size: 28px; line-height: 1.2; }
.card-moral { color: var(--muted); font-size: 15px; line-height: 1.65; flex: 1; }
.card-meta { font-size: 13px; color: var(--muted); }
.card-actions { display: flex; gap: 10px; margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px 12px; border-radius: 999px; border: 3px solid var(--ink);
  background: var(--card); font-family: "KuaiLe", sans-serif; font-size: 16px;
  box-shadow: 0 5px 0 rgba(44,42,40,.14); transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(44,42,40,.14); }
.btn-primary { background: var(--red); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-sm { padding: 7px 14px 8px; font-size: 14px; border-width: 2px; }

.footer {
  padding: 26px 0 40px; text-align: center; color: var(--muted); font-size: 13px;
  border-top: 2px dashed rgba(44,42,40,.14);
}

/* ---------- 单集 ---------- */
.ep-head { display: flex; align-items: center; gap: 14px; padding: 22px 0 12px; flex-wrap: wrap; }
.back { border: 3px solid var(--ink); background: var(--card); border-radius: 999px; padding: 8px 16px 9px; font-family: "KuaiLe", sans-serif; }
.ep-title { font-family: "KuaiLe", sans-serif; font-size: clamp(26px, 4vw, 40px); }
.ep-sub { color: var(--muted); font-size: 15px; }

.tabs { display: flex; gap: 10px; margin: 8px 0 18px; }
.tab { padding: 9px 20px 11px; border-radius: 999px; border: 3px solid var(--ink); background: var(--card); font-family: "KuaiLe", sans-serif; }
.tab.active { background: var(--ink); color: #fff; }

.player {
  border: 4px solid var(--ink); border-radius: var(--radius); overflow: hidden;
  background: #000; box-shadow: var(--shadow);
}
.player video { width: 100%; display: block; aspect-ratio: 16/9; background: #000; }
.player-bar { display: flex; gap: 12px; align-items: center; padding: 16px 18px; background: var(--card); flex-wrap: wrap; }

/* ---------- 绘本 ---------- */
.book { padding-bottom: 30px; }
.book-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 12px; flex-wrap: wrap; }
.book-top .meta { color: var(--muted); font-size: 14px; }
.book-stage {
  display: grid; grid-template-columns: 1.55fr 1fr; gap: 0;
  border: 4px solid var(--ink); border-radius: var(--radius); overflow: hidden;
  background: var(--card); box-shadow: var(--shadow); min-height: 62vh;
}
.book-image { position: relative; background: #f0e6d4; overflow: hidden; }
.book-image img { width: 100%; height: 100%; object-fit: cover; animation: pagein .45s ease both; }
@keyframes pagein { from { opacity: 0; transform: scale(1.03) translateX(12px); } to { opacity: 1; transform: none; } }
.book-image .page-chip {
  position: absolute; left: 16px; top: 16px; background: rgba(255,253,247,.94);
  border: 3px solid var(--ink); border-radius: 999px; padding: 5px 14px 7px;
  font-family: "KuaiLe", sans-serif; font-size: 15px;
}
.book-panel { padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.page-eyebrow { font-size: 13px; letter-spacing: 2px; color: var(--muted); }
.page-text { font-family: "KuaiLe", sans-serif; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.35; margin: 0; }
.narration { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.nline { margin: 0; font-size: 16px; line-height: 1.75; color: #4a423a; }
.nline.said { padding-left: 2px; }
.nsp { display: inline-block; font-family: "KuaiLe", sans-serif; font-size: 13px; color: #fff;
  padding: 1px 9px 3px; border-radius: 999px; margin-right: 7px; vertical-align: 1px; }
.sp-J { background: var(--blue); }
.sp-R { background: var(--red); }
.sp-P { background: var(--green); }
.sp-D { background: #8a5a2b; }
.book-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.guide {
  margin-top: 6px; background: #fdf6e6; border: 2px dashed rgba(44,42,40,.28);
  border-radius: 18px; padding: 12px 16px;
}
.guide summary { font-family: "KuaiLe", sans-serif; font-size: 16px; cursor: pointer; }
.guide p { margin: 8px 0 0; font-size: 15px; line-height: 1.8; color: #5a4c3e; }

.book-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 0; }
.dots { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.dot { width: 10px; height: 10px; border-radius: 999px; background: rgba(44,42,40,.18); border: 0; padding: 0; }
.dot.on { background: var(--red); transform: scale(1.25); }

.ep-tips { margin: 26px 0 0; background: var(--card); border: 3px solid var(--ink); border-radius: 24px; padding: 20px 22px; }
.ep-tips h3 { margin: 0 0 8px; font-family: "KuaiLe", sans-serif; font-size: 22px; }
.ep-tips ul { margin: 0; padding-left: 20px; color: #5a4c3e; line-height: 1.9; font-size: 15px; }

@media (max-width: 860px) {
  .book-stage { grid-template-columns: 1fr; min-height: 0; }
  .book-image { aspect-ratio: 16/10; }
  .book-panel { padding: 20px 18px; }
  .wrap { width: min(1180px, 100% - 24px); }
  .hero { padding-top: 40px; }
}

@media (max-width: 520px) {
  .card-actions .btn { flex: 1; }
  .book-image { aspect-ratio: 4/3; }
  .book-nav .btn { padding: 9px 14px; font-size: 14px; }
  .dots { display: none; }
}

/* 打印 / 投屏 */
@media print {
  .topbar, .book-nav, .book-top, .footer { display: none; }
  .book-stage { border: 0; box-shadow: none; }
}

/* ---------- 全屏绘本（图片铺满 + 气泡文字） ---------- */
.bk {
  position: fixed; inset: 0; z-index: 50;
  background: #111; overflow: hidden;
  font-family: "PingFang SC", "Hiragino Sans GB", sans-serif;
  user-select: none;
}
.bk-bg {
  position: absolute; inset: -60px;
  background-size: cover; background-position: center;
  filter: blur(28px) brightness(.5) saturate(1.1);
  transform: scale(1.12);
}
.bk-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  max-width: none; object-fit: contain; object-position: center;
}
@media (orientation: landscape) and (min-width: 900px) {
  .bk-img { object-fit: cover; }
}
.bk-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,8,6,.62) 0%, rgba(10,8,6,0) 18%, rgba(10,8,6,0) 52%, rgba(10,8,6,.55) 82%, rgba(10,8,6,.82) 100%);
}
.bk-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 18px 12px;
  color: #fff; z-index: 3;
}
.bk-top .bk-name {
  font-family: "KuaiLe", sans-serif; font-size: clamp(16px, 2.2vw, 24px);
  text-shadow: 0 2px 10px rgba(0,0,0,.55); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.bk-top .bk-page { font-size: 13px; opacity: .8; margin-left: 2px; white-space: nowrap; }
.bk-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.bk-btn {
  border: 2px solid rgba(255,255,255,.55); background: rgba(20,16,12,.42);
  color: #fff; border-radius: 999px; padding: 8px 14px 9px; font-size: 13px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.bk-btn:hover { background: rgba(20,16,12,.62); }
.bk-btn.on { background: #ffd23f; color: #2c2a28; border-color: #2c2a28; }
.bk-icon {
  width: 40px; height: 40px; padding: 0; display: inline-flex;
  align-items: center; justify-content: center; font-size: 18px;
}
.bk-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,.5); background: rgba(20,16,12,.38);
  color: #fff; font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); z-index: 3;
}
.bk-arrow:hover { background: rgba(20,16,12,.62); }
.bk-arrow.left { left: 16px; }
.bk-arrow.right { right: 16px; }
.bk-arrow:disabled { opacity: .18; cursor: default; }

.bk-title {
  position: absolute; top: calc(max(14px, env(safe-area-inset-top)) + 62px);
  left: 50%; transform: translateX(-50%) rotate(-1deg);
  background: #ffd23f; border: 4px solid #2c2a28; border-radius: 18px;
  padding: 8px 26px 12px; font-family: "KuaiLe", sans-serif;
  font-size: clamp(20px, 2.6vw, 34px); color: #2c2a28;
  box-shadow: 0 8px 0 rgba(0,0,0,.22);
  white-space: nowrap; max-width: 86vw; overflow: hidden; text-overflow: ellipsis;
  z-index: 3;
}

.bk-stage {
  position: absolute; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(980px, calc(100% - 140px));
  max-height: 56vh;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 6px 10px; z-index: 2;
  scrollbar-width: thin;
}
.bk-stage::-webkit-scrollbar { width: 6px; }
.bk-stage::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 99px; }

.bubble {
  position: relative; align-self: flex-start;
  background: rgba(255,253,247,.72);
  -webkit-backdrop-filter: blur(9px) saturate(1.12);
  backdrop-filter: blur(9px) saturate(1.12);
  border: 3px solid #2c2a28; border-radius: 20px;
  padding: 9px 16px 11px; color: #2c2a28;
  text-shadow: 0 1px 2px rgba(255,255,255,.95), 0 0 10px rgba(255,255,255,.8), 0 -1px 1px rgba(255,255,255,.8);
  font-size: clamp(15px, 1.35vw, 20px); line-height: 1.62;
  box-shadow: 0 7px 0 rgba(0,0,0,.18);
  max-width: 92%;
  animation: bubblein .28s ease both;
}
@keyframes bubblein { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.bubble.narr { background: rgba(255,253,247,.2); }
.bubble.said { max-width: 78%; }
.bubble.said.right { align-self: flex-end; background: rgba(255,240,236,.2); }
.bubble.said.left { align-self: flex-start; }
.bubble .sp {
  display: inline-block; font-family: "KuaiLe", sans-serif; font-size: 13px;
  color: #fff; padding: 1px 10px 3px; border-radius: 999px; margin-right: 8px;
  vertical-align: 2px;
}
.bubble.said::after {
  content: ""; position: absolute; bottom: -12px; left: 26px;
  width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent;
  border-top: 12px solid #2c2a28;
}
.bubble.said.right::after { left: auto; right: 26px; }
.bubble.said::before {
  content: ""; position: absolute; bottom: -7px; left: 28px;
  width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-top: 10px solid rgba(255,253,247,.2); z-index: 1;
}
.bubble.said.right::before { left: auto; right: 28px; }

.bk-play {
  position: absolute; left: calc(50% - min(490px, calc(50% - 70px)));
  bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 3;
  width: 46px; height: 46px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,.6); background: rgba(20,16,12,.5);
  color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
.bk-dots {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 3;
  display: flex; gap: 7px;
}
.bk-dots .dot { background: rgba(255,255,255,.32); }
.bk-dots .dot.on { background: #ffd23f; }

.bk-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  background: #fffdf7; border-top: 4px solid #2c2a28;
  border-radius: 28px 28px 0 0; padding: 22px 24px calc(26px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .28s ease;
  max-height: 72vh; overflow-y: auto;
}
.bk-sheet.open { transform: none; }
.bk-sheet h3 { margin: 0 0 10px; font-family: "KuaiLe", sans-serif; font-size: 24px; }
.bk-sheet p { margin: 0 0 10px; font-size: 16px; line-height: 1.85; color: #4a423a; }
.bk-sheet .close {
  position: absolute; right: 16px; top: 14px; border: 0; background: none; font-size: 24px;
}
.bk-hint {
  position: absolute; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom));
  transform: translateX(-50%); color: rgba(255,255,255,.72); font-size: 12px;
  z-index: 2; pointer-events: none;
}

@media (max-width: 720px) {
  .bk-stage { width: calc(100% - 20px); bottom: calc(66px + env(safe-area-inset-bottom)); max-height: 44vh; }
  .bk-arrow { width: 38px; height: 38px; font-size: 20px; background: rgba(20,16,12,.28); }
  .bk-arrow.left { left: 6px; }
  .bk-arrow.right { right: 6px; }
  .bk-top { padding: max(8px, env(safe-area-inset-top)) 10px 6px; gap: 8px; }
  .bk-top .bk-name { font-size: 14px; max-width: 46vw; }
  .bk-epname { display: none; }
  .bk-top .bk-page { font-size: 12px; }
  .bk-btn { padding: 6px 10px 7px; font-size: 12px; white-space: nowrap; }
  .bk-tools { gap: 6px; }
  .bk-icon { width: 34px; height: 34px; font-size: 15px; }
  .bk-title { font-size: 19px; padding: 6px 16px 9px; top: calc(max(8px, env(safe-area-inset-top)) + 46px); }
  .bubble { font-size: 15.5px; padding: 8px 13px 10px; }
  .bubble.said { max-width: 88%; }
  .bk-play { left: 10px; width: 38px; height: 38px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .bk-dots { display: none; }
  .bk-img { width: 152%; left: -26%; top: 11vh; height: auto; object-fit: contain; }
  .bk-bg { filter: blur(30px) brightness(.62) saturate(1.1); }
  .bk-shade { background: linear-gradient(180deg, rgba(10,8,6,.55) 0%, rgba(10,8,6,0) 16%, rgba(10,8,6,0) 46%, rgba(10,8,6,.62) 76%, rgba(10,8,6,.88) 100%); }
}

/* ---------- 系列分区 ---------- */
.series { padding: 10px 0 30px; }
.series-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 10px 0 18px; }
.series-head h2 { margin: 0; font-family: "KuaiLe", sans-serif; font-size: clamp(24px, 3vw, 34px); }
.series-head p { margin: 0; color: var(--muted); font-size: 15px; }
.series-empty {
  border: 3px dashed rgba(44,42,40,.25); border-radius: 24px; padding: 34px 24px;
  text-align: center; color: var(--muted); font-size: 15px; background: rgba(255,253,247,.5);
}
.series .grid { padding: 0 0 10px; }


/* ---------- 底部文字版（无气泡） ---------- */
.bk-text {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  max-height: 56vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 150px 7% calc(74px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg,
    rgba(12,10,8,0) 0%,
    rgba(12,10,8,.10) 18%,
    rgba(12,10,8,.42) 42%,
    rgba(12,10,8,.72) 70%,
    rgba(12,10,8,.86) 100%);
  scrollbar-width: thin;
}
.bk-text::-webkit-scrollbar { width: 6px; }
.bk-text::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 99px; }
.bk-text .line {
  margin: 0 auto 8px; max-width: 1180px;
  font-size: clamp(16px, 1.55vw, 22px); line-height: 1.7;
  color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.75), 0 0 2px rgba(0,0,0,.6);
}
.bk-text .line.narr { color: rgba(255,250,240,.95); }
.bk-text .line.said { color: #fff8ea; }
.bk-text .sp {
  display: inline; font-family: "KuaiLe", sans-serif; font-size: .92em;
  margin-right: 6px; text-shadow: 0 2px 6px rgba(0,0,0,.8);
}
.bk-text .sp::after { content: "："; }
.sp-J { color: #9fc4ff; }
.sp-R { color: #ffb2a8; }
.sp-P { color: #a8e0a2; }
.sp-D { color: #e6c08a; }

.bk-play { left: auto; right: 18px; bottom: calc(16px + env(safe-area-inset-bottom)); }
.bk-dots { bottom: calc(22px + env(safe-area-inset-bottom)); }

@media (max-width: 720px) {
  .bk-text {
    max-height: 50vh; padding: 100px 16px calc(62px + env(safe-area-inset-bottom));
  }
  .bk-text .line { font-size: 16px; line-height: 1.65; margin-bottom: 6px; }
  .bk-play { left: auto; right: 12px; width: 38px; height: 38px; }
}

/* 4 集起用两列大卡片 */
.series .grid {
  max-width: 980px; margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .series .grid { grid-template-columns: 1fr; }
}
