:root{
  --wood:#8b5625;--wood-dark:#5d3519;--parchment:#fff1c9;--gold:#f7b932;--green:#62bd38;--blue:#2d83bd;
  --safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);
  --shadow:0 5px 12px #33200f55;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;width:100%;height:100%;height:100dvh;height:100svh;overflow:hidden;overscroll-behavior:none;touch-action:manipulation;background:#87c95c;font-family:"Arial Rounded MT Bold","PingFang SC","Microsoft YaHei",Arial,sans-serif;color:#4f331c}
button,input{font:inherit}button{border:0;cursor:pointer}.is-hidden{display:none!important}
.app-root{position:fixed;inset:0;width:100%;height:100%;min-height:100svh;display:flex;align-items:stretch;justify-content:center;overflow:hidden;background:transparent}
.login-screen,.game-screen{position:fixed;left:0;top:0;width:390px;height:844px;overflow:hidden;transform-origin:0 0;-webkit-transform-origin:0 0;background:#87c95c}
.login-screen{background:linear-gradient(#60c3ed 0 34%,#8dce5b 34%);display:grid;place-items:center;padding-top:48px;box-sizing:border-box}
.login-screen:before{content:"";position:absolute;inset:0;background:url('assets/map/main_ranch.png') center top/cover;opacity:.42;filter:saturate(1.1)}
.login-lang-btn{position:absolute;z-index:6;top:max(10px,env(safe-area-inset-top,0px));right:12px;width:44px;height:44px;padding:0;border:3px solid #8d5828;border-radius:14px;background:linear-gradient(#fff6d8,#e8c078);box-shadow:0 4px 10px #0004,inset 0 2px #fff8;display:grid;place-items:center}
.login-lang-btn img{width:28px;height:28px;display:block;pointer-events:none}
.login-lang-btn:active{transform:scale(.96)}
html[dir="rtl"] .login-lang-btn{right:auto;left:12px}
.login-card{position:relative;width:330px;padding:56px 26px 22px;border-radius:30px;background:linear-gradient(#fff3cf,#e8be74);border:6px solid #8d5828;box-shadow:0 18px 40px #0005;text-align:center;overflow:visible}
.login-avatar{position:absolute;left:50%;top:0;z-index:2;width:88px;height:88px;margin:0;object-fit:cover;object-position:center 12%;border-radius:50%;background:#f3d59a;filter:drop-shadow(0 4px 5px #0004);transform:translate(-50%,-50%)}
.login-card h1{margin:2px 0 2px;font-size:28px}
.login-tagline{margin:0 0 12px;font-size:12px;color:#8a6236;font-weight:800}
.auth-hint{font-size:12px;color:#7f6341;margin:0 0 10px;line-height:1.45}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:0 0 12px;border-radius:16px;overflow:hidden;border:3px solid #bd8a45;background:#f3d59a}
.auth-tab{height:40px;background:transparent;color:#7a5428;font-weight:900;font-size:15px}
.auth-tab.is-on{background:linear-gradient(#82df4c,#42a32a);color:#fff;box-shadow:inset 0 2px #fff5}
.field{height:52px;margin:8px 0;border-radius:18px;background:#fffaf0;border:3px solid #bd8a45;display:grid;grid-template-columns:62px 1fr;align-items:center;text-align:left;overflow:hidden}
.field span{padding-left:14px;font-weight:900;font-size:13px}
.field input{height:100%;border:0;outline:0;background:transparent;padding:0 10px;color:#4d331f;min-width:0}
.field input::placeholder{color:#c4a57a;font-weight:700;font-size:12px}
.auth-perks{list-style:none;display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin:8px 0 4px;padding:0}
.auth-perks li{padding:4px 8px;border-radius:999px;background:#fff6dd;border:2px solid #d7a45a;color:#6d4520;font-size:11px;font-weight:800}
.auth-error{margin:6px 0 0;min-height:18px;color:#c0392b;font-size:12px;font-weight:800}
.game-button{width:100%;height:54px;border-radius:27px;color:#fff;font-weight:900;font-size:17px;border:4px solid;box-shadow:inset 0 3px #fff6,0 5px 9px #0003;margin-top:10px}
.game-button.green{background:linear-gradient(#82df4c,#42a32a);border-color:#2b7821}
.game-button.gold{background:linear-gradient(#ffd45a,#ed9e1e);border-color:#9f5f14}
.game-button:disabled{opacity:.55;pointer-events:none}
.lang-row{display:flex;justify-content:center;gap:8px;margin-top:14px}
.lang-btn{padding:6px 10px;border-radius:13px;background:#fff3ce;border:2px solid #ad7940;color:#6f4b29;font-weight:900}
.gender-box{position:relative;margin:4px 0 10px;padding:16px 10px 10px;border:3px solid #bd8a45;border-radius:18px;background:#fff8e8;text-align:left}
.gender-legend{position:absolute;left:14px;top:-11px;padding:0 8px;background:linear-gradient(#fff3cf,#fff8e8);color:#6a4320;font-size:13px;font-weight:900}
.gender-hint{margin:2px 6px 8px;font-size:11px;color:#8a6236;font-weight:700;line-height:1.3}
.gender-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.gender-pick{position:relative;height:52px;display:flex;align-items:center;gap:8px;padding:0 8px;border-radius:14px;background:#fffaf0;border:2px solid #c49655;color:#5d3a1c;box-shadow:none}
.gender-pick img{width:36px;height:36px;object-fit:cover;object-position:center 12%;border-radius:9px;background:linear-gradient(#9ad45a,#c9a05a);border:2px solid #8dbe4a;flex:none}
.gender-pick b,.gender-symbol{width:30px;height:30px;display:grid;place-items:center;flex:none}
.gender-symbol svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round}
.gender-symbol--male{color:#2d83bd}
.gender-symbol--female{color:#e23b4a}
.gender-pick.is-on{background:#eefbe4;border:3px solid #4cbf36;box-shadow:inset 0 0 0 1px #b7e98a}
.gender-pick.is-on:after{content:"";position:absolute;right:-6px;top:-8px;width:18px;height:18px;border-radius:50%;background:#43b92e url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M3.2 8.3 6.4 11.4 12.8 4.6 11.5 3.4 6.4 8.9 4.4 7z'/></svg>") center/12px no-repeat;border:2px solid #fff;box-shadow:0 1px 3px #0004}

.game-screen{background:#87c95c;box-shadow:none}
/* HUD — 参考横排：玩家 | 金币 | 钻石 */
.top-hud{position:absolute;z-index:2900;left:6px;right:6px;top:max(8px,env(safe-area-inset-top,0px));height:auto;display:flex;flex-direction:column;gap:6px;pointer-events:none}
.top-hud *{pointer-events:auto}
.top-row{display:flex;align-items:flex-start;gap:4px}

.player-card{position:relative;z-index:4;height:64px;width:154px;flex:0 0 154px;display:block;background:transparent;border:0;padding:0;color:#4f331c;text-align:left;overflow:visible}
.avatar-wrap{position:absolute;z-index:3;left:0;top:0;width:58px;height:58px}
.avatar-ring{position:absolute;inset:0;border-radius:50%;background:linear-gradient(160deg,#ffe9a8 0%,#f0c35a 35%,#c6862a 70%,#8f5a18 100%);box-shadow:0 2px 5px #0005, inset 0 1px 1px #fff8}
.player-avatar{position:absolute;z-index:1;left:3px;top:3px;width:52px;height:52px;object-fit:cover;object-position:center 22%;border-radius:50%;border:0;background:#3a5d8a;overflow:hidden}
.level-badge{position:absolute;z-index:4;right:-1px;bottom:0;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(#3a4d58,#24333c);border:2px solid #f0d28a;color:#fff;font-size:10px;font-weight:900;box-shadow:0 1px 3px #0007;line-height:1}
.player-panel{position:absolute;left:34px;right:0;top:8px;height:46px;padding:4px 7px 4px 28px;border-radius:14px;background:linear-gradient(#fff8e4 0%,#f3dfb0 100%);border:2px solid #d4a45a;box-shadow:0 2px 5px #00000033, inset 0 1px 0 #fff9;display:flex;flex-direction:column;justify-content:center;gap:3px}
.player-name{display:flex;align-items:center;gap:5px;white-space:nowrap;min-width:0}
.player-name strong{font-size:12px;max-width:88px;overflow:hidden;text-overflow:ellipsis;color:#4a2c10;font-weight:900;letter-spacing:0;line-height:1.1}
.vip-badge,.player-name span{font-size:10px;line-height:1;background:linear-gradient(#ffe27a,#e0a63a);border:1.5px solid #7a4a14;color:#4a2808;padding:3px 6px;border-radius:8px;flex:0 0 auto;box-shadow:inset 0 1px 0 #fff6c8, 0 1px 0 #0002;text-shadow:0 1px 0 #fff8;font-weight:900;letter-spacing:.2px}
.game-screen.is-tutorial #vipBadge,
.game-screen.is-tutorial .exp-bar,
.game-screen.is-tutorial .player-panel{
  display:none !important;
}
.game-screen.is-tutorial .player-card{
  width:58px;
  flex:0 0 58px;
}
.game-screen.is-tutorial .notice-row{
  display:none !important;
}
.exp-bar{position:relative;height:14px;border-radius:8px;background:#1c2c38;border:1.5px solid #8d6436;overflow:hidden;box-shadow:inset 0 1px 2px #0005}
.exp-bar i{display:block;height:100%;width:0;background:linear-gradient(#b6f06a,#4fa828);box-shadow:inset 0 1px 0 #d8ff9a88}
.exp-bar em{position:absolute;inset:0;display:grid;place-items:center;font-style:normal;font-size:9px;color:#fffce8;text-shadow:0 0 2px #000, 0 1px 1px #000c, 1px 0 1px #0008,-1px 0 1px #0008;font-weight:900;letter-spacing:0;line-height:1}

.currency-block{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;gap:4px;padding-top:6px;padding-bottom:4px;z-index:5;position:relative;overflow:visible}
.currency-pill{position:relative;height:22px;display:flex;align-items:center;width:100%;max-width:132px;min-width:0;flex:0 0 auto}
.currency-main{position:relative;height:22px;width:auto;min-width:0;flex:1;background:transparent;border:0;padding:0;color:#fff;display:flex;align-items:center;box-sizing:border-box}
/* 顶部实时时钟已下线：强制隐藏，防止旧缓存/备份页再次露出 */
.time-pill,.hud-clock,#energyTimer,.currency-pill.time-pill{display:none!important}
.currency-track{position:absolute;left:8px;right:0;top:1px;bottom:1px;border-radius:10px;background:rgba(28,52,66,.72);border:1.5px solid rgba(255,255,255,.18);box-shadow:inset 0 1px 2px #0004;pointer-events:none}
.currency-icon{position:absolute;left:-2px;top:50%;width:22px;height:22px;transform:translateY(-50%);object-fit:contain;pointer-events:none;z-index:2;filter:drop-shadow(0 1px 2px #0007)}
.currency-main b{position:relative;z-index:1;font-size:11px;font-weight:900;margin-left:22px;margin-right:4px;text-shadow:0 1px 2px #0008;letter-spacing:-.2px;overflow:visible;white-space:nowrap}
.currency-main small{position:relative;z-index:1;font-size:8px;margin-left:0;opacity:.95;font-weight:800}
.currency-plus{width:20px;height:20px;margin-left:-8px;background:transparent;border:0;padding:0;flex:0 0 20px;z-index:3}
.currency-plus img{width:20px;height:20px;display:block;object-fit:contain;filter:drop-shadow(0 2px 2px #0005)}

.notice-row{position:relative;z-index:1;display:flex;align-items:center;gap:6px;height:28px;background:transparent;border:0;box-shadow:none;border-radius:0}
.notice-shell{position:relative;height:28px;flex:1;min-width:0}
.notice-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none}
.notice-horn{position:absolute;z-index:2;left:4px;top:50%;width:22px;height:22px;transform:translateY(-50%);object-fit:contain;pointer-events:none;filter:drop-shadow(0 1px 1px #0006)}
.notice-marquee{position:relative;z-index:1;height:28px;display:flex;align-items:center;padding:0 10px 0 30px;font-size:10px;white-space:nowrap;overflow:hidden;color:#fff;line-height:1}
.notice-marquee b{color:#ffd54b;margin-right:6px;flex:none;font-size:10px;font-weight:900;letter-spacing:.04em;text-shadow:0 1px 1px #0007}
.notice-marquee span{position:relative;flex:1;min-width:0;height:28px;overflow:hidden;color:#fff2cc;display:block}
.notice-marquee span em{
  position:absolute;left:0;right:0;top:0;
  height:28px;line-height:28px;margin:0;
  display:block;font-style:normal;font-weight:700;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  will-change:transform,opacity;
}
.notice-marquee span em.is-in{animation:notice-flip-in .42s cubic-bezier(.2,.8,.2,1) forwards}
.notice-marquee span em.is-out{animation:notice-flip-out .42s cubic-bezier(.2,.8,.2,1) forwards}
.notice-marquee span em.is-hold{transform:translateY(0);opacity:1}
@keyframes notice-flip-in{
  0%{transform:translateY(110%);opacity:0}
  100%{transform:translateY(0);opacity:1}
}
@keyframes notice-flip-out{
  0%{transform:translateY(0);opacity:1}
  100%{transform:translateY(-110%);opacity:0}
}
.mail-button{position:relative;background:transparent;width:28px;height:28px;padding:0;flex:0 0 28px}
.mail-button img{width:28px;height:28px;object-fit:contain;display:block;filter:drop-shadow(0 2px 2px #0004)}
.mail-button i,.badge{position:absolute;right:-2px;top:-3px;min-width:14px;height:14px;border-radius:8px;background:#ff5a4e;border:2px solid #fff;color:#fff;font-style:normal;font-size:8px;display:grid;place-items:center;padding:0 2px;font-weight:900}

/* World — 铺满游戏框，不留左右绿边，右侧建筑完整露出来 */
.world-viewport{position:absolute;z-index:100;inset:0;width:100%;height:100%;overflow:hidden;touch-action:manipulation;background:#87c95c;pointer-events:auto;cursor:default}
.world-viewport .building-btn,.world-viewport .farm-map-skin__building-hotspot,.world-viewport .farm-map-skin__creature{pointer-events:auto}
.world-viewport .facility,.world-viewport .facility-deco{pointer-events:none!important}
.world{--world-scale:1;--world-fit-scale:1;--animal-base-scale:1;--creature-keep:1;position:absolute!important;inset:0!important;left:0!important;top:0!important;right:0!important;bottom:0!important;width:100%!important;height:100%!important;max-width:none!important;aspect-ratio:auto!important;transform:none!important;transform-origin:0 0;pointer-events:auto}
.world-map{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;object-position:center top;user-select:none;pointer-events:auto}
.farm-map-skin-host,.world .farm-map-skin{position:absolute;inset:0;z-index:1;width:100%!important;height:100%!important;max-width:none!important;aspect-ratio:auto!important;border-radius:0!important;background:url("assets/ui/farm-map-skins/maps/webp/01-livestock-ranch-h5-v4.webp") center top / 100% 100% no-repeat}
.world .farm-map-skin__picture,.world .farm-map-skin__map{inset:0!important;width:100%!important;height:100%!important;object-fit:fill!important;object-position:center top!important}
.farm-map-skin__animals{z-index:10}
.farm-map-skin__labels{z-index:12}
#animalLayer .animal-entity{width:100px;height:112px;overflow:visible;pointer-events:none;cursor:pointer;transform:translate(-50%,-100%)}
#animalLayer .animal-entity img,
#animalLayer .animal-entity:before,
#animalLayer .animal-bubbles{display:none!important}
#animalLayer .animal-hud{display:flex!important;bottom:20px;pointer-events:none;z-index:6;gap:2px}
#animalLayer .animal-entity[data-stage="small"] .animal-hud{bottom:18px}
#animalLayer .animal-entity[data-stage="medium"] .animal-hud{bottom:22px}
#animalLayer .animal-entity[data-stage="adult"] .animal-hud{bottom:26px}
#animalLayer .animal-entity[data-species="cow"][data-stage="adult"] .animal-hud,
#animalLayer .animal-entity[data-species="horse"][data-stage="adult"] .animal-hud{bottom:34px}
#animalLayer .animal-status{display:block!important}
/* 原生气泡永久隐藏（仍留在 DOM 供读取文案）；可见气泡是 #animalLayer .animal-speech */
.farm-map-skin__creature-speech{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
#animalLayer .animal-entity.is-speaking{z-index:48!important}
/* 看门狗仅作气泡锚点，不显示名字条/血条 */
#animalLayer .animal-entity.is-patrol-dog{
  width:1px;height:1px;padding:0;border:0;background:transparent;overflow:visible;
}
#animalLayer .animal-entity.is-patrol-dog .animal-hud,
#animalLayer .animal-entity.is-patrol-dog img,
#animalLayer .animal-entity.is-patrol-dog .animal-bubbles{display:none!important}

/* 气泡在动物正上方居中，尖角朝下指向本体；--speech-shift 仅用于贴边不出框 */
#animalLayer .animal-speech{
  position:absolute;
  z-index:24;
  left:50%;
  bottom:var(--speech-lift,52px);
  transform:translateX(calc(-50% + var(--speech-shift,0px)));
  width:max-content;
  min-width:64px;
  max-width:132px;
  padding:5px 8px 6px;
  border:1.5px solid #8b4e21;
  border-radius:11px;
  color:#382114;
  background:linear-gradient(#fffdf2,#fff0c9);
  box-shadow:0 3px 8px rgba(50,29,12,.34),inset 0 0 0 1px rgba(255,255,255,.72);
  font:800 11px/1.25 system-ui,"Noto Sans SC",sans-serif;
  text-align:center;
  overflow-wrap:anywhere;
  pointer-events:none;
  transform-origin:50% 100%;
  animation:animalSpeechIn .18s ease-out;
}
#animalLayer .animal-speech::after{
  content:"";
  position:absolute;
  left:calc(50% - var(--speech-shift,0px) - 4px);
  top:100%;
  width:8px;
  height:8px;
  margin-top:-5px;
  border-right:1.5px solid #8b4e21;
  border-bottom:1.5px solid #8b4e21;
  background:#fff0c9;
  transform:rotate(45deg);
}
@keyframes animalSpeechIn{
  from{opacity:0;transform:translateX(calc(-50% + var(--speech-shift,0px))) translateY(6px) scale(.92)}
  to{opacity:1;transform:translateX(calc(-50% + var(--speech-shift,0px))) translateY(0) scale(1)}
}
.building-strip{position:absolute;z-index:450;inset:0;pointer-events:none}
.building-btn{position:absolute;pointer-events:auto;background:transparent;padding:0;margin:0;border:0;cursor:pointer;transform:translate(-50%,-50%)}
.building-btn[data-panel="warehouse"]{left:70px;top:210px;width:88px;height:100px}
.building-btn[data-panel="animal"]{left:157px;top:200px;width:88px;height:95px}
.building-btn[data-panel="shop"]{left:231px;top:198px;width:88px;height:95px}
.building-btn[data-panel="exchange"]{left:328px;top:212px;width:90px;height:100px}
.world:after{content:none}
.farm-map-skin__particle{display:none!important}
/* 设施：图一已画在底图上，只保留透明点击热区 */
.facility{position:absolute;background:transparent;padding:0;z-index:110;pointer-events:none}.facility img,.facility-deco img{display:none}.feed-trough{left:103px;top:373px;width:72px;height:46px;pointer-events:none}.feed-trough:after{content:none;display:none}.feed-hay{display:none!important}.water-pool{position:absolute;left:175px;top:357px;width:40px;height:34px;z-index:105;pointer-events:none}.water-trough{position:absolute;left:215px;top:373px;width:72px;height:46px;z-index:105;pointer-events:none}
.animal-layer{position:absolute;inset:0;z-index:180;pointer-events:none;visibility:hidden}.animal-layer.is-hud-ready{visibility:visible}.animal-layer .animal{pointer-events:auto}
.animal{position:absolute;left:195px;top:350px;z-index:180;width:78px;height:86px;background:transparent;padding:0;transform:translate(-50%,-86%);filter:drop-shadow(0 6px 4px #0004)}.animal>img{width:78px;height:78px;object-fit:contain}.animal.flipped>img{transform:scaleX(-1)}.rabbit-thought{position:absolute;left:50%;bottom:72px;transform:translateX(-50%);min-width:66px;height:34px;border-radius:18px;background:#fff9e8;border:2px solid #d2a55d;box-shadow:0 3px 6px #0002;display:flex;align-items:center;justify-content:center;gap:2px;padding:2px 6px;white-space:nowrap}.rabbit-thought:after{content:"";position:absolute;bottom:-8px;left:50%;width:12px;height:12px;background:#fff9e8;border-right:2px solid #d2a55d;border-bottom:2px solid #d2a55d;transform:translateX(-50%) rotate(45deg)}.rabbit-thought img{width:22px;height:22px}.rabbit-thought span{font-size:8px;font-weight:900}.rabbit-mini-progress{position:absolute;left:10px;right:10px;bottom:2px;height:7px;border-radius:5px;background:#222;border:1px solid #111;overflow:hidden}.rabbit-mini-progress i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,#f5c02d,#67c83e)}.world-vfx{position:absolute;z-index:220;width:140px;height:140px;transform:translate(-50%,-50%);pointer-events:none;overflow:visible;object-fit:contain}

/* ===== 390 手机框内锁定素材按钮：禁止 vw/fixed 相对浏览器对齐 ===== */
.side-buttons-legacy,.action-bar-legacy,.bottom-nav-legacy,.side-stack,.side-btn{display:none!important}

.side-buttons-host{position:absolute;z-index:850;left:0;right:0;top:108px;bottom:228px;pointer-events:none}
.side-buttons-host .farm-side-buttons{
  position:absolute !important;
  inset:0 !important;
  max-width:none !important;
  margin:0 !important;
  transform:none !important;
  pointer-events:none;
  --farm-side-edge:2px;
  --farm-side-z:850;
  --farm-side-top:0;
  --farm-side-bottom:0;
}
.side-buttons-host .farm-side-buttons__rail{gap:4px !important}
.side-buttons-host .farm-side-buttons__item{width:50px !important;min-height:64px !important;padding:0 !important}
.side-buttons-host .farm-side-buttons__visual{width:46px !important;height:46px !important;margin-bottom:-2px !important}
.side-buttons-host .farm-side-buttons__icon{width:46px !important;height:46px !important;object-fit:contain !important}
.side-buttons-host .farm-side-buttons__label{font-size:9px !important;min-height:12px !important;max-height:24px !important;line-height:1.05 !important}
.side-buttons-host .farm-side-buttons__countdown{font-size:8px !important}

.action-bar-host{position:absolute;z-index:1200;left:0;right:0;bottom:80px;height:64px;pointer-events:none}
.action-bar-host .farm-action-bar{
  position:absolute !important;
  inset:0 !important;
  left:0 !important;
  right:0 !important;
  bottom:auto !important;
  transform:none !important;
  pointer-events:auto;
  width:100% !important;
  height:64px !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 4px 2px !important;
  align-items:end;
}
.action-bar-host .farm-action-bar__item{padding:0 0 1px !important;justify-content:flex-end}
.action-bar-host .farm-action-bar__visual{width:42px !important;height:42px !important;margin-bottom:-1px !important}
.action-bar-host .farm-action-bar__icon{width:42px !important;height:42px !important;object-fit:contain !important}
.action-bar-host .farm-action-bar__label{font-size:9px !important;min-height:12px !important;line-height:1.05 !important}

/* Collapsible quick-action drawer: animal / feed / treatment / harvest / support */
.action-bar-host.is-action-drawer{
  --action-drawer-scale:1;
  position:absolute !important;
  z-index:1200;
  left:0 !important;
  right:auto !important;
  top:47%;
  bottom:auto !important;
  width:calc(76px * var(--action-drawer-scale,1));
  height:calc(310px * var(--action-drawer-scale,1));
  transform:translateY(-50%);
  pointer-events:none;
  overflow:visible;
}
.action-bar-host.is-action-drawer .farm-action-bar{
  position:absolute !important;
  inset:0 auto auto 0 !important;
  display:grid !important;
  grid-template-columns:1fr !important;
  grid-template-rows:repeat(5,minmax(0,1fr));
  width:76px !important;
  height:310px !important;
  padding:8px 7px 9px 5px !important;
  border:2px solid #f8df91;
  border-left:0;
  border-radius:0 18px 18px 0;
  background:linear-gradient(90deg,rgba(66,38,17,.96),rgba(112,73,30,.94));
  box-shadow:3px 5px 12px rgba(23,15,8,.38),inset -2px 0 0 rgba(255,245,187,.24);
  opacity:0;
  transform:translateX(-102%) scale(var(--action-drawer-scale,1)) !important;
  transform-origin:top left;
  transition:transform .22s cubic-bezier(.2,.78,.22,1),opacity .16s ease;
  pointer-events:none;
}
.action-bar-host.is-action-drawer.is-drawer-open .farm-action-bar{
  opacity:1;
  transform:translateX(0) scale(var(--action-drawer-scale,1)) !important;
  pointer-events:auto;
}
.action-bar-host.is-action-drawer .farm-action-bar__item{
  width:100%;
  height:58px !important;
  min-height:0;
  padding:0 !important;
  justify-content:center !important;
  border-bottom:1px solid rgba(255,232,158,.22);
}
.action-bar-host.is-action-drawer .farm-action-bar__item:last-child{border-bottom:0}
.action-bar-host.is-action-drawer .farm-action-bar__visual,
.action-bar-host.is-action-drawer .farm-action-bar__icon{
  width:43px !important;
  height:43px !important;
}
.action-bar-host.is-action-drawer .farm-action-bar__label{
  min-height:11px !important;
  font-size:9px !important;
  line-height:1 !important;
}
.farm-action-drawer__toggle{
  position:absolute;
  z-index:2;
  left:0;
  top:50%;
  display:grid;
  place-items:center;
  width:22px;
  height:48px;
  padding:0;
  border:2px solid #ffe59a;
  border-left:0;
  border-radius:0 12px 12px 0;
  background:linear-gradient(180deg,#9d672e,#5b351b);
  box-shadow:3px 3px 8px rgba(26,14,7,.36),inset 0 1px 0 #fff1b0;
  color:#fff6d8;
  transform:translateY(-50%);
  transition:left .22s cubic-bezier(.2,.78,.22,1);
  pointer-events:auto;
  cursor:pointer;
  touch-action:manipulation;
}
.is-drawer-open .farm-action-drawer__toggle{left:calc(74px * var(--action-drawer-scale,1))}
.farm-action-drawer__arrow{display:block;font:900 18px/1 Arial;text-shadow:0 1px 1px #3a1c0d;transition:transform .2s ease}
.is-drawer-open .farm-action-drawer__arrow{transform:rotate(180deg)}
.farm-action-drawer__toggle:focus-visible{outline:3px solid #fff4a7;outline-offset:2px}

/* Animal inspect overlay only. Card internals live in animal-card-layout.css */
.animal-inspect-overlay{position:absolute;z-index:2350;inset:0;display:flex;align-items:center;justify-content:center;padding:64px 8px 118px;pointer-events:auto}
.animal-inspect-overlay.is-hidden{display:none!important}
.animal-inspect-backdrop{position:absolute;inset:0;border:0;padding:0;background:rgba(18,28,24,.32);cursor:pointer}
.animal-inspect-card{position:relative;z-index:1;width:372px;max-width:96%;height:360px;overflow:hidden;pointer-events:auto}
.unlock-card{display:none!important}

.lock-icon{font-size:20px;line-height:1}
.unlock-card b{font-size:9px}
.unlock-card small{font-size:8px;margin-top:2px}

.bottom-nav-host{position:absolute;z-index:1100;left:0;right:0;bottom:0;height:80px;pointer-events:none}
.bottom-nav-host .farm-nav{
  pointer-events:auto;
  position:absolute !important;
  inset:0 !important;
  left:0 !important;
  right:0 !important;
  bottom:0 !important;
  width:100% !important;
  height:80px !important;
  padding:0 2px 0 !important;
  transform:none !important;
  border-inline:0 !important;
  --farm-nav-height:80px;
  --farm-nav-z:1100;
}
.bottom-nav-host .farm-nav__item{height:80px !important;padding:2px 1px 3px !important;border:0 !important;border-inline-start:0 !important}
.bottom-nav-host .farm-nav__item:first-child{border-inline-start:0 !important}
.bottom-nav-host .farm-nav__visual{width:48px !important;height:48px !important}
.bottom-nav-host .farm-nav__icon{width:48px !important;height:48px !important;object-fit:contain !important;transform:none !important}
.bottom-nav-host .farm-nav__item.is-active .farm-nav__icon{transform:translateY(-1px) scale(1.04) !important}
.bottom-nav-host .farm-nav__label{font-size:10px !important;min-height:14px !important;line-height:1.05 !important}
.bottom-nav-host .farm-nav__badge{top:1px;transform:scale(.85)}
@media (min-width:640px){
  .bottom-nav-host .farm-nav{left:0 !important;right:0 !important;width:100% !important;transform:none !important;border-inline:0}
  .bottom-nav-host .farm-nav__visual,.bottom-nav-host .farm-nav__icon{width:48px !important;height:48px !important}
  .bottom-nav-host .farm-nav__label{font-size:10px !important}
  .side-buttons-host .farm-side-buttons__item{width:50px !important}
  .side-buttons-host .farm-side-buttons__visual{width:46px !important;height:46px !important}
}

/* tutorial — 老农场黄框 + 步骤卡素材 */
.game-screen.is-tutorial .side-buttons-host{opacity:.28;pointer-events:none}
.game-screen.is-tutorial .action-bar-host{z-index:2860}
.game-screen.is-aiming,.game-screen.is-aiming *,body.is-aiming,body.is-aiming *{cursor:none!important}
.game-screen.is-aiming .farm-map-skin__creature{filter:drop-shadow(0 0 10px #ffe56a)}
.aim-spot{position:absolute;left:180px;top:380px;width:16px;height:16px;margin:-8px 0 0 -8px;border:2px solid #ffe56a;border-radius:50%;background:#ffe56a33;box-shadow:0 0 8px #ffd23b88;pointer-events:none;z-index:3180}
.aim-spot.is-over{width:22px;height:22px;margin:-11px 0 0 -11px;background:#ffe56a55}
.tutorial-hand.is-point-animal{--hand-width:92px}
.tutorial-hand.is-point-crate{--hand-width:92px}
.tutorial-hand.is-aim-wear{--hand-width:88px;position:fixed!important;transition:none!important;will-change:left,top;z-index:2147483646!important;pointer-events:none!important;margin:0}
.tutorial-hand.is-aim-wear .tutorial-hand-reference__hand{animation:none}
.tutorial-hand.is-aim-wear .tutorial-hand-reference__ring{opacity:.35;animation:none}
.tutorial-hand.is-aim-wear.is-over .tutorial-hand-reference__ring{opacity:1;animation:reference-ring-pulse 700ms ease-out infinite}
.tutorial-guide.is-aim-only .tutorial-card,
.tutorial-guide.is-aim-only .tutorial-dots{display:none!important}
.tutorial-guide{position:absolute;z-index:2960;inset:0;pointer-events:none;--tut-panel-scale:1;--tut-left:82px}
.tutorial-guide .tut-fit{
  position:absolute;
  left:var(--tut-left,82px);
  top:72px;
  width:300px;
  height:auto;
  pointer-events:none;
  overflow:visible;
  z-index:4;
}
.tutorial-dots{display:none!important}
.tutorial-dots i{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.35);box-shadow:0 1px 2px #0006}
.tutorial-dots i.on{background:#ffd23b}
.tutorial-hole{display:none!important}
.tutorial-hole.is-hidden{display:none!important}
@keyframes tutHolePulse{0%,100%{border-color:#ffe14a}50%{border-color:#ffb020}}
.tutorial-guide .tutorial-card.trial-guide,.tutorial-guide .tutorial-card{
  pointer-events:auto;
  position:relative;
  left:0;top:0;
  right:auto;
  display:flex;
  flex-direction:column;
  width:300px!important;
  max-width:none!important;
  height:auto!important;
  min-height:0!important;
  padding:32px 22px 34px 64px!important;
  overflow:visible;
  border:0;
  border-radius:0;
  background:none!important;
  box-shadow:none;
  filter:none;
  --guide-size:72px;
  box-sizing:border-box!important;
  transform:none;
  transform-origin:top left;
}
.tutorial-card__frame{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:0;
  pointer-events:none;
  object-fit:fill;
  filter:drop-shadow(0 6px 8px #40210f40);
}
.tutorial-guide .tutorial-card:before{display:none}
.tutorial-card__copy{
  position:relative;
  z-index:4;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:flex-start;
  gap:6px;
  min-width:0;
  width:100%;
  height:auto;
  margin:0;
  padding:8px 10px 10px;
  overflow:visible;
  word-break:break-word;
  overflow-wrap:anywhere;
  background:#fff6df;
  border-radius:14px;
  box-sizing:border-box;
}
.tutorial-card__row{
  display:flex;
  align-items:center;
  gap:6px;
  width:100%;
  min-height:22px;
  flex:none;
}
.tutorial-card__avatar,.tutorial-guide .trial-guide__character{
  position:absolute;
  left:2px;bottom:10px;
  width:62px;height:62px;
  object-fit:contain;
  pointer-events:none;
  filter:drop-shadow(0 3px 4px #0005);
  z-index:3;
}
.tutorial-card__head,.tutorial-card__badge{display:none}
.tutorial-card__step{
  position:static;
  flex:none;
  width:22px;min-width:22px;height:22px;
  padding:0;margin:0;
  border-radius:50%;
  background:#7a4a22;color:#fff8e6;
  font-size:10px;font-weight:900;
  display:grid;place-items:center;
  border:2px solid #c9a267;
  letter-spacing:0;
  line-height:1;
  box-sizing:border-box;
}
.tutorial-guide .tutorial-card__title,.tutorial-guide .trial-guide__title{
  margin:0!important;
  padding:0!important;
  font-size:15px!important;
  font-weight:900;
  color:#40291a;
  text-shadow:none;
  line-height:1.3;
  height:auto;
  flex:1;
  min-width:0;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
}
.tutorial-card__howto{
  margin:0!important;
  padding:0!important;
  width:100%;
  font-size:12px!important;
  line-height:1.45!important;
  font-weight:900;
  color:#1d6a18;
  overflow:visible;
  display:block;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.tutorial-card__howto.is-hidden{display:none!important}
.tutorial-guide .tutorial-card__body,.tutorial-guide .trial-guide__body{
  margin:0!important;
  padding:0!important;
  font-size:12px!important;
  line-height:1.45!important;
  color:#4a3418;
  font-weight:600;
  width:100%;
  flex:none;
  min-height:0;
  overflow:visible;
  display:block;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.tutorial-card__action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:4px 0 0;
  height:28px;
  padding:0 14px;
  border-radius:12px;
  background:linear-gradient(180deg,#8ee85e,#4aa62c);
  border:0;
  box-shadow:0 2px 0 #2f6a18;
  color:#fff;
  font-size:13px;
  font-weight:900;
  pointer-events:auto;
  width:auto;
  max-width:100%;
  flex:none;
}
.tutorial-guide[data-place="below-hud"] .tut-fit,
.tutorial-guide[data-place="mid"] .tut-fit,
.tutorial-guide[data-place="top"] .tut-fit{top:72px}
.game-screen .trial-guide{width:300px!important;max-width:none!important;min-height:0!important;height:auto!important;padding:32px 22px 34px 64px!important}
.tutorial-focus{display:none!important}
.tutorial-hand{--hand-width:116px;position:absolute;left:180px;top:380px;width:var(--hand-width);aspect-ratio:240/180;overflow:visible;transition:.18s left,.18s top;z-index:3000;pointer-events:none;transform:translate(-29.167%,-30.556%)}
.tutorial-hand-reference__hand{position:absolute;inset:0;background:url("assets/ui/tutorial/hand-v3/trial-guide-hand-reference-exact-v3/ui/png/2x/tutorial-hand-reference-exact-only.png") center/contain no-repeat;animation:reference-hand-press 950ms ease-in-out infinite;filter:drop-shadow(0 4px 3px #0005)}
.tutorial-hand-reference__ring{position:absolute;inset:0;background:url("assets/ui/tutorial/hand-v3/trial-guide-hand-reference-exact-v3/ui/svg/tutorial-hand-gold-rings.svg") center/contain no-repeat;transform-origin:29.167% 30.556%;animation:reference-ring-pulse 950ms ease-out infinite}
.tutorial-hand.is-hidden{display:none!important}
.game-screen:not(.is-tutorial) .tutorial-hand,.game-screen:not(.is-tutorial) .tutorial-guide{display:none!important}
@keyframes reference-hand-press{0%,100%{translate:0 0}45%,60%{translate:-2px -2px}}
@keyframes reference-ring-pulse{0%{opacity:1;scale:.88}78%,100%{opacity:.16;scale:1.08}}
.is-guide-hit,.tut-dom-target{outline:none}
.gift-farmer{display:block;width:96px;height:96px;margin:-56px auto 4px;object-fit:contain;filter:drop-shadow(0 4px 4px #0004)}
.welcome-card{position:relative;overflow:visible;padding-top:22px}
.welcome-ribbon{position:absolute;left:-6px;top:14px;padding:4px 12px 4px 10px;border-radius:0 12px 12px 0;background:linear-gradient(180deg,#ff7a4a,#e24a2a);color:#fff;font-size:11px;font-weight:900;letter-spacing:.04em;box-shadow:0 3px 0 #9a2414}
.welcome-card h2{margin-top:4px}
.welcome-card .gift-farmer{width:112px;height:112px;margin:-64px auto 2px}
.rescue-bubble{position:absolute;z-index:2700;left:208px;top:360px;transform:translate(-50%,-100%);min-width:92px;max-width:140px;padding:8px 12px 10px;border:2px solid #8b4e21;border-radius:16px 16px 16px 6px;background:linear-gradient(#fffdf4,#ffe7b0);color:#6a2a14;font-weight:900;text-align:center;box-shadow:0 6px 14px #0004;pointer-events:none;animation:rescuePop .42s cubic-bezier(.2,1.4,.3,1)}
.rescue-bubble__text{display:block;font-size:15px;line-height:1.2;text-shadow:0 1px 0 #fff6}
.rescue-bubble:after{content:"";position:absolute;left:22px;top:100%;width:10px;height:10px;margin-top:-6px;background:#ffe7b0;border-right:2px solid #8b4e21;border-bottom:2px solid #8b4e21;transform:rotate(45deg)}
.rescue-bubble.is-hidden{display:none!important}
@keyframes rescuePop{0%{transform:translate(-50%,-70%) scale(.4);opacity:0}100%{transform:translate(-50%,-100%) scale(1);opacity:1}}
@keyframes rescueBob{0%,100%{transform:translate(-50%,-100%)}50%{transform:translate(-50%,-112%)}}
.rescue-bubble:not(.is-hidden){animation:rescuePop .42s cubic-bezier(.2,1.4,.3,1),rescueBob 1.1s ease-in-out .42s infinite}
.farm-map-skin__creature.is-arriving .farm-map-skin__creature-sprite{transform-origin:50% 100%;animation:rescueArrive .88s cubic-bezier(.18,.82,.22,1)}
@keyframes rescueArrive{0%{transform:translateY(-240%) scale(.28);opacity:0}72%{transform:translateY(8%) scale(1.06);opacity:1}100%{transform:translateY(0) scale(1);opacity:1}}
.game-screen.is-rescue-intro .farm-map-skin__creature[data-creature-id="trial-rabbit"] .farm-map-skin__creature-sprite{animation:rescueWeak 1.35s ease-in-out infinite}
.game-screen.is-rescue-intro .farm-map-skin__creature.is-arriving .farm-map-skin__creature-sprite{transform-origin:50% 100%;animation:rescueArrive .88s cubic-bezier(.18,.82,.22,1)}
@keyframes rescueWeak{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(3px) rotate(3deg)}}
.gift-card ul.gift-rewards,.gift-rewards{list-style:none;margin:0 0 14px;padding:0}
.gift-rewards li{display:flex;gap:10px;align-items:center;padding:8px 10px;margin:0 0 8px;background:#fff4d6;border:1.5px solid #c9a267;border-radius:12px}
.gift-rewards img{width:36px;height:36px;object-fit:contain;flex:none}
.gift-rewards .gift-rabbit{width:64px;height:64px;object-fit:contain;transform:scale(1.18);transform-origin:center}
.gift-rewards b{display:block;font-size:13px}
.gift-rewards small{display:block;font-size:10px;color:#7a5b30;margin-top:2px}
.animal-entity.is-sick img{filter:hue-rotate(-22deg) saturate(.72) brightness(.9)}
.animal-bubbles{display:none;position:absolute;left:58%;top:18%;width:14px;height:28px;z-index:4;pointer-events:none}
.animal-entity.is-sick .animal-bubbles{display:block}
.animal-bubbles:before,.animal-bubbles:after{content:"";position:absolute;border-radius:50%;border:2px solid rgba(180,230,255,.95);background:rgba(210,245,255,.35);animation:noseBub 1.2s ease-in-out infinite}
.animal-bubbles:before{width:7px;height:7px;left:0;bottom:0}
.animal-bubbles:after{width:11px;height:11px;left:4px;bottom:10px;animation-delay:.25s}
@keyframes noseBub{0%,100%{transform:translateY(0);opacity:.3}50%{transform:translateY(-8px);opacity:1}}
.progress-line .health.is-mid{background:#f1b22b}
.progress-line .health.is-sick{background:#e07058}
.progress-line .health.is-crit{background:#b3261e}

/* modal panels — stay inside the 390 game frame; no vw/vh/fixed, no 800/1360 overflow */
.game-screen .os-overlay,
.game-screen .me-overlay,
.game-screen .ex-overlay,
.game-screen .bp-overlay,
.game-screen .mk-overlay,
.game-screen .am-overlay,
.game-screen .panel-overlay,
.game-screen .gift-overlay{
  position:absolute !important;
  z-index:3200;
  inset:0 !important;
  width:auto !important;
  height:auto !important;
  display:flex !important;
  align-items:stretch !important;
  justify-content:center !important;
  padding:68px 8px 28px !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  pointer-events:auto;
}
.game-screen .bp-overlay{background:rgba(16,32,24,.48)}
.game-screen .os-panel,
.game-screen .me-panel,
.game-screen .ex-panel,
.game-screen .game-panel{
  position:relative;
  width:100% !important;
  max-width:374px !important;
  height:100% !important;
  max-height:100% !important;
  min-height:0 !important;
  aspect-ratio:auto !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}
.game-screen .mk-overlay>div,
.game-screen .am-overlay>div{
  width:100% !important;
  max-width:374px !important;
  height:100% !important;
  min-height:0 !important;
}
.game-screen .os-grid,
.game-screen .me-list,
.game-screen .ex-list,
.game-screen .panel-content,
.game-screen .market-body,
.game-screen .animal-list{
  overflow:auto !important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  min-height:0;
}
.game-screen .market-modal-backdrop{
  position:absolute !important;
  inset:0;
}
.game-screen .animal-inspect-overlay{
  align-items:center !important;
  padding:64px 8px 118px !important;
}
.game-screen .animal-inspect-card{
  width:372px !important;
  max-width:96% !important;
  height:360px !important;
  max-height:100% !important;
  overflow:hidden !important;
}
.game-screen .gift-overlay{
  align-items:center !important;
  padding:24px 12px !important;
  overflow:auto !important;
}
.game-screen .gift-card,
.game-screen .srp-layer{
  height:auto !important;
  max-height:100% !important;
  overflow:auto !important;
  pointer-events:auto;
}
.game-screen .os-overlay.is-hidden,
.game-screen .me-overlay.is-hidden,
.game-screen .ex-overlay.is-hidden,
.game-screen .bp-overlay.is-hidden,
.game-screen .mk-overlay.is-hidden,
.game-screen .am-overlay.is-hidden,
.game-screen .panel-overlay.is-hidden,
.game-screen .gift-overlay.is-hidden,
.game-screen .animal-inspect-overlay.is-hidden{
  display:none !important;
  pointer-events:none !important;
}
#deathOverlay.gift-overlay{
  z-index:5800 !important;
  background:rgba(16,32,39,.78) !important;
}
#deathOverlay .gift-card{
  position:relative;
  z-index:2;
  width:318px;
  max-width:94%;
  height:auto !important;
  overflow:visible !important;
  pointer-events:auto !important;
}
#deathOverlay #deathAckBtn{
  position:relative;
  z-index:3;
  pointer-events:auto !important;
  min-height:48px;
}
.game-screen:has(#deathOverlay:not(.is-hidden)) #giftOverlay,
.game-screen:has(#deathOverlay:not(.is-hidden)) .os-overlay,
.game-screen:has(#deathOverlay:not(.is-hidden)) .panel-overlay,
.game-screen:has(#deathOverlay:not(.is-hidden)) .tutorial-guide{
  pointer-events:none !important;
}
/* backpack layout is owned by backpack-v4.css (.bp-v4) */

.panel-overlay{position:absolute;z-index:3000;inset:0;background:#102027aa;display:flex;align-items:stretch;justify-content:center;padding:68px 8px 12px}.game-panel{position:relative;width:360px;max-width:100%;height:100%;max-height:100%;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;padding:55px 14px 16px;border-radius:24px;background:linear-gradient(#fff3d0,#e6bb72);border:6px solid #8d5727;box-shadow:0 15px 40px #0008}.game-panel > h2{position:absolute;top:5px;left:50%;transform:translateX(-50%);margin:0;min-width:190px;text-align:center;padding:8px 22px;border-radius:15px;background:linear-gradient(#c78a3c,#8d5727);border:3px solid #6d3d1b;color:#fff;font-size:16px}.panel-close{position:absolute;z-index:2;right:6px;top:6px;width:32px;height:32px;padding:0;border-radius:50%;background:#e84d3b;border:3px solid #982b21;color:#fff;font-size:20px;font-weight:900;line-height:1;display:grid;place-items:center;box-sizing:border-box;-webkit-tap-highlight-color:transparent}.panel-content{display:grid;gap:8px}.panel-card{display:grid;grid-template-columns:50px 1fr auto;align-items:center;gap:8px;padding:8px;border-radius:16px;background:#fff3d1;border:3px solid #b47b36}.panel-icon{width:48px;height:48px;border-radius:14px;background:#efd292;border:2px solid #c18a42;display:grid;place-items:center;font-size:24px;overflow:hidden}.panel-icon img{width:44px;height:44px;object-fit:contain}.panel-card b{font-size:11px}.panel-card small{display:block;font-size:8px;color:#85663f;margin-top:2px}.mini-btn{padding:7px 10px;border-radius:13px;background:linear-gradient(#78d247,#409d2b);border:2px solid #2b7621;color:#fff;font-size:9px;font-weight:900}.panel-tabs{display:flex;gap:4px}.panel-tabs button{flex:1;padding:7px;border-radius:10px;background:#d4a05b;border:2px solid #99632d;color:#fff;font-size:9px;font-weight:900}.panel-tabs .active{background:#69b941}.wallet-box{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:9px;border-radius:15px;background:linear-gradient(#2f708d,#173f59);color:#fff}.wallet-box div{padding:8px;border-radius:10px;background:#ffffff12}.wallet-box small{display:block;font-size:8px}.wallet-box b{font-size:16px}.form-row{display:flex;gap:5px}.form-row input{height:38px;flex:1;min-width:0;border-radius:12px;border:2px solid #b98342;padding:0 8px;background:#fffaf0}.notice{padding:8px;border-radius:11px;background:#fff5d7;border:1px solid #c99752;font-size:9px;line-height:1.4}.gift-overlay{position:absolute;z-index:3200;inset:0;background:#102027bb;display:flex;align-items:center;justify-content:center;padding:48px 12px 24px;pointer-events:auto}.gift-card{width:318px;border-radius:22px;padding:18px 16px 16px;background:linear-gradient(#fff6d8,#e8b96a);border:5px solid #8d5727;box-shadow:0 12px 28px #0007;color:#52341d}.gift-card h2{margin:0 0 8px;text-align:center;font-size:18px}.gift-card p{margin:0 0 10px;font-size:11px;line-height:1.45}.gift-card ul{margin:0 0 14px;padding:0 0 0 18px;font-size:11px;line-height:1.55}.gift-card .game-button{width:100%;height:42px;border-radius:14px;font-size:14px;font-weight:900}.toast{position:absolute;z-index:4000;left:50%;bottom:152px;transform:translateX(-50%);max-width:84%;padding:9px 14px;border-radius:16px;background:#20333edd;color:#fff;font-size:10px;box-shadow:0 5px 12px #0005;text-align:center}.screen-vfx{position:absolute;z-index:3900;width:220px;height:220px;left:50%;top:45%;transform:translate(-50%,-50%);pointer-events:none;overflow:visible;object-fit:contain}

.cs-float{position:absolute;z-index:2400;right:10px;bottom:92px;width:52px;height:52px;border-radius:50%;background:linear-gradient(#78d247,#409d2b);border:3px solid #2b7621;color:#fff;font-size:12px;font-weight:900;box-shadow:0 6px 14px #0006;pointer-events:auto}.cs-float:active{transform:scale(.96)}#panelContent .mini-btn{margin-top:4px}

/* 通用面板：外层是缩放壳，必须给内容区固定高度，否则邮件/任务列表滑不动 */
.game-panel{
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}
.game-panel > h2,
.game-panel > .panel-close{
  flex:none;
}
.panel-overlay,
.game-panel,
.panel-content{
  touch-action:pan-y;
  pointer-events:auto;
}
.game-screen .panel-content{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

.animal-layer{position:absolute;inset:0;z-index:180;pointer-events:none;visibility:hidden}.animal-layer.is-hud-ready{visibility:visible}.animal-entity{position:absolute;width:82px;height:88px;transform:translate(-50%,-100%) scale(var(--creature-keep, 1));transform-origin:50% 100%;background:transparent;pointer-events:auto;overflow:visible}.animal-entity:before{content:"";position:absolute;left:50%;bottom:3px;width:36px;height:11px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(ellipse at center,rgba(32,18,6,.42) 0%,rgba(32,18,6,.2) 45%,transparent 72%);pointer-events:none;z-index:0}.animal-entity[data-stage="small"]:before{width:24px;height:8px;bottom:2px}.animal-entity[data-stage="medium"]:before{width:32px;height:10px}.animal-entity[data-species="cow"]:before,.animal-entity[data-species="horse"]:before{width:48px;height:13px}.animal-entity[data-species="cow"][data-stage="small"]:before,.animal-entity[data-species="horse"][data-stage="small"]:before{width:28px;height:9px}.animal-entity[data-species="cow"][data-stage="adult"]:before,.animal-entity[data-species="horse"][data-stage="adult"]:before{width:56px;height:15px}.animal-entity[data-species="sheep"]:before{width:40px;height:12px}.animal-entity img{position:absolute;left:50%;bottom:0;transform:translate(-50%,8%);width:82px;height:82px;object-fit:contain;object-position:bottom center;z-index:1}.animal-entity.flipped img{transform:translate(-50%,8%) scaleX(-1)}.animal-entity[data-species="cow"] img,.animal-entity[data-species="horse"] img{width:104px;height:104px;object-fit:contain;object-position:bottom center}.animal-entity[data-species="cow"][data-stage="small"] img,.animal-entity[data-species="horse"][data-stage="small"] img{width:57px;height:57px}.animal-entity[data-species="cow"][data-stage="medium"] img,.animal-entity[data-species="horse"][data-stage="medium"] img{width:81px;height:81px}.animal-entity[data-species="cow"][data-stage="adult"] img,.animal-entity[data-species="horse"][data-stage="adult"] img{width:104px;height:104px}.animal-entity[data-species="cow"][data-stage="small"] .animal-hud,.animal-entity[data-species="horse"][data-stage="small"] .animal-hud{bottom:54px}.animal-entity[data-species="cow"][data-stage="medium"] .animal-hud,.animal-entity[data-species="horse"][data-stage="medium"] .animal-hud{bottom:72px}.animal-entity[data-species="cow"][data-stage="adult"] .animal-hud,.animal-entity[data-species="horse"][data-stage="adult"] .animal-hud{bottom:96px}.animal-entity[data-species="rabbit"]{width:72px;height:78px}.animal-entity[data-species="rabbit"]:before{width:26px;height:8px;bottom:2px}.animal-entity[data-species="rabbit"][data-stage="small"]:before{width:20px;height:6px}.animal-entity[data-species="rabbit"][data-stage="adult"]:before{width:34px;height:10px}.animal-entity[data-species="rabbit"] img{width:80px;height:94px;object-fit:contain;object-position:center 72%;transform:translate(-50%,2%)}.animal-entity[data-species="rabbit"].flipped img{transform:translate(-50%,2%) scaleX(-1)}.animal-entity[data-species="rabbit"][data-stage="small"] img{width:64px;height:78px}.animal-entity[data-species="rabbit"][data-stage="medium"] img{width:80px;height:94px}.animal-entity[data-species="rabbit"][data-stage="adult"] img{width:96px;height:116px}.animal-entity[data-species="rabbit"][data-stage="small"] .animal-hud{bottom:62px}.animal-entity[data-species="rabbit"][data-stage="medium"] .animal-hud{bottom:76px}.animal-entity[data-species="rabbit"][data-stage="adult"] .animal-hud{bottom:92px}.animal-entity[data-species="chicken"] img{width:56px;height:76px;object-fit:contain;object-position:bottom center}.animal-entity[data-species="chicken"][data-stage="small"] img{width:48px;height:64px}.animal-entity[data-species="chicken"][data-stage="medium"] img{width:52px;height:70px}.animal-entity[data-species="chicken"][data-stage="adult"] img{width:62px;height:84px}.animal-entity[data-species="turkey"] img{width:64px;height:86px;object-fit:contain;object-position:bottom center}.animal-entity[data-species="turkey"][data-stage="small"] img{width:50px;height:68px}.animal-entity[data-species="turkey"][data-stage="medium"] img{width:58px;height:78px}.animal-entity[data-species="turkey"][data-stage="adult"] img{width:70px;height:94px}.animal-entity[data-species="sheep"] img{width:72px;height:72px;object-fit:contain;object-position:bottom center}.animal-entity[data-species="sheep"][data-stage="small"] img{width:40px;height:40px}.animal-entity[data-species="sheep"][data-stage="medium"] img{width:56px;height:56px}.animal-entity[data-species="sheep"][data-stage="adult"] img{width:72px;height:72px}.animal-entity[data-species="sheep"][data-stage="small"] .animal-hud{bottom:46px}.animal-entity[data-species="sheep"][data-stage="medium"] .animal-hud{bottom:58px}.animal-entity[data-species="sheep"][data-stage="adult"] .animal-hud{bottom:72px}.animal-entity[data-species="turkey"][data-stage="small"] .animal-hud{bottom:64px}.animal-entity[data-species="turkey"][data-stage="medium"] .animal-hud{bottom:74px}.animal-entity[data-species="turkey"][data-stage="adult"] .animal-hud{bottom:88px}.animal-entity[data-species="chicken"][data-stage="small"] .animal-hud{bottom:60px}.animal-entity[data-species="chicken"][data-stage="medium"] .animal-hud{bottom:66px}.animal-entity[data-species="chicken"][data-stage="adult"] .animal-hud{bottom:78px}.animal-entity.selected:after{content:none;display:none}.animal-hud{position:absolute;left:50%;bottom:72px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:2px;z-index:3;pointer-events:none;filter:drop-shadow(0 2px 3px #0005)}.animal-name{display:block;padding:2px 8px;border-radius:999px;background:linear-gradient(180deg,rgba(48,66,58,.82),rgba(28,40,34,.88));border:1px solid rgba(255,232,176,.45);color:#fff8e6;font-size:9px;font-weight:800;line-height:1.2;letter-spacing:.02em;white-space:nowrap;text-shadow:0 1px 1px #0009}.animal-status{display:block;padding:1px 6px;border-radius:999px;background:rgba(255,248,220,.92);border:1px solid #d2a45a;color:#6a4522;font-size:8px;font-weight:800;line-height:1.15;white-space:nowrap}.animal-status.is-empty{display:none}.animal-status.is-sick{background:rgba(255,228,220,.95);border-color:#e07058;color:#a32f24}.animal-status.is-collect{background:linear-gradient(180deg,#ffe9a0,#f0c14a);border-color:#d49a22;color:#7a4a10}.animal-status.is-feed{background:rgba(255,236,210,.95);border-color:#e09a45;color:#9a5318}.animal-smallbar{width:46px;height:5px;border-radius:999px;background:rgba(18,24,20,.55);border:1px solid rgba(255,255,255,.28);overflow:hidden;box-shadow:inset 0 1px 1px #0005}.animal-smallbar i{display:block;height:100%;width:0;border-radius:999px;background:linear-gradient(90deg,#6edc4a,#b8e85a);box-shadow:0 0 4px #8fe06a66;transition:width .25s linear}.animal-smallbar.is-sick i{background:linear-gradient(90deg,#ef7a5a,#f0b06a)}.animal-smallbar.is-collect i{background:linear-gradient(90deg,#f0c14a,#ffe08a)}.animal-smallbar.is-feed i{background:linear-gradient(90deg,#f0a54a,#f5d06a)}.phase-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.phase-card{padding:8px;border-radius:14px;background:#fff2ce;border:2px solid #b77d33}.phase-card b{display:block;font-size:10px}.phase-card small{font-size:8px;color:#76593a}.phase-card.done{background:#e7f5d3;border-color:#6aac4a}.market-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.metric{padding:7px;border-radius:12px;background:#2b6782;color:#fff;text-align:center}.metric small{display:block;font-size:7px}.metric b{font-size:11px}.animal-list-row{display:grid;grid-template-columns:52px 1fr auto;align-items:center;gap:7px;padding:7px;border-radius:14px;background:#fff1cc;border:2px solid #b57b36}.animal-list-row img{width:50px;height:50px;object-fit:contain}.animal-list-row small{display:block;font-size:8px;color:#79603f}.animal-list-row .mini-btn{min-width:55px}.locked-note{opacity:.55;filter:grayscale(.4)}

/* Support channel list */
.support-list{display:grid;align-content:start;align-self:start;gap:6px;padding-top:0}
.support-card{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;align-self:start;gap:8px;padding:8px 10px;border-radius:14px;background:#fff8e6;border:2px solid #b47b36;text-decoration:none;color:inherit;box-shadow:0 1px 0 #c9954a55;transition:transform .12s ease,box-shadow .12s ease;-webkit-tap-highlight-color:transparent}
.support-card:active{transform:scale(.985);box-shadow:none}
.support-card__icon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#fff;border:2px solid #e6c48a;overflow:hidden;flex-shrink:0}
.support-card__icon img{width:22px;height:22px;display:block;object-fit:contain}
.support-card__meta{min-width:0;display:grid;gap:2px}
.support-card__meta b{font-size:12px;font-weight:900;color:#4a2d12;line-height:1.15}
.support-card__meta small{display:block;font-size:9px;color:#8a6640;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.support-card__go{padding:6px 12px;border-radius:999px;background:linear-gradient(#78d247,#409d2b);border:2px solid #2b7621;color:#fff;font-size:10px;font-weight:900;white-space:nowrap;box-shadow:0 1px 0 #2b762166}
.support-card--telegram .support-card__icon{background:#E8F6FD;border-color:#9ad4f0}
.support-card--whatsapp .support-card__icon{background:#E8F8EE;border-color:#9ad9b0}
.support-card--line .support-card__icon{background:#E8FBEA;border-color:#8fd99a}
.support-card--liveChat .support-card__icon{background:#EAF2FF;border-color:#9bb8f0}
.support-card--website .support-card__icon{background:#E7F7FD;border-color:#9ad0ea}
.support-card--facebook .support-card__icon{background:#EAF1FF;border-color:#9bb6ef}
.support-card--discord .support-card__icon{background:#EEF0FF;border-color:#a8b0f0}
