/* ==========================================================================
   Laika & Kaka — 小狗 Kaka 的漫画日记
   设计语言：炭笔手绘 + 米色纸张 + 胶带拼贴
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计变量
   -------------------------------------------------------------------------- */
:root {
  /* 纸张与墨色 */
  --paper:        #f2ebdd;
  --paper-deep:   #e7dcc6;
  --card:         #fbf7ee;
  --ink:          #2b2723;
  --ink-2:        #574f45;
  --ink-3:        #8d8478;
  --line:         #3a342d;
  --line-soft:    #d3c6ac;

  /* 点缀色（取自漫画里的暖调） */
  --accent:       #c2603f;
  --accent-ink:   #8f4229;
  --accent-wash:  #f0d9cc;
  --olive:        #6f7d5a;
  --olive-wash:   #dde3d2;

  /* 排版 */
  --font-hand:    'Caveat', 'Bradley Hand', 'Segoe Script', 'Snell Roundhand',
                  'Kaiti SC', 'STKaiti', 'KaiTi', cursive;
  --font-hand-zh: 'Ma Shan Zheng', 'LXGW WenKai', 'Kaiti SC', 'STKaiti',
                  'KaiTi', 'Yuanti SC', cursive;
  --font-body:    'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi',
                  -apple-system, BlinkMacSystemFont, 'PingFang SC',
                  'Hiragino Sans GB', 'Microsoft YaHei', serif;
  --font-ui:      -apple-system, BlinkMacSystemFont, 'PingFang SC',
                  'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;

  --fs-body:      clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --fs-lede:      clamp(1.05rem, 0.98rem + 0.5vw, 1.28rem);
  --fs-h1:        clamp(2.4rem, 1.7rem + 3.2vw, 4.4rem);
  --fs-h2:        clamp(1.6rem, 1.3rem + 1.5vw, 2.3rem);
  --fs-h3:        clamp(1.2rem, 1.08rem + 0.6vw, 1.5rem);

  /* 结构 */
  --wrap:         1120px;
  --radius:       4px;
  --radius-lg:    8px;
  --shadow-sm:    0 1px 0 rgba(43, 39, 35, .05), 0 6px 14px -10px rgba(43, 39, 35, .45);
  --shadow:       0 2px 0 rgba(43, 39, 35, .05), 0 14px 30px -18px rgba(43, 39, 35, .55);
  --shadow-lg:    0 24px 50px -26px rgba(43, 39, 35, .6);
  --ease:         cubic-bezier(.22, .61, .36, 1);

  /* 纸张颗粒 */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");

  /* 手绘波浪分隔线 */
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 5.5c3-4 6-4 9 0s6 4 9 0 6-4 9 0' fill='none' stroke='%232b2723' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

[data-theme='dark'] {
  --paper:        #1e1c1a;
  --paper-deep:   #161513;
  --card:         #272421;
  --ink:          #efe6d6;
  --ink-2:        #c3b9a8;
  --ink-3:        #918878;
  --line:         #efe6d6;
  --line-soft:    #453f38;

  --accent:       #e08a63;
  --accent-ink:   #f0a884;
  --accent-wash:  #3a2a22;
  --olive:        #a3b189;
  --olive-wash:   #2b3125;

  --shadow-sm:    0 1px 0 rgba(0, 0, 0, .3), 0 6px 14px -10px rgba(0, 0, 0, .9);
  --shadow:       0 2px 0 rgba(0, 0, 0, .3), 0 14px 30px -18px rgba(0, 0, 0, .95);
  --shadow-lg:    0 24px 50px -26px rgba(0, 0, 0, 1);

  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 5.5c3-4 6-4 9 0s6 4 9 0 6-4 9 0' fill='none' stroke='%23efe6d6' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   2. 基础
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 15% -10%, color-mix(in srgb, var(--card) 70%, transparent), transparent 70%),
    radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--paper-deep) 80%, transparent), transparent 65%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.78;
  letter-spacing: .01em;
  overflow-x: hidden;
}

