/* 小动物储物柜 · 卡通风格 */
:root { --cream: #fff6e5; --pink: #ff8fb3; --gold: #ffd54f; --choco: #6b4a2b; --ink: #3a2e1f; --green: #6ec96e; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: linear-gradient(180deg, #cdeaff 0%, #fff6e5 60%, #b8e6b8 100%);
  color: var(--ink); user-select: none; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
#app { max-width: 760px; margin: 0 auto; padding: 12px; min-height: 100vh; }
.screen { display: none; }
.screen.active { display: block; }
.title { text-align: center; font-size: 2rem; margin: 18px 0 4px; text-shadow: 2px 2px 0 rgba(255,255,255,.6); }
.subtitle { text-align: center; font-size: 1.02rem; margin-bottom: 14px; color: #5a6a8a; }
.animal-picker { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 16px 0; }
.animal-picker button {
  font-size: 2.4rem; width: 84px; height: 84px; border-radius: 50%;
  border: 4px solid var(--choco); background: #fff; cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,.18); transition: transform .15s;
}
.animal-picker button:active { transform: scale(.9); }
.mode-picker { display: flex; gap: 14px; justify-content: center; margin-top: 20px; }
.mode-btn {
  font-size: 1.15rem; padding: 16px 22px; border-radius: 20px;
  border: 4px solid var(--choco); cursor: pointer; background: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,.18);
}
.mode-btn small { display: block; font-size: .8rem; color: #5a6a8a; margin-top: 4px; }
.mode-btn.baby { border-color: var(--pink); }
.mode-btn.challenge { border-color: #5c9cff; }

.game-header { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.animal-face { font-size: 2.4rem; background: #fff; border-radius: 50%; width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center; border: 4px solid var(--choco); }
.header-info { flex: 1; }
.hint { font-size: 1.05rem; font-weight: 700; }
.status-line { display: flex; gap: 10px; align-items: center; margin-top: 4px; font-size: .9rem; flex-wrap: wrap; }

/* 目标 + 号码表 */
.target-zone { display: flex; gap: 10px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.target-item {
  font-size: 1.6rem; background: #fff; border: 4px solid var(--gold); border-radius: 16px;
  padding: 8px 14px; min-width: 120px; text-align: center; font-weight: 800;
  box-shadow: 0 3px 8px rgba(0,0,0,.12);
}
.hash-table {
  flex: 1; background: rgba(255,255,255,.85); border-radius: 14px; padding: 8px 12px;
  border: 3px dashed #5c9cff; font-size: .9rem; line-height: 1.7;
}
.hash-table .ht-title { font-weight: 800; color: #5c9cff; font-size: .82rem; }
.hash-table .ht-row { display: flex; gap: 6px; flex-wrap: wrap; }
.hash-table .ht-item { background: #eaf3ff; border-radius: 8px; padding: 1px 8px; }

/* 柜子墙 */
.locker-wall { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 12px 0; }
.locker {
  width: 74px; height: 96px; background: linear-gradient(180deg, #e8a87c, #c97b4a);
  border: 4px solid var(--choco); border-radius: 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 6px; box-shadow: 0 4px 10px rgba(0,0,0,.2); position: relative;
  transition: transform .12s;
}
.locker:active { transform: scale(.93); }
.locker .locker-num {
  background: #fff; border-radius: 50%; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: .95rem; border: 2px solid var(--choco);
}
.locker .locker-handle {
  width: 18px; height: 10px; background: #ffd54f; border-radius: 4px; border: 2px solid #b8860b;
}
.locker.open { transform: scale(1.05); border-color: var(--gold); box-shadow: 0 0 18px rgba(255,213,79,.8); }
.locker.checked { opacity: .35; pointer-events: none; }

/* 链柜内容 */
.collision-zone { text-align: center; min-height: 90px; margin: 8px 0; }
.collision-zone .chain-hint { font-size: .95rem; font-weight: 700; color: #d32f2f; margin-bottom: 8px; }
.chain-items { display: flex; gap: 12px; justify-content: center; }
.chain-item {
  font-size: 2rem; background: #fff; border: 4px solid #d32f2f; border-radius: 16px;
  width: 84px; height: 84px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.15);
}
.chain-item:active { transform: scale(.92); }

.feedback { text-align: center; font-size: 1.3rem; font-weight: 800; min-height: 2rem; margin: 6px 0; }
.feedback.ok { color: #2e7d32; }
.feedback.no { color: #d32f2f; }

.btn-reset, .btn-home {
  display: block; margin: 8px auto; padding: 12px 24px; font-size: 1.02rem;
  border-radius: 18px; border: 3px solid var(--choco); cursor: pointer;
  background: #fff; box-shadow: 0 4px 8px rgba(0,0,0,.18);
}
.btn-home { background: #ffe9d6; }

.stats-title { text-align: center; margin: 20px 0 10px; }
.stats-box { background: rgba(255,255,255,.85); border-radius: 18px; padding: 16px; margin: 12px 0; font-size: 1.02rem; line-height: 1.9; }
.stats-box .big { font-size: 1.35rem; font-weight: 800; }

@keyframes celebrate-pop { 0% { transform: scale(0) rotate(-20deg); } 70% { transform: scale(1.4) rotate(10deg); } 100% { transform: scale(1) rotate(0); } }
.celebrate { animation: celebrate-pop .6s ease; display: inline-block; }
@keyframes reveal-pop { 0% { transform: scale(.3) rotate(-10deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.reveal { animation: reveal-pop .4s ease; }

.fast * { animation: none !important; transition: none !important; }

@media (max-width: 480px) {
  .animal-picker button { width: 64px; height: 64px; font-size: 1.9rem; }
  .locker { width: 60px; height: 82px; }
  .title { font-size: 1.5rem; }
}

/* v1.1 工程队模式 */
.mode-btn.team { border-color: #ff8a50; }
.real-id {
  display: inline-block; background: #ff8a50; color: #fff; border-radius: 10px;
  font-size: 1rem; padding: 1px 10px; margin-left: 4px; vertical-align: middle;
}
.hash-question { font-size: 1.05rem; font-weight: 800; color: #d35400; margin-bottom: 8px; }
.hash-option {
  font-size: 1.6rem; font-weight: 900; background: #fff; border: 4px solid #ff8a50;
  border-radius: 16px; width: 96px; height: 72px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.15);
}
.hash-option:active { transform: scale(.92); }
.chain-tag { display: block; font-size: .68rem; color: #8a6a4f; }

/* ===== 通用：回游乐场 + 奖励评价 ===== */
.btn-portal {
  display: block; margin: 8px auto; padding: 12px 26px; font-size: 1.05rem;
  border-radius: 18px; border: 3px solid #ff8fb3; cursor: pointer;
  background: linear-gradient(160deg, #fff, #ffe4ec); box-shadow: 0 4px 10px rgba(0,0,0,.15);
  animation: portal-bob 2s ease-in-out infinite; text-decoration: none; text-align: center;
  color: #3a2e1f; font-weight: 800; width: fit-content;
}
.btn-portal:hover { transform: scale(1.05); }
@keyframes portal-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.btn-portal-mini {
  position: absolute; top: 10px; left: 10px; z-index: 20;
  background: rgba(255,255,255,.9); border: 2px solid #ff8fb3; border-radius: 16px;
  padding: 4px 12px; font-size: .82rem; font-weight: 800; color: #3a2e1f;
  text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.reward-card {
  text-align: center; background: linear-gradient(160deg, #fffbe6, #ffe9d9);
  border: 4px solid #ffd54f; border-radius: 20px; padding: 14px; margin: 10px auto;
  font-weight: 900; color: #b8860b; max-width: 360px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  animation: reward-pop .6s ease;
}
.reward-card .reward-text { font-size: 1.2rem; margin-top: 4px; }
.confetti { position: relative; min-height: 40px; }
.confetti span {
  position: absolute; top: -8px; font-size: 1.3rem;
  animation: confetti-fall 2.2s ease-in infinite;
}
.confetti span:nth-child(1) { left: 8%; animation-delay: 0s; }
.confetti span:nth-child(2) { left: 28%; animation-delay: .3s; }
.confetti span:nth-child(3) { left: 48%; animation-delay: .6s; }
.confetti span:nth-child(4) { left: 68%; animation-delay: .9s; }
.confetti span:nth-child(5) { left: 88%; animation-delay: 1.2s; }
@keyframes confetti-fall {
  0% { transform: translateY(-8px) rotate(0); opacity: 1; }
  80% { transform: translateY(40px) rotate(300deg); opacity: 1; }
  100% { transform: translateY(40px) rotate(360deg); opacity: 0; }
}
@keyframes reward-pop {
  0% { transform: scale(.3) rotate(-10deg); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* 家长折叠区 + 生活任务 */
.dad-note {
  max-width: 600px; margin: 8px auto; background: #fff8e7;
  border: 3px dashed #b08968; border-radius: 14px; padding: 8px 14px;
}
.dad-note summary { font-weight: 900; color: #8a6a4f; cursor: pointer; font-size: .98rem; }
.dad-text { font-size: .92rem; color: #5a4a35; line-height: 1.7; margin: 4px 0; }
.life-task {
  text-align: center; font-size: 1rem; font-weight: 900; color: #2e7d32;
  background: #e8f5e9; border: 2px solid #6ec96e; border-radius: 12px;
  padding: 8px 12px; margin: 8px auto; max-width: 600px;
}
