/* =========================================================
   学前班夏日簿 — 原创二创界面
   ========================================================= */
:root {
  --paper: #f7efdd;
  --paper-2: #efe4cd;
  --paper-3: #fff9ed;
  --ink: #2f342f;
  --ink-soft: #4e554c;
  --muted: #8a8573;
  --line: rgba(47, 52, 47, .13);
  --line-strong: rgba(47, 52, 47, .22);
  --green: #7d9e78;
  --green-deep: #4e7058;
  --mint: #d7e6d2;
  --mint-2: #e8f1df;
  --peach: #e5a17d;
  --peach-soft: #f4d8c5;
  --gold: #e5b75e;
  --gold-soft: #f6e6b8;
  --lav: #c7a9d0;
  --lav-soft: #eadcf0;
  --rose: #d98b7d;
  --shadow: 0 18px 50px rgba(74, 62, 40, .11);
  --shadow-soft: 0 8px 24px rgba(74, 62, 40, .08);
  --r-lg: 30px;
  --r-md: 20px;
  --r-sm: 12px;
  --serif: 'Songti SC', 'Noto Serif CJK SC', 'STSong', 'SimSun', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
  --hand: 'Kaiti SC', 'STKaiti', 'KaiTi', var(--serif);
  --safe: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font-family: var(--sans); background: var(--paper);
  min-height: 100vh; overflow-x: hidden;
}
button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--gold-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--green-deep); outline-offset: 3px; }

/* ------------- 纹理与背景 ------------- */
#app { position: relative; min-height: 100vh; overflow: hidden; }
.paper-grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .22; mix-blend-mode: multiply;
  background-image: 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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}