/* 纸张颗粒覆层 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--grain);
  opacity: .05;
  mix-blend-mode: multiply;
}
[data-theme='dark'] body::before { mix-blend-mode: screen; opacity: .035; }

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

a { color: inherit; text-decoration: none; }

button, input, select { font: inherit; color: inherit; }

::selection { background: var(--accent); color: #fff8f2; }

:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  position: relative;
  z-index: 1;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: .6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* --------------------------------------------------------------------------
   3. 排版
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.24;
  font-weight: 400;
  letter-spacing: .005em;
}

.h-hand {
  font-family: var(--font-hand);
  font-weight: 700;
  letter-spacing: .01em;
}
[lang='zh-CN'] .h-hand { font-family: var(--font-hand-zh); font-weight: 400; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: .74rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 .9rem;
}

.lede {
  font-size: var(--fs-lede);
  color: var(--ink-2);
  line-height: 1.8;
  margin: 0;
}

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section-title {
  font-family: var(--font-hand);
  font-size: var(--fs-h2);
  font-weight: 700;
}
[lang='zh-CN'] .section-title { font-family: var(--font-hand-zh); font-weight: 400; }

.section-title small {
  display: block;
  font-family: var(--font-ui);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: .45rem;
  font-weight: 600;
}

.wave {
  height: 8px;
  background-image: var(--wave);
  background-repeat: repeat-x;
  background-size: 24px 8px;
  opacity: .35;
  border: 0;
  margin: 0;
}

/* --------------------------------------------------------------------------
   4. 页头 / 页脚
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 68px;
  padding-block: .55rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-right: auto;
  font-family: var(--font-hand);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
[lang='zh-CN'] .brand { font-family: var(--font-hand-zh); }

.brand svg { width: 26px; height: 26px; flex: none; color: var(--accent); }
.brand .brand-sub {
  font-family: var(--font-ui);
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-top: .3rem;
  font-weight: 600;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--font-ui);
  font-size: .9rem;
}

.main-nav a {
  position: relative;
  padding: .45rem .7rem;
  color: var(--ink-2);
  border-radius: var(--radius);
  transition: color .2s var(--ease);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a::after {
  content: '';
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: .18rem;
  height: 5px;
  background-image: var(--wave);
  background-repeat: repeat-x;
  background-size: 24px 8px;
  opacity: 0;
  transform: scaleX(.4);
  transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.main-nav a:hover::after,
.main-nav a[aria-current='page']::after { opacity: .8; transform: scaleX(1); }
.main-nav a[aria-current='page'] { color: var(--ink); font-weight: 600; }

.header-tools {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-left: .75rem;
  border-left: 1px dashed var(--line-soft);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-2);
  transition: all .2s var(--ease);
}
.icon-btn:hover {
  border-color: var(--line);
  color: var(--ink);
  transform: translateY(-1px);
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .i-moon { display: none; }
[data-theme='dark'] .icon-btn .i-moon { display: block; }
[data-theme='dark'] .icon-btn .i-sun { display: none; }

.lang-switch {
  display: flex;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: .76rem;
  font-weight: 600;
}
.lang-switch button {
  background: transparent;
  border: 0;
  padding: .48rem .72rem;
  cursor: pointer;
  color: var(--ink-3);
  letter-spacing: .04em;
  transition: all .2s var(--ease);
  line-height: 1;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--paper);
}

.site-footer {
  margin-top: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid var(--line-soft);
  padding-block: 2.75rem 3.25rem;
  font-family: var(--font-ui);
  font-size: .86rem;
  color: var(--ink-3);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.footer-motto {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--ink-2);
}
[lang='zh-CN'] .footer-motto { font-family: var(--font-hand-zh); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.site-footer p a {
  color: var(--ink-2);
  border-bottom: 1px dashed var(--line-soft);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.site-footer p a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 5vw, 3.5rem);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy .eyebrow { margin-bottom: 1.1rem; }

.hero-title {
  font-family: var(--font-hand);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.02;
  margin-bottom: .3rem;
}
[lang='zh-CN'] .hero-title {
  font-family: var(--font-hand-zh);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: .02em;
}
.hero-title .accent { color: var(--accent); }

.hero-sub {
  font-family: var(--font-hand);
  font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem);
  color: var(--ink-2);
  margin: 0 0 1.5rem;
}
[lang='zh-CN'] .hero-sub { font-family: var(--font-hand-zh); }

.hero-motto {
  margin: 1.75rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-hand);
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--ink-2);
}
[lang='zh-CN'] .hero-motto { font-family: var(--font-body); font-size: 1.02rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

/* 拼贴照片 */
.hero-art {
  position: relative;
  aspect-ratio: 1 / 1.02;
  min-height: 320px;
}
.polaroid {
  position: absolute;
  background: var(--card);
  padding: .8rem .8rem 2.6rem;
  border-radius: 2px;
  box-shadow: var(--shadow-lg);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.polaroid img {
  width: 100%;
  object-fit: contain;
  border-radius: 1px;
  background: color-mix(in srgb, var(--paper-deep) 55%, var(--card));
}
.polaroid--back img { aspect-ratio: 3 / 4; }
.polaroid--front img { aspect-ratio: 5 / 4; }
.polaroid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: .7rem;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--ink-2);
}
[lang='zh-CN'] .polaroid figcaption { font-family: var(--font-body); font-size: .82rem; }

