/* ===========================================================================
 * 西西的动物园 · 全站样式
 * 设计风格：明亮贴纸风——奶油底色、糖果色卡片、粗描边圆角、贴纸质感。
 * =========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #4a3b2a;            /* 深棕描边，比纯黑柔和 */
  --cream: #FFF7E3;          /* 奶油底色 */
  --sun: #FFB636;            /* 向日葵黄 */
  --grass: #58C472;          /* 草地绿 */
  --sky: #6FB7F0;            /* 天空蓝 */
  --candy: #FF8A80;          /* 西瓜红 */
  --card: #FFFFFF;
}

html, body {
  font-family: "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
}

/* 顶部草地色带 */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 60px;
  background:
    radial-gradient(circle at 12% 88%, #C8ECB4 0, transparent 34%),
    radial-gradient(circle at 88% 92%, #BFE3F5 0, transparent 30%),
    var(--cream);
}

/* ---------------- 通用卡片 ---------------- */
.card {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 6px 6px 0 rgba(74, 59, 42, .12);
  padding: 26px;
}

.title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
}
.title .rainbow { display: inline-block; transform: rotate(-4deg); }

.subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: #8a7a63;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-block;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--sun);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  padding: 12px 26px;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(74, 59, 42, .25);
  transition: transform .08s ease;
  user-select: none;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(74, 59, 42, .25); }