.bg-blob { position: fixed; border-radius: 50%; filter: blur(10px); pointer-events: none; z-index: 0; opacity: .55; }
.blob-a { width: 520px; height: 520px; right: -180px; top: 120px; background: radial-gradient(circle, #dce9cf, transparent 70%); }
.blob-b { width: 480px; height: 480px; left: -220px; top: 50%; background: radial-gradient(circle, #f3d8bf, transparent 70%); }
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.petal { position: absolute; top: -30px; width: 12px; height: 12px; border-radius: 70% 10% 70% 10%; background: #a7c29b; opacity: .55; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--x), 110vh, 0) rotate(480deg); } }

/* ------------- 基础组件 ------------- */
.eyebrow {
  display: inline-block; font-family: var(--mono, 'Courier New', monospace); font-size: 10px;
  letter-spacing: .2em; color: var(--muted); font-weight: 700;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px; font-weight: 700; font-size: 14px; letter-spacing: .02em;
  padding: 14px 24px; transition: transform .2s, box-shadow .2s, background .2s; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: var(--ink); color: var(--paper-3); box-shadow: 0 10px 22px rgba(47,52,47,.18);
}
.btn-primary:hover { background: #414940; transform: translateY(-2px); }
.btn-primary b { font-size: 18px; font-weight: 400; }
.btn-ghost { border: 1.5px solid var(--line-strong); background: rgba(255,249,237,.55); color: var(--ink-soft); }
.btn-ghost:hover { background: #fff9ed; border-color: var(--ink-soft); transform: translateY(-2px); }
.btn-small { padding: 10px 18px; font-size: 12px; }
.link-btn { font-size: 12px; color: var(--green-deep); font-weight: 700; padding: 6px; }
.link-btn span { transition: transform .2s; display: inline-block; }
.link-btn:hover span { transform: translateX(4px); }
.text-danger { font-size: 11px; color: #a97869; text-decoration: underline; text-underline-offset: 4px; padding: 8px; }
.text-danger:hover { color: #8a4e3d; }
.hidden { display: none !important; }
.round-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line);
  background: rgba(255,249,237,.6); display: grid; place-items: center; font-size: 15px;
  transition: .2s;
}
.round-btn:hover { background: var(--paper-3); border-color: var(--line-strong); transform: rotate(-6deg); }
.icon-close {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 24px;
  line-height: 1; display: grid; place-items: center; color: var(--ink-soft); background: var(--paper-3);
}
.icon-close:hover { background: var(--peach-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 54px 0 20px; }
.section-head h2 { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); font-weight: 600; letter-spacing: .02em; }
.section-head.compact { margin: 0 0 14px; align-items: center; }
.section-head.compact h2 { font-size: 22px; }
.hand-note { font-family: var(--hand); font-size: 14px; color: var(--muted); transform: rotate(-1deg); }

/* ------------- 顶部 ------------- */
.site-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 4vw, 54px); background: rgba(247,239,221,.8);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 46px; height: 42px; display: block; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-text b { font-family: var(--serif); font-size: 17px; letter-spacing: .08em; font-weight: 600; }
.brand-text small { font-size: 7px; letter-spacing: .2em; color: var(--muted); }
.desktop-nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 9px 13px; border-radius: 999px; font-size: 12px; color: var(--ink-soft);
  font-weight: 600; position: relative; transition: .2s;
}
.nav-link:hover { background: rgba(255,249,237,.8); }
.nav-link.active { background: var(--ink); color: var(--paper-3); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.progress-pill { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(255,249,237,.55); }
.progress-ring {
  --p: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--green-deep) calc(var(--p) * 1%), #e2d8c2 0);
  position: relative;
}
.progress-ring::before { content: ''; position: absolute; inset: 4px; background: var(--paper-3); border-radius: 50%; }
.progress-ring b { position: relative; z-index: 1; font-size: 8px; color: var(--green-deep); }
.progress-label { font-size: 9px; letter-spacing: .06em; color: var(--muted); }
.mobile-nav { display: none; }

/* ------------- 页面与首页 ------------- */
#main { position: relative; z-index: 2; padding: 0 clamp(16px, 4.2vw, 58px) 60px; max-width: 1360px; margin: 0 auto; }
.view { display: none; animation: viewIn .45s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(26px, 5vw, 72px); align-items: center; padding: clamp(34px, 6vw, 78px) 0 28px; min-height: 640px; }
.kicker { display: flex; align-items: center; gap: 8px; font-family: var(--mono, monospace); font-size: 9px; letter-spacing: .18em; color: var(--muted); margin-bottom: 28px; text-transform: uppercase; }
.leaf-dot { width: 8px; height: 8px; border-radius: 70% 10% 70% 10%; background: var(--green); transform: rotate(25deg); }
.hero-title { font-family: var(--serif); font-size: clamp(56px, 7.8vw, 108px); line-height: .98; letter-spacing: -.045em; font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; position: relative; }
.hero-title em { font-style: normal; color: var(--green-deep); position: relative; display: inline-block; }
.hero-title em::after { content: ''; position: absolute; left: 3%; right: -2%; bottom: 10px; height: 12px; background: var(--gold-soft); border-radius: 50%; z-index: -1; transform: rotate(-1.5deg); }
.title-spark { font-size: 26px; color: var(--gold); align-self: flex-start; margin-top: 10px; animation: twinkle 3s infinite; }
@keyframes twinkle { 50% { opacity: .3; transform: rotate(20deg) scale(.8); } }
.hero-sub { font-family: var(--hand); font-size: clamp(22px, 2.6vw, 31px); color: var(--ink-soft); margin-top: 22px; letter-spacing: .04em; }
.hero-desc { max-width: 550px; font-size: 13px; line-height: 2.05; color: var(--ink-soft); margin-top: 18px; letter-spacing: .02em; }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-meta { display: flex; align-items: center; gap: 20px; margin-top: 34px; flex-wrap: wrap; font-size: 10px; color: var(--muted); }
.hero-meta span { display: flex; align-items: baseline; gap: 5px; }
.hero-meta b { font-family: var(--serif); font-size: 22px; color: var(--ink); font-weight: 500; }
.finish-badge { border: 1px dashed var(--line-strong); padding: 5px 10px; border-radius: 999px; font-family: var(--hand); font-size: 12px; color: var(--green-deep) !important; background: rgba(255,249,237,.5); }
.hero-visual { position: relative; }
.hero-frame {
  position: relative; border-radius: 36px; background: var(--paper-3); padding: 14px;
  box-shadow: var(--shadow); transform: rotate(1.2deg); border: 1px solid rgba(255,255,255,.7);
}
.hero-art { border-radius: 26px; overflow: hidden; background: #d9e7d2; }
.hero-scene-svg { width: 100%; height: auto; display: block; }
.frame-tape { position: absolute; width: 92px; height: 26px; background: rgba(230,183,94,.45); top: -12px; left: 50%; transform: translateX(-50%) rotate(-2deg); z-index: 3; backdrop-filter: blur(2px); }
.frame-tape.tape-a { left: 16%; top: -9px; transform: rotate(-7deg); }
.frame-tape.tape-b { left: auto; right: 15%; top: -9px; transform: rotate(6deg); }
.hero-badge {
  position: absolute; top: 28px; right: -16px; background: var(--ink); color: var(--paper-3);
  border-radius: 999px; padding: 8px 14px; font-size: 10px; font-weight: 700; display: flex; align-items: center; gap: 6px;
  box-shadow: 0 8px 18px rgba(0,0,0,.16); transform: rotate(3deg);
}
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.8); } }
.speech-bubble {
  position: absolute; left: -18px; bottom: 70px; background: var(--paper-3); border: 1.5px solid var(--line-strong);
  border-radius: 18px 18px 18px 4px; padding: 12px 16px; font-family: var(--hand); font-size: 15px;
  box-shadow: var(--shadow-soft); transform: rotate(-3deg); max-width: 210px; z-index: 4; transition: transform .25s;
}
.speech-bubble::after { content: ''; position: absolute; left: -9px; bottom: 8px; width: 14px; height: 14px; background: var(--paper-3); border-left: 1.5px solid var(--line-strong); border-bottom: 1.5px solid var(--line-strong); transform: rotate(45deg); }
.floating-card {
  position: absolute; font-family: Georgia, serif; font-size: 14px; color: var(--ink-soft);
  background: var(--paper-3); border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px;
  box-shadow: var(--shadow-soft); animation: floatCard 5s ease-in-out infinite;
}
.fc-one { top: 120px; left: 4%; transform: rotate(-8deg); }
.fc-two { top: 250px; right: 2%; transform: rotate(6deg); animation-delay: -1.4s; }
.fc-three { bottom: 130px; right: 12%; transform: rotate(-4deg); animation-delay: -2.6s; }
@keyframes floatCard { 50% { translate: 0 -10px; } }
.hero-doodle { font-family: var(--hand); font-size: 14px; color: var(--muted); text-align: right; padding: 15px 22px 0 0; transform: rotate(2deg); }
.hero-doodle span { color: var(--gold); font-size: 20px; }
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 10px 0 0; }
.marquee-track { display: flex; align-items: center; gap: 26px; width: max-content; animation: marquee 30s linear infinite; }
.marquee span { font-family: var(--serif); font-size: 15px; letter-spacing: .28em; color: var(--green-deep); white-space: nowrap; }
.marquee i { font-style: normal; color: var(--gold); font-size: 12px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.home-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; margin-top: 30px; }
.daily-card, .note-card {
  border-radius: var(--r-lg); padding: 26px; border: 1px solid var(--line); position: relative; overflow: hidden;
}
.daily-card { background: linear-gradient(130deg, #fff8e9, #f5e7c8); box-shadow: var(--shadow-soft); }
.daily-card::after { content: '🐟'; position: absolute; right: 18px; bottom: -16px; font-size: 100px; opacity: .07; transform: rotate(-15deg); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.date-badge { font-family: var(--hand); font-size: 12px; color: var(--muted); }
.daily-main { display: flex; align-items: center; gap: 16px; margin: 22px 0 20px; }
.daily-icon { width: 68px; height: 68px; border-radius: 24px; background: var(--paper-3); display: grid; place-items: center; font-size: 34px; transform: rotate(-4deg); box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.daily-main h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 5px; }
.daily-main p { font-size: 12px; color: var(--ink-soft); line-height: 1.7; }
.daily-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px dashed var(--line-strong); padding-top: 16px; font-size: 11px; color: var(--muted); }
.note-card { background: #fff8e6; transform: rotate(1.4deg); box-shadow: var(--shadow-soft); }
.note-pin { position: absolute; top: -5px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--peach); box-shadow: 0 2px 4px rgba(0,0,0,.15); }
.note-card blockquote { font-family: var(--hand); font-size: 23px; line-height: 1.55; margin: 20px 0 14px; color: var(--ink); }
.note-card p { font-size: 10px; color: var(--muted); text-align: right; }
.note-doodle { position: absolute; right: 20px; bottom: 10px; font-size: 28px; opacity: .3; transform: rotate(12deg); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
  position: relative; border-radius: var(--r-lg); padding: 26px 24px 22px; text-align: left; overflow: hidden;
  border: 1px solid rgba(255,255,255,.6); box-shadow: var(--shadow-soft); min-height: 218px;
  transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column;
}
.feature-card:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: var(--shadow); }
.fc-story { background: linear-gradient(145deg, #f4e5c8, #ecd4a8); }
.fc-play { background: linear-gradient(145deg, #dbead6, #c3ddc4); }
.fc-archive { background: linear-gradient(145deg, #eadcf0, #d9c4e0); }
.feature-icon { font-size: 30px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.08)); }
.feature-en { font-family: var(--mono, monospace); font-size: 8px; letter-spacing: .18em; color: var(--ink-soft); opacity: .6; margin: 18px 0 6px; }
.feature-card b { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.feature-card small { font-size: 11px; color: var(--ink-soft); line-height: 1.8; margin-top: 9px; max-width: 90%; }
.feature-go { margin-top: auto; padding-top: 18px; font-size: 11px; font-weight: 700; color: var(--green-deep); }
.feature-card::after { content: ''; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: -25px; bottom: -30px; background: rgba(255,255,255,.25); }
.chapter-preview { padding-top: 10px; }
.chapter-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.chapter-mini {
  border: 1px solid var(--line); border-radius: 18px; background: rgba(255,249,237,.5); padding: 16px 14px;
  text-align: left; min-height: 128px; position: relative; overflow: hidden; transition: .2s;
}
.chapter-mini:hover { background: var(--paper-3); transform: translateY(-3px); }
.chapter-mini.locked { opacity: .48; }
.chapter-mini .cm-num { font-family: var(--mono, monospace); font-size: 8px; color: var(--muted); }
.chapter-mini b { display: block; font-family: var(--serif); font-size: 15px; margin: 12px 0 4px; line-height: 1.35; }
.chapter-mini small { font-size: 9px; color: var(--muted); }
.chapter-mini .cm-stamp { position: absolute; right: 9px; bottom: 8px; width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; font-family: var(--hand); color: var(--muted); transform: rotate(-8deg); font-size: 14px; }
.home-bottom { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; margin-top: 48px; }
.about-teaser { border-top: 1px solid var(--line); padding-top: 24px; }
.about-teaser h3 { font-family: var(--serif); font-size: 24px; margin: 12px 0 9px; }
.about-teaser p { font-size: 11px; line-height: 1.9; color: var(--ink-soft); max-width: 640px; }
.cat-nap { display: flex; align-items: center; gap: 16px; background: rgba(255,249,237,.55); border: 1px dashed var(--line-strong); border-radius: 24px; padding: 16px 20px; cursor: pointer; }
.nap-cat { width: 74px; height: 74px; flex: none; animation: nap 3.5s ease-in-out infinite; }
.nap-cat svg { width: 100%; }
@keyframes nap { 50% { transform: translateY(-3px) rotate(-2deg); } }
.nap-text b { display: block; font-family: var(--serif); font-size: 16px; }
.nap-text span { font-size: 10px; color: var(--muted); }

/* ------------- 页面头 / 故事列表 ------------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 52px 0 16px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-family: var(--serif); font-size: clamp(38px, 5vw, 64px); font-weight: 600; letter-spacing: -.03em; margin: 8px 0 10px; }
.page-head p { font-size: 12px; line-height: 1.9; color: var(--ink-soft); max-width: 620px; }
.story-progress-card { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,249,237,.6); flex: none; }
.big-ring { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green-deep) calc(var(--p, 0) * 1%), #e2d8c2 0); position: relative; flex: none; }
.big-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--paper-3); }
.big-ring span { position: relative; font-size: 12px; font-weight: 700; color: var(--green-deep); }
.story-progress-card b { display: block; font-size: 12px; }
.story-progress-card small { font-size: 9px; color: var(--muted); }
.story-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; margin-top: 26px; align-items: start; }
.chapter-list { display: flex; flex-direction: column; gap: 12px; }
.chapter-card {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 18px; align-items: center;
  border: 1px solid var(--line); border-radius: 24px; background: rgba(255,249,237,.6);
  padding: 18px 20px; text-align: left; transition: .22s; position: relative; overflow: hidden;
}
.chapter-card:hover { background: var(--paper-3); transform: translateX(4px); box-shadow: var(--shadow-soft); }
.chapter-card.locked { opacity: .52; filter: grayscale(.2); }
.chapter-card.current { border-color: var(--green); background: linear-gradient(100deg, rgba(232,241,223,.9), rgba(255,249,237,.6)); }
.chapter-stamp { width: 66px; height: 66px; border-radius: 22px; border: 1.5px dashed var(--line-strong); display: grid; place-items: center; font-family: var(--serif); font-size: 26px; color: var(--ink-soft); transform: rotate(-3deg); background: rgba(255,255,255,.35); }
.chapter-card.current .chapter-stamp { background: var(--mint-2); border-color: var(--green); }
.chapter-info .cc-eyebrow { font-family: var(--mono, monospace); font-size: 8px; letter-spacing: .15em; color: var(--muted); }
.chapter-info h3 { font-family: var(--serif); font-size: 24px; margin: 5px 0 6px; font-weight: 600; }
.chapter-info p { font-size: 11px; color: var(--ink-soft); line-height: 1.7; }
.chapter-card .cc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.status-chip { font-size: 9px; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.4); white-space: nowrap; }
.status-chip.done { color: var(--green-deep); border-color: rgba(78,112,88,.3); background: var(--mint-2); }
.status-chip.locked { color: #a49a84; }
.chapter-card .cc-game { font-size: 8px; color: var(--muted); font-family: var(--mono, monospace); }
.story-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.side-card { border: 1px solid var(--line); border-radius: 24px; padding: 20px; background: rgba(255,249,237,.55); }
.stat-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 10px; }
.stat-row > span { width: 58px; flex: none; }
.stat-row b { width: 20px; text-align: right; font-family: var(--mono, monospace); font-size: 10px; }
.stat-bar { flex: 1; height: 5px; border-radius: 4px; background: #e5dac4; overflow: hidden; }
.stat-bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 4px; transition: width .5s; }
.side-note { font-size: 9px; color: var(--muted); line-height: 1.8; margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 12px; }
.mini-stickers { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.mini-sticker { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-3); border: 1px dashed var(--line-strong); font-size: 18px; opacity: .3; filter: grayscale(1); }
.mini-sticker.on { opacity: 1; filter: none; background: var(--gold-soft); transform: rotate(-3deg); }

/* ------------- 游乐场 ------------- */
.play-stamp { width: 92px; height: 92px; border-radius: 50%; border: 2px solid var(--peach); color: #b46f53; display: grid; place-items: center; text-align: center; font-family: var(--hand); font-size: 11px; line-height: 1.4; transform: rotate(8deg); flex: none; }
.play-stamp b { font-size: 16px; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.game-card { border: 1px solid var(--line); border-radius: 24px; padding: 22px; text-align: left; background: rgba(255,249,237,.62); transition: .22s; position: relative; overflow: hidden; }
.game-card:hover { transform: translateY(-4px); background: var(--paper-3); box-shadow: var(--shadow-soft); }
.game-card .gc-icon { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; background: var(--gc, var(--mint-2)); margin-bottom: 18px; }
.game-card .gc-en { font-family: var(--mono, monospace); font-size: 8px; letter-spacing: .16em; color: var(--muted); }
.game-card h3 { font-family: var(--serif); font-size: 23px; margin: 5px 0 7px; }
.game-card p { font-size: 10px; line-height: 1.7; color: var(--ink-soft); min-height: 34px; }
.game-card .gc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 9px; color: var(--muted); }
.game-card .gc-go { color: var(--green-deep); font-weight: 700; }
.play-extra { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; margin-top: 14px; }
.photo-card, .quiz-card { border-radius: 24px; border: 1px solid var(--line); padding: 20px; background: rgba(255,249,237,.6); display: flex; gap: 18px; align-items: center; }
.photo-preview { width: 118px; height: 140px; border-radius: 16px; background: linear-gradient(160deg, #dbe7d1, #b5d0b1); position: relative; overflow: hidden; flex: none; border: 4px solid #fff; box-shadow: var(--shadow-soft); transform: rotate(-2deg); }
.photo-cat { position: absolute; left: 8px; bottom: -4px; width: 98px; }
.photo-sticker { position: absolute; right: 5px; top: 6px; font-size: 22px; transform: rotate(12deg); }
.photo-card h3, .quiz-card h3 { font-family: var(--serif); font-size: 22px; margin: 6px 0 6px; }
.photo-card p, .quiz-card p { font-size: 10px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 12px; }
.quiz-card { flex-direction: column; align-items: flex-start; justify-content: center; }

/* ------------- 档案 ------------- */
.archive-seal { width: 82px; height: 82px; border: 2px solid var(--green); border-radius: 50%; display: grid; place-items: center; text-align: center; color: var(--green-deep); font-family: var(--hand); font-size: 11px; line-height: 1.3; transform: rotate(7deg); flex: none; }
.archive-seal b { font-size: 18px; }
.episode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.episode-card { border: 1px solid var(--line); border-radius: 22px; padding: 22px; background: rgba(255,249,237,.55); position: relative; overflow: hidden; transition: .2s; }
.episode-card:hover { transform: translateY(-3px); background: var(--paper-3); }
.episode-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--ep, var(--gold)); }
.ep-num { font-family: var(--serif); font-size: 42px; line-height: 1; color: var(--ep, var(--gold)); opacity: .8; font-weight: 600; }
.ep-meta { display: flex; justify-content: space-between; gap: 8px; margin: 12px 0 6px; font-family: var(--mono, monospace); font-size: 8px; color: var(--muted); letter-spacing: .06em; }
.episode-card h3 { font-family: var(--serif); font-size: 17px; line-height: 1.5; margin-bottom: 8px; }
.episode-card p { font-size: 10px; line-height: 1.8; color: var(--ink-soft); }
.character-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.character-card { border: 1px solid var(--line); border-radius: 24px; padding: 16px; text-align: left; background: rgba(255,249,237,.55); transition: .22s; position: relative; overflow: hidden; }
.character-card:hover { transform: translateY(-5px) rotate(-.5deg); background: var(--paper-3); box-shadow: var(--shadow-soft); }
.character-art { height: 170px; border-radius: 18px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; background: linear-gradient(160deg, var(--cc1, #e8f1df), var(--cc2, #f7efdd)); margin-bottom: 13px; }
.character-art svg { width: 82%; height: 96%; }
.character-card b { display: block; font-family: var(--serif); font-size: 19px; }
.character-card small { display: block; font-size: 8px; color: var(--muted); margin-top: 2px; letter-spacing: .06em; }
.character-card .cc-tag { display: inline-block; margin-top: 9px; font-size: 9px; color: var(--ink-soft); background: rgba(255,255,255,.4); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; }
.character-card .cc-arrow { position: absolute; right: 14px; bottom: 14px; color: var(--muted); }
.lore-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.lore-card { border: 1px dashed var(--line-strong); border-radius: 22px; padding: 22px; background: rgba(255,249,237,.35); }
.lore-icon { font-size: 25px; }
.lore-card h3 { font-family: var(--serif); font-size: 20px; margin: 10px 0 8px; }
.lore-card p { font-size: 10px; line-height: 1.85; color: var(--ink-soft); }
.sources-card { margin-top: 36px; border: 1px solid var(--line); border-radius: 26px; padding: 26px; background: rgba(255,249,237,.5); }
.sources-card h3 { font-family: var(--serif); font-size: 24px; margin: 8px 0; }
.sources-card p { font-size: 11px; line-height: 1.9; color: var(--ink-soft); max-width: 760px; }
.source-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.source-links a { font-size: 10px; border: 1px solid var(--line); padding: 7px 11px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); background: rgba(255,255,255,.35); }
.source-links a:hover { border-color: var(--green); color: var(--green-deep); }

/* ------------- 收藏 ------------- */
.album-actions { flex: none; }
.collection-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; }
.album-card, .achievement-card { border: 1px solid var(--line); border-radius: 26px; padding: 24px; background: rgba(255,249,237,.58); }
.sticker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sticker { border: 1px solid var(--line); border-radius: 18px; padding: 16px 10px; text-align: center; background: rgba(255,255,255,.3); opacity: .34; filter: grayscale(1); transition: .3s; }
.sticker.on { opacity: 1; filter: none; background: var(--sticker-bg, var(--gold-soft)); transform: rotate(-1.5deg); }
.sticker .st-icon { font-size: 30px; }
.sticker b { display: block; font-size: 10px; margin-top: 8px; }
.sticker small { font-size: 8px; color: var(--muted); }
.achievement-list { display: flex; flex-direction: column; gap: 7px; }
.achv-row { display: flex; gap: 11px; align-items: center; padding: 8px 10px; border-radius: 14px; border: 1px solid transparent; font-size: 11px; opacity: .38; filter: grayscale(1); }
.achv-row.on { opacity: 1; filter: none; background: rgba(255,249,237,.7); border-color: var(--line); }
.achv-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-3); font-size: 16px; flex: none; }
.achv-row b { display: block; font-size: 11px; }
.achv-row small { display: block; font-size: 8px; color: var(--muted); margin-top: 2px; }
.cert-preview { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: center; margin-top: 18px; border: 1px solid var(--line); border-radius: 28px; padding: 30px; background: linear-gradient(120deg, #f6e7c9, #e5efdd); }
.cert-preview h2 { font-family: var(--serif); font-size: 34px; margin: 8px 0; }
.cert-preview p { font-size: 11px; line-height: 1.8; color: var(--ink-soft); }
.cert-preview-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 10px; margin: 16px 0; color: var(--muted); }
.cert-preview-meta b { color: var(--ink); }
.cert-mini { background: var(--paper-3); border: 5px solid #fff; border-radius: 16px; padding: 20px; text-align: center; transform: rotate(2deg); box-shadow: var(--shadow); }
.cert-mini-label { font-family: var(--mono, monospace); font-size: 8px; letter-spacing: .16em; color: var(--muted); }
.cert-mini-cat { width: 100px; margin: 8px auto; }
.cert-mini b { display: block; font-family: var(--serif); font-size: 19px; border-top: 1px solid var(--line); padding-top: 8px; }
.cert-mini small { display: block; font-family: var(--hand); font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ------------- 页脚 ------------- */
.site-footer { position: relative; z-index: 2; max-width: 1360px; margin: 0 auto; padding: 32px clamp(16px,4.2vw,58px) calc(40px + var(--safe)); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 7px; font-family: var(--serif); font-size: 13px; }
.footer-brand span { width: 28px; height: 28px; }
.footer-brand small { font-family: var(--sans); font-size: 8px; color: var(--muted); margin-left: 5px; }
.footer-links { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-links button { font-size: 9px; color: var(--muted); padding: 6px; }
.footer-links button:hover { color: var(--ink); }
.footer-note { flex-basis: 100%; font-size: 8px; color: var(--muted); line-height: 1.7; border-top: 1px dashed var(--line); padding-top: 12px; }

/* =========================================================
   故事弹层
   ========================================================= */
.overlay { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(31,36,30,.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.overlay.open { display: flex; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.story-shell { width: min(1080px, 100%); height: min(760px, calc(100vh - 40px)); background: var(--paper-3); border-radius: 30px; overflow: hidden; display: flex; flex-direction: column; position: relative; box-shadow: 0 30px 100px rgba(0,0,0,.3); animation: popIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes popIn { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.story-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--paper); flex: none; }
.story-chapter-chip { font-family: var(--mono, monospace); font-size: 9px; letter-spacing: .1em; color: var(--green-deep); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; }
.story-dots { display: flex; gap: 5px; }
.story-dots i { width: 15px; height: 4px; border-radius: 4px; background: #e2d8c2; }
.story-dots i.on { background: var(--green); }
.story-top-actions { display: flex; gap: 8px; align-items: center; }
.mini-pill { font-size: 9px; border: 1px solid var(--line); padding: 5px 9px; border-radius: 999px; color: var(--muted); }
.mini-pill.on { background: var(--mint-2); color: var(--green-deep); border-color: var(--green); }
.story-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #e8f0df; }
.story-bg { position: absolute; inset: 0; transition: .4s; }
.story-bg svg { width: 100%; height: 100%; object-fit: cover; }
.story-deco { position: absolute; inset: 0; pointer-events: none; }
.story-characters { position: absolute; inset: 0; pointer-events: none; }
.story-character { position: absolute; bottom: 0; width: 240px; max-height: 82%; transition: transform .3s, opacity .3s; filter: drop-shadow(0 12px 18px rgba(60,50,30,.16)); }
.story-character.left { left: 6%; }
.story-character.right { right: 6%; transform: scaleX(-1); }
.story-character.center { left: 50%; transform: translateX(-50%); width: 300px; }
.story-character.dim { opacity: .5; transform: translateY(8px) scale(.96); }
.story-character svg { width: 100%; max-height: 100%; }
.story-character .person-art { height: 330px; }
.chapter-title-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: rgba(255,249,237,.92); border: 1px solid var(--line); border-radius: 22px; padding: 26px 30px; text-align: center; max-width: 420px; box-shadow: var(--shadow); animation: titleCard .4s ease; }
@keyframes titleCard { from { opacity: 0; transform: translate(-50%,-44%); } }
.chapter-title-card h2 { font-family: var(--serif); font-size: 32px; margin: 7px 0; }
.chapter-title-card p { font-size: 11px; color: var(--ink-soft); }
.dialogue-box { flex: none; background: var(--paper-3); border-top: 1px solid var(--line); padding: 16px 22px 14px; position: relative; min-height: 176px; }
.speaker { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: var(--paper-3); border-radius: 999px; font-size: 10px; font-weight: 700; padding: 5px 12px; margin-top: -30px; margin-bottom: 8px; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.dialogue-text { font-family: var(--serif); font-size: 17px; line-height: 1.9; min-height: 58px; color: var(--ink); }
.dialogue-text::after { content: '▍'; color: var(--green); opacity: 0; animation: blink 1s steps(1) infinite; }
.dialogue-text.typing::after { opacity: 1; }
@keyframes blink { 50% { opacity: 0; } }
.dialogue-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.dialogue-hint { font-size: 9px; color: var(--muted); }
.next-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--paper-3); font-size: 20px; display: grid; place-items: center; transition: .2s; }
.next-btn:hover { transform: translateX(3px); }
.choice-box { display: flex; flex-direction: column; gap: 7px; margin: 6px 0 8px; }
.choice-btn { text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; font-size: 12px; background: rgba(247,239,221,.5); transition: .18s; }
.choice-btn:hover { border-color: var(--green); background: var(--mint-2); transform: translateX(4px); }
.story-result { position: absolute; inset: 0; z-index: 10; background: rgba(255,249,237,.96); backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.result-stamp { width: 78px; height: 78px; border-radius: 50%; border: 2px solid var(--green); color: var(--green-deep); display: grid; place-items: center; font-size: 32px; transform: rotate(-8deg); margin-bottom: 18px; animation: stamp .4s ease; }
@keyframes stamp { from { transform: scale(2) rotate(10deg); opacity: 0; } }
.story-result h2 { font-family: var(--serif); font-size: 36px; }
.story-result p { font-size: 12px; line-height: 1.8; color: var(--ink-soft); max-width: 440px; margin: 8px 0 22px; }
.result-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; }

/* =========================================================
   游戏弹层
   ========================================================= */
.game-shell { width: min(880px, 100%); height: min(700px, calc(100vh - 40px)); background: var(--paper-3); border-radius: 28px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 100px rgba(0,0,0,.3); animation: popIn .3s ease; }
.game-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: var(--paper); border-bottom: 1px solid var(--line); flex: none; }
.game-topbar h2 { font-family: var(--serif); font-size: 24px; margin-top: 2px; }
.game-top-actions { display: flex; align-items: center; gap: 10px; }
.game-score-chip { font-family: var(--mono, monospace); font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; background: var(--paper-3); }
.game-intro { padding: 26px 24px; text-align: center; flex: none; }
.game-intro p { font-size: 12px; color: var(--ink-soft); line-height: 1.8; margin-bottom: 16px; }
.game-body { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.game-result { position: absolute; inset: 0; z-index: 15; background: rgba(255,249,237,.96); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.result-stars { font-size: 34px; color: var(--gold); letter-spacing: 5px; margin-bottom: 10px; }
.game-result h2 { font-family: var(--serif); font-size: 32px; }
.game-result p { font-size: 12px; line-height: 1.8; color: var(--ink-soft); margin: 8px 0 20px; max-width: 420px; }

/* 拼音 */
.pinyin-stage { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, #e7f1df, #f7ecd4); }
.pinyin-cloud { position: absolute; color: #fff; opacity: .7; font-size: 60px; animation: cloudMove 22s linear infinite; }
.pinyin-cloud.c2 { font-size: 40px; top: 16%; animation-delay: -8s; animation-duration: 28s; }
@keyframes cloudMove { from { transform: translateX(-20vw); } to { transform: translateX(110vw); } }
.pinyin-target { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; z-index: 5; }
.pinyin-letter { width: 42px; height: 48px; border-radius: 12px; background: rgba(255,249,237,.8); border: 1px dashed var(--line-strong); display: grid; place-items: center; font-family: Georgia, serif; font-size: 13px; color: var(--muted); transition: .3s; }
.pinyin-letter.on { background: var(--gold-soft); border-color: var(--gold); color: var(--ink); transform: translateY(-3px) rotate(-4deg); }
.pinyin-bubble { position: absolute; min-width: 74px; padding: 12px 16px; border-radius: 50%; background: rgba(255,249,237,.92); border: 2px solid rgba(255,255,255,.9); box-shadow: 0 8px 18px rgba(94,110,80,.16); font-family: Georgia, serif; font-size: 18px; color: var(--ink); cursor: pointer; transition: transform .1s, background .2s; animation: bubbleFloat 4s ease-in-out infinite; z-index: 4; }
.pinyin-bubble:hover { background: #fff; transform: scale(1.08); }
.pinyin-bubble.wrong { animation: shake .3s; background: #f5d8cd; }
.pinyin-bubble.pop { animation: popBubble .35s forwards; pointer-events: none; }
@keyframes bubbleFloat { 50% { translate: 0 -8px; } }
@keyframes popBubble { to { transform: scale(1.6); opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-5px) rotate(-3deg); } 75% { transform: translateX(5px) rotate(3deg); } }
.pinyin-cat { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 130px; z-index: 3; }
.pinyin-status { position: absolute; top: 72px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--ink-soft); background: rgba(255,249,237,.65); padding: 5px 10px; border-radius: 999px; }
.pinyin-timer { position: absolute; right: 14px; top: 12px; font-family: var(--mono, monospace); font-size: 12px; color: var(--green-deep); z-index: 5; }

/* 房间 */
.room-game { position: absolute; inset: 0; display: flex; flex-direction: column; background: #f7efdd; }
.room-canvas { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.room-canvas svg { width: 100%; height: 100%; object-fit: cover; }
.room-item { position: absolute; transform: translate(-50%,-50%) scale(.2); opacity: 0; transition: .4s cubic-bezier(.2,.9,.3,1.3); z-index: 3; font-size: 40px; filter: drop-shadow(0 5px 6px rgba(80,60,30,.18)); }
.room-item.placed { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.room-item .item-svg { width: 70px; }
.room-tray { flex: none; display: flex; gap: 8px; padding: 10px 14px 14px; justify-content: center; background: rgba(255,249,237,.8); border-top: 1px solid var(--line); overflow-x: auto; }
.tray-item { border: 1px solid var(--line); border-radius: 14px; padding: 7px 10px; background: var(--paper-3); font-size: 10px; display: flex; align-items: center; gap: 6px; flex: none; transition: .2s; }
.tray-item:hover { border-color: var(--gold); transform: translateY(-2px); }
.tray-item.used { opacity: .3; pointer-events: none; }
.tray-item i { font-size: 18px; font-style: normal; }
.room-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(255,249,237,.82); border-radius: 999px; padding: 6px 12px; font-size: 9px; color: var(--muted); z-index: 4; }

/* 寻灵 */
.hidden-stage { position: absolute; inset: 0; background: #c9ddcb; }
.hidden-stage svg { width: 100%; height: 100%; object-fit: cover; }
.spirit-spot { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 2px dashed transparent; background: transparent; z-index: 5; display: grid; place-items: center; color: transparent; font-size: 0; }
.spirit-spot:hover { border-color: rgba(255,255,255,.35); }
.spirit-spot.hint { animation: hintPulse 1s infinite; border-color: var(--gold); background: rgba(255,244,190,.25); }
.spirit-spot.found { border-color: var(--green); background: rgba(255,249,237,.6); color: var(--ink); font-size: 18px; }
.spirit-spot .spirit-svg { width: 36px; height: 36px; opacity: 0; }
.spirit-spot.found .spirit-svg { opacity: 1; animation: popBubble .4s; }
@keyframes hintPulse { 50% { box-shadow: 0 0 0 10px rgba(230,183,94,.15); } }
.hidden-hud { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; justify-content: space-between; z-index: 6; pointer-events: none; }
.hidden-hud > * { pointer-events: auto; }
.spirit-count { background: rgba(255,249,237,.85); border-radius: 999px; padding: 7px 12px; font-size: 10px; color: var(--ink-soft); }
.hint-btn { background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 999px; padding: 7px 12px; font-size: 10px; }
.hidden-toast { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: rgba(47,52,47,.86); color: var(--paper-3); border-radius: 999px; padding: 7px 14px; font-size: 10px; opacity: 0; transition: .3s; z-index: 7; white-space: nowrap; }
.hidden-toast.show { opacity: 1; }

/* 星图 */
.memory-stage { position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, #3f4a50, #222b2f 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px; color: #f7efdd; }
.memory-title { font-size: 11px; color: #d9d2bd; letter-spacing: .08em; }
.memory-round { font-family: var(--serif); font-size: 24px; margin: 5px 0 14px; }
.star-grid { display: grid; grid-template-columns: repeat(3, 84px); gap: 13px; }
.star-btn { width: 84px; height: 84px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); display: grid; place-items: center; font-size: 32px; color: #d7d1bb; transition: .16s; position: relative; }
.star-btn.lit { background: #f4d888; color: #6f5b2f; box-shadow: 0 0 26px rgba(244,216,136,.55); transform: scale(1.06); }
.star-btn.wrong { background: #b56b5d; }
.star-btn:active { transform: scale(.95); }
.memory-status { margin-top: 16px; font-size: 10px; color: #cbc4b0; }

/* 节奏 */
.rhythm-stage { position: absolute; inset: 0; background: linear-gradient(180deg, #f3e7c8, #dcead5); display: flex; flex-direction: column; }
.rhythm-top { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; font-size: 10px; color: var(--ink-soft); }
.rhythm-lanes { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 0 8px; position: relative; min-height: 0; }
.rhythm-lane { position: relative; border-radius: 12px; background: rgba(255,249,237,.32); overflow: hidden; }
.rhythm-lane::after { content: ''; position: absolute; left: 7%; right: 7%; bottom: 5%; height: 44px; border-radius: 12px; border: 2px dashed rgba(78,112,88,.35); background: rgba(255,249,237,.28); }
.rhythm-note { position: absolute; left: 50%; width: 46px; height: 26px; margin-left: -23px; border-radius: 999px; background: var(--green); color: #fff; font-size: 15px; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(70,90,60,.18); z-index: 2; }
.rhythm-note.hit { animation: noteHit .2s forwards; }
@keyframes noteHit { to { transform: scale(1.6); opacity: 0; } }
.rhythm-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 0 8px 10px; }
.rhythm-key { border: 1px solid rgba(78,112,88,.3); background: rgba(255,249,237,.7); border-radius: 10px; padding: 8px 0; font-family: var(--mono, monospace); font-size: 10px; color: var(--green-deep); }
.rhythm-key:active, .rhythm-key.on { background: var(--green); color: #fff; }
.rhythm-hint { position: absolute; bottom: 46%; left: 50%; transform: translateX(-50%); font-size: 9px; color: var(--ink-soft); background: rgba(255,249,237,.6); padding: 4px 10px; border-radius: 999px; }

/* 问答 */
.quiz-stage { position: absolute; inset: 0; padding: 20px; overflow-y: auto; }
.quiz-q { max-width: 620px; margin: 0 auto; }
.quiz-progress { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); margin-bottom: 14px; }
.quiz-question { font-family: var(--serif); font-size: 24px; line-height: 1.5; margin-bottom: 18px; }
.quiz-option { display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; margin-bottom: 8px; font-size: 12px; background: rgba(247,239,221,.4); transition: .16s; }
.quiz-option:hover { border-color: var(--green); background: var(--mint-2); }
.quiz-option.correct { background: #d9ecd5; border-color: var(--green); }
.quiz-option.wrong { background: #f3d6cb; border-color: var(--rose); }
.quiz-note { font-size: 10px; line-height: 1.7; color: var(--ink-soft); background: rgba(255,249,237,.7); border-left: 2px solid var(--green); padding: 10px 12px; margin-top: 12px; }

/* 弹窗 */
.modal-overlay { z-index: 80; }
.modal-card { width: min(720px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--paper-3); border-radius: 28px; padding: 28px; box-shadow: 0 30px 100px rgba(0,0,0,.3); animation: popIn .3s ease; position: relative; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.modal-card h2 { font-family: var(--serif); font-size: 32px; margin: 8px 0; }
.modal-card p { font-size: 11px; line-height: 1.9; color: var(--ink-soft); }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.character-modal { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: center; }
.character-modal .cm-art { border-radius: 20px; background: linear-gradient(160deg, #e7f0dc, #f7efdd); overflow: hidden; height: 300px; display: flex; align-items: flex-end; }
.character-modal .cm-art svg { width: 100%; }
.character-modal .quote { font-family: var(--hand); font-size: 22px; color: var(--green-deep); border-left: 2px solid var(--gold); padding-left: 13px; margin: 14px 0; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.chip { font-size: 9px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; background: rgba(255,255,255,.45); }
.about-modal h2 { font-size: 34px; }
.about-modal .about-note { border: 1px dashed var(--line-strong); border-radius: 16px; padding: 14px; background: rgba(247,239,221,.6); margin: 12px 0; font-size: 11px; line-height: 1.9; color: var(--ink-soft); }
.about-modal .src-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.about-modal .src-list a { font-size: 10px; color: var(--green-deep); }

/* 毕业证 */
.certificate-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.certificate-paper { width: 100%; max-width: 660px; background: #fff9e9; border: 10px double var(--gold); padding: 30px; text-align: center; position: relative; }
.certificate-paper::before { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(201,147,69,.35); pointer-events: none; }
.certificate-paper .cert-kicker { font-family: var(--mono, monospace); font-size: 8px; letter-spacing: .2em; color: var(--muted); }
.certificate-paper h2 { font-family: var(--serif); font-size: 38px; margin: 10px 0; letter-spacing: .12em; }
.certificate-paper .cert-line { height: 1px; background: var(--line); margin: 16px 0; }
.certificate-paper .cert-name { font-family: var(--hand); font-size: 32px; border-bottom: 1px solid var(--line-strong); display: inline-block; padding: 0 20px 4px; margin: 10px 0; min-width: 180px; }
.certificate-paper .cert-body { font-size: 11px; line-height: 2; color: var(--ink-soft); }
.certificate-paper .cert-stamps { display: flex; justify-content: center; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.cert-stamp { width: 44px; height: 44px; border: 1.5px solid var(--gold); border-radius: 50%; display: grid; place-items: center; color: var(--goldDeep, #a87b3f); font-family: var(--hand); font-size: 17px; transform: rotate(-6deg); }
.certificate-paper .cert-foot { display: flex; justify-content: space-between; font-family: var(--mono, monospace); font-size: 8px; color: var(--muted); margin-top: 18px; }
.certificate-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* 拍照 */
.photo-maker { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.photo-canvas-wrap { background: #e8f1df; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 320px; }
#photoCanvas { width: 100%; height: auto; max-height: 420px; object-fit: contain; }
.photo-controls label { display: block; font-size: 10px; color: var(--muted); margin: 10px 0 5px; }
.photo-controls input, .photo-controls select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: rgba(255,255,255,.55); font-family: inherit; font-size: 12px; color: var(--ink); }
.photo-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.photo-option { border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; font-size: 9px; background: rgba(255,255,255,.4); }
.photo-option.on { border-color: var(--green); background: var(--mint-2); }

/* toast / confetti */
.toast { position: fixed; left: 50%; bottom: calc(30px + var(--safe)); transform: translate(-50%, 16px); background: var(--ink); color: var(--paper-3); border-radius: 999px; padding: 11px 18px; font-size: 11px; z-index: 90; opacity: 0; pointer-events: none; transition: .3s; box-shadow: 0 10px 30px rgba(0,0,0,.2); white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 85; display: none; }
.confetti.show { display: block; }

/* boot */
.boot { position: fixed; inset: 0; z-index: 100; background: var(--paper); display: flex; align-items: center; justify-content: center; transition: .45s; }
.boot.done { opacity: 0; pointer-events: none; }
.boot-inner { text-align: center; }
.boot-paw { font-size: 42px; animation: nap 2s infinite; }
.boot-title { font-family: var(--serif); font-size: 22px; letter-spacing: .16em; margin: 12px 0 20px; }
.boot-dots { display: flex; gap: 5px; justify-content: center; }
.boot-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: dot 1s infinite; }
.boot-dots i:nth-child(2) { animation-delay: .15s; }.boot-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { opacity: .25; transform: translateY(-4px); } }

/* 插画动画 */
.cat-eye { transform-origin: 50% 50%; animation: catBlink 5.6s infinite; }
@keyframes catBlink { 0%, 92%, 100% { transform: scaleY(1); } 94%, 96% { transform: scaleY(.08); } }
.cat-tail { transform-origin: 70% 80%; animation: tailSway 3.8s ease-in-out infinite; }
@keyframes tailSway { 50% { transform: rotate(5deg); } }
.cat-sparkle { animation: twinkle 3.4s infinite; }
.hero-cat .cat-tail { animation-duration: 3.1s; }
.portrait-cat .cat-tail { animation-duration: 4.3s; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr .95fr; gap: 28px; min-height: 0; }
  .hero-title { font-size: clamp(52px, 7vw, 84px); }
  .desktop-nav { gap: 0; }
  .nav-link { padding: 8px 10px; font-size: 11px; }
  .character-grid { grid-template-columns: repeat(4, 1fr); }
  .character-art { height: 145px; }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .episode-grid { grid-template-columns: repeat(2, 1fr); }
  .chapter-track { grid-template-columns: repeat(3, 1fr); }
  .home-grid, .home-bottom { grid-template-columns: 1.15fr .85fr; }
  .story-character { width: 210px; }
  .story-character .person-art { height: 290px; }
}
@media (max-width: 820px) {
  .site-header { padding: 10px 16px; }
  .desktop-nav { display: none; }
  .brand-text b { font-size: 15px; }
  .brand-mark { width: 38px; height: 36px; }
  .header-actions { margin-left: auto; }
  .progress-label { display: none; }
  .progress-pill { padding: 3px; }
  .progress-ring { width: 32px; height: 32px; }
  .round-btn { width: 34px; height: 34px; font-size: 13px; }
  #main { padding-bottom: 92px; }
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; max-width: 640px; margin: 0 auto; width: 100%; }
  .hero-title { font-size: clamp(54px, 13vw, 88px); }
  .hero-desc { max-width: 100%; }
  .hero-meta { gap: 14px; }
  .hero-badge { right: -4px; }
  .home-grid, .home-bottom, .play-extra, .collection-layout, .cert-preview { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; padding: 20px; }
  .feature-icon { font-size: 24px; }
  .feature-en { margin-top: 10px; }
  .feature-card b { font-size: 21px; }
  .chapter-track { grid-template-columns: repeat(2, 1fr); }
  .story-layout { grid-template-columns: 1fr; }
  .story-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .story-side .text-danger { grid-column: 1 / -1; justify-self: center; }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .episode-grid { grid-template-columns: 1fr 1fr; }
  .character-grid { grid-template-columns: 1fr 1fr; }
  .character-art { height: 190px; }
  .lore-grid { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 100px; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40;
    bottom: 0; left: 0; right: 0; background: rgba(255,249,237,.94); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); padding: 7px 6px calc(7px + var(--safe));
  }
  .mobile-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 8px; padding: 3px; border-radius: 12px; }
  .mobile-nav button span { font-size: 19px; filter: grayscale(.5); }
  .mobile-nav button.active { color: var(--green-deep); background: var(--mint-2); }
  .mobile-nav button.active span { filter: none; }
  .toast { bottom: calc(78px + var(--safe)); }
  .page-head { align-items: flex-start; flex-direction: column; padding-top: 30px; }
  .story-progress-card { align-self: stretch; }
  .play-stamp, .archive-seal { display: none; }
  .story-shell { height: calc(100vh - 20px); border-radius: 22px; }
  .game-shell { height: calc(100vh - 20px); border-radius: 22px; }
  .story-character { width: 165px; }
  .story-character .person-art { height: 235px; }
  .story-stage { min-height: 240px; }
  .dialogue-text { font-size: 15px; }
  .chapter-title-card { padding: 20px; max-width: 86%; }
  .chapter-title-card h2 { font-size: 25px; }
  .character-modal { grid-template-columns: 150px 1fr; gap: 16px; }
  .character-modal .cm-art { height: 220px; }
  .photo-maker { grid-template-columns: 1fr; }
  .star-grid { grid-template-columns: repeat(3, 72px); gap: 9px; }
  .star-btn { width: 72px; height: 72px; font-size: 27px; }
}
@media (max-width: 520px) {
  #main { padding-left: 13px; padding-right: 13px; }
  .site-header { gap: 8px; }
  .header-actions { gap: 5px; }
  .aboutBtn, #aboutBtn { display: none; }
  .hero-title { font-size: 16.5vw; gap: 0 5px; }
  .hero-sub { font-size: 21px; }
  .hero-desc { font-size: 12px; line-height: 1.9; }
  .hero-actions { gap: 8px; }
  .btn { padding: 13px 20px; font-size: 13px; }
  .hero-meta { gap: 12px; font-size: 9px; }
  .hero-meta b { font-size: 18px; }
  .floating-card { font-size: 11px; padding: 5px 8px; }
  .fc-two { right: 0; top: 180px; }
  .hero-badge { font-size: 8px; padding: 6px 9px; }
  .speech-bubble { font-size: 12px; left: 0; bottom: 45px; padding: 8px 11px; max-width: 160px; }
  .section-head { margin-top: 38px; align-items: flex-start; flex-direction: column; gap: 6px; }
  .section-head h2 { font-size: 24px; }
  .marquee span { font-size: 12px; }
  .daily-card, .note-card { padding: 20px; border-radius: 24px; }
  .daily-icon { width: 54px; height: 54px; font-size: 27px; }
  .daily-main h3 { font-size: 18px; }
  .daily-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  .feature-card { border-radius: 24px; }
  .chapter-mini { min-height: 105px; padding: 12px; }
  .chapter-mini b { font-size: 13px; margin-top: 8px; }
  .chapter-card { grid-template-columns: 52px 1fr; gap: 10px; padding: 13px; border-radius: 20px; }
  .chapter-stamp { width: 48px; height: 48px; border-radius: 14px; font-size: 19px; }
  .chapter-info h3 { font-size: 18px; }
  .chapter-info p { font-size: 9px; }
  .chapter-card .cc-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
  .story-side { grid-template-columns: 1fr; }
  .game-grid, .episode-grid, .character-grid { grid-template-columns: 1fr; }
  .character-art { height: 230px; }
  .sticker-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-preview { padding: 20px; }
  .cert-preview h2 { font-size: 28px; }
  .cert-mini b { font-size: 17px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 40px; }
  .page-head p { font-size: 11px; }
  .story-topbar { padding: 8px 10px; }
  .story-dots i { width: 10px; }
  .story-character { width: 140px; }
  .story-character .person-art { height: 200px; }
  .story-stage { min-height: 200px; }
  .dialogue-box { padding: 12px 14px 10px; min-height: 190px; }
  .speaker { font-size: 9px; margin-top: -26px; }
  .dialogue-text { font-size: 14px; line-height: 1.8; }
  .story-result h2 { font-size: 29px; }
  .game-intro { padding: 18px 16px; }
  .game-topbar { padding: 10px 13px; }
  .game-topbar h2 { font-size: 20px; }
  .star-grid { grid-template-columns: repeat(3, 64px); gap: 7px; }
  .star-btn { width: 64px; height: 64px; font-size: 24px; }
  .memory-stage { padding: 12px; }
  .character-modal { grid-template-columns: 1fr; }
  .character-modal .cm-art { height: 190px; }
  .modal-card { padding: 20px; border-radius: 22px; }
  .modal-card h2 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
.character-modal .cm-art svg { height: 100%; width: auto; max-width: 100%; margin: 0 auto; }
@media (max-width: 820px) {
  body.story-open .toast { top: calc(86px + env(safe-area-inset-top, 0px)); bottom: auto; }
}
@media (max-width: 520px) {
  .story-character { width: 112px; }
  .story-character .person-art { height: 164px; }
  .story-character.center { width: 170px; }
}