.polaroid--back {
  top: 2%;
  left: 0;
  width: 58%;
  rotate: -6deg;
  z-index: 1;
}
.polaroid--front {
  bottom: 0;
  right: 0;
  width: 66%;
  rotate: 3.5deg;
  z-index: 2;
}
.hero-art:hover .polaroid--back { rotate: -8.5deg; translate: 0 -6px; }
.hero-art:hover .polaroid--front { rotate: 5deg; translate: 0 -8px; box-shadow: 0 30px 60px -28px rgba(43,39,35,.7); }

/* 胶带 */
.tape {
  position: absolute;
  width: 92px;
  height: 26px;
  background: color-mix(in srgb, var(--accent) 26%, #fff);
  border-left: 1px dashed rgba(255,255,255,.5);
  border-right: 1px dashed rgba(255,255,255,.5);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  opacity: .82;
}
[data-theme='dark'] .tape { background: color-mix(in srgb, var(--accent) 34%, #6b6b6b); }
.tape--a { top: -11px; left: 24%; rotate: -5deg; }
.tape--b { top: -12px; right: 18%; rotate: 4deg; }

.hero-badge {
  position: absolute;
  z-index: 3;
  bottom: 6%;
  left: 2%;
  rotate: -8deg;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--accent-ink);
  background: var(--accent-wash);
  padding: .35rem .85rem;
  border-radius: 999px;
}
[lang='zh-CN'] .hero-badge { font-family: var(--font-body); font-size: .78rem; }

/* 数据条 */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem 2.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--line-soft);
}
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat b {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}
[lang='zh-CN'] .stat b { font-family: var(--font-body); font-weight: 700; font-size: 1.32rem; }
.stat span {
  font-family: var(--font-ui);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* 关于 Kaka 引导条 */
.cta-band {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
  background: color-mix(in srgb, var(--accent-wash) 55%, var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--radius-lg);
}
.cta-avatar {
  width: 96px;
  height: 96px;
  object-fit: cover;
  object-position: 62% 50%;
  border-radius: 50%;
  border: 2px solid var(--card);
  box-shadow: var(--shadow-sm);
  rotate: -3deg;
}
.cta-band h2 { font-size: 1.45rem; }
.cta-band p { margin: .45rem 0 0; font-size: .95rem; color: var(--ink-2); }
@media (max-width: 720px) {
  .cta-band { grid-template-columns: 1fr; justify-items: start; }
  .cta-avatar { width: 72px; height: 72px; }
}

/* --------------------------------------------------------------------------
   6. 按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .78rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .22s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff8f2; }

.btn--ghost { border-style: dashed; border-color: var(--line-soft); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--ink); border-style: solid; color: var(--ink); }

.btn--sm { padding: .5rem 1rem; font-size: .82rem; }

/* --------------------------------------------------------------------------
   7. 故事卡片
   -------------------------------------------------------------------------- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.story-card:nth-child(3n+1) { rotate: -.35deg; }
.story-card:nth-child(3n+2) { rotate: .28deg; }
.story-card:nth-child(3n+3) { rotate: -.14deg; }

.story-card:hover {
  rotate: 0deg;
  translate: 0 -5px;
  box-shadow: var(--shadow);
  border-color: var(--line);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--paper-deep) 60%, transparent) 0 12px, transparent 12px 24px),
    var(--paper-deep);
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(.15) contrast(1.03);
  transition: scale .5s var(--ease), filter .5s var(--ease);
}
.story-card:hover .card-cover img { scale: 1.05; filter: none; }

.card-cover--empty {
  display: grid;
  place-items: center;
  padding: 1.5rem 1.25rem;
  color: var(--ink-3);
}

.cover-sketch {
  display: grid;
  justify-items: center;
  gap: .55rem;
  text-align: center;
  rotate: -2deg;
  max-width: 22ch;
}
.cover-sketch-paw {
  width: 24px;
  height: 24px;
  opacity: .32;
}
.cover-sketch-title {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.24;
  color: var(--ink-2);
  padding-bottom: .4rem;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 38%, transparent);
}
.cover-sketch-hint {
  font-family: var(--font-ui);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.feature-card .cover-sketch { max-width: 26ch; }
.feature-card .cover-sketch-title { font-size: 1.75rem; }
.feature-card .cover-sketch-paw { width: 30px; height: 30px; }

.card-ep {
  position: absolute;
  top: .6rem;
  left: .6rem;
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding: .28rem .58rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
}

.card-body {
  padding: 1.15rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .6rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-ui);
  font-size: .74rem;
  color: var(--ink-3);
  letter-spacing: .04em;
}

.card-title {
  font-size: var(--fs-h3);
  font-family: var(--font-hand-zh);
  line-height: 1.3;
}
.card-title .en {
  display: block;
  font-family: var(--font-hand);
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: .01em;
  margin-top: .18rem;
}

.card-summary {
  margin: 0;
  font-size: .92rem;
  line-height: 1.7;
  color: var(--ink-2);
  flex: 1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tag {
  font-family: var(--font-ui);
  font-size: .7rem;
  letter-spacing: .05em;
  padding: .2rem .55rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink-3);
  background: color-mix(in srgb, var(--paper-deep) 45%, transparent);
}

.card-read {
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  letter-spacing: .04em;
}
.story-card:hover .card-read { gap: .6rem; }
.card-read svg { width: 14px; height: 14px; transition: translate .25s var(--ease); }
.story-card:hover .card-read svg { translate: 3px 0; }

/* 最新一话：横排大卡 */
.feature-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .3s var(--ease), translate .3s var(--ease);
}
.feature-card:hover { box-shadow: var(--shadow-lg); translate: 0 -3px; }
.feature-card .card-cover { aspect-ratio: auto; height: 100%; min-height: 300px; border-bottom: 0; border-right: 1px solid var(--line-soft); }
.feature-card .card-body { padding: clamp(1.5rem, 3vw, 2.5rem); gap: .85rem; }
.feature-card .card-title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.feature-card .card-summary { font-size: 1rem; }