.btn.green { background: var(--grass); color: #fff; }
.btn.blue  { background: var(--sky); }
.btn.plain { background: #fff; font-weight: 400; font-size: 14px; padding: 8px 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------- 表单 ---------------- */
.field { margin: 18px 0; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.field input {
  width: 100%;
  font-size: 16px;
  padding: 12px 14px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: #FFFDF6;
  outline: none;
}
.field input:focus { border-color: var(--sun); }

.msg { min-height: 20px; font-size: 14px; color: #d0483f; margin: 6px 0 12px; }
.msg.ok { color: #2f8f4e; }

/* ---------------- 登录页 ---------------- */
.login-box { width: 380px; max-width: 94vw; margin-top: 26px; }
.login-foot { margin-top: 14px; font-size: 13px; color: #8a7a63; line-height: 1.7; }

/* ---------------- 选宠页 ---------------- */
.animal-grid {
  width: 760px; max-width: 96vw;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}
@media (max-width: 700px) { .animal-grid { grid-template-columns: repeat(2, 1fr); } }

.animal-card {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 4px 4px 0 rgba(74, 59, 42, .12);
  padding: 18px 10px 14px;
  text-align: center;
  cursor: pointer;
  transition: transform .1s ease;
}
.animal-card:hover { transform: translateY(-4px) rotate(-1deg); }
.animal-card .face {
  font-size: 52px;
  line-height: 1;
  padding: 10px;
  border-radius: 50%;
  display: inline-block;
}
.animal-card .name { font-size: 18px; font-weight: 700; margin-top: 8px; }
.animal-card .tag { font-size: 12px; color: #8a7a63; margin-top: 4px; }

.animal-card.picked {
  border-color: var(--sun);
  box-shadow: 0 0 0 4px var(--sun), 4px 4px 0 rgba(74, 59, 42, .12);
  transform: translateY(-4px);
}

.select-bar {
  width: 760px; max-width: 96vw;
  margin-top: 24px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.select-bar input { flex: 1; min-width: 200px; }

/* 弹窗（二次确认） */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(74, 59, 42, .35);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
}
.modal {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 28px;
  width: 340px; max-width: 90vw;
  text-align: center;
}
.modal .face { font-size: 56px; }
.modal h3 { margin: 10px 0 6px; font-size: 18px; }
.modal p { font-size: 14px; color: #8a7a63; line-height: 1.6; }
.modal .row { margin-top: 18px; display: flex; gap: 12px; justify-content: center; }

/* ---------------- 宠物主页 ---------------- */
.topbar {
  width: 860px; max-width: 96vw;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap; gap: 10px;
}
.topbar .hello { font-size: 15px; font-weight: 700; }

.pet-stage {
  width: 860px; max-width: 96vw;
  display: flex; flex-direction: column; align-items: center;
  padding: 34px 26px 28px;
}
.pet-emoji {
  font-size: 110px;
  line-height: 1;
  animation: bounce 2.6s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.pet-name { font-size: 24px; font-weight: 700; margin-top: 14px; }
.pet-badges { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.badge {
  font-size: 13px; font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 14px;
  background: #FFFDF6;
}
.badge.sick { background: var(--candy); color: #fff; border-color: #b2524b; }
.badge.stage { background: var(--grass); color: #fff; border-color: #2f8f4e; }
.pet-visit { font-size: 13px; color: #8a7a63; margin-top: 12px; }

.stats {
  width: 860px; max-width: 96vw;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 22px;
}
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }
.stat { display: flex; align-items: center; gap: 12px; }
.stat .label { width: 92px; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.bar {
  flex: 1; height: 18px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #FFFDF6;
  overflow: hidden;
}
.bar .fill {
  height: 100%;
  border-radius: 999px 0 0 999px;
  transition: width .5s ease;
}
.stat .num { width: 40px; font-size: 13px; text-align: right; color: #8a7a63; }

.feature-zone {
  width: 860px; max-width: 96vw;
  margin-top: 20px;
}
.feature-zone h3 { font-size: 15px; margin-bottom: 14px; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  background: #FFFDF6;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.chip .lock { font-size: 12px; font-weight: 400; color: #b0a186; }

.loading { padding: 60px; text-align: center; font-size: 15px; color: #8a7a63; }

/* ---------------- 顶部导航 ---------------- */
.navlinks { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.navlinks a { text-decoration: none; color: var(--ink); }

/* ---------------- 日常互动卡片 ---------------- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 640px) { .action-grid { grid-template-columns: repeat(2, 1fr); } }
.action-card {
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #FFFDF6;
  text-align: center;
  padding: 14px 8px;
  cursor: pointer;
  transition: transform .1s ease;
  user-select: none;
}
.action-card:hover { transform: translateY(-3px); }
.action-card .face { font-size: 34px; line-height: 1; }
.action-card .name { font-size: 15px; font-weight: 700; margin-top: 6px; }
.action-card .count { font-size: 12px; color: #8a7a63; margin-top: 4px; }
.action-card.done { opacity: .4; cursor: not-allowed; }

/* ---------------- 学习面板 ---------------- */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
@media (max-width: 720px) { .subject-grid { grid-template-columns: repeat(4, 1fr); } }
.subject-card {
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #FFFDF6;
  text-align: center;
  padding: 12px 4px 8px;
  cursor: pointer;
  position: relative;
  transition: transform .1s ease;
  user-select: none;
}
.subject-card:hover { transform: translateY(-3px); }
.subject-card .face { font-size: 26px; }
.subject-card .name { font-size: 13px; font-weight: 700; margin-top: 4px; }
.subject-card.picked { border-color: var(--sun); box-shadow: 0 0 0 3px var(--sun); }
.subject-card .picked-n {
  position: absolute; top: -8px; right: -6px;
  background: var(--sun); color: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  padding: 2px 7px;
}
.study-count { font-size: 15px; font-weight: 700; }
.study-done { padding: 18px; text-align: center; color: #8a7a63; font-size: 15px; grid-column: 1 / -1; }
.score-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.score-chip {
  background: #EAF3DE;
  border: 2px solid #97C459;
  border-radius: 999px;
  font-size: 13px;
  padding: 4px 12px;
}

/* ---------------- 聊天 ---------------- */
.chat-box {
  height: 260px;
  overflow-y: auto;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: #FFFDF6;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-empty { color: #b0a186; text-align: center; margin: auto; font-size: 14px; }
.chat-msg {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.chat-msg.me { align-self: flex-end; background: var(--sky); color: #fff; border: 2px solid #3d87c2; }
.chat-msg.pet { align-self: flex-start; background: #FFF; border: 2px solid var(--ink); }
.chat-input-row { display: flex; gap: 10px; margin-top: 12px; }
.chat-input-row input { flex: 1; font-size: 15px; padding: 11px 14px; border: 3px solid var(--ink); border-radius: 12px; background: #FFFDF6; outline: none; }
.chat-input-row input:disabled { opacity: .5; }

/* ---------------- 测验页 ---------------- */
.notice { width: 860px; max-width: 96vw; font-size: 14px; color: #8a7a63; line-height: 1.7; padding: 18px 22px; }
.exam-block { width: 860px; max-width: 96vw; margin-top: 18px; }
.exam-title { font-size: 17px; margin-bottom: 12px; }
.exam-card {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 4px 4px 0 rgba(74, 59, 42, .12);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.exam-period { font-weight: 700; font-size: 15px; margin-bottom: 10px; color: #a3722d; }
.exam-rows { display: flex; flex-direction: column; gap: 8px; }
.exam-row {
  display: flex; align-items: center; gap: 10px;
  background: #FFFDF6;
  border: 2px solid #e8ddc7;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 14px;
}
.exam-row.top { border-color: var(--sun); background: #FFF7E3; }
.exam-row .rk { width: 84px; font-weight: 700; }
.exam-row .face { font-size: 20px; }
.exam-row .nm { flex: 1; }
.exam-row .sc { font-weight: 700; }
.exam-empty { color: #8a7a63; font-size: 14px; line-height: 1.8; text-align: center; padding: 10px; }

.train-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.train-table th, .train-table td {
  border: 2px solid #e8ddc7;
  padding: 7px 9px;
  text-align: center;
  background: #FFFDF6;
}
.train-table th { background: #FFF7E3; font-weight: 700; }
.train-table .td-pet { font-weight: 700; text-align: left; white-space: nowrap; }

/* ---------------- 陈列室 ---------------- */
.hall-owner { font-size: 22px; font-weight: 700; margin: 10px 0 20px; }
.award-grid {
  width: 860px; max-width: 96vw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) { .award-grid { grid-template-columns: repeat(2, 1fr); } }
.award-card {
  background: #FFF7E3;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 rgba(74, 59, 42, .12);
  padding: 22px 16px;
  text-align: center;
  transform: rotate(-.6deg);
}
.award-card:nth-child(2n) { transform: rotate(.6deg); }
.award-face { font-size: 40px; }
.award-title { font-size: 16px; font-weight: 700; margin-top: 10px; }
.award-desc { font-size: 13px; color: #8a7a63; margin-top: 6px; line-height: 1.6; }

/* ---------------- 动物园大广场 ---------------- */
.plaza-card {
  width: 860px; max-width: 96vw;
  display: flex; flex-direction: column; align-items: stretch;
  padding: 0 0 22px;
  overflow: hidden;
}
.plaza-sky {
  height: 88px;
  background: linear-gradient(#BFE3F5, #DFF3FC);
  border-bottom: 3px solid var(--ink);
  position: relative;
  overflow: hidden;
}
/* 远山剪影（天空底部两层淡绿山丘） */
.plaza-sky::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px; height: 30px;
  background:
    radial-gradient(ellipse 130px 34px at 8% 100%, #CDEBC2 0 98%, transparent 100%),
    radial-gradient(ellipse 170px 40px at 36% 100%, #BFE6B2 0 98%, transparent 100%),
    radial-gradient(ellipse 150px 36px at 66% 100%, #CDEBC2 0 98%, transparent 100%),
    radial-gradient(ellipse 180px 42px at 94% 100%, #BFE6B2 0 98%, transparent 100%);
  opacity: .8;
}
.plaza-sky .sun { position: absolute; top: 8px; right: 22px; font-size: 30px; z-index: 1; }
.plaza-sky .cloud { position: absolute; font-size: 24px; opacity: .9; }
.plaza-sky .cloud.c1 { top: 10px; left: 12%; animation: drift 26s linear infinite; }
.plaza-sky .cloud.c2 { top: 34px; left: 55%; font-size: 18px; animation: drift 34s linear infinite; }
.plaza-sky .cloud.c3 { top: 6px;  left: 78%; font-size: 15px; opacity: .7; animation: drift 44s linear infinite; }
.plaza-sky .bird { position: absolute; font-size: 15px; z-index: 1; }
.plaza-sky .bird.b1 { top: 18px; left: 30%; animation: flyby 18s linear infinite; }
.plaza-sky .bird.b2 { top: 40px; left: 62%; font-size: 13px; animation: flyby 24s linear infinite reverse; }
@keyframes drift {
  from { transform: translateX(-40px); }
  to   { transform: translateX(560px); }
}
@keyframes flyby {
  from { transform: translateX(-60px); }
  to   { transform: translateX(420px); }
}
.plaza-fence {
  height: 20px;
  background:
    repeating-linear-gradient(90deg, #C98A5B 0 12px, #E9BC85 12px 17px, #C98A5B 17px 22px, transparent 22px 34px),
    linear-gradient(#E9BC85 0 26%, transparent 26% 32%, #E9BC85 32% 62%, transparent 62% 68%, #E9BC85 68% 100%);
  border-bottom: 3px solid var(--ink);
}
.plaza-fence.bottom {
  border-bottom: none;
  border-top: 3px solid var(--ink);
}
/* 场景层：装饰垫底，动物在上面跑 */
.plaza-scene { position: relative; }
.plaza-decor { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.plaza-ground {
  height: 300px;
  position: relative;
  background:
    radial-gradient(circle at 20% 30%, #A8E6A1 0 40px, transparent 41px),
    radial-gradient(circle at 70% 60%, #A8E6A1 0 55px, transparent 56px),
    radial-gradient(circle at 45% 85%, #A8E6A1 0 45px, transparent 46px),
    linear-gradient(#B9EFB0, #8FDD87);
}
.plaza-pet { z-index: 2; }

/* ---- 广场装饰：大树 / 池塘 / 花草 / 蝴蝶 / 气球 ---- */
.plaza-tree { position: absolute; text-align: center; z-index: 0; }
.plaza-tree.t1 { left: 3%; bottom: 12%; }
.plaza-tree.t2 { right: 4%; top: 4%; transform: scale(.85); }
.plaza-tree .crown {
  width: 74px; height: 46px;
  background: #5FBF63;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 46% 46%;
  margin: 0 auto -10px;
  position: relative;
}
.plaza-tree .crown.c2 {
  width: 54px; height: 34px;
  background: #79D679;
  margin: -58px 0 0 26px;
  position: relative;
}
.plaza-tree .trunk {
  width: 15px; height: 32px;
  background: #8D5A3B;
  border: 2px solid var(--ink);
  border-radius: 4px 4px 6px 6px;
  margin: 0 auto;
}
.plaza-pond {
  position: absolute; right: 7%; bottom: 6%;
  width: 132px; height: 54px;
  background: linear-gradient(#A5DCF5, #6FBFE8);
  border: 3px solid var(--ink);
  border-radius: 50%;
}
.plaza-pond .duck { position: absolute; top: -14px; right: 16px; font-size: 20px; }
.plaza-flower { position: absolute; font-size: 17px; }
.plaza-flower.f1 { left: 16%; bottom: 5%; }
.plaza-flower.f2 { left: 38%; bottom: 12%; font-size: 14px; }
.plaza-flower.f3 { left: 55%; bottom: 4%; }
.plaza-flower.f4 { left: 26%; top: 8%; font-size: 14px; }
.plaza-flower.f5 { right: 24%; bottom: 22%; font-size: 15px; }
.plaza-flower.f6 { right: 34%; top: 10%; font-size: 13px; }
.plaza-shroom { position: absolute; font-size: 15px; }
.plaza-shroom.m1 { left: 8%; top: 38%; }
.plaza-shroom.m2 { right: 16%; bottom: 40%; font-size: 13px; }
.plaza-grass { position: absolute; font-size: 16px; opacity: .85; }
.plaza-grass.g1 { left: 47%; top: 16%; }
.plaza-grass.g2 { left: 66%; bottom: 30%; font-size: 13px; }
.plaza-grass.g3 { right: 44%; bottom: 6%; }
.plaza-butterfly {
  position: absolute; left: 30%; top: 30%;
  font-size: 16px;
  animation: flutter 10s ease-in-out infinite alternate;
}
.plaza-ball {
  position: absolute; right: 12%; top: 2%;
  font-size: 20px;
  animation: balloon 6s ease-in-out infinite alternate;
}
@keyframes flutter {
  0%   { transform: translate(0, 0) rotate(-8deg); }
  50%  { transform: translate(60px, -18px) rotate(8deg); }
  100% { transform: translate(130px, 4px) rotate(-6deg); }
}
@keyframes balloon {
  from { transform: translateY(0) rotate(-3deg); }
  to   { transform: translateY(-10px) rotate(3deg); }
}
.plaza-pet {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.plaza-pet .face {
  display: inline-block;
  font-size: 40px;
  line-height: 1;
  padding: 8px;
  border-radius: 50%;
  animation: bounce 2.8s ease-in-out infinite;
}
.plaza-pet.mine .face { font-size: 64px; padding: 12px; animation-duration: 2.4s; }
.plaza-pet .mood {
  position: absolute; top: -6px; right: -10px;
  font-size: 15px;
  filter: drop-shadow(0 1px 0 rgba(74,59,42,.3));
}
.plaza-pet .own-label {
  font-size: 13px; font-weight: 700;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 12px;
  margin-top: 4px;
  display: inline-block;
}
.plaza-pet .bubble {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) scale(.85);
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 5;
}
.plaza-pet .bubble::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--ink);
}
.plaza-pet .bubble.show { opacity: 1; transform: translateX(-50%) scale(1); }
.plaza-tip {
  font-size: 12px;
  color: #8a7a63;
  text-align: center;
  padding: 10px 0 4px;
}
.plaza-card .pet-badges { justify-content: center; margin-top: 8px; padding: 0 20px; }
.plaza-card .pet-visit { text-align: center; }

/* ---------------- 聊天对象选择 ---------------- */
.chat-target-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.target-hint { font-size: 13px; color: #8a7a63; font-weight: 700; }
.target-chip {
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #FFFDF6;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  transition: transform .08s ease;
}
.target-chip:hover { transform: translateY(-2px); }
.target-chip.active { background: var(--sun); box-shadow: 0 0 0 3px rgba(255,182,54,.4); }
.chat-with { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: #a3722d; min-height: 18px; }
h3 .lock { font-size: 12px; font-weight: 400; color: #b0a186; margin-left: 6px; }

/* ---------------- 五期升级：踱步 / 睡觉 / 闲聊看板 / 注册弹窗 ---------------- */

/* 踱步：内层 walker 做左右走动（不和外层定位 transform 冲突） */
.plaza-pet .walker { display: inline-block; position: relative; }
.plaza-pet.walking .walker { animation: stroll 6s ease-in-out infinite alternate; }
@keyframes stroll {
  from { transform: translateX(-26px) scaleX(1); }
  49%  { transform: translateX(0) scaleX(1); }
  50%  { transform: translateX(0) scaleX(-1); }   /* 走到头转身 */
  to   { transform: translateX(26px) scaleX(-1); }
}

/* 睡觉：不蹦不跳，头顶冒 💤 */
.plaza-pet.sleeping .face { animation: none; opacity: .85; }
.plaza-pet .zzz {
  position: absolute; top: -18px; right: -16px;
  font-size: 16px; font-weight: 700;
  animation: zzz-float 2.4s ease-in-out infinite;
}
@keyframes zzz-float {
  0%   { transform: translateY(0) scale(.8); opacity: .4; }
  50%  { transform: translateY(-6px) scale(1.15); opacity: 1; }
  100% { transform: translateY(0) scale(.8); opacity: .4; }
}

/* 动物闲聊窗口（IM 聊天室风格） */
.talk-window {
  border: 3px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  background: #FFF7E0;
}
.talk-head {
  display: flex; align-items: center; gap: 10px;
  background: var(--sun);
  border-bottom: 3px solid var(--ink);
  padding: 10px 14px;
  font-weight: 700; font-size: 15px;
}
.talk-head .talk-avatars { font-size: 20px; letter-spacing: -4px; }
.talk-head .talk-live {
  margin-left: auto;
  font-size: 12px; color: #1c7c3c; font-weight: 700;
  animation: live-blink 1.6s ease-in-out infinite;
}
@keyframes live-blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.talk-list {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 380px; overflow-y: auto;
  padding: 14px 12px;
  background:
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(163, 114, 45, .05) 26px 27px),
    #FFFDF4;
}
.talk-msg { display: flex; gap: 8px; align-items: flex-start; }
.talk-msg.side-b { flex-direction: row-reverse; }
.talk-avatar {
  width: 34px; height: 34px; flex: none;
  border: 2.5px solid var(--ink); border-radius: 50%;
  background: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 14px;
}
.talk-body { max-width: 78%; display: flex; flex-direction: column; gap: 2px; }
.talk-msg.side-b .talk-body { align-items: flex-end; }
.talk-name { font-size: 12px; font-weight: 700; color: #a3722d; padding: 0 4px; }
.talk-name .owner { font-weight: 400; color: #b0a186; }
.talk-bubble {
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 4px 14px 14px 14px;
  padding: 7px 12px;
  font-size: 14px; line-height: 1.55;
  color: #4a3b2a;
  box-shadow: 2px 2px 0 rgba(74, 59, 42, .12);
}
.talk-msg.side-b .talk-bubble {
  background: #E8F6DA;
  border-radius: 14px 4px 14px 14px;
}
.talk-msg.talk-sys { justify-content: center; }
.talk-msg.talk-sys .talk-bubble {
  background: #F3EDE0; border-style: dashed;
  color: #8a7a63; font-size: 13px;
  border-radius: 12px; box-shadow: none;
}
.talk-empty { text-align: center; color: #b0a186; font-size: 14px; padding: 18px 0; }
.talk-period { font-size: 13px; font-weight: 700; color: #8a7a63; margin-bottom: 8px; }

/* 游客提示条 */
.guest-bar {
  background: var(--sun);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 14px; font-weight: 700;
  text-align: center;
  width: 860px; max-width: 96vw;
}

/* 注册引导弹窗 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(60, 45, 25, .45);
  display: flex; align-items: center; justify-content: center;
  z-index: 99; padding: 16px;
}
.modal-card {
  background: #FFFDF6;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 24px 22px 20px;
  width: 430px; max-width: 94vw;
  box-shadow: 0 10px 0 rgba(74, 59, 42, .22);
}
.modal-card h3 { margin: 0 0 4px; text-align: center; }
.modal-card .modal-sub { font-size: 13px; color: #8a7a63; text-align: center; margin-bottom: 14px; }
.modal-close {
  position: absolute; top: 10px; right: 14px;
  border: none; background: none;
  font-size: 20px; cursor: pointer; color: #b0a186;
}
.modal-card { position: relative; }
.modal-foot { text-align: center; margin-top: 10px; font-size: 13px; color: #8a7a63; }
.modal-foot a { color: #a3722d; font-weight: 700; cursor: pointer; }

/* ---------------- 六期：日期天气条 / 日报 / 梦境 / 留言板 / 小老师 / 月历 ---------------- */

/* 真实日期 · 时钟 · 天气条（园门口大屏：各项定宽，加载前后尺寸稳定） */
.now-bar {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  flex-wrap: wrap;
  background: #FFFDF6;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 10px 18px;
  font-size: 16px; font-weight: 700;
  min-height: 52px;
  box-sizing: border-box;
}
.now-bar .now-date { min-width: 172px; text-align: center; }
.now-bar .now-clock {
  font-variant-numeric: tabular-nums;
  font-size: 20px; color: #a3722d;
  min-width: 104px; text-align: center;
}
.now-bar .now-weather { font-weight: 400; font-size: 15px; min-width: 158px; text-align: center; }

/* 动物园日报 */
.daily-paper {
  border: 3px double var(--ink);
  border-radius: 12px;
  background: #FFF9EA;
  overflow: hidden;
}
.daily-head {
  background: var(--ink);
  color: #FFF9EA;
  padding: 8px 14px;
  font-weight: 700; letter-spacing: 2px;
  display: flex; justify-content: space-between;
}
.daily-head .daily-date { font-weight: 400; font-size: 13px; opacity: .85; }
.daily-items { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.daily-item { border-left: 4px solid var(--sun); padding-left: 10px; }
.daily-title { font-weight: 700; font-size: 15px; }
.daily-text { font-size: 14px; color: #4a3b2a; line-height: 1.6; margin-top: 2px; }

/* 梦境卡 */
.dream-card {
  background: #EFE9FF;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
}
.dream-card .dream-emoji { font-size: 22px; }
.dream-card .dream-text { color: #4a3b7a; }

/* 访客留言板 */
.visitor-list { display: flex; flex-direction: column; gap: 8px; }
.visitor-line {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px; line-height: 1.6;
}
.visitor-line .visitor-name { font-weight: 700; color: #a3722d; }
.visitor-line .visitor-text { color: #4a3b2a; }
.visitor-line .visitor-reply { color: #1c7c3c; }
.visitor-line .visitor-time { color: #b0a186; font-size: 12px; margin-left: 6px; }

/* 小老师出题 */
.quiz-subjects { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.quiz-sub.active { background: var(--sun); }
.quiz-box {
  background: #FFF7E0;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 14px;
}
.quiz-question { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.quiz-input-row { display: flex; gap: 10px; }
.quiz-input-row input {
  flex: 1;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
}

/* 采访按钮激活态 */
.btn.plain.active { background: var(--sun); border-color: var(--ink); }

/* 测验页双栏 + 月历 */
.exams-layout { display: flex; gap: 16px; align-items: flex-start; }
.exams-layout .calendar-card { flex: none; width: 330px; }
.exams-layout .exams-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 860px) {
  .exams-layout { flex-direction: column; }
  .exams-layout .calendar-card { width: 100%; }
}
.calendar-head { display: flex; align-items: center; justify-content: space-between; }
.calendar-head h3 { margin: 0; }
.cal-weekrow, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-weekrow { margin-top: 10px; }
.cal-weekrow .cal-w { text-align: center; font-weight: 700; font-size: 13px; color: #8a7a63; }
.cal-weekrow .cal-w.weekend { color: #d85a30; }
.cal-grid { margin-top: 6px; }
.cal-cell {
  min-height: 56px;
  border: 2px solid #E8DFC8;
  border-radius: 8px;
  background: #FFFDF6;
  padding: 4px;
  font-size: 13px;
  display: flex; flex-direction: column; align-items: flex-start;
  overflow: hidden;
}
.cal-cell b { font-size: 13px; }
.cal-cell.empty { border-style: dashed; background: transparent; }
.cal-cell.wed { background: #E8F6DA; border-color: #97C459; }
.cal-cell.thu { background: #FFF3D6; border-color: #EF9F27; }
.cal-cell.festival { background: #FDEBEB; border-color: #F09595; }
.cal-cell.today { outline: 3px solid #378ADD; outline-offset: -1px; }
.cal-tag, .cal-fest { font-style: normal; font-size: 11px; color: #6a5b42; white-space: nowrap; }
.cal-fest { font-weight: 700; color: #a32d2d; }
.cal-legend {
  margin-top: 10px;
  font-size: 12px; color: #8a7a63;
  display: flex; flex-direction: column; gap: 4px;
}

/* 周周练状态 */
.weekly-status {
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 10px;
}
.weekly-status.ongoing { background: #FFF3D6; }
.weekly-status.upcoming { background: #F1EFE8; }
.weekly-status.published { background: #E8F6DA; font-weight: 700; }
.weekly-mine {
  background: #FFF9EA;
  border: 2px dashed var(--ink);
  border-radius: 12px;
  padding: 8px 14px;
  margin-bottom: 10px;
  font-size: 15px;
}
.exam-row .sub { color: #185FA5; font-weight: 700; }

/* ---------------- 六期打磨：移动端适配（手机上广场/大屏不变形） ---------------- */
@media (max-width: 640px) {
  .plaza-card { width: 100%; max-width: 100vw; border-radius: 16px; }
  .plaza-sky { height: 64px; }
  .plaza-sky .sun { font-size: 24px; right: 14px; }
  .plaza-sky .cloud.c3, .plaza-sky .bird.b2 { display: none; }
  .plaza-ground { height: 240px; }
  .plaza-tree .crown { width: 56px; height: 36px; }
  .plaza-tree .crown.c2 { width: 42px; height: 27px; margin: -46px 0 0 20px; }
  .plaza-tree .trunk { width: 12px; height: 26px; }
  .plaza-pond { width: 96px; height: 40px; right: 5%; }
  .plaza-pond .duck { font-size: 16px; top: -12px; right: 10px; }
  .plaza-flower, .plaza-grass { font-size: 13px; }
  .plaza-butterfly { font-size: 13px; }
  .plaza-pet .face { font-size: 34px; }
  .plaza-pet.mine .face { font-size: 50px; }
  .plaza-pet .bubble { font-size: 11px; }
  .now-bar { gap: 8px; padding: 8px 10px; font-size: 14px; border-radius: 12px; }
  .now-bar .now-date { min-width: 0; flex: 1 1 100%; }
  .now-bar .now-clock { font-size: 18px; min-width: 0; flex: none; }
  .now-bar .now-weather { font-size: 13px; min-width: 0; flex: 1; }
  .talk-list { max-height: 260px; }
  .daily-items { padding: 10px 10px; }
}
