/* ============================================================
   團購小萌寵｜雙人共養「動態日記 + 友情樹」樣式 diary.css v1
   - 中性溫馨風（無愛心/粉紅戀愛暗示），字大按鈕大，配合 50+ 婆媽。
   - 全部 class 加前綴 dy- ，避免撞到 app 既有樣式。
   ============================================================ */
.dy-wrap { margin: 14px 0; font-size: 17px; color: #4a4038; }
#sharedDiaryMount.dy-flash { animation: dyFlash 1.2s ease; border-radius: 20px; }
@keyframes dyFlash { 0%,100%{ box-shadow: 0 0 0 0 rgba(87,168,107,0);} 30%{ box-shadow: 0 0 0 4px rgba(87,168,107,.5);} }
.dy-loading { text-align: center; color: #9a8f83; padding: 20px; }

/* ---------- 成就「百年好樹」綠色發亮特效（套在成就卡上）---------- */
.ach-item.ach-glow-green {
  border-color: #57a86b !important;
  background: linear-gradient(180deg, #f3fcef, #e6f6e2) !important;
  animation: achGreenGlow 2s ease-in-out infinite;
}
.ach-item.ach-glow-green .ach-emoji { animation: achGreenFloat 2.4s ease-in-out infinite; }
@keyframes achGreenGlow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(87,168,107,.30), 0 0 12px rgba(87,168,107,.40); }
  50%      { box-shadow: 0 0 0 3px rgba(87,168,107,.55), 0 0 26px rgba(87,168,107,.80); }
}
@keyframes achGreenFloat { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-3px);} }