.pill-new {
  font-family: var(--font-ui);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  padding: .22rem .55rem;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   8. 筛选器 / 搜索
   -------------------------------------------------------------------------- */
.filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius-lg);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box svg {
  position: absolute;
  left: .9rem;
  width: 17px; height: 17px;
  color: var(--ink-3);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: .7rem 2.6rem .7rem 2.6rem;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: .9rem;
  transition: border-color .2s var(--ease);
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-box .clear-btn {
  position: absolute;
  right: .5rem;
  width: 26px; height: 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  display: none;
  place-items: center;
  font-size: 1.1rem;
  line-height: 1;
}
.search-box.has-value .clear-btn { display: grid; }
.search-box .clear-btn:hover { background: var(--paper-deep); color: var(--ink); }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}
.filter-label {
  font-family: var(--font-ui);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-right: .35rem;
}
.chip {
  font-family: var(--font-ui);
  font-size: .78rem;
  padding: .35rem .8rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.result-count {
  font-family: var(--font-ui);
  font-size: .78rem;
  color: var(--ink-3);
  margin-left: auto;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--ink-3);
}
.empty-state svg { width: 46px; height: 46px; margin: 0 auto 1rem; opacity: .45; }
.empty-state p { margin: .3rem 0; }

/* --------------------------------------------------------------------------
   9. 漫画详情页
   -------------------------------------------------------------------------- */
.comic-shell {
  max-width: 780px;
  margin-inline: auto;
}

.comic-head {
  padding-block: clamp(2rem, 5vw, 3.25rem) 1.75rem;
  text-align: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--ink-3);
  margin-bottom: 1.6rem;
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.back-link:hover { color: var(--accent); gap: .65rem; }
.back-link svg { width: 14px; height: 14px; }

.comic-ep {
  font-family: var(--font-ui);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: .8rem;
}

.comic-title {
  font-family: var(--font-hand-zh);
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: .35rem;
}
.comic-title-en {
  font-family: var(--font-hand);
  font-size: clamp(1.05rem, .95rem + .7vw, 1.45rem);
  font-weight: 700;
  color: var(--ink-3);
  margin: 0 0 1.2rem;
}

.comic-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem .9rem;
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--ink-3);
  margin-bottom: 1.4rem;
}
.comic-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

.comic-body {
  padding-bottom: 2rem;
  font-size: 1.06rem;
  line-height: 1.95;
}

/* 正文富文本 */
.prose > * + * { margin-top: 1.35em; }
.prose p { margin: 0; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-hand-zh);
  margin-top: 2em;
  line-height: 1.35;
}
.prose h2 { font-size: 1.55rem; }
.prose h3 { font-size: 1.3rem; }
.prose h2::after, .prose h3::after {
  content: '';
  display: block;
  width: 58px;
  height: 8px;
  margin-top: .5rem;
  background-image: var(--wave);
  background-repeat: repeat-x;
  background-size: 24px 8px;
  opacity: .55;
}
.prose blockquote {
  margin: 0;
  padding: .2rem 0 .2rem 1.4rem;
  border-left: 3px solid var(--accent);
  color: var(--ink-2);
  font-style: italic;
}
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0; }
.prose li + li { margin-top: .4em; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: var(--paper-deep);
  padding: .12em .42em;
  border-radius: 3px;
}
.prose a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 3px;
}
.prose a:hover { text-decoration-style: solid; }
.prose hr {
  border: 0;
  height: 8px;
  margin-block: 2.5em;
  background-image: var(--wave);
  background-repeat: repeat-x;
  background-size: 24px 8px;
  opacity: .4;
}
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }

/* 手绘备注块 */
.note-block {
  margin-top: 2em;
  padding: 1.1rem 1.3rem;
  background: color-mix(in srgb, var(--olive-wash) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--olive) 35%, transparent);
  border-radius: var(--radius);
  font-size: .95rem;
  line-height: 1.8;
  color: var(--ink-2);
}
.note-block .note-title {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--olive);
  display: block;
  margin-bottom: .55rem;
}

/* 分镜面板 */
.panel {
  margin: clamp(1.75rem, 4vw, 2.75rem) 0;
}
.panel-frame {
  position: relative;
  padding: clamp(.6rem, 1.6vw, 1rem);
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 3px 9px 4px 7px / 7px 4px 9px 3px;
  box-shadow: var(--shadow);
}
.panel-frame img {
  width: 100%;
  border-radius: 2px;
}
.panel--sketch .panel-frame {
  border-style: dashed;
  border-color: var(--line-soft);
  box-shadow: none;
  background:
    repeating-linear-gradient(45deg, color-mix(in srgb, var(--paper-deep) 50%, transparent) 0 10px, transparent 10px 20px),
    color-mix(in srgb, var(--card) 60%, transparent);
}
.panel-placeholder {
  display: grid;
  place-items: center;
  gap: .7rem;
  padding: clamp(2.5rem, 8vw, 4.5rem) 1rem;
  text-align: center;
  color: var(--ink-3);
}
.panel-placeholder svg { width: 38px; height: 38px; opacity: .55; }
.panel-placeholder span {
  font-family: var(--font-ui);
  font-size: .82rem;
  letter-spacing: .06em;
}

.panel figcaption {
  margin-top: .85rem;
  text-align: center;
  font-size: .9rem;
  color: var(--ink-3);
  font-style: italic;
  line-height: 1.7;
}
.panel figcaption::before { content: '— '; }
.panel figcaption::after { content: ' —'; }

