/* 赛博宝宝样式（2026-10-21 从 index.html 的 <style> 原样搬出）：探险面板、地图回执、做菜加载、聊天、故事弹窗、回忆、背包、New 泡泡、Toast。
   index.html 里按 base → yard → controls → panels 的顺序 <link>，层叠顺序跟原来一样，别调换。
   ⚠️ 放在 frontend/ 根目录、别挪进子目录：按钮背景走 --btn-bg: url(./assets/…) 这种 CSS 变量，url 是按引用它的样式表的位置解析的。 */
/* 探险面板 */
.adventure-panel { text-align: center; }
.adventure-status { font-size: 14px; color: #6E5A4B; margin: 12px 0; }
.adventure-timer { font-size: 16px; font-weight: bold; color: #D79B6D; margin: 8px 0; }
.adventure-room-overlay {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(30,25,20,0.65);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; pointer-events: auto;
}
.adventure-room-overlay .adv-text {
  color: rgba(255,240,220,0.9); font-size: 14px; text-align: center; line-height: 1.6;
}
.adventure-room-overlay .adv-timer {
  color: #f5d6a8; font-size: 18px; font-weight: bold; margin: 4px 0;
}
.adventure-room-overlay .adv-warn {
  color: #f5a0a0; font-size: 12px;
}
.adventure-room-overlay .adv-btn {
  margin-top: 10px; padding: 10px 28px; border: none; border-radius: 16px;
  background: linear-gradient(135deg, #D79B6D, #e0ac80); color: white;
  font-size: 14px; font-weight: bold; cursor: pointer;
}
.adventure-room-overlay .adv-btn:hover { transform: scale(1.03); }
.adventure-room-overlay .adv-map-btn { background: #fffaf0; color: #7a5233; border: 2px solid #d9b48a; }
/* 探险地图回执：在哪儿捡的 / 路上还捡到了 / 成长期特别收获 */
.adv-special-cell { display: flex; gap: 12px; align-items: center; text-align: left; margin: 10px 0 4px; padding: 12px; border-radius: 16px;
  background: linear-gradient(135deg, #fff3d6, #ffe6ec); border: 2px solid #d9708d; }
.adv-special-cell img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.adv-special-cell .tag { display: inline-block; font-size: 11px; color: #fff; background: #d9708d; border-radius: 999px; padding: 1px 8px; margin-bottom: 4px; }
.adv-special-cell .t { font-size: 16px; font-weight: bold; color: #6E5A4B; }
.adv-special-cell .w { font-size: 12px; color: #8a6a55; margin-top: 2px; }
.adventure-btn {
  padding: 14px 32px; background: linear-gradient(135deg, #D79B6D, #e0ac80);
  color: white; border: none; border-radius: 14px; font-size: 16px;
  font-weight: bold; cursor: pointer; margin: 8px;
}
.adventure-btn:disabled { opacity: 0.4; }
.loot-list { text-align: left; margin-top: 16px; }
.loot-item {
  display: flex; align-items: center; gap: 8px; padding: 8px;
  background: #fff9c4; border-radius: 8px; margin-bottom: 4px;
}
.loot-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.loot-modal {
  background: #FDF6EE; border-radius: 20px; padding: 24px 20px; max-width: 340px;
  width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,0.25); text-align: center;
  max-height: 80vh; overflow-y: auto; border: 2px solid #EEDFCC;
}
.loot-modal h3 { color: #6E5A4B; margin: 0 0 4px; font-size: 18px; }
.loot-modal .loot-time { color: #A08D7D; font-size: 13px; margin-bottom: 16px; }
.loot-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0;
}
.loot-card {
  background: #FFFDF9; border: 1px solid #EEDFCC; border-radius: 12px;
  padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.loot-card img { width: 36px; height: 36px; object-fit: contain; }
.loot-card .loot-name { font-size: 11px; color: #6E5A4B; }
.loot-card .loot-type { font-size: 10px; color: #A08D7D; }
.loot-close-btn {
  margin-top: 16px; padding: 10px 36px; background: linear-gradient(135deg, #D79B6D, #e0ac80);
  color: white; border: none; border-radius: 14px; font-size: 15px; font-weight: bold; cursor: pointer;
}
.action-loading-overlay {
  position: fixed; inset: 0; background: rgba(253,246,238,0.5); z-index: 90;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px;
  backdrop-filter: blur(2px);
  animation: overlay-fade-in 0.15s ease;
}
@keyframes overlay-fade-in { from { opacity: 0; } to { opacity: 1; } }
.action-spinner {
  width: 32px; height: 32px; border: 2.5px solid rgba(215,155,109,0.2); border-top-color: #D79B6D;
  border-radius: 50%; animation: spin 0.7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.action-loading-text { color: #A08D7D; font-size: 13px; }

/* 做菜加载 */
.cooking-overlay {
  position: fixed; inset: 0; background: rgba(253,246,238,0.85); z-index: 95;
  display: flex; align-items: center; justify-content: center;
}
.cooking-content {
  text-align: center; position: relative;
}
.cooking-pot {
  font-size: 64px; animation: cooking-bounce 0.6s ease-in-out infinite alternate;
}
@keyframes cooking-bounce {
  from { transform: translateY(0) rotate(-3deg); }
  to { transform: translateY(-8px) rotate(3deg); }
}
.cooking-steam {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
}
.steam {
  color: #D79B6D; font-size: 20px; opacity: 0;
  display: inline-block;
  animation: steam-rise 1.5s ease-out infinite;
}
.steam.s1 { animation-delay: 0s; }
.steam.s2 { animation-delay: 0.4s; }
.steam.s3 { animation-delay: 0.8s; }
@keyframes steam-rise {
  0% { opacity: 0; transform: translateY(0) rotate(90deg); }
  30% { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(-30px) rotate(90deg); }
}
.cooking-name {
  margin-top: 16px; font-size: 16px; font-weight: bold; color: #6E5A4B;
}
.cooking-dots {
  margin-top: 8px; display: flex; justify-content: center; gap: 6px;
}
.cooking-dots span {
  font-size: 24px; color: #D79B6D; animation: dot-pulse 1.2s ease-in-out infinite;
}
.cooking-dots span:nth-child(2) { animation-delay: 0.2s; }
.cooking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1.2); }
}
.back-btn-wiggle { animation: wiggle 3s ease-in-out infinite; }
@keyframes wiggle {
  0%, 85%, 100% { transform: translateX(-50%) rotate(0deg); }
  88% { transform: translateX(-50%) rotate(-3deg); }
  91% { transform: translateX(-50%) rotate(3deg); }
  94% { transform: translateX(-50%) rotate(-2deg); }
  97% { transform: translateX(-50%) rotate(0deg); }
}

/* 聊天 */
.chat-panel {
  display: flex; flex-direction: column; height: 60vh;
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px;
}
.chat-msg {
  margin-bottom: 12px; display: flex; gap: 8px;
}
.chat-msg.baby { justify-content: flex-start; }
.chat-msg.user { justify-content: flex-end; }
.chat-bubble {
  max-width: 75%; padding: 10px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.5;
}
.chat-msg.baby .chat-bubble {
  background: #f5e6d3; color: #6E5A4B; border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
  background: #D79B6D; color: white; border-bottom-right-radius: 4px;
}
.chat-msg.system { justify-content: center; }
.chat-msg.system .chat-bubble {
  max-width: 90%; background: #fff3e0; color: #a67; font-size: 12px; text-align: center;
}
.chat-input-row {
  display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid #EEDFCC;
}
.chat-input {
  flex: 1; padding: 10px 14px; border: 2px solid #EEDFCC;
  border-radius: 20px; font-size: 14px; outline: none;
  background: #FFFDF9; color: #6E5A4B;
}
.chat-input::placeholder { color: #A08D7D; }
.chat-input:focus { border-color: #D79B6D; }
.chat-send {
  width: 40px; height: 40px; padding: 0; background: linear-gradient(135deg, #D79B6D, #e0ac80); color: white;
  border: none; border-radius: 50%; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(215,155,109,0.3);
}
.chat-send:disabled { opacity: 0.4; }

/* 故事弹窗 */
.story-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,0.6); animation: fade-in 0.3s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.story-box {
  background: #FFFDF9; border-radius: 24px; overflow: hidden;
  max-width: 360px; width: 100%; max-height: 85vh; overflow-y: auto;
  animation: pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(215,155,109,0.1);
}
.story-box .story-body { padding: 20px 24px 24px; }
.story-image {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block;
}
@keyframes pop-in {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.story-title {
  font-size: 18px; font-weight: bold; color: #D79B6D;
  text-align: center; margin-bottom: 16px;
}
.story-line {
  margin-bottom: 12px; font-size: 14px; line-height: 1.7;
}
.story-line.narration { color: #A08D7D; font-style: italic; }
.story-line-image {
  width: 92%; display: block; margin: 8px auto 10px; border-radius: 8px;
  border: 6px solid #FFF; box-shadow: 0 3px 10px rgba(0,0,0,0.12), 0 0 0 1px rgba(160,141,125,0.25);
  transform: rotate(-1.5deg);
}
.story-line.baby { color: #6E5A4B; padding-left: 14px; border-left: 3px solid #D79B6D; background: rgba(215,155,109,0.04); padding: 8px 12px 8px 14px; border-radius: 0 10px 10px 0; }
.story-next {
  width: 100%; padding: 13px; background: linear-gradient(135deg, #D79B6D, #e0ac80);
  color: white; border: none; border-radius: 14px; font-size: 15px;
  cursor: pointer; margin-top: 16px; font-family: inherit;
  box-shadow: 0 4px 12px rgba(215,155,109,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.story-next:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(215,155,109,0.3); }
.story-next:active { transform: translateY(0) scale(0.98); }

/* 回忆列表 */
.memory-list { }
.memory-item {
  background: #f5e6d3; border-radius: 12px; padding: 12px; margin-bottom: 8px;
  cursor: pointer; transition: transform 0.1s;
}
.memory-item:hover { transform: scale(1.01); }
.memory-day { font-size: 11px; color: #D79B6D; font-weight: bold; }
.memory-title { font-size: 14px; color: #6E5A4B; margin-top: 2px; }

/* 背包/物品 */
.inventory-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.inv-slot {
  background: #FFFDF9; border-radius: 12px; padding: 6px 4px 5px; text-align: center;
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative;
  box-shadow: 0 1px 6px rgba(110,90,75,0.06);
  border: 1.5px solid #EEDFCC;
}
.inv-img { width: 32px; height: 32px; object-fit: contain; }
/* 新东西的小泡泡（2026-10-21 小玉：换购、厨房、礼物都加个 New） */
.new-bubble {
  position: absolute; top: -5px; left: -4px; z-index: 2;
  background: linear-gradient(135deg, #FF9EB5, #F27A9B); color: white;
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.3px; line-height: 1;
  border-radius: 9px 9px 9px 2px; padding: 3px 6px 3px;
  box-shadow: 0 1px 4px rgba(242,122,155,0.4); transform: rotate(-8deg);
  animation: new-bob 2.4s ease-in-out infinite; pointer-events: none;
}
.new-bubble.inline { position: relative; top: -1px; left: 4px; display: inline-block; vertical-align: middle; }
@keyframes new-bob { 0%,100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-8deg) translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .new-bubble { animation: none; } }
.inv-name { font-size: 9px; color: #6E5A4B; margin-top: 2px; font-weight: 500; line-height: 1.2; }
.inv-qty {
  position: absolute; top: -3px; right: -3px; background: linear-gradient(135deg, #D79B6D, #c4875a);
  color: white; font-size: 9px; font-weight: bold; border-radius: 8px; padding: 0px 5px;
  box-shadow: 0 1px 4px rgba(215,155,109,0.35);
}
.inv-category {
  display: inline-flex; align-items: center; gap: 4px;
  background: #FDF6EE; border: 1px solid #EEDFCC;
  border-radius: 10px; padding: 4px 12px; margin-bottom: 10px;
  font-size: 12px; font-weight: 600; color: #D79B6D;
}
.inv-section { margin-bottom: 16px; }
.inv-section + .inv-section { border-top: 1px dashed #EEDFCC; padding-top: 14px; }

/* Toast */
.toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(196,149,112,0.92); color: white; padding: 10px 20px;
  border-radius: 20px; font-size: 14px; z-index: 300;
  animation: toast-in 0.3s ease; backdrop-filter: blur(6px);
}
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } }

