/* ============================================================
   Sunny 成长物语 · 明亮治愈系像素 RPG 风格
   主色：天空蓝 #87CEEB / 奶油白 #FFF5DC / 浅绿 #A8D8A8
        暖黄 #FFD166 / 珊瑚橙 #FF9F80
   ============================================================ */

:root {
  --sky: #87CEEB;
  --sky-deep: #6BB8E0;
  --cream: #FFF5DC;
  --cream-dark: #F7E8C6;
  --green: #A8D8A8;
  --green-deep: #7FBF7F;
  --yellow: #FFD166;
  --orange: #FF9F80;
  --pink: #F8C8DC;
  --purple: #C9B8E8;
  --mint: #B8E8D0;
  --ink: #5A4A3A;
  --ink-soft: #8A7A6A;
  --pixel-font: 'Press Start 2P', 'ZCOOL KuaiLe', 'Microsoft YaHei', sans-serif;
  --round-font: 'ZCOOL KuaiLe', 'Microsoft YaHei', sans-serif;
  --body-font: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body-font);
  color: var(--ink);
  background: linear-gradient(180deg, #A8DCF5 0%, #D6F0FB 40%, #EAF7DC 100%);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none;
}

/* ===== 太阳光标 ===== */
#cursor-sun {
  position: fixed;
  left: 0; top: 0;
  width: 28px; height: 28px;
  background: url('assets/sun-cursor.png') no-repeat center / contain;
  pointer-events: none;
  z-index: 9999;
  transform: translate(var(--mx, -100px), var(--my, -100px));
  opacity: 0.95;
  animation: cursor-bob 2s ease-in-out infinite;
  /* 注意：动画只动 opacity/filter，位移交给 JS 更新 CSS 变量，避免 transform 冲突 */
}
@keyframes cursor-bob {
  0%, 100% { opacity: 0.95; filter: drop-shadow(0 0 2px rgba(255,209,102,.6)); }
  50% { opacity: 0.75; filter: drop-shadow(0 0 6px rgba(255,209,102,.9)); }
}
@media (hover: none) { #cursor-sun { display: none; } body { cursor: auto; } }

/* ===== 背景云朵与星星 ===== */
.sky-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.cloud {
  position: absolute;
  background: rgba(255,255,255,.85);
  border-radius: 60px;
  animation: cloud-move linear infinite;
}
.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.cloud::before { width: 60%; height: 160%; left: 15%; top: -80%; }
.cloud::after { width: 45%; height: 120%; right: 10%; top: -55%; }
.cloud-1 { width: 180px; height: 40px; top: 8%; left: -200px; animation-duration: 70s; animation-delay: -20s; }
.cloud-2 { width: 240px; height: 52px; top: 22%; left: -260px; animation-duration: 95s; animation-delay: -50s; }
.cloud-3 { width: 150px; height: 34px; top: 40%; left: -170px; animation-duration: 60s; animation-delay: -5s; }
@keyframes cloud-move {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 400px)); }
}
.star-field { position: absolute; inset: 0; }
.star-field::before, .star-field::after {
  content: '✦ ✧ ★ ✦ ✧ ★ ✦ ✧ ★';
  position: absolute;
  color: rgba(255,255,255,.55);
  font-size: 14px;
  letter-spacing: 90px;
  animation: star-twinkle 3s ease-in-out infinite;
  font-variant-emoji: text;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols", "Microsoft YaHei", sans-serif;
}
.star-field::before { top: 6%; left: 10%; }
.star-field::after { top: 12%; left: 55%; animation-delay: 1.5s; }
@keyframes star-twinkle {
  0%, 100% { opacity: .3; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.15); }
}