/* 上一话 / 下一话 */
.comic-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--line-soft);
}
.nav-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.15rem 1.3rem;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: all .25s var(--ease);
}
.nav-card:hover { border-color: var(--ink); translate: 0 -3px; box-shadow: var(--shadow-sm); }
.nav-card--next { text-align: right; align-items: flex-end; }
.nav-card .nav-label {
  font-family: var(--font-ui);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.nav-card .nav-title {
  font-family: var(--font-hand-zh);
  font-size: 1.08rem;
  line-height: 1.35;
}
.nav-card--next .nav-title { text-align: right; }
.nav-card .nav-title .en {
  display: block;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: .88rem;
  color: var(--ink-3);
}
.nav-card--empty {
  border-style: dashed;
  opacity: .55;
  pointer-events: none;
  justify-content: center;
  color: var(--ink-3);
  font-family: var(--font-ui);
  font-size: .84rem;
}

.comic-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   10. 关于页
   -------------------------------------------------------------------------- */
.about-head { text-align: center; padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.paper-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}
.paper-card h3 {
  font-family: var(--font-hand-zh);
  font-size: 1.3rem;
  margin-bottom: .3rem;
}
/* 卡片标题的第二语言副标题（paper-card、contact-card 共用） */
.h3-en {
  display: block;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink-3);
  margin-top: .15rem;
}
.paper-card .h3-en { margin-top: 0; margin-bottom: .9rem; }
.paper-card p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.paper-card p + p { margin-top: .9rem; }

/* 联系邮箱 */
.mail-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-ui);
  font-size: .95rem;
  font-weight: 600;
  color: var(--accent-ink);
  padding-bottom: .15rem;
  border-bottom: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.mail-link svg { width: 17px; height: 17px; flex: none; }
.mail-link:hover {
  color: var(--accent);
  border-bottom-style: solid;
  border-bottom-color: var(--accent);
}

/* 整宽的联系卡：放在信息卡网格之后，
   这样不管容器宽度能放下几列，都不会出现最后一张单独占一行的空档 */
.contact-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.contact-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent-ink);
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-card h3 { font-family: var(--font-hand-zh); font-size: 1.3rem; }
.contact-card p { margin: .45rem 0 0; color: var(--ink-2); font-size: .95rem; }
@media (max-width: 720px) {
  .contact-card { grid-template-columns: auto minmax(0, 1fr); }
  .contact-btn { grid-column: 1 / -1; justify-self: start; }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.gallery figure {
  margin: 0;
  background: var(--card);
  padding: .7rem .7rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
  rotate: -.6deg;
  transition: rotate .3s var(--ease), translate .3s var(--ease);
}
.gallery figure:nth-child(even) { rotate: .7deg; }
.gallery figure:hover { rotate: 0deg; translate: 0 -4px; }
.gallery img { width: 100%; }
.gallery figcaption {
  margin-top: .7rem;
  font-size: .84rem;
  color: var(--ink-3);
  text-align: center;
}

.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .95rem;
}
.fact-list li {
  display: flex;
  gap: .8rem;
  padding: .6rem 0;
  border-bottom: 1px dashed var(--line-soft);
}
.fact-list li:last-child { border-bottom: 0; }
.fact-list dt, .fact-list .k {
  font-family: var(--font-ui);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex: none;
  width: 6.5rem;
  padding-top: .18rem;
}
.fact-list .v { color: var(--ink); }

/* --------------------------------------------------------------------------
   11. 载入骨架 / 工具
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--paper-deep) 45%, transparent) 25%,
    color-mix(in srgb, var(--paper-deep) 75%, transparent) 37%,
    color-mix(in srgb, var(--paper-deep) 45%, transparent) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.skeleton-card { height: 330px; }

[hidden] { display: none !important; }

.fade-in { animation: fadeUp .5s var(--ease) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   12. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 520px; margin-inline: auto; aspect-ratio: 1 / .95; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-card .card-cover { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

@media (max-width: 720px) {
  .main-nav .nav-label-full { display: none; }
  .header-tools { padding-left: .5rem; }
  .brand { font-size: 1.35rem; }
  .brand .brand-sub { display: none; }
  .comic-nav { grid-template-columns: 1fr; }
  .nav-card--next { text-align: left; align-items: flex-start; }
  .nav-card--next .nav-title { text-align: left; }
  .story-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header-inner { gap: .6rem; }
  .main-nav a { padding: .4rem .45rem; font-size: .84rem; }
  .lang-switch button { padding: .42rem .58rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .comic-nav, .hero-actions, .filters { display: none; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
}