/* ---------- 頂列：兩人暱稱 + 解除（上下兩層響應式） ---------- */
.dy-topbar { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin-bottom: 8px; min-width: 0; }
/* 第一排：名字（單行；超長才省略號、不拆字；🌱 與 × 不縮） */
.dy-members { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; font-weight: 800; color: #5c8a52; }
.dy-nm-emoji { flex: 0 0 auto; }
.dy-nm-sep   { flex: 0 0 auto; color: #b7ad9e; font-weight: 700; }
.dy-nm-me, .dy-nm-you { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dy-nm-me  { color: #3f9a57; font-weight: 800; }   /* 自己＝綠 */
.dy-nm-you { color: #c67a34; font-weight: 800; }   /* 夥伴＝橘 */
/* 第二排：左＝小字說明（可省略號），右＝「解除共養」按鈕（單行、依文字撐開、不縮） */
.dy-topbar-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.dy-topbar-caption { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; color: #9a8f83; }

/* Lv5 外型選擇面板 */
.dy-skin-cur { margin-top: 8px; font-size: 15px; color: #5c8a52; }
.dy-skin-title { margin-top: 8px; font-size: 13px; color: #6b8a5f; }
.dy-skin-opts { display: flex; flex-wrap: wrap; justify-content: center; }
.dy-skin-opt { font-size: 14px !important; margin: 3px; padding: 8px 12px !important; }
.dy-skin-toggle { font-size: 13px !important; padding: 6px 10px !important; margin-left: 6px; }
.dy-leave-btn { border: none; background: #f2ede3; color: #9a8f83; font-size: 13px; border-radius: 10px; padding: 6px 11px; cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.dy-leave-btn:active { transform: scale(.96); }

/* ---------- 未綁定：邀請卡 ---------- */
.dy-invite { background: #fff8ee; border: 2px solid #f0e2cc; border-radius: 18px; padding: 20px; text-align: center; }
.dy-invite h3 { margin: 0 0 6px; font-size: 20px; color: #6b5b47; }
.dy-invite p { margin: 4px 0 14px; color: #9a8f83; font-size: 15px; }
.dy-invite .dy-btn { width: 100%; margin: 6px 0; }
.dy-code-box { background: #fff; border: 2px dashed #d9b98a; border-radius: 14px; padding: 14px; margin: 10px 0; }
.dy-code { font-size: 30px; letter-spacing: 4px; font-weight: 800; color: #c98a2e; }
.dy-code-hint { font-size: 14px; color: #9a8f83; margin-top: 6px; }
.dy-input { width: 100%; box-sizing: border-box; font-size: 20px; text-align: center; letter-spacing: 3px;
  padding: 12px; border: 2px solid #e6d6bd; border-radius: 12px; text-transform: uppercase; }

/* ---------- 按鈕 ---------- */
.dy-btn { display: inline-block; border: none; border-radius: 14px; padding: 13px 18px; font-size: 18px;
  font-weight: 700; cursor: pointer; background: #efe6d6; color: #6b5b47; }
.dy-btn.primary { background: linear-gradient(180deg,#7cc08a,#57a86b); color: #fff; }
.dy-btn.block { display: block; width: 100%; box-sizing: border-box; }
.dy-btn:active { transform: scale(.97); }

/* ---------- 友情樹 ---------- */
.dy-tree-card { background: linear-gradient(180deg,#f4fbef,#eaf6e6); border: 2px solid #d7ecca;
  border-radius: 20px; padding: 16px 16px 12px; text-align: center; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; }   /* ★強制所有內容水平置中，樹不會偏 */
.dy-tree-card .dy-prog { align-self: stretch; }                    /* 進度條維持滿版 */
.dy-tree-imgwrap { margin-left: auto !important; margin-right: auto !important; }
.dy-tree-stage { font-size: 15px; color: #5c8a52; font-weight: 700; }
/* 🗣️ 樹的今日一句：溫柔、像樹在對你說話（可讀性優先，長輩也好讀） */
.dy-tree-voice { margin: 8px auto 4px; max-width: 88%; font-size: 18px; line-height: 1.6; color: #3d5940;
  font-weight: 600; font-style: normal; text-align: center;
  white-space: pre-line;        /* 讓文案裡的 \n 直接換行（預設好的兩行版本） */
  text-wrap: balance;           /* 平衡換行，避免最後只剩 1～2 個字單獨成行 */ }
.dy-tree-imgwrap { position: relative; width: min(80vw, 460px); height: min(80vw, 460px); margin: 6px auto 2px;
  animation: dyLeafBreathe 3.4s ease-in-out infinite; }
.dy-tree-img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 100%;
  animation: dyLeafSway 6.5s ease-in-out infinite, dyLeafBright 5.2s ease-in-out infinite; }
.dy-tree-img.grow { animation: dyGrow .9s ease; }
/* 🌿 第一層・生命感（全等級常駐、純 CSS）：整棵樹很微弱地呼吸、樹冠隨風左右微晃（樹幹固定）、葉子亮度呼吸 */
@keyframes dyLeafBreathe { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.012);} }
@keyframes dyLeafSway { 0%,100%{ transform: rotate(-1deg);} 50%{ transform: rotate(1deg);} }
@keyframes dyLeafBright { 0%,100%{ filter: brightness(.99);} 50%{ filter: brightness(1.02);} }
/* 神樹：整棵樹輕輕呼吸（比一般更明顯，覆蓋上面的微呼吸） */
.dy-tree-card.lv5 .dy-tree-imgwrap { animation: dyTreeBreathe 4s ease-in-out infinite; }
@keyframes dyTreeBreathe { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.05);} }
/* 尊重「減少動態」偏好：關掉常駐生命感動畫 */
@media (prefers-reduced-motion: reduce) {
  .dy-tree-imgwrap, .dy-tree-img { animation: none !important; }
}
/* 樹的金色霓虹光暈 ＋ 呼吸燈（所有階段都有，神樹更強）*/
.dy-tree-imgwrap::after { content: ''; position: absolute; inset: -6%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(255,205,80,.45), rgba(255,205,80,0) 62%);
  animation: dyBreath 3s ease-in-out infinite; }
.dy-tree-card.lv5 .dy-tree-imgwrap::after { inset: -14%;
  background: radial-gradient(circle, rgba(255,222,100,.78), rgba(255,190,40,0) 66%); }

@keyframes dyGrow { 0%{transform:scale(1)} 20%{transform:scale(1.12) rotate(-2deg)} 40%{transform:scale(.96) rotate(2deg)}
  60%{transform:scale(1.06) rotate(-1deg)} 100%{transform:scale(1)} }
@keyframes dyBreath { 0%,100%{ opacity:.5; transform:scale(.95);} 50%{ opacity:1; transform:scale(1.06);} }

/* 「友情值 +1 ⬆️」浮字 */
.dy-float { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); pointer-events: none;
  font-size: 20px; font-weight: 800; background: linear-gradient(180deg,#8fe0a0,#4caf6a);
  -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0; z-index: 3; }
.dy-float.play { animation: dyFloat 1.5s ease forwards; }
@keyframes dyFloat { 0%{opacity:0; transform:translateX(-50%) translateY(6px)} 15%{opacity:1}
  100%{opacity:0; transform:translateX(-50%) translateY(-46px)} }

/* 進度條 */
.dy-prog { height: 16px; background: #e3efd8; border-radius: 999px; overflow: hidden; margin: 8px 6px 4px; }
.dy-prog-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg,#8fd39a,#4caf6a);
  transition: width .8s cubic-bezier(.22,.61,.36,1); }
.dy-prog-txt { font-size: 13px; color: #6b8a5f; }

/* 優惠券果實（Lv4/5 掛在樹上，點了去團購） */
.dy-fruit { position: absolute; width: 40px; height: 40px; cursor: pointer; animation: dySwing 3s ease-in-out infinite; z-index: 2; }
.dy-fruit:active { transform: scale(1.15); }
@keyframes dySwing { 0%,100%{transform:rotate(-6deg)} 50%{transform:rotate(6deg)} }

/* 🍎 美食成長裝飾果實：純裝飾、不可點、不可採；z-index 在導購優惠券果實(z2)之下，不搶其點擊 */
.dy-growfruit { position: absolute; width: 34px; height: 34px; object-fit: contain; z-index: 1;
  pointer-events: auto; cursor: default; filter: drop-shadow(0 2px 2px rgba(0,0,0,.12));
  animation: dyGrowFruitIn .5s ease; }
@keyframes dyGrowFruitIn { 0%{ opacity: 0; transform: scale(.6);} 100%{ opacity: 1; transform: scale(1);} }

/* 分類選擇小面板（拍完照跳出；選一個或略過，永不擋上傳） */
.dy-tagpick { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.42); padding: 20px; animation: dyFrBg .2s ease; }
.dy-tagpick-card { background: #fff; border-radius: 18px; padding: 18px 16px 14px; width: min(92vw, 360px);
  box-shadow: 0 12px 40px rgba(0,0,0,.25); text-align: center; }
.dy-tagpick-title { font-size: 16px; font-weight: 700; color: #4a5c42; margin-bottom: 12px; }
.dy-tagpick-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dy-tagpick-chip { border: 1.5px solid #dfe7d6; background: #f6faf2; color: #3d5940; font-size: 15px; font-weight: 600;
  border-radius: 12px; padding: 9px 12px; cursor: pointer; flex: 0 0 auto; }
.dy-tagpick-chip:active { transform: scale(.96); background: #e8f2df; }
.dy-tagpick-skip { margin-top: 12px; border: none; background: none; color: #9a8f83; font-size: 13px; cursor: pointer; text-decoration: underline; }

/* Streak 連續天數 */
.dy-streak { display: inline-flex; align-items: center; gap: 6px; background: #fff3e0; color: #d08427;
  border: 1.5px solid #f3d9ae; border-radius: 999px; padding: 5px 14px; font-weight: 800; font-size: 16px; margin-top: 8px; }
.dy-photoleft { margin-top: 8px; font-size: 15px; color: #5c8a52; }
.dy-photoleft b { font-size: 18px; color: #2f7d3f; }
.dy-pl-hint { font-size: 13px; color: #b0916a; }

/* ---------- Phase 2：季節裝飾 / 每日採果 / 里程徽章 ---------- */
.dy-deco { position: absolute; top: 2%; left: 50%; transform: translateX(-50%); width: 92%; max-height: 42%; object-fit: contain; pointer-events: none; z-index: 2; }
/* 🌳 進化掛飾層：填滿與樹圖同一框、object-fit contain → 掛飾對齊整棵樹（滿版設計）。淡入更柔和、不擋點擊 */
.dy-evolve { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .6s ease-out; }
.dy-evolve[src] { opacity: .68; }   /* 🌳 進化掛飾降透明度＝裝飾退為襯托、讓生命樹本體(主角)清楚凸顯，不再被吊墜/彩旗蓋住 */
/* 🐾 本月作客小紀錄 */
.dy-visitlog { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 6px auto 2px; font-size: 12px; color: #7a6a52; }
.dy-visitlog .dvl-t { font-weight: 700; }
.dy-visitlog .dvl-row { display: inline-flex; gap: 2px; }
.dy-visitlog .dvl-row img { width: 22px; height: 22px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(60,50,30,.15)); }

.dy-harvest-btn { margin-top: 10px; font-size: clamp(12.5px, 3.7vw, 16px); white-space: nowrap; padding-left: 12px; padding-right: 12px; animation: dyHarvestPulse 1.8s ease-in-out infinite; }
@keyframes dyHarvestPulse { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.04);} }
.dy-harvest.done { margin-top: 10px; font-size: 15px; color: #9a8f83; display: flex; align-items: center; justify-content: center; gap: 6px; }
.dy-harvest.done img { width: 28px; height: 28px; object-fit: contain; }

.dy-badges { background: #fffdf8; border: 2px solid #efe6d6; border-radius: 16px; margin-top: 12px; padding: 10px 12px; text-align: center; }
.dy-badges-h { font-weight: 800; color: #6b5b47; font-size: 15px; margin-bottom: 8px; }
.dy-badges-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.dy-badge { display: flex; flex-direction: column; align-items: center; width: 72px; }
.dy-badge img { width: 60px; height: 60px; object-fit: contain; }
.dy-badge span { font-size: 13px; font-weight: 800; color: #b5811f; margin-top: 2px; }
.dy-badge.shine img { animation: dyBadgeShine 2s ease-in-out infinite; }
@keyframes dyBadgeShine { 0%,100%{ filter: drop-shadow(0 0 3px rgba(255,205,80,.5));} 50%{ filter: drop-shadow(0 0 12px rgba(255,205,80,.95));} }

/* ---------- 動態牆 ---------- */
.dy-feed-card { background: #fffdf8; border: 2px solid #efe6d6; border-radius: 20px; margin-top: 12px; overflow: hidden; position: relative; }
/* 「有新的話，去看看」浮動鈕：正在看舊留言、對方傳新訊息時出現，不強拉畫面 */
.dy-newmsg-fab { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 6;
  background: #2f6b3c; color: #fff; border: none; border-radius: 20px; padding: 7px 16px;
  font-size: 13.5px; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,.2); cursor: pointer;
  animation: dyFabIn .25s ease; }
.dy-newmsg-fab:active { transform: translateX(-50%) scale(.96); }
@keyframes dyFabIn { 0%{ opacity: 0; transform: translateX(-50%) translateY(8px);} 100%{ opacity: 1; transform: translateX(-50%);} }
/* 進入時定位到第一則未讀的柔和亮框（約 1.6 秒淡出） */
.dy-newflash { animation: dyNewFlash 1.6s ease; border-radius: 12px; }
@keyframes dyNewFlash { 0%,100%{ box-shadow: 0 0 0 0 rgba(255,190,90,0);} 30%{ box-shadow: 0 0 0 3px rgba(255,190,90,.6);} }

/* ---------- 🍃 P5 畫面反應：說話泡泡淡入、葉片輕晃、暖色光點、樹冠柔光 ---------- */
/* 說話泡泡淡入 */
.dy-tree-voice.dy-voice-in { animation: dyVoiceIn .5s ease; }
@keyframes dyVoiceIn { 0%{ opacity: 0; transform: translateY(4px);} 100%{ opacity: 1; transform: none;} }
/* 葉片輕晃兩下（幅度極小、溫柔，非劇烈震動）；!important 確保神樹呼吸中也能晃 */
.dy-tree-card .dy-tree-imgwrap.dy-sway { animation: dySway 1s ease-in-out !important; }
@keyframes dySway { 0%,100%{ transform: rotate(0);} 25%{ transform: rotate(-2.4deg);} 50%{ transform: rotate(0);} 75%{ transform: rotate(2.4deg);} }
/* 暖色光點：從樹冠往上（留言區方向）慢慢飄並淡出 */
.dy-tree-card { position: relative; }
.dy-lightpoint { position: absolute; top: 18px; left: 50%; width: 9px; height: 9px; border-radius: 50%; z-index: 4;
  background: radial-gradient(circle, #ffe0a3, #ff9d3c); box-shadow: 0 0 8px 2px rgba(255,170,80,.7);
  pointer-events: none; animation: dyLightFloat 1.7s ease-in forwards; }
@keyframes dyLightFloat {
  0%{ opacity: 0; transform: translate(-50%, 0) scale(.6);}
  18%{ opacity: 1;}
  100%{ opacity: 0; transform: translate(-50%, -120px) scale(1);} }
/* 樹冠柔和暖光：未讀時亮起，讀完 class 移除→透過 transition 自然淡出 */
.dy-tree-card::after { content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 64px; height: 64px; border-radius: 50%; pointer-events: none; z-index: 3;
  background: radial-gradient(circle, rgba(255,180,90,.55), rgba(255,180,90,0) 70%);
  opacity: 0; transition: opacity 1.2s ease; }
.dy-tree-card.dy-has-glow::after { opacity: 1; animation: dyGlowBreath 2.6s ease-in-out infinite; }
@keyframes dyGlowBreath { 0%,100%{ opacity: .5;} 50%{ opacity: .95;} }

/* ───────── 🌳 生命樹 Layer 2：時段光線 + 偶發粒子 ───────── */
.dy-tree-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  z-index: 0; opacity: .55; transition: background 1.4s ease, opacity 1.4s ease; }
.dy-tree-card.tod-morning::before { background: radial-gradient(120% 78% at 72% 6%, rgba(255,239,196,.6), rgba(255,255,255,0) 60%); }
.dy-tree-card.tod-day::before     { background: radial-gradient(120% 80% at 50% 0%, rgba(255,250,222,.42), rgba(255,255,255,0) 55%); }
.dy-tree-card.tod-evening::before { background: radial-gradient(120% 92% at 28% 14%, rgba(255,186,132,.52), rgba(255,214,170,0) 62%); }
.dy-tree-card.tod-night::before   { background: radial-gradient(135% 100% at 50% 0%, rgba(116,136,206,.34), rgba(80,92,158,0) 60%); }
/* 粒子（葉子上飄／蝴蝶／螢火蟲／小鳥）——都在 prefers-reduced-motion 下隱藏 */
.dy-amb { position: absolute; top: 76%; font-size: 16px; z-index: 2; pointer-events: none; will-change: transform, opacity; }
.dy-leaf { animation: dyAmbLeaf linear forwards; }
@keyframes dyAmbLeaf { 0%{ opacity: 0; transform: translate(0,0) rotate(0);} 12%{ opacity: .9;} 100%{ opacity: 0; transform: translate(var(--dx,0), -165px) rotate(220deg);} }
.dy-butterfly { animation: dyAmbFly ease-in-out forwards; }
@keyframes dyAmbFly { 0%{ opacity: 0; transform: translate(0,0);} 14%{ opacity: 1;} 50%{ transform: translate(calc(var(--dx,0) * 2), -92px);} 100%{ opacity: 0; transform: translate(var(--dx,0), -172px);} }
.dy-firefly { width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle,#fff3b0,#ffd85a);
  box-shadow: 0 0 8px 2px rgba(255,220,120,.85); animation: dyAmbFire ease-in-out forwards; }
@keyframes dyAmbFire { 0%{ opacity: 0; transform: translate(0,0);} 20%{ opacity: 1;} 80%{ opacity: .9;} 100%{ opacity: 0; transform: translate(var(--dx,0), -120px);} }
.dy-bird { left: -8%; font-size: 15px; animation: dyAmbBird linear forwards; }
@keyframes dyAmbBird { 0%{ opacity: 0; left: -8%; transform: translateY(0);} 12%{ opacity: .9;} 50%{ transform: translateY(-16px);} 100%{ opacity: 0; left: 98%; transform: translateY(-6px);} }
@media (prefers-reduced-motion: reduce) { .dy-amb { display: none !important; } }
.dy-feed-head { padding: 10px 14px; font-weight: 800; color: #6b5b47; border-bottom: 1px solid #f0e8da; }
.dy-feed { max-height: 340px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.dy-empty { text-align: center; color: #b0a595; padding: 18px; font-size: 15px; }

/* 對話氣泡 */
.dy-row { display: flex; }
.dy-row.me { justify-content: flex-end; }
.dy-bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 17px; line-height: 1.45;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); word-break: break-word; }
.dy-row.me  .dy-bubble { background: #d8f0d0; color: #34502c; border-bottom-right-radius: 5px; }
.dy-row.you .dy-bubble { background: #eef1f4; color: #3a4048; border-bottom-left-radius: 5px; }
.dy-name { font-size: 12px; color: #a99e8f; margin: 0 4px 3px; }

/* 回覆功能：引言、回覆鈕、輸入列上方回覆條 */
.dy-row { flex-wrap: wrap; align-items: flex-end; }
.dy-name { flex-basis: 100%; }
.dy-quote { flex-basis: 100%; font-size: 12.5px; color: #8a7f70; background: rgba(0,0,0,.05);
  border-left: 3px solid #cbb98f; border-radius: 6px; padding: 3px 8px; margin: 0 0 3px; cursor: pointer;
  max-width: 78%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dy-row.me .dy-quote { margin-left: auto; }
.dy-reply-btn { align-self: center; background: none; border: none; color: #b0a48f; font-size: 16px; cursor: pointer; padding: 2px 6px; opacity: .6; }
.dy-reply-btn:hover { opacity: 1; }
.dy-row.me .dy-reply-btn { order: -1; }
.dy-flash .dy-bubble, .dy-flash .dy-polaroid { animation: dyFlash 1.2s ease; }
@keyframes dyFlash { 0%,100% { box-shadow: 0 1px 3px rgba(0,0,0,.08); } 30% { box-shadow: 0 0 0 3px #f2c14e; } }
.dy-replybar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: #fbf3e0; border-top: 1px solid #f0e8da; font-size: 13px; color: #8a6d3b; }
.dy-rb-txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dy-rb-x { background: none; border: none; font-size: 18px; color: #b0975f; cursor: pointer; line-height: 1; }
.dy-time { font-size: 11px; color: #b7ac9d; margin-top: 3px; text-align: right; }

/* 拍立得事件卡 */
.dy-polaroid { background: #fff; border: 1px solid #ece3d3; border-radius: 10px; padding: 6px 6px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.1); max-width: 150px; cursor: pointer; }
.dy-polaroid img { width: 100%; border-radius: 6px; display: block; background: #f3efe7; aspect-ratio: 1/1; object-fit: cover; }
.dy-polaroid .dy-cap { font-size: 13px; color: #8a7f70; text-align: center; margin-top: 6px; }
.dy-polaroid.dy-expired { display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 96px; background: #f5f1e9; color: #b0a595; font-size: 22px; text-align: center; cursor: default; }
.dy-polaroid.dy-expired div { font-size: 13px; margin-top: 2px; }
.dy-polaroid.dy-expired span { font-size: 11px; color: #c2b8a8; }

/* 🌳 聊天泡泡跟隨生命樹等級/樹皮進化（v0.60.217・純 CSS、免圖、逐階升級） */
.dy-feed-card[class*="dybt-"] .dy-bubble { position: relative; transition: background .4s, box-shadow .4s, border-color .4s; }
/* Lv2 小幼苗 */
.dybt-lv2 .dy-row.you .dy-bubble { background:#eef7e4; }
.dybt-lv2 .dy-row.me  .dy-bubble { background:#dcf0cf; }
.dybt-lv2 .dy-row.you .dy-bubble::after { content:"🌿"; position:absolute; right:-3px; bottom:-7px; font-size:13px; }
/* Lv3 繁茂小樹 */
.dybt-lv3 .dy-row.you .dy-bubble { background:#e7f4dc; box-shadow:0 2px 7px rgba(80,140,60,.16); }
.dybt-lv3 .dy-row.me  .dy-bubble { background:#cdeab8; }
.dybt-lv3 .dy-row.you .dy-bubble::after { content:"🍃"; position:absolute; right:-3px; bottom:-7px; font-size:13px; }
/* Lv4 開花結果 */
.dybt-lv4 .dy-row.you .dy-bubble { background:#fdeef0; box-shadow:0 2px 9px rgba(200,120,120,.18); }
.dybt-lv4 .dy-row.me  .dy-bubble { background:#ffe0d4; color:#7a4a3a; }
.dybt-lv4 .dy-row.you .dy-bubble::after { content:"🌸"; position:absolute; right:-3px; bottom:-7px; font-size:13px; }
/* Lv5 神樹（金光呼吸） */
.dybt-lv5 .dy-row.you .dy-bubble { background:linear-gradient(#fffbe9,#fff3c9); box-shadow:0 0 0 2px rgba(255,220,120,.4),0 3px 12px rgba(220,180,60,.3); animation:dybtBreathe 3.4s ease-in-out infinite; }
.dybt-lv5 .dy-row.me  .dy-bubble { background:linear-gradient(#fff3c9,#ffe6a0); color:#6a5320; }
.dybt-lv5 .dy-row.you .dy-bubble::after { content:"✨"; position:absolute; right:-3px; bottom:-7px; font-size:13px; }
/* 💰 金錢樹 */
.dybt-money .dy-row.you .dy-bubble { background:linear-gradient(#fff7d6,#f6cf5a); color:#6a4e12; box-shadow:0 0 0 2px rgba(240,200,90,.5),0 3px 12px rgba(200,150,30,.35); animation:dybtBreathe 3s ease-in-out infinite; }
.dybt-money .dy-row.me  .dy-bubble { background:linear-gradient(#ffe9a0,#f6cf5a); color:#6a4e12; }
.dybt-money .dy-row.you .dy-bubble::after { content:"💰"; position:absolute; right:-3px; bottom:-7px; font-size:13px; }
/* 🌈 彩虹樹（彩虹描邊流光） */
.dybt-rainbow .dy-row.you .dy-bubble { background:#fff; border:2px solid transparent; background-image:linear-gradient(#fff,#fff),linear-gradient(120deg,#ff9db0,#ffd36a,#8fe08a,#8fd3ff,#c9a7ff); background-origin:border-box; background-clip:padding-box,border-box; box-shadow:0 3px 12px rgba(160,90,200,.28); }
.dybt-rainbow .dy-row.me  .dy-bubble { background:#fff; border:2px solid transparent; background-image:linear-gradient(#eafff0,#eafff0),linear-gradient(120deg,#8fe08a,#8fd3ff,#c9a7ff); background-origin:border-box; background-clip:padding-box,border-box; color:#3a5a3a; }
.dybt-rainbow .dy-row.you .dy-bubble::after { content:"🌈"; position:absolute; right:-3px; bottom:-7px; font-size:13px; }
/* 🌌 星空樹（深色泡泡＋星點） */
.dybt-galaxy .dy-row.you .dy-bubble { background:#2a2f5e; color:#f0eefb; box-shadow:0 0 0 2px rgba(150,130,255,.4),0 3px 14px rgba(40,20,80,.5); background-image:radial-gradient(1.5px 1.5px at 22% 32%,#fff,transparent),radial-gradient(1.5px 1.5px at 72% 62%,#cfe0ff,transparent); }
.dybt-galaxy .dy-row.me  .dy-bubble { background:#3a3570; color:#eafaee; }
.dybt-galaxy .dy-row.you .dy-bubble::after { content:"🌟"; position:absolute; right:-3px; bottom:-7px; font-size:13px; }
.dybt-galaxy .dy-name { color:#a99ecf; }
@keyframes dybtBreathe { 0%,100%{ transform:translateY(0);} 50%{ transform:translateY(-2px);} }
@media (prefers-reduced-motion:reduce){ .dy-feed-card[class*="dybt-"] .dy-bubble{ animation:none!important; } }

/* 🌤️ 聊天卡跟隨遊戲時段＋天氣（v0.60.218・純 CSS、免圖）
   時段＝房間光線（換卡片底色）；泡泡材質仍由 dybt-* 決定，夜晚只微調 Lv1 基礎泡泡，不壓過樹皮階級 */
.dy-feed-card.tod-morning { background:#fffef6; }
.dy-feed-card.tod-day     { background:#fffdf8; }
.dy-feed-card.tod-evening { background:#fff4e9; }
.dy-feed-card.tod-night   { background:#edeff7; }
.dy-feed-card.tod-evening .dy-feed-head { background:linear-gradient(#ffe9d4,#ffdcc0); }
.dy-feed-card.tod-night   .dy-feed-head { background:linear-gradient(#dfe3f2,#ccd2ea); color:#2f3550; }
/* 夜晚：只調整還沒進化(Lv1)的基礎泡泡，讓深底也好讀；Lv2+ 樹皮階級維持自己的配色 */
.dy-feed-card.dybt-lv1.tod-night .dy-row.you .dy-bubble { background:#e3e6f2; color:#303654; }
.dy-feed-card.dybt-lv1.tod-night .dy-row.me  .dy-bubble { background:#cfe0cf; color:#2b3f2b; }
.dy-feed-card.dybt-lv1.tod-evening .dy-row.you .dy-bubble { background:#fbeadf; }
/* 天氣：雨/雪用「背景層」呈現，永遠畫在泡泡文字後面，不影響點擊/閱讀 */
.dy-feed-card.dyw-rain { background-image:repeating-linear-gradient(102deg, rgba(120,150,200,.10) 0 1.5px, transparent 1.5px 11px); background-size:100% 220px; animation:dywRain 1.1s linear infinite; }
.dy-feed-card.dyw-snow { background-image:radial-gradient(2px 2px at 20% 10%,rgba(255,255,255,.9),transparent),radial-gradient(2px 2px at 60% 30%,rgba(255,255,255,.8),transparent),radial-gradient(2px 2px at 85% 55%,rgba(255,255,255,.85),transparent); background-size:100% 240px; animation:dywSnow 6s linear infinite; }
.dy-feed-card.dyw-snow.tod-night { background-color:#e6e9f4; }
@keyframes dywRain { from{ background-position:0 0; } to{ background-position:-40px 220px; } }
@keyframes dywSnow { from{ background-position:0 0; } to{ background-position:20px 240px; } }
@media (prefers-reduced-motion:reduce){ .dy-feed-card.dyw-rain, .dy-feed-card.dyw-snow{ animation:none!important; } }

/* 🐾 樹下小夥伴＋永久裝飾（v0.60.219・前端自動常駐＋每日隨機・免圖層阻擋互動） */
.dy-mates { position:absolute; inset:0; pointer-events:none; z-index:3; }
.dy-mate { position:absolute; object-fit:contain; filter:drop-shadow(0 3px 4px rgba(60,50,30,.18));
  opacity:0; transition:opacity .55s ease-out; }               /* 🌙 柔和淡入：預設透明，JS 加 .dm-in 才浮現（只動 opacity，不干擾 transform 待機動畫） */
.dy-mate.dm-in { opacity:1; }
.dy-mate.dm-pet { bottom:-2%; width:32%; max-width:130px; transform-origin:50% 100%; pointer-events:auto; cursor:pointer;
  animation:dyMateBob 4.5s ease-in-out infinite; transition:filter .15s, opacity .55s ease-out; }
/* 🌳 依生命樹等級縮放小夥伴/裝飾（zoom 縮整個框、不動 transform → 與待機動畫並存）：小嫩芽最小、越長越大 */
#dyMates[data-lv="1"] .dy-mate { zoom:.66; }
#dyMates[data-lv="2"] .dy-mate { zoom:.8; }
#dyMates[data-lv="3"] .dy-mate { zoom:.92; }
.dy-mate.dm-pet:hover { filter:drop-shadow(0 4px 8px rgba(60,50,30,.3)) brightness(1.04); }
.dy-mate.dm-pet:active { transform:scale(.94); }
.dy-mate.dm-left  { left:-3%; }
.dy-mate.dm-right { right:-3%; width:29%; animation-delay:1.6s; }
.dy-mate.dm-mid   { left:37%; width:26%; animation-delay:.8s; }   /* 🐾 第三個座位（後台把小夥伴上限調到 3 時） */
/* 各型專屬待機動畫（呼吸/跳/飛/張望），讓每隻都活著、不再只是站著 */
.dm-rabbit    { animation:dyHop 3.6s ease-in-out infinite !important; }
.dm-bird      { animation:dyFlutter 2.6s ease-in-out infinite !important; }
.dm-squirrel  { animation:dyPeek 4.2s ease-in-out infinite !important; }
.dm-butterfly { animation:dyFloat 5s ease-in-out infinite !important; }
.dm-cat       { animation:dySwayBody 4s ease-in-out infinite !important; }
.dm-hedgehog  { animation:dyBreathe 3.4s ease-in-out infinite !important; }
.dm-deer      { animation:dyLook 5.5s ease-in-out infinite !important; }
.dm-turtle    { animation:dyBreathe 4.6s ease-in-out infinite !important; }
/* 擴充角色專屬待機動畫（沿用既有 keyframes：hop跳/flutter拍翅/peek張望/float繞飛/breathe呼吸/bob浮動） */
.dm-fox{ animation:dyPeek 4s ease-in-out infinite !important; }
.dm-bear{ animation:dyBreathe 4.4s ease-in-out infinite !important; }
.dm-raccoon{ animation:dyPeek 3.8s ease-in-out infinite !important; }
.dm-owl{ animation:dyBreathe 3.2s ease-in-out infinite !important; }
.dm-hedgehog2{ animation:dyBreathe 3.6s ease-in-out infinite !important; }
.dm-chipmunk{ animation:dyHop 3.2s ease-in-out infinite !important; }
.dm-frog{ animation:dyHop 2.8s ease-in-out infinite !important; }
.dm-chick{ animation:dyFlutter 2.4s ease-in-out infinite !important; }
.dm-snail{ animation:dyBreathe 5.6s ease-in-out infinite !important; }
.dm-ladybug{ animation:dyFloat 5s ease-in-out infinite !important; }
.dm-cow{ animation:dyBreathe 4.8s ease-in-out infinite !important; }
.dm-monkey{ animation:dyHop 3s ease-in-out infinite !important; }
.dm-npc-gardener{ animation:dyMateBob 4s ease-in-out infinite !important; }
.dm-npc-sprite{ animation:dyFloat 4.5s ease-in-out infinite !important; }
.dm-npc-mailduck{ animation:dyFlutter 2.8s ease-in-out infinite !important; }
.dm-npc-jambear{ animation:dyBreathe 4.8s ease-in-out infinite !important; }
@media (prefers-reduced-motion:reduce){ .dm-fox,.dm-bear,.dm-raccoon,.dm-owl,.dm-hedgehog2,.dm-chipmunk,.dm-frog,.dm-chick,.dm-snail,.dm-ladybug,.dm-cow,.dm-monkey,.dm-npc-gardener,.dm-npc-sprite,.dm-npc-mailduck,.dm-npc-jambear{ animation:none !important; } }
@keyframes dyMateBob { 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-4px); } }
@keyframes dyHop { 0%,72%,100%{ transform:translateY(0); } 80%{ transform:translateY(-11px) scaleY(1.05); } 90%{ transform:translateY(0) scaleY(.94); } }
@keyframes dyFlutter { 0%,100%{ transform:translateY(0) rotate(-2deg); } 50%{ transform:translateY(-6px) rotate(2deg); } }
@keyframes dyPeek { 0%,100%{ transform:rotate(-3deg) translateX(0); } 50%{ transform:rotate(4deg) translateX(3px); } }
@keyframes dyFloat { 0%,100%{ transform:translate(0,0) rotate(-3deg); } 33%{ transform:translate(6px,-8px) rotate(3deg); } 66%{ transform:translate(-4px,-4px) rotate(-2deg); } }
@keyframes dySwayBody { 0%,100%{ transform:rotate(-2.5deg); } 50%{ transform:rotate(2.5deg); } }
@keyframes dyBreathe { 0%,100%{ transform:scale(1) translateY(0); } 50%{ transform:scale(1.045) translateY(-1px); } }
@keyframes dyLook { 0%,40%,100%{ transform:translateX(0) rotate(0); } 55%{ transform:translateX(4px) rotate(2deg); } 70%{ transform:translateX(-3px) rotate(-1.5deg); } }
/* 點擊反饋：彈一下 */
/* 後台行為規則：關掉可點擊／動畫 */
.dy-mate.dm-pet.dm-noclick { pointer-events:none !important; cursor:default !important; }
.dy-mate.dm-pet.dm-noanim { animation:none !important; }
.dy-mate.dm-pet.mate-react { animation:dyMateReact .5s ease !important; }
@keyframes dyMateReact { 0%{ transform:scale(1) translateY(0); } 30%{ transform:scale(1.14) translateY(-10px); } 55%{ transform:scale(.92) translateY(0); } 100%{ transform:scale(1); } }
/* 待機小事件：偶爾一隻興奮動一下 */
.dy-mate.dm-pet.mate-act { animation:dyMateAct 1.5s ease !important; }
@keyframes dyMateAct { 0%,100%{ transform:translateY(0) rotate(0); } 20%{ transform:translateY(-14px) rotate(-6deg); } 40%{ transform:translateY(0) rotate(5deg); } 60%{ transform:translateY(-8px) rotate(-3deg); } 80%{ transform:translateY(0) rotate(2deg); } }
.dm-butterfly.mate-act { animation:dyBflyLoop 1.6s ease-in-out !important; }
@keyframes dyBflyLoop { 0%{ transform:translate(0,0); } 25%{ transform:translate(20px,-26px) rotate(15deg); } 50%{ transform:translate(0,-36px) rotate(-10deg); } 75%{ transform:translate(-18px,-20px) rotate(8deg); } 100%{ transform:translate(0,0); } }
/* 小夥伴講話泡泡 */
.dy-mate-say { position:absolute; bottom:27%; max-width:76%; background:#fff; color:#4a3a22;
  border:1.5px solid #b9d6a0; border-radius:12px; padding:5px 11px; font-size:12.5px; font-weight:800; line-height:1.4;
  box-shadow:0 3px 10px rgba(60,50,30,.28); z-index:9; pointer-events:none; white-space:normal; word-break:break-word;
  animation:dySayIn .18s ease both; }
.dy-mate-say.out { animation:dySayOut .4s ease forwards; }
@keyframes dySayIn { from{ opacity:0; transform:translateY(6px) scale(.9); } to{ opacity:1; transform:none; } }
@keyframes dySayOut { to{ opacity:0; transform:translateY(-8px) scale(.96); } }
/* 裝飾互動 */
.dy-mate.dm-lights { top:0; left:0; width:100%; height:auto; filter:drop-shadow(0 2px 5px rgba(240,190,90,.4)); animation:dyLightsGlow 3.2s ease-in-out infinite; }
@keyframes dyLightsGlow { 0%,100%{ filter:drop-shadow(0 2px 5px rgba(240,190,90,.35)); } 50%{ filter:drop-shadow(0 2px 10px rgba(255,205,90,.85)); } }
.dy-mate.dm-chime  { top:12%; right:5%; width:18%; max-width:72px; transform-origin:top center; animation:dyMateSway 3.8s ease-in-out infinite; }
.dy-mate.dm-chime.chime-ring { animation:dyChimeRing .8s ease; }
@keyframes dyChimeRing { 0%,100%{ transform:rotate(0); } 15%{ transform:rotate(-11deg); } 35%{ transform:rotate(9deg); } 55%{ transform:rotate(-6deg); } 75%{ transform:rotate(3deg); } }
/* 鳥巢：從角落飄浮改成掛在樹冠上（往內＋往下，壓在綠葉上更連貫） */
.dy-mate.dm-nest   { top:25%; left:11%; width:21%; max-width:86px; }
/* 擴充裝飾（每天只顯示 1 件，共用位置不會疊）：hang＝掛在樹冠、ground＝放在樹下 */
.dy-mate.dm-hang   { top:8%; left:10%; width:30%; max-width:120px; transform-origin:top center; animation:dyMateSway 4.2s ease-in-out infinite; }
.dy-mate.dm-ground { top:46%; left:4%; width:19%; max-width:76px; }
.dy-nest-peek { position:absolute; top:15%; left:6%; font-size:18px; z-index:4; pointer-events:none; animation:dyPeekIn .2s ease both; }
.dy-nest-peek.out { animation:dySayOut .4s ease forwards; }
@keyframes dyPeekIn { from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }
@keyframes dyMateSway { 0%,100%{ transform:rotate(-4deg); } 50%{ transform:rotate(4deg); } }
@media (prefers-reduced-motion:reduce){ .dy-mate,.dy-mate.dm-pet,.dm-rabbit,.dm-bird,.dm-squirrel,.dm-butterfly,.dm-cat,.dm-hedgehog,.dm-deer,.dm-turtle{ animation:none!important; } }

/* 🏅 連續里程徽章「改變聊天室」（v0.60.219）：30天鑲邊、100天多葉子、365天偶爾掉星星
   ─ 都疊在既有 dybt-*(泡泡材質)／tod-*(時段)／dyw-*(天氣) 之上，用 outline/::before/card::after，不搶既有屬性 */
/* 7天入門款：泡泡尾巴一點點暖光（用 filter，獨立於 tier 的 box-shadow／高階的 outline，不打架） */
.dy-feed-card.dymb-7 .dy-bubble { filter:drop-shadow(0 1px 3px rgba(255,178,84,.45)); }
.dy-feed-card.dymb-30  .dy-bubble { outline:2px solid rgba(198,138,90,.7);  outline-offset:2px; }
.dy-feed-card.dymb-100 .dy-bubble { outline:2px solid rgba(229,185,78,.85); outline-offset:2px; }
.dy-feed-card.dymb-365 .dy-bubble { outline:2px solid rgba(240,196,80,1);   outline-offset:2px; box-shadow:0 0 0 1px rgba(255,230,150,.5),0 2px 8px rgba(220,170,50,.25); }
/* 100天＋：對方泡泡左上角悄悄長出小葉子（用 ::before，不與 tier 的 ::after 角標衝突） */
.dy-feed-card.dymb-100 .dy-row.you .dy-bubble::before,
.dy-feed-card.dymb-365 .dy-row.you .dy-bubble::before { content:"🍃"; position:absolute; left:-6px; top:-9px; font-size:13px; transform:rotate(-12deg); }
/* 365天：聊天室偶爾飄落一顆星星（card::after 目前未用；overflow:hidden 已裁在卡內） */
.dy-feed-card.dymb-365::after { content:"⭐"; position:absolute; top:-18px; left:16%; font-size:15px; opacity:0; pointer-events:none; z-index:4; animation:dymbStarFall 9s ease-in infinite; }
@keyframes dymbStarFall { 0%{ transform:translateY(0) rotate(0); opacity:0; } 6%{ opacity:.9; } 26%{ transform:translateY(240px) rotate(40deg); opacity:0; } 100%{ opacity:0; } }
@media (prefers-reduced-motion:reduce){ .dy-feed-card.dymb-365::after{ animation:none!important; display:none; } }

/* 徽章列：點開看共同回憶 */
.dy-badges-tip { display:block; font-size:11.5px; font-weight:700; color:#c79a4a; margin-top:2px; }
button.dy-badge { border:0; background:transparent; cursor:pointer; font:inherit; padding:2px; border-radius:12px; transition:transform .1s; }
button.dy-badge:active { transform:scale(.92); }

/* 💌 共同回憶彈窗 */
.dy-mem-back { position:fixed; inset:0; z-index:9999; background:rgba(40,32,22,.5); backdrop-filter:blur(2px); display:flex; align-items:center; justify-content:center; padding:20px; animation:dyMemIn .18s ease; }
@keyframes dyMemIn { from{ opacity:0; } to{ opacity:1; } }
.dy-mem-card { position:relative; width:100%; max-width:360px; background:linear-gradient(180deg,#fffdf7,#fff4e2); border:2px solid #f0dcae; border-radius:20px; padding:18px 18px 16px; box-shadow:0 16px 40px rgba(60,40,15,.32); }
.dy-mem-x { position:absolute; top:10px; right:12px; width:30px; height:30px; border:0; border-radius:50%; background:#f3e6cc; color:#8a6a34; font-size:19px; line-height:1; cursor:pointer; }
.dy-mem-title { font-size:18px; font-weight:800; color:#7a5a1e; text-align:center; margin-bottom:12px; }
.dy-mem-body { display:flex; flex-direction:column; gap:10px; }
.dy-mem-row { display:flex; gap:11px; align-items:flex-start; background:#fff; border:1px solid #f0e4cc; border-radius:14px; padding:10px 12px; }
.dy-mem-row.dy-mem-next { background:linear-gradient(180deg,#fff8e8,#fff1d4); border-color:#f2d79a; }
.dy-mem-ic { font-size:20px; flex-shrink:0; line-height:1.3; }
.dy-mem-row b { display:block; font-size:14.5px; color:#5a4a30; }
.dy-mem-row i { display:block; font-style:normal; font-size:12.5px; color:#9a8a6c; margin-top:2px; line-height:1.5; }
.dy-mem-foot { text-align:center; font-size:12px; color:#b09a6a; margin-top:12px; }

/* 系統公告（升級慶賀） */
.dy-sys { align-self: center; background: linear-gradient(180deg,#fff4d6,#ffe6a8); color: #a5701a;
  border: 1.5px solid #f0cf85; border-radius: 14px; padding: 10px 14px; font-size: 15px; font-weight: 700;
  text-align: center; max-width: 92%; }
.dy-sys.pop { animation: dyPop .5s ease; }
@keyframes dyPop { 0%{transform:scale(.8); opacity:0} 60%{transform:scale(1.05)} 100%{transform:scale(1); opacity:1} }

/* ---------- 撰寫列 ---------- */
.dy-composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #f0e8da; background: #fffdf8; align-items: flex-end; }
.dy-ta { flex: 1; resize: none; border: 2px solid #e6d6bd; border-radius: 14px; padding: 10px 12px; font-size: 17px;
  font-family: inherit; max-height: 96px; }
.dy-icon-btn { flex: 0 0 auto; width: 48px; height: 48px; border: none; border-radius: 14px; font-size: 22px; cursor: pointer; background: #efe6d6; }
.dy-icon-btn.cam { background: #e3f0dc; }
.dy-icon-btn.send { background: linear-gradient(180deg,#7cc08a,#57a86b); color: #fff; }
.dy-icon-btn:active { transform: scale(.94); }

/* 離線橫幅 */
.dy-offline-banner { background: linear-gradient(90deg,#ffe9c2,#ffd79a); color: #9a6a1c; font-weight: 700;
  border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; font-size: 15px; text-align: center; animation: dyPop .5s ease; }

/* 全畫面升級慶賀 */
.dy-levelup { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: rgba(40,30,15,.55); animation: dyFade .3s ease; padding: 20px; }
.dy-levelup-box { background: linear-gradient(180deg,#fffdf5,#fff2cf); border: 3px solid #f0cf85; border-radius: 24px;
  padding: 26px 22px; text-align: center; max-width: 340px; box-shadow: 0 10px 40px rgba(0,0,0,.3); animation: dyPop .5s ease; }
.dy-levelup-box img { width: 210px; height: 210px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(255,205,80,.6)); }
.dy-levelup-box h2 { margin: 8px 0 4px; color: #b5811f; font-size: 22px; }
.dy-levelup-box p { color: #8a7048; font-size: 16px; margin: 6px 0 16px; }
@keyframes dyFade { from{opacity:0} to{opacity:1} }

/* Lightbox 放大 */
.dy-lightbox { position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,.82); display: flex;
  align-items: center; justify-content: center; padding: 16px; animation: dyFade .2s ease; }
.dy-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.dy-lightbox .dy-close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 20px); right: 16px;
  width: 44px; height: 44px; line-height: 44px; text-align: center; color: #fff; font-size: 30px; cursor: pointer;
  border-radius: 50%; background: rgba(0,0,0,.4); box-shadow: 0 2px 8px rgba(0,0,0,.35); z-index: 1; }

/* ---------- Phase 3：共同里程目標 ---------- */
/* 🏡 小屋旅行入口（放在「共同目標」上方） */
.dy-homeentry { display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 12px; padding: 10px 14px;
  background: linear-gradient(135deg,#f3eeff,#ece2ff); border: 2px solid #d6c8f0; border-radius: 16px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(120,90,180,.14); text-align: left; }
.dy-homeentry:active { transform: scale(.99); }
.dy-homeentry img { width: 52px; height: 52px; object-fit: contain; flex: none; }
.dy-homeentry > span:nth-child(2) { flex: 1; min-width: 0; }
.dy-homeentry b { font-size: 15px; color: #7a5220; font-weight: 900; }
.dy-homeentry small { font-size: 12px; color: #a1876a; font-weight: 700; }
.dy-homeentry-go { flex: none; font-size: 22px; color: #cbb083; font-weight: 900; }
/* 🌱 菜園成熟徽章：作物熟了時冒在小屋入口左上角，提醒玩家有東西可收（不用先進小屋） */
.dy-homeentry { position: relative; }
.dy-homeentry-badge { position: absolute; top: -8px; left: -6px; z-index: 2; font-size: 15px; line-height: 24px;
  width: 26px; height: 26px; text-align: center; background: #fff; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(120,90,30,.28); animation: dyHomeBadgePop 1.6s ease-in-out infinite; }
.dy-homeentry-badge[hidden] { display: none; }
@keyframes dyHomeBadgePop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.dy-mile { background: linear-gradient(180deg,#fffbe9,#fff2d0); border: 2px solid #f2d98a;
  border-radius: 16px; padding: 14px 16px; margin: 12px 0; text-align: center; }
.dy-mile-h { font-size: 16px; font-weight: 800; color: #a9781f; margin-bottom: 6px; }
.dy-mile-txt { font-size: 14.5px; color: #6b5a2e; line-height: 1.7; }
.dy-mile-sub { font-size: 12.5px; color: #9c8a5e; margin-top: 6px; }
.dy-mile-bar { height: 14px; background: #f0e3bd; border-radius: 999px; overflow: hidden; margin: 10px 4px 2px; }
.dy-mile-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg,#ffcf5c,#ff9e3d);
  transition: width .8s cubic-bezier(.22,.61,.36,1); }
/* 可領取時：金色呼吸強調 */
.dy-mile.claim { border-color: #ffb52e; box-shadow: 0 0 0 0 rgba(255,181,46,.6); animation: dyMileGlow 1.6s ease-in-out infinite; }
.dy-mile-reward { font-size: 15px; font-weight: 800; color: #b9791a; margin: 4px 0 10px; }
@keyframes dyMileGlow { 0%,100%{ box-shadow: 0 0 0 0 rgba(255,181,46,.55);} 50%{ box-shadow: 0 0 0 8px rgba(255,181,46,0);} }

/* ---------- Phase 3：夥伴新動態橫幅 ---------- */
.dy-news { background: linear-gradient(180deg,#e9f7ec,#d8f0dd); border: 1.5px solid #b6dcbf;
  color: #2f6b3c; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; font-size: 14.5px; font-weight: 700;
  text-align: center; animation: dyNewsPop .3s ease; }
@keyframes dyNewsPop { 0%{ transform: translateY(-6px); opacity: 0;} 100%{ transform: none; opacity: 1;} }

/* ---------- Phase 3：底部分頁紅點（柔和呼吸；多則未讀顯示數字） ---------- */
[data-tab="tree"] { position: relative; }
.dy-nav-dot { position: absolute; top: 4px; right: calc(50% - 22px); width: 11px; height: 11px;
  background: #ff6b6b; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.06);
  animation: dyDotBreath 2.4s ease-in-out infinite; z-index: 3; }
/* 柔和呼吸：以透明度為主、極輕微縮放，不快閃 */
@keyframes dyDotBreath { 0%,100%{ opacity: 1; transform: scale(1);} 50%{ opacity: .55; transform: scale(1.12);} }
/* 有未讀數字時，變成小圓角標籤 */
.dy-nav-dot.has-num { width: auto; height: 16px; min-width: 16px; padding: 0 4px; border-radius: 9px;
  font-size: 10px; line-height: 16px; font-weight: 800; color: #fff; text-align: center; top: 2px; }
@keyframes dyDotPulse { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.25);} }  /* 保留舊名以免他處引用 */
/* 🌱 菜園成熟：底部「生命樹」分頁冒出樹苗（與紅點可並存；紅點在右、樹苗在左上） */
.dy-nav-garden { position: absolute; top: 2px; right: calc(50% + 8px); font-size: 13px; line-height: 1;
  z-index: 3; animation: dyDotBreath 2s ease-in-out infinite; pointer-events: none; }

/* 「共同飼養動態」標題旁的「有新留言」小標籤 */
.dy-feed-new { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 9px;
  background: #ffe3e3; color: #e0484a; font-size: 11.5px; font-weight: 800; vertical-align: middle;
  animation: dyTagBreath 2.4s ease-in-out infinite; }
@keyframes dyTagBreath { 0%,100%{ opacity: 1;} 50%{ opacity: .6;} }

/* ---------- 採果結果：真實果實圖＋掉落彈跳 ---------- */
.dy-fruit-reveal { position: fixed; inset: 0; z-index: 9997; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); padding: 20px; animation: dyFrBg .25s ease; }
.dy-fruit-reveal.out { animation: dyFrBgOut .24s ease forwards; }
@keyframes dyFrBg { from{ opacity: 0;} to{ opacity: 1;} }
@keyframes dyFrBgOut { from{ opacity: 1;} to{ opacity: 0;} }
.dy-fr-card { background: linear-gradient(180deg,#fffef8,#fff4e0); border: 2px solid #f0d9a0; border-radius: 22px;
  padding: 26px 24px 20px; width: min(84vw, 340px); text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.35);
  animation: dyFrPop .3s cubic-bezier(.2,.8,.3,1.3); }
.dy-fr-drop { height: 130px; display: flex; align-items: flex-end; justify-content: center; overflow: visible; }
.dy-fr-img { width: 120px; height: 120px; object-fit: contain; transform-origin: 50% 100%;
  animation: dyFrDrop .75s cubic-bezier(.34,1.56,.64,1) both; filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)); }
@keyframes dyFrDrop {
  0%   { transform: translateY(-160px) rotate(-14deg) scale(.9); opacity: 0; }
  55%  { transform: translateY(0) rotate(4deg) scale(1.05); opacity: 1; }
  70%  { transform: translateY(-22px) rotate(-3deg) scale(1); }
  85%  { transform: translateY(0) rotate(1deg) scale(1.02); }
  100% { transform: translateY(0) rotate(0) scale(1); }
}
@keyframes dyFrPop { from{ transform: scale(.85); opacity: 0;} to{ transform: scale(1); opacity: 1;} }
.dy-fr-label { font-size: 20px; font-weight: 900; color: #b9791a; margin-top: 8px; }
.dy-fr-sub { font-size: 14px; color: #8a7a55; margin: 6px 0 14px; line-height: 1.5; }

/* ============================================================
   生命樹・風吹輕搖（Idle wind sway）— 最小新增，僅此段
   只作用在 .dy-tree-img；用獨立的 rotate 屬性（不佔用 transform），
   因此不影響任何父層、神樹呼吸、留言搖擺、果實搖晃與成長動畫。
   支點沿用既有的 transform-origin:50% 100%（樹幹底）。
   五階（嫩芽→神樹）與所有外觀自動套用。純顯示層、不改 JS/HTML。
   ============================================================ */
.dy-tree-img { animation: treeWind 7s ease-in-out infinite; }
@keyframes treeWind {
  0%   { rotate: 0deg; }
  25%  { rotate: 1deg; }
  50%  { rotate: -0.7deg; }
  75%  { rotate: 0.5deg; }
  100% { rotate: 0deg; }
}
/* 尊重系統「減少動態」：僅停用本風搖，不影響其他動畫 */
@media (prefers-reduced-motion: reduce) {
  .dy-tree-img { animation: none; }
}

/* 🌳 生命樹介面調整 v0.60.266 */
/* 雙人對話框明顯區分：自己=綠、夥伴=淡藍（覆蓋各等級 dybt 主題色，避免兩邊都綠分不清） */
.dy-feed-card .dy-row.me .dy-bubble{background:#cdeab0!important;color:#34502c!important}
.dy-feed-card .dy-row.you .dy-bubble{background:#e7eefc!important;color:#37414f!important;border:1px solid #cdddf5!important}
.dy-feed-card .dy-row.you .dy-bubble::after{content:none!important}
/* 進化裝飾降透明，讓生命樹本體看得清楚（原本裝飾太多蓋住樹） */
.dy-evolve[src]{opacity:.62!important}
/* 進度文字/連續天數：加大、清楚 */
.dy-prog-txt{font-size:15px!important;line-height:1.6;margin-top:10px;text-align:center}
.dy-streak{font-size:15px!important}
/* 共同目標里程卡：加大不再看不到 */
.dy-mile-h{font-size:16px!important}
.dy-mile-txt{font-size:15px!important;line-height:1.75!important}
.dy-mile-sub{font-size:13.5px!important;margin-top:8px!important}
.dy-mile-reward{font-size:15px!important}
/* 本月來過客人：文字＋頭像加大 */
.dvl-t{font-size:14px!important;font-weight:800}
.dy-visitlog .dvl-row img,.dvl-row img{width:32px!important;height:32px!important}