/* ===== 通用：像素按钮 ===== */
.pixel-btn {
  font-family: var(--round-font);
  font-size: 20px;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 14px 34px;
  cursor: none;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background .2s;
  position: relative;
}
.pixel-btn:hover { background: #FFDD85; transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.pixel-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.pixel-btn.small { font-size: 15px; padding: 10px 20px; border-width: 2px; box-shadow: 0 4px 0 var(--ink); border-radius: 10px; }

/* ===== ① 标题画面 ===== */
#title-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
  background: linear-gradient(180deg, var(--sky) 0%, #BFE7F7 55%, #DCF5C8 100%);
  overflow: hidden;
}
.title-inner { position: relative; z-index: 2; padding: 30px; animation: title-rise 1.2s ease-out both; }
@keyframes title-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
.title-star-row { font-size: 26px; color: rgba(255,209,102,.95); letter-spacing: 34px; margin-bottom: 10px; animation: star-twinkle 2.4s ease-in-out infinite; }
.tstar { display: inline-block; animation: star-twinkle 2.2s ease-in-out infinite; font-variant-emoji: text; font-family: "Segoe UI Symbol", "Noto Sans Symbols", "Microsoft YaHei", sans-serif; text-shadow: 0 0 8px rgba(255,209,102,.8); }
.tstar:nth-child(2) { animation-delay: .7s; }
.tstar:nth-child(3) { animation-delay: 1.4s; }
.title-logo {
  font-family: var(--pixel-font);
  font-size: clamp(40px, 9vw, 76px);
  color: #fff;
  text-shadow: 0 4px 0 var(--yellow), 0 8px 0 rgba(90,74,58,.25);
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.title-cn {
  font-family: var(--round-font);
  font-size: 0.62em;
  color: var(--yellow);
  text-shadow: 0 3px 0 rgba(90,74,58,.25);
  letter-spacing: 1px;
  margin-left: 6px;
}
.title-sub {
  font-family: var(--round-font);
  font-size: clamp(20px, 4vw, 32px);
  color: var(--ink);
  margin-bottom: 10px;
}
.title-desc { font-size: 15px; color: var(--ink-soft); margin-bottom: 34px; }
.title-hint { margin-top: 26px; font-size: 12px; color: rgba(90,74,58,.6); animation: star-twinkle 2s ease-in-out infinite; }
.title-links { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.title-link {
  font-family: var(--round-font);
  font-size: 14px;
  color: var(--ink);
  background: rgba(255,255,255,.75);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 8px 18px;
  text-decoration: none;
  transition: transform .15s, background .2s;
  cursor: none;
}
.title-link:hover { background: var(--yellow); transform: translateY(-2px); }
.title-grass {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 90px;
  background: linear-gradient(180deg, var(--green) 0%, var(--green-deep) 100%);
  z-index: 1;
}
.title-grass .grass {
  position: absolute;
  bottom: 0;
  width: 10px; height: 34px;
  background: var(--green-deep);
  border-radius: 6px 6px 0 0;
}
.title-grass .grass:nth-child(1) { left: 8%; height: 30px; }
.title-grass .grass:nth-child(2) { left: 22%; height: 46px; }
.title-grass .grass:nth-child(3) { left: 41%; height: 36px; }
.title-grass .grass:nth-child(4) { left: 58%; height: 48px; }
.title-grass .grass:nth-child(5) { left: 76%; height: 32px; }
.title-grass .grass:nth-child(6) { left: 90%; height: 42px; }

/* ===== ② 读取存档 ===== */
#loading-screen {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, #A8DCF5 0%, #EAF7DC 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
}
#loading-screen[hidden] { display: none; }
.loading-window {
  position: relative;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 8px 0 rgba(90,74,58,.2);
  padding: 30px 38px 26px;
  width: min(440px, 88vw);
  font-family: var(--round-font);
  overflow: hidden;
}
.loading-window::before {
  content: '✦ ✧ ★ ✦';
  position: absolute;
  top: 10px; left: 16px;
  color: rgba(255,209,102,.6);
  font-size: 12px;
  letter-spacing: 14px;
  animation: star-twinkle 2.4s ease-in-out infinite;
}
.loading-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.loading-icon {
  width: 46px; height: 46px;
  background: radial-gradient(circle, #FFF3C4 0%, var(--yellow) 60%, #FFC94D 80%);
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 16px rgba(255,209,102,.5);
  animation: sun-float 2.6s ease-in-out infinite;
}
.loading-title { font-size: 20px; color: var(--ink); }
.loading-bar-wrap {
  position: relative;
  height: 20px;
  background: var(--cream-dark);
  border: 2px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--yellow), var(--orange));
  transition: width .3s ease;
}
.loading-pct {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--pixel-font);
  font-size: 9px;
  color: var(--ink);
  background: rgba(255,255,255,.85);
  border-radius: 6px;
  padding: 2px 5px;
}
.loading-line { font-size: 17px; color: var(--ink-soft); margin: 7px 0; opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .4s; }
.loading-line.active { opacity: 1; transform: translateX(0); color: var(--ink); }
.loading-line.done { color: var(--green-deep); }
.loading-tip {
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.6);
  border: 2px dashed var(--green-deep);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}

/* ===== ③ 主界面 ===== */
#game { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 20px 60px; }
#game[hidden] { display: none; }

.game-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 4px 6px;
}
.header-left { display: flex; align-items: baseline; }
.header-right { display: flex; gap: 10px; }
.header-logo { font-family: var(--pixel-font); font-size: 15px; color: #fff; text-shadow: 0 2px 0 var(--yellow); }
.header-cn { font-family: var(--round-font); font-size: 0.78em; color: var(--yellow); text-shadow: 0 1px 0 rgba(90,74,58,.25); margin-left: 3px; }
.header-ver {
  margin-left: 12px;
  font-size: 12px;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 3px 8px;
}
.icon-btn {
  font-size: 18px;
  width: 42px; height: 42px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--cream);
  box-shadow: 0 3px 0 rgba(90,74,58,.3);
  cursor: none;
  transition: transform .12s;
}
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn.playing { background: var(--yellow); }

/* 游戏菜单导航 */
.game-menu {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center;
  background: rgba(255,245,220,.75);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 8px;
  margin-bottom: 18px;
  position: sticky; top: 10px; z-index: 20;
  backdrop-filter: blur(4px);
}
.menu-item {
  font-family: var(--round-font);
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 8px 16px;
  transition: transform .12s, background .2s;
  cursor: none;
}
.menu-item::before { content: attr(data-ico) ' '; }
.menu-item:hover { background: var(--yellow); transform: translateY(-2px); }

/* 主界面顶部滚动引导 */
.scroll-down {
  text-align: center;
  margin: 6px 0 22px;
}
.sd-text {
  display: block;
  font-size: 14px;
  color: var(--ink-soft);
  font-family: var(--round-font);
  margin-bottom: 2px;
}
.sd-arrow {
  display: inline-block;
  font-size: 24px;
  color: var(--orange);
  line-height: 1;
  animation: scroll-bounce 1.4s ease-in-out infinite;
}

/* ===== 首屏 Hero 人物介绍 ===== */
.hero {
  background: rgba(255,245,220,.92);
  border: 4px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 8px 0 rgba(90,74,58,.18);
  padding: 30px 26px 22px;
  margin-bottom: 34px;
  scroll-margin-top: 76px;
  position: relative;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-avatar-wrap { flex: 0 0 auto; }
.hero-avatar {
  width: 128px; height: 138px;
  background: linear-gradient(180deg, #FFF 0%, var(--sky) 100%);
  border: 3px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.5), 0 5px 0 rgba(90,74,58,.2);
  position: relative;
}
.hero-avatar::before, .hero-avatar::after { display: none; } /* 星星已改为 .pixel-star 组件 */
.hero-star-l { position: absolute; top: 6px; left: 8px; z-index: 2; }
.hero-star-r { position: absolute; top: 6px; right: 8px; z-index: 2; }
.hero-avatar img {
  width: 100%; height: 100%;
  object-fit: contain;
  animation: avatar-breathe 3.2s ease-in-out infinite;
  transform-origin: 50% 90%;
}
.hero-text { text-align: left; min-width: 260px; flex: 1; }
.hero-hello { font-size: 14px; color: var(--ink-soft); margin-bottom: 2px; }
.hero-name {
  font-size: clamp(26px, 4.6vw, 40px);
  color: var(--ink);
  margin: 2px 0 4px;
  font-weight: 800;
}
.hero-name span { font-size: .68em; color: var(--orange); font-weight: 600; }
.hero-role {
  font-family: var(--round-font);
  font-size: clamp(16px, 2.6vw, 20px);
  color: var(--orange);
  margin-bottom: 8px;
}
.hero-explore { font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.hero-line { font-size: 13px; color: var(--ink-soft); }
.hero-declare {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px dashed var(--green-deep);
  text-align: center;
  font-size: 15px;
  color: var(--ink);
  font-family: var(--round-font);
  line-height: 1.7;
}
@media (max-width: 640px) {
  .hero-text { text-align: center; }
}

/* ===== 面板通用 ===== */
.chapter { margin-bottom: 22px; scroll-margin-top: 76px; }
.chapter-head {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.7);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: 0 4px 0 rgba(90,74,58,.12);
}
.ch-num {
  font-family: var(--pixel-font);
  font-size: 13px;
  color: #fff;
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 6px 8px;
  flex: 0 0 auto;
  line-height: 1.4;
}
.ch-title {
  font-family: var(--round-font);
  font-size: clamp(20px, 3.4vw, 26px);
  color: var(--ink);
  white-space: nowrap;
}
.ch-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin-left: auto;
  text-align: right;
  line-height: 1.5;
}
/* 各章配色 */
.ch-1 .ch-num { background: var(--sky-deep); }
.ch-2 .ch-num { background: var(--green-deep); }
.ch-3 .ch-num { background: var(--orange); }
.ch-4 .ch-num { background: var(--yellow); color: var(--ink); }
.ch-5 .ch-num { background: var(--pink); }
.ch-6 .ch-num { background: var(--purple); }
@media (max-width: 640px) {
  .ch-desc { display: none; }
  .chapter-head { gap: 10px; padding: 10px 14px; }
}

.panel {
  position: relative;
  background: rgba(255,245,220,.92);
  border: 4px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 8px 0 rgba(90,74,58,.18);
  padding: 30px;
  margin-bottom: 34px;
}
.panel-head { margin-bottom: 22px; }
.panel-title {
  font-family: var(--round-font);
  font-size: clamp(24px, 4vw, 32px);
  color: var(--ink);
}
.panel-num {
  display: inline-block;
  font-family: var(--pixel-font);
  font-size: 14px;
  color: #fff;
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 5px 8px;
  margin-right: 10px;
  vertical-align: middle;
}
.panel-sub { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }

/* ===== 角色卡 ===== */
.char-card {
  display: flex; gap: 26px; flex-wrap: wrap;
  align-items: center;
  background: var(--cream-dark);
  border: 3px dashed var(--green-deep);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 22px;
}
.char-avatar-wrap { text-align: center; flex: 0 0 auto; }
.char-frame {
  position: relative;
  width: 190px; height: 210px;
  background: linear-gradient(180deg, #FFF 0%, var(--sky) 100%);
  border: 4px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.5), 0 6px 0 rgba(90,74,58,.2);
}
.char-frame::before, .char-frame::after { display: none; } /* 星星已改为 .pixel-star 组件 */
.char-star-l { position: absolute; top: 8px; left: 10px; }
.char-star-r { position: absolute; top: 8px; right: 10px; }
#char-avatar {
  width: 100%; height: 100%;
  object-fit: contain;
  animation: avatar-breathe 3.2s ease-in-out infinite;
  transform-origin: 50% 90%;
}
@keyframes avatar-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}
.char-status {
  margin-top: 12px;
  font-family: var(--round-font);
  font-size: 15px;
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 5px 12px;
  display: inline-block;
}
.char-info { flex: 1; min-width: 260px; }
.char-name { font-family: var(--pixel-font); font-size: 22px; color: var(--ink); margin-bottom: 6px; }
.char-class { font-family: var(--round-font); font-size: 19px; color: var(--orange); margin-bottom: 10px; }
.char-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.meta-chip {
  font-size: 12px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 4px 10px;
}
.char-keywords { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }
.char-keywords b { color: var(--orange); font-size: 15px; }
.char-exp { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.exp-label { font-size: 12px; color: var(--ink-soft); }
.exp-bar {
  flex: 1;
  height: 16px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
}
.exp-fill {
  width: 45%;
  height: 100%;
  background: linear-gradient(180deg, #FFE39A 0%, var(--yellow) 100%);
  border-radius: 6px;
  animation: exp-shine 2.4s ease-in-out infinite;
}
@keyframes exp-shine { 0%,100% { opacity: 1; } 50% { opacity: .75; } }
.exp-num { font-family: var(--pixel-font); font-size: 10px; color: var(--ink); white-space: nowrap; }
.char-story {
  background: #fff;
  border: 2px solid var(--green-deep);
  border-radius: 12px;
  padding: 12px 14px;
}
.story-title { font-family: var(--round-font); font-size: 15px; color: var(--green-deep); margin-bottom: 6px; }
.char-story p:last-child { font-size: 14px; line-height: 1.7; }
.char-contact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.contact-chip {
  font-size: 13px;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .12s, background .2s;
  cursor: none;
}
.contact-chip:hover { background: var(--yellow); transform: translateY(-2px); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.stat-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 12px 16px;
}
.stat-name { font-size: 15px; font-weight: 600; }
.stat-stars { color: var(--yellow); text-shadow: 0 1px 0 var(--ink); letter-spacing: 2px; font-size: 17px; font-variant-emoji: text; font-family: "Segoe UI Symbol", "Noto Sans Symbols", "Microsoft YaHei", sans-serif; }

/* ===== 数据大陆 ===== */
.map-wrap {
  position: relative;
  background: linear-gradient(180deg, #A8DCF5 0%, #D6F0FB 30%, #CFE9B8 70%, #B8DCA0 100%);
  border: 4px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  padding: 30px 22px 50px;
}
.map-wrap::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.6) 2px, transparent 2px);
  background-size: 34px 34px;
  opacity: .4;
  pointer-events: none;
}
.map-clouds {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.7) 18px, transparent 20px);
  background-size: 220px 90px;
  background-position: 30px 20px, 140px 60px;
  animation: cloud-move 80s linear infinite;
  pointer-events: none;
}
.land {
  position: relative;
  margin-bottom: 30px;
  padding: 16px;
  background: rgba(255,255,255,.55);
  border: 3px solid var(--ink);
  border-radius: 16px;
  opacity: .35;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
}
.land.lit { opacity: 1; transform: translateY(0); }
.land-name {
  font-family: var(--round-font);
  font-size: 21px;
  margin-bottom: 12px;
  color: var(--ink);
}
.land-body { display: flex; flex-wrap: wrap; gap: 12px; }
.data-point {
  position: relative;
  flex: 1 1 150px;
  text-align: center;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 12px 8px 10px;
  box-shadow: 0 3px 0 rgba(90,74,58,.2);
  transition: transform .2s;
  cursor: none;
}
.data-point:hover { transform: translateY(-4px) rotate(-1deg); }
.data-point.big { background: var(--yellow); }
.dp-num {
  display: block;
  font-family: var(--pixel-font);
  font-size: clamp(14px, 3vw, 20px);
  color: var(--ink);
  margin-bottom: 6px;
}
.dp-label { font-size: 12px; color: var(--ink-soft); }
.land-create .land-name { color: var(--orange); }
.land-spread .land-name { color: var(--green-deep); }
.land-exhibit .land-name { color: var(--purple); }
.land-public .land-name { color: var(--green-deep); }
.land-community .land-name { color: var(--pink); }
.map-tip { text-align: center; font-size: 13px; color: var(--ink-soft); margin-top: 6px; animation: star-twinkle 2.2s ease-in-out infinite; }

/* ===== 任务系统 ===== */
.quest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.quest-card {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 5px 0 rgba(90,74,58,.18);
  transition: transform .15s;
}
.quest-card:hover { transform: translateY(-4px); }
.q-blue { border-top: 8px solid var(--sky); }
.q-green { border-top: 8px solid var(--green); }
.q-yellow { border-top: 8px solid var(--yellow); }
.q-pink { border-top: 8px solid var(--pink); }
.q-ico { font-size: 28px; }
.quest-card h4 { font-family: var(--round-font); font-size: 20px; margin: 6px 0; }
.q-lv {
  position: absolute; top: 16px; right: 16px;
  font-family: var(--pixel-font); font-size: 10px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 4px 6px;
}
.quest-card p { font-size: 13px; line-height: 1.7; color: var(--ink-soft); min-height: 56px; }
.q-src { display: block; margin-top: 10px; font-size: 11px; color: var(--green-deep); }

/* ===== 协作方式 ===== */
.team-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.team-col {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 18px;
}
.team-col h4 { font-family: var(--round-font); font-size: 18px; margin-bottom: 10px; }
.team-col p { font-size: 14px; line-height: 1.8; }
.flow { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.flow::-webkit-scrollbar { display: none; }
.flow-step {
  font-size: 13px;
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
}
.flow-arrow { color: var(--orange); font-weight: 700; font-size: 17px; line-height: 1; display: inline-flex; align-items: center; }

/* ===== 反馈系统 ===== */
.growth-flow { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 8px; margin-bottom: 24px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.growth-flow::-webkit-scrollbar { display: none; }
.g-step {
  font-family: var(--round-font);
  font-size: 17px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px 18px;
}
.g-arrow { color: var(--orange); font-size: 20px; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; }
.version-list { display: grid; gap: 12px; }
.version-item {
  display: flex; align-items: center; gap: 14px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 14px 16px;
}
.version-item.current { background: var(--mint); }
.ver-tag {
  flex: 0 0 auto;
  font-family: var(--pixel-font); font-size: 11px;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 5px 8px;
  white-space: nowrap;
}
.version-item p { font-size: 14px; line-height: 1.6; }

/* ===== 状态监测 ===== */
.status-box { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 20px; }
.status-meter { display: grid; gap: 16px; margin-bottom: 18px; }
.meter-item { display: flex; align-items: center; gap: 12px; }
.meter-name { flex: 0 0 64px; font-size: 14px; }
.meter-bar {
  flex: 1;
  height: 16px;
  background: var(--cream-dark);
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
}
.meter-fill {
  width: var(--p, 50%);
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
  border-radius: 6px;
  transition: width 1s ease;
}
.meter-fill.green { background: linear-gradient(90deg, var(--green), var(--green-deep)); }
.meter-num { font-family: var(--pixel-font); font-size: 10px; width: 42px; text-align: right; }
.status-legend { display: grid; gap: 8px; margin-bottom: 14px; }
.legend-item { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
.dot-green { background: var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-red { background: var(--orange); }
.status-note { font-size: 13px; color: var(--green-deep); text-align: center; }

/* ===== 装备系统 ===== */
.inventory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.inv-card {
  text-align: center;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 18px 12px;
  transition: transform .15s;
}
.inv-card:hover { transform: translateY(-4px) rotate(-1deg); }
.inv-ico { font-size: 30px; }
.inv-card h4 { font-family: var(--round-font); font-size: 18px; margin: 8px 0 6px; }
.inv-card p { font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.need-box {
  text-align: center;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 16px;
}
.need-box h4 { font-family: var(--round-font); font-size: 18px; margin-bottom: 6px; }
.need-box p { font-size: 14px; }

/* ===== 团队使用指南 ===== */
.party-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.party-card {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 20px;
}
.party-card h4 { font-family: var(--round-font); font-size: 18px; margin-bottom: 10px; }
.party-card p { font-size: 14px; line-height: 1.8; }
.party-card.ok { border-top: 8px solid var(--green); }
.party-card.mid { border-top: 8px solid var(--yellow); }
.party-card.no { border-top: 8px solid var(--orange); }

/* ===== 成就系统 ===== */
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.ach-card {
  position: relative;
  z-index: 1;
  text-align: center;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 18px 12px;
  box-shadow: 0 5px 0 rgba(90,74,58,.18);
  cursor: pointer;
  transition: transform .15s, background .2s;
  font-family: var(--body-font);
  color: var(--ink);
  margin: 0;
  width: auto;
  transform: none; /* 默认禁止任何偏移 */
}
.ach-card:hover { transform: translateY(-4px); background: var(--cream); }
.ach-card:hover:active { transform: translateY(0); }
.ach-ico { font-size: 30px; }
.ach-card h4 { font-family: var(--round-font); font-size: 15px; margin: 8px 0 6px; line-height: 1.5; }
.ach-gain { font-size: 12px; color: var(--green-deep); margin: 0 0 8px; line-height: 1.5; }
.ach-tag { font-size: 11px; color: var(--orange); }
@media (max-width: 900px) {
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
  .ach-card h4 { font-size: 16px; }
}
@media (max-width: 720px) {
  .ach-grid { grid-template-columns: 1fr; }
  .ach-card h4 { font-size: 17px; }
}
.ach-detail {
  position: relative;
  margin-top: 18px;
  background: var(--mint);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 22px;
}
.ach-detail[hidden] { display: none; }
.ach-detail h4 { font-family: var(--round-font); font-size: 20px; margin-bottom: 4px; }
.ach-detail .period { font-size: 12px; color: var(--ink-soft); margin-bottom: 12px; }
.ach-detail ul { margin: 0 0 10px 20px; }
.ach-detail li { font-size: 14px; line-height: 1.9; }
.ach-detail .unlock { font-size: 13px; color: var(--green-deep); font-weight: 600; }
#ach-close { position: absolute; top: 12px; right: 12px; }

/* ===== AI 成长模块 ===== */
.ai-timeline { display: grid; gap: 14px; }
.ai-step {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 16px 18px;
}
.ai-ver {
  flex: 0 0 auto;
  font-family: var(--pixel-font); font-size: 12px;
  background: var(--purple);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 6px 8px;
}
.ai-step h4 { font-family: var(--round-font); font-size: 18px; margin-bottom: 4px; }
.ai-step p { font-size: 14px; line-height: 1.7; color: var(--ink-soft); }

/* ===== 技能树 ===== */
.skill-box { position: relative; display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.radar-wrap { flex: 1 1 300px; text-align: center; }
#radar-canvas { max-width: 100%; height: auto; }
.skill-sub { flex: 1 1 260px; display: grid; gap: 12px; }
.skill-group {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 12px 16px;
}
.skill-group h4 { font-family: var(--round-font); font-size: 16px; margin-bottom: 4px; }
.skill-group p { font-size: 13px; color: var(--ink-soft); }

/* ===== 智能问答 ===== */
.chat-box { background: #fff; border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; }
.chat-log {
  height: 300px;
  overflow-y: auto;
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--cream);
}
.msg {
  max-width: 78%;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.msg.bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--sky); border-bottom-right-radius: 4px; }
.msg.thinking { color: var(--ink-soft); font-style: italic; background: var(--cream-dark); }
.chat-input-row { display: flex; gap: 10px; padding: 12px; border-top: 3px solid var(--ink); background: #fff; }
#chat-input {
  flex: 1;
  font-family: var(--body-font);
  font-size: 15px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  outline: none;
}
#chat-input:focus { border-color: var(--green-deep); }
.chat-asks { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 14px; background: #fff; border-top: 2px dashed var(--cream-dark); }
.ask-chip {
  font-family: var(--body-font);
  font-size: 12px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 6px 12px;
  cursor: none;
  transition: background .2s;
}
.ask-chip:hover { background: var(--yellow); }
.chat-asks.dynamic { border: none; padding: 2px 0 6px; background: transparent; align-self: flex-start; }

/* ===== 页脚 ===== */
.game-footer { text-align: center; padding: 30px 0 10px; }
.game-footer p { font-family: var(--round-font); font-size: 15px; color: var(--ink); }
.footer-hint { font-size: 12px !important; color: var(--ink-soft) !important; margin-top: 6px; }

/* ===== 彩蛋弹窗 ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(90,74,58,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-box {
  position: relative;
  width: min(560px, 92vw);
  max-height: 82vh;
  overflow-y: auto;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 10px 0 rgba(90,74,58,.25);
  padding: 30px;
  animation: modal-pop .3s ease-out;
}
@keyframes modal-pop { from { opacity: 0; transform: scale(.92) translateY(14px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-box h3 { font-family: var(--round-font); font-size: 24px; margin-bottom: 18px; }
.diary-content p {
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 14px;
  padding-left: 14px;
  border-left: 3px solid var(--yellow);
}
#diary-close { position: absolute; top: 14px; right: 14px; }

/* ===== 点击星星特效 ===== */
#sparkle-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9998; }
.sparkle {
  position: absolute;
  font-size: 16px;
  color: var(--yellow);
  text-shadow: 0 0 4px rgba(255,209,102,.8);
  animation: sparkle-fly .8s ease-out forwards;
  pointer-events: none;
  font-variant-emoji: text;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols", sans-serif;
}
@keyframes sparkle-fly {
  0% { opacity: 1; transform: translateY(0) scale(.6) rotate(0deg); }
  100% { opacity: 0; transform: translateY(-36px) scale(1.3) rotate(40deg); }
}

/* ===== 响应式 ===== */
@media (max-width: 720px) {
  .game-menu { position: static; }
  .char-card { justify-content: center; text-align: center; }
  .char-info { text-align: left; }
  .panel { padding: 20px; }
  .chat-log { height: 240px; }
  #cursor-sun { display: none; }
  body { cursor: auto; }
  .pixel-btn, .menu-item, .icon-btn, .ach-card, .ask-chip, .data-point { cursor: pointer; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== 加载与滚动指示（防"以为卡住"） ===== */
.intro-loading {
  position: absolute;
  left: 50%;
  bottom: 7vh;
  transform: translateX(-50%);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255,255,255,.75);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 8px 18px;
  white-space: nowrap;
  animation: star-twinkle 1.6s ease-in-out infinite;
}
.intro-skip {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-soft);
  background: rgba(255,255,255,.55);
  border-radius: 10px;
  padding: 3px 9px;
  margin-left: 6px;
  animation: none;
  cursor: none;
}
.scroll-hint {
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 22px;
  animation: scroll-bounce 1.6s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* ===== 星星收集提示气泡 ===== */
.star-hint {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 6px 0 rgba(90,74,58,.2);
  padding: 12px 16px 12px 18px;
  font-size: 14px;
  color: var(--ink);
  z-index: 90;
  display: flex; align-items: center; gap: 12px;
  animation: modal-pop .4s ease-out;
  max-width: 90vw;
}
.star-hint-close {
  border: 2px solid var(--ink);
  background: var(--yellow);
  border-radius: 8px;
  width: 26px; height: 26px;
  font-size: 12px;
  line-height: 1;
  cursor: none;
  flex: 0 0 auto;
}
.star-hint-close:hover { background: var(--orange); }

/* ============================================================
/* ============================================================
   ① 进入世界动画（像素世界构建：逐层生长）
   ============================================================ */
#intro-scene {
  position: fixed; inset: 0;
  z-index: 40;
  overflow: hidden;
  background: #A8DCF5;
}
#intro-scene[hidden] { display: none; }

/* 天空：从顶部刷入 */
.intro-sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #9CD7F0 0%, #C8ECF8 55%, #DCF5C8 100%);
  transform: scaleY(0);
  transform-origin: top;
}
#intro-scene.active .intro-sky { animation: sky-sweep 1.1s ease-out .1s forwards; }
@keyframes sky-sweep {
  0% { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}

/* 太阳：从地平线升起 */
.intro-sun {
  position: absolute;
  left: 50%; top: 9%;
  transform: translateX(-50%);
  width: 82px; height: 82px;
  background: radial-gradient(circle, #FFF6D8 0%, var(--yellow) 55%, #FFC94D 78%);
  border-radius: 50%;
  box-shadow: 0 0 46px 16px rgba(255,209,102,.45);
  opacity: 0;
  z-index: 1;
}
.intro-sun .rays {
  position: absolute;
  inset: -20px;
  background: repeating-conic-gradient(from 0deg, rgba(255,209,102,.5) 0deg 7deg, transparent 7deg 22deg);
  border-radius: 50%;
  animation: rays-spin 16s linear infinite;
}
@keyframes rays-spin { to { transform: rotate(360deg); } }
#intro-scene.active .intro-sun { animation: sun-rise 1.4s ease-out .4s forwards; }
@keyframes sun-rise {
  0% { opacity: 0; transform: translateX(-50%) translateY(120px) scale(.8); }
  35% { opacity: 1; }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* 像素云：方块逐个"生成" */
.intro-cloud { position: absolute; opacity: 0; z-index: 1; }
.intro-cloud i {
  position: absolute;
  background: #fff;
  border-radius: 4px;
  transform: scale(0);
  box-shadow: 0 3px 6px rgba(90,74,58,.08);
}
.intro-cloud.c1 { width: 120px; height: 36px; top: 8%; left: 10%; }
.intro-cloud.c1 i:nth-child(1) { width: 46px; height: 46px; left: 0; top: -20px; border-radius: 50%; }
.intro-cloud.c1 i:nth-child(2) { width: 52px; height: 36px; left: 36px; top: -28px; border-radius: 50%; }
.intro-cloud.c1 i:nth-child(3) { width: 62px; height: 36px; left: 60px; top: -18px; border-radius: 50%; }
.intro-cloud.c1 i:nth-child(4) { width: 112px; height: 30px; left: 4px; top: 4px; border-radius: 30px; }
.intro-cloud.c2 { width: 90px; height: 28px; top: 44%; left: 68%; }
.intro-cloud.c2 i:nth-child(1) { width: 34px; height: 34px; left: 0; top: -14px; border-radius: 50%; }
.intro-cloud.c2 i:nth-child(2) { width: 40px; height: 28px; left: 26px; top: -20px; border-radius: 50%; }
.intro-cloud.c2 i:nth-child(3) { width: 84px; height: 24px; left: 2px; top: 4px; border-radius: 24px; }
#intro-scene.active .intro-cloud i { animation: block-pop .45s cubic-bezier(.3,1.8,.4,1) forwards; }
#intro-scene.active .intro-cloud.c1 i:nth-child(1) { animation-delay: .7s; }
#intro-scene.active .intro-cloud.c1 i:nth-child(2) { animation-delay: .8s; }
#intro-scene.active .intro-cloud.c1 i:nth-child(3) { animation-delay: .9s; }
#intro-scene.active .intro-cloud.c1 i:nth-child(4) { animation-delay: 1s; }
#intro-scene.active .intro-cloud.c2 i:nth-child(1) { animation-delay: 1.1s; }
#intro-scene.active .intro-cloud.c2 i:nth-child(2) { animation-delay: 1.2s; }
#intro-scene.active .intro-cloud.c2 i:nth-child(3) { animation-delay: 1.3s; }
@keyframes block-pop {
  0% { transform: scale(0) rotate(-12deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* 远山：浮现 */
.intro-hills {
  position: absolute;
  left: 0; right: 0; bottom: 15vh;
  height: 13vh;
  min-height: 60px;
  background: linear-gradient(160deg, var(--green-deep) 0%, #96C69A 55%, #CBE7B0 100%);
  clip-path: polygon(0 100%, 0 60%, 12% 46%, 24% 55%, 36% 38%, 50% 52%, 62% 35%, 76% 50%, 88% 42%, 100% 56%, 100% 100%);
  opacity: 0;
}
#intro-scene.active .intro-hills { animation: fade-in 1s ease-out .6s forwards; }
@keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }

/* 草地：从底部升起 */
.intro-grass {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 15vh;
  min-height: 90px;
  background: linear-gradient(180deg, var(--green) 0%, var(--green-deep) 100%);
  transform: translateY(100%);
}
#intro-scene.active .intro-grass { animation: ground-rise 1s cubic-bezier(.25,.8,.35,1) .5s forwards; }
@keyframes ground-rise {
  0% { transform: translateY(100%); }
  100% { transform: translateY(0); }
}

/* 草与花：依次生长 */
.intro-grass .ig {
  position: absolute;
  bottom: 0;
  width: 10px; height: 40px;
  background: var(--green-deep);
  border-radius: 6px 6px 0 0;
  opacity: 0;
}
#intro-scene.active .ig { animation: grass-grow .5s ease-out forwards; }
#intro-scene.active .ig:nth-child(1) { left: 6%; animation-delay: 1s; height: 30px; }
#intro-scene.active .ig:nth-child(2) { left: 12%; animation-delay: 1.05s; height: 44px; }
#intro-scene.active .ig:nth-child(3) { left: 24%; animation-delay: 1.1s; height: 36px; }
#intro-scene.active .ig:nth-child(4) { left: 34%; animation-delay: 1.15s; height: 46px; }
#intro-scene.active .ig:nth-child(5) { left: 44%; animation-delay: 1.2s; height: 32px; }
#intro-scene.active .ig:nth-child(6) { left: 55%; animation-delay: 1.25s; height: 42px; }
#intro-scene.active .ig:nth-child(7) { left: 64%; animation-delay: 1.3s; height: 34px; }
#intro-scene.active .ig:nth-child(8) { left: 74%; animation-delay: 1.35s; height: 46px; }
#intro-scene.active .ig:nth-child(9) { left: 82%; animation-delay: 1.4s; height: 30px; }
#intro-scene.active .ig:nth-child(10) { left: 90%; animation-delay: 1.45s; height: 38px; }
#intro-scene.active .ig:nth-child(11) { left: 95%; animation-delay: 1.5s; height: 42px; }
#intro-scene.active .ig:nth-child(12) { left: 48%; animation-delay: 1.55s; height: 36px; }
@keyframes grass-grow {
  0% { transform: scaleY(0); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
}
/* 小花 */
.intro-grass .ig.flower { width: 12px; height: 32px; }
.intro-grass .ig.flower::after {
  content: '';
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 14px;
  background: var(--pink);
  border-radius: 50%;
}
.intro-grass .ig.flower.f1::after { background: var(--pink); }
.intro-grass .ig.flower.f2::after { background: var(--yellow); }
.intro-grass .ig.flower.f3::after { background: var(--orange); }
.intro-grass .ig.flower.f4::after { background: #B8A8E8; }

/* 角色：从左走进来（行走晃动 + 影子 + 登场星星） */
.intro-person {
  position: absolute;
  left: 50%; bottom: 16vh;
  margin-left: -66px;
  width: 132px; height: 150px;
  opacity: 0;
  z-index: 2;
}
.intro-person img {
  width: 100%; height: 100%;
  object-fit: contain;
  animation: walk-bob .3s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}
#intro-scene.active .intro-person { animation: walk-in 2.1s cubic-bezier(.3,.7,.4,1) 1.4s forwards; }
@keyframes walk-in {
  0% { transform: translateX(-46vw) scale(.92); opacity: 0; }
  8% { opacity: 1; }
  55% { transform: translateX(-9vw) scale(1); opacity: 1; }
  82% { transform: translateX(-1.5vw) scale(1); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes walk-bob {
  0% { transform: rotate(-2.5deg) translateY(0); }
  100% { transform: rotate(2.5deg) translateY(-3px); }
}
.person-shadow {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 88px; height: 15px;
  background: radial-gradient(ellipse, rgba(90,74,58,.38) 0%, transparent 70%);
  animation: shadow-pulse 1s ease-in-out infinite alternate;
}
@keyframes shadow-pulse {
  0% { transform: translateX(-50%) scaleX(1); opacity: .9; }
  100% { transform: translateX(-50%) scaleX(.78); opacity: .55; }
}
.person-star {
  position: absolute;
  top: -28px; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 22px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 10px rgba(255,209,102,.95));
  opacity: 0;
  animation: star-pop .9s ease-out 3.2s forwards, star-spin 2.4s ease-in-out 3.5s infinite;
}
@keyframes star-pop {
  0% { opacity: 0; transform: translateX(-50%) scale(0) rotate(0deg); }
  60% { opacity: 1; transform: translateX(-50%) scale(1.5) rotate(60deg); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) rotate(0deg); }
}
@keyframes star-spin {
  0%, 100% { transform: translateX(-50%) rotate(0deg) translateY(0); }
  50% { transform: translateX(-50%) rotate(22deg) translateY(-6px); }
}

/* 标题 */
.intro-words {
  position: absolute;
  left: 0; right: 0; top: 26%;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
}
#intro-scene.active .intro-words { animation: words-in 1s ease-out 2.6s forwards; }
@keyframes words-in {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}
.intro-title {
  font-family: var(--pixel-font);
  font-size: clamp(30px, 7vw, 56px);
  color: #fff;
  text-shadow: 0 4px 0 var(--yellow), 0 8px 0 rgba(90,74,58,.25);
}
.intro-title span {
  font-family: var(--round-font);
  font-size: .62em;
  color: var(--yellow);
  text-shadow: 0 3px 0 rgba(90,74,58,.25);
  margin-left: 6px;
}
.intro-welcome {
  font-family: var(--round-font);
  font-size: clamp(16px, 3.4vw, 24px);
  color: var(--ink);
  margin-top: 12px;
}

#intro-scene.expand {
  transform: scale(1.18);
  opacity: 0;
  transition: transform .9s ease, opacity .9s ease;
}

   ③ 探索感：隐藏星星 / 收集计数 / 读取完成卡
   ============================================================ */
/* ============================================================
   ✦ 统一像素星星组件（全站装饰统一调用，禁止文字星星字符）
   ============================================================ */
.pixel-star {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px; height: 18px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 5px rgba(255,209,102,.8));
  animation: star-float 2.4s ease-in-out infinite;
  transition: transform .2s ease, filter .2s ease;
  position: relative;
  vertical-align: middle;
}
.pixel-star:hover {
  animation: none;
  transform: scale(1.2) rotate(15deg);
  filter: drop-shadow(0 0 12px rgba(255,209,102,1));
}
.pixel-star.pointer-none { pointer-events: none; }
.pixel-star.star-sm { width: 12px; height: 12px; }
.pixel-star.star-lg { width: 26px; height: 26px; }
.pixel-star.star-static { animation: none; }
@keyframes star-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hidden-star {
  position: absolute;
  width: 22px; height: 22px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 6px rgba(255,209,102,.75));
  cursor: none;
  transition: filter .25s, transform .25s, opacity .4s;
  z-index: 5;
  user-select: none;
  font-size: 0; /* 隐藏任何文字字符，纯 CSS 绘制 */
  line-height: 1;
}
.hidden-star:hover {
  animation: none;
  transform: scale(1.35) rotate(15deg);
  filter: drop-shadow(0 0 14px rgba(255,209,102,1));
}
.hidden-star.collected { opacity: 0; transform: scale(2) rotate(40deg); pointer-events: none; }
#character > .hidden-star { top: 18px; right: 26px; }
.map-wrap > .hidden-star { top: 20px; right: 24px; }
.ach-grid > .hidden-star { display: none; } /* 旧位置：星星已移到 section 级，避免干扰 Grid */
#achievements > .hidden-star { top: 18px; right: 26px; z-index: 2; }
.skill-box > .hidden-star { top: -14px; left: -8px; }
.read-complete > .hidden-star { top: -14px; left: 50%; }

.star-counter {
  align-self: center;
  font-family: var(--pixel-font);
  font-size: 10px;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 7px 10px;
  margin-right: 6px;
}
.star-ico {
  display: inline-block;
  width: 11px; height: 11px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 4px rgba(255,209,102,.7));
  vertical-align: -1px;
}
.star-counter.full { background: var(--yellow); animation: star-twinkle 1.2s ease-in-out infinite; }

.read-complete {
  position: relative;
  text-align: center;
  background: linear-gradient(135deg, var(--yellow), #FFE39A);
  border: 4px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 8px 0 rgba(90,74,58,.18);
  padding: 34px 26px;
  margin-bottom: 34px;
  animation: modal-pop .5s ease-out;
}
.read-complete[hidden] { display: none; }
.read-complete h3 { font-family: var(--round-font); font-size: 26px; margin-bottom: 12px; }
.read-complete p { font-size: 15px; line-height: 1.9; margin-bottom: 18px; }
.rc-contact { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rc-contact span {
  font-size: 14px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 8px 16px;
}

/* ===== 邮箱点击复制 ===== */
.copy-email { cursor: none; transition: background .2s, transform .12s; }
.copy-email:hover { background: var(--yellow) !important; transform: translateY(-2px); }
.copy-tip {
  position: fixed;
  left: 50%; bottom: 40px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  border-radius: 20px;
  padding: 10px 22px;
  z-index: 120;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  animation: modal-pop .3s ease-out;
}
