/* 养成小猫6 · 竖屏放置养成
   暖橘奶油色小窝，所有图形均为原生 CSS / SVG，无外部资源。 */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #FFD9B8;
  color: #3B2A20;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body { overflow-x: hidden; }

button {
  font-family: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

h1, h2, h3, p { margin: 0; }

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #FFD9B8;
}

/* ============ 场景 ============ */
.scene {
  position: relative;
  flex: 1 1 auto;
  min-height: 292px;
  overflow: hidden;
  background:
    radial-gradient(115% 76% at 50% -4%, #FFF0D9 0%, #FFE4C6 34%, #FFD4AE 68%, #FFC99C 100%);
  isolation: isolate;
}

.wall-glow {
  position: absolute;
  left: 50%;
  top: -18%;
  width: 92%;
  height: 78%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 252, 232, .92) 0%, rgba(255, 245, 220, .4) 46%, rgba(255, 245, 220, 0) 74%);
  pointer-events: none;
}

/* 拱形窗 */
.window {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 62px);
  width: 58%;
  height: 44%;
  max-height: 212px;
  min-height: 112px;
  transform: translateX(-50%);
  padding: 7px;
  border-radius: 96px 96px 16px 16px;
  background: linear-gradient(180deg, #FFF8EC, #F8E2C9);
  box-shadow:
    0 12px 26px rgba(176, 102, 44, .13),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

.window-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 90px 90px 10px 10px;
  background: linear-gradient(180deg, #A9DDF4 0%, #C8ECFA 46%, #DFF6F2 72%, #F6F9DE 100%);
}

.win-sun {
  position: absolute;
  right: 20%;
  top: 17%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFE08A;
  box-shadow: 0 0 0 7px rgba(255, 230, 152, .32), 0 0 22px rgba(255, 216, 100, .72);
}

.win-cloud {
  position: absolute;
  height: 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .9);
}
.win-cloud::before,
.win-cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}
.win-cloud.c1 { left: 13%; top: 27%; width: 40px; }
.win-cloud.c1::before { width: 18px; height: 18px; left: 8px; top: -8px; }
.win-cloud.c1::after { width: 12px; height: 12px; left: 22px; top: -5px; }
.win-cloud.c2 { right: 15%; top: 47%; width: 30px; opacity: .72; }
.win-cloud.c2::before { width: 13px; height: 13px; left: 6px; top: -6px; }

.win-hill {
  position: absolute;
  bottom: -20%;
  border-radius: 50%;
}
.win-hill.h1 {
  left: -18%;
  width: 88%;
  height: 48%;
  background: #A9D3A0;
  transform: rotate(4deg);
}
.win-hill.h2 {
  right: -30%;
  width: 96%;
  height: 42%;
  background: #C0DFAD;
  transform: rotate(-5deg);
}

.win-bar {
  position: absolute;
  background: rgba(255, 247, 232, .86);
  box-shadow: 0 1px 2px rgba(120, 80, 30, .12);
}
.win-bar.v { left: 50%; top: 0; bottom: 0; width: 5px; margin-left: -2.5px; }
.win-bar.h { left: 0; right: 0; top: 58%; height: 5px; }

.win-sill {
  position: absolute;
  left: -8px;
  right: -8px;
  bottom: -7px;
  height: 13px;
  border-radius: 7px;
  background: linear-gradient(180deg, #F7D7B1, #E6B183);
  box-shadow: 0 5px 8px rgba(150, 90, 40, .16);
}

/* 斜射阳光与光尘 */
.sunbeam {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(118deg,
    rgba(255, 255, 255, 0) 24%,
    rgba(255, 250, 218, .36) 38%,
    rgba(255, 255, 255, .08) 50%,
    rgba(255, 255, 255, 0) 62%);
  mix-blend-mode: soft-light;
}

.mote {
  position: absolute;
  z-index: 3;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 236, .85);
  box-shadow: 0 0 8px rgba(255, 250, 210, .9);
  animation: moteFloat 9s ease-in-out infinite;
  pointer-events: none;
}
.mote.m1 { left: 28%; top: 28%; animation-delay: 0s; }
.mote.m2 { left: 66%; top: 36%; width: 4px; height: 4px; animation-delay: -3s; }
.mote.m3 { left: 48%; top: 19%; width: 3px; height: 3px; animation-delay: -6s; }

@keyframes moteFloat {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: .35; }
  50% { transform: translate3d(9px, -14px, 0); opacity: .9; }
}

/* 木地板与地毯 */
.floor {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 27%;
  background:
    linear-gradient(180deg, #F7D5AF 0%, #EFC296 38%, #E7B181 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45);
}
.floor::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(160, 100, 50, .09) 62px 64px),
    repeating-linear-gradient(180deg, transparent 0 30px, rgba(150, 92, 45, .06) 30px 32px);
}
.floor::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 9px;
  background: linear-gradient(180deg, #FFE8CC, #F4CDA4);
  box-shadow: 0 2px 4px rgba(160, 100, 50, .12);
}

.rug {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 3.5%;
  width: 87%;
  height: 18%;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 42%, #FFE9D3 0%, #FFD9B8 48%, #F4BE8B 78%, #E8AA70 100%);
  border: 2px dashed rgba(255, 255, 255, .62);
  box-shadow: 0 9px 18px rgba(172, 101, 45, .13);
}

/* 场景道具 */
.prop { position: absolute; }
.prop-plant {
  z-index: 2;
  left: -8px;
  bottom: 48px;
  width: clamp(74px, 21vw, 98px);
  filter: drop-shadow(0 8px 10px rgba(130, 78, 35, .13));
}
.prop-yarn {
  z-index: 6;
  right: 3px;
  bottom: 20px;
  width: clamp(56px, 15vw, 72px);
  filter: drop-shadow(0 6px 7px rgba(130, 78, 35, .16));
}
.prop-bowl {
  z-index: 6;
  left: -4px;
  bottom: 12px;
  width: clamp(82px, 23vw, 106px);
  filter: drop-shadow(0 6px 7px rgba(130, 78, 35, .14));
}

/* 小猫 */
.cat-stage {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 90%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.cat-btn {
  position: relative;
  display: block;
  width: min(88vw, 352px);
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 320 / 314;
  pointer-events: auto;
  outline: none;
  filter: drop-shadow(0 16px 14px rgba(154, 82, 32, .14));
  transition: transform .18s ease;
}
.cat-btn:active { transform: scale(.985); }
.cat-btn:focus-visible { outline: 3px solid rgba(255, 138, 61, .55); outline-offset: 5px; border-radius: 26px; }

.cat-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: catBreathe 3.9s ease-in-out infinite;
  transform-origin: 50% 92%;
}

@keyframes catBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2.5px) scale(1.012); }
}

.cat-stage.petted .cat-svg { animation: catHappy .62s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes catHappy {
  0% { transform: scale(1); }
  28% { transform: scale(1.035, .965) translateY(2px); }
  58% { transform: scale(.975, 1.035) translateY(-4px); }
  100% { transform: scale(1); }
}

.cat-svg .tail {
  transform-box: fill-box;
  transform-origin: 8% 88%;
  animation: tailSway 3.7s ease-in-out infinite;
}
@keyframes tailSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(8deg); }
}

.cat-svg .eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 5.6s infinite;
}
@keyframes blink {
  0%, 91%, 100% { transform: scaleY(1); }
  93.5%, 95.5% { transform: scaleY(.06); }
}

.cat-svg .ear {
  transform-box: fill-box;
  animation: earTwitch 7.2s ease-in-out infinite;
}
.cat-svg .ear-left { transform-origin: 82% 100%; }
.cat-svg .ear-right { transform-origin: 18% 100%; animation-delay: -2.4s; }
@keyframes earTwitch {
  0%, 86%, 100% { transform: rotate(0deg); }
  88.5% { transform: rotate(-5deg); }
  91% { transform: rotate(1.5deg); }
}

.cat-svg .mouth-hungry { display: none; }
.cat-stage[data-mood="hungry"] .mouth-happy { display: none; }
.cat-stage[data-mood="hungry"] .mouth-hungry { display: block; }
.cat-stage[data-mood="hungry"] .eyes { animation-duration: 7.4s; }
.cat-stage[data-mood="sad"] .tail { animation-duration: 5.6s; }

/* 对话气泡 */
.speech {
  position: absolute;
  z-index: 8;
  right: 5%;
  top: 29%;
  max-width: 46%;
  padding: 9px 13px;
  border-radius: 15px 15px 15px 5px;
  background: rgba(255, 253, 246, .96);
  border: 1.5px solid #F4D3B4;
  box-shadow: 0 8px 18px rgba(150, 85, 38, .14);
  font-size: 12px;
  line-height: 1.42;
  color: #7A5037;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px) scale(.92);
  transform-origin: 20% 100%;
  transition: opacity .22s ease, transform .28s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}
.speech::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -7px;
  width: 11px;
  height: 11px;
  background: inherit;
  border-right: 1.5px solid #F4D3B4;
  border-bottom: 1.5px solid #F4D3B4;
  transform: rotate(45deg);
  border-radius: 0 0 3px 0;
}
.speech.show { opacity: 1; transform: translateY(0) scale(1); }

/* 粒子层 */
.fx-layer {
  position: absolute;
  inset: 0;
  z-index: 9;
  overflow: hidden;
  pointer-events: none;
}
.fx {
  position: absolute;
  display: block;
  pointer-events: none;
  will-change: transform, opacity;
  animation: fxFloat 1.15s cubic-bezier(.22, .75, .3, 1) forwards;
}
.fx .mp-icon { display: block; width: 100%; height: 100%; }
.fx-heart { width: 20px; height: 20px; color: #FF7895; filter: drop-shadow(0 2px 3px rgba(214, 62, 95, .28)); }
.fx-spark { width: 20px; height: 20px; color: #FFC94D; filter: drop-shadow(0 0 6px rgba(255, 190, 50, .85)); }
.fx-fish {
  width: 26px;
  height: 26px;
  color: #FF9A3D;
  filter: drop-shadow(0 2px 4px rgba(214, 112, 30, .3));
}
.fx-fish svg { display: block; width: 100%; height: 100%; }

@keyframes fxFloat {
  0% { opacity: 0; transform: translate(-50%, 4px) scale(.35) rotate(0deg); }
  18% { opacity: 1; transform: translate(-50%, -8px) scale(1.08) rotate(var(--rot, 0deg)); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -82px) scale(.62) rotate(calc(var(--rot, 0deg) * 2)); }
}

/* ============ 顶部 HUD ============ */
.hud {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 0;
  pointer-events: none;
}

.player-chip,
.wallet {
  display: flex;
  align-items: center;
  pointer-events: auto;
  background: rgba(255, 251, 243, .82);
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow: 0 7px 18px rgba(150, 82, 32, .13);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.player-chip {
  min-width: 0;
  max-width: 54%;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
}

.avatar {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #FFB36E, #F37B2E);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { line-height: 1; transform: translateY(-.5px); }

.player-txt {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
}
.player-txt strong {
  font-size: 12.5px;
  font-weight: 700;
  color: #4A3224;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 88px;
}
.player-txt small {
  font-size: 9.5px;
  color: #A98569;
  white-space: nowrap;
}

.wallet {
  flex: none;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
}
.fish-badge {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #FFB05C, #F3741D);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 7px rgba(221, 105, 25, .28);
}
.fish-badge svg { width: 17px; height: 17px; display: block; }
.fish-badge.small { width: 26px; height: 26px; }
.fish-badge.small svg { width: 15px; height: 15px; }

.wallet-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}
.wallet-txt small {
  font-size: 8.5px;
  letter-spacing: .4px;
  color: #AC8A70;
}
.wallet-txt strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.2px;
  color: #4A2E1D;
  font-variant-numeric: tabular-nums;
  transition: transform .16s ease, color .16s ease;
}
.wallet.tick .wallet-txt strong { transform: translateY(-1.5px); color: #E8671A; }

/* ============ 底部养成面板 ============ */
.sheet {
  position: relative;
  z-index: 10;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: -12px;
  padding: 8px 16px calc(12px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #FFFCF6 0%, #FFF7EC 58%, #FFF3E3 100%);
  border-top: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 -12px 32px rgba(146, 78, 28, .12);
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image: radial-gradient(circle at 11px 11px, rgba(255, 138, 61, .045) 1.5px, transparent 1.7px);
  background-size: 23px 23px;
}

.sheet > * { position: relative; }

.sheet-grip {
  width: 38px;
  height: 4px;
  margin: 0 auto 1px;
  border-radius: 99px;
  background: #EAD4BF;
}

.cat-meta { padding-top: 1px; }
.name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.name-line h1 {
  font-size: 25px;
  line-height: 1.08;
  letter-spacing: .5px;
  font-weight: 800;
  color: #3B281C;
}

.lv-pill {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #fff;
  background: linear-gradient(135deg, #FFA34F, #F0741E);
  box-shadow: 0 3px 7px rgba(230, 110, 25, .25);
  font-variant-numeric: tabular-nums;
}
.lv-pill.pop { animation: pillPop .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pillPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.32) rotate(-3deg); }
  100% { transform: scale(1); }
}

.mood-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: #FFE9DE;
  color: #DD6127;
  transition: background .3s, color .3s;
}
.mood-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(221, 97, 39, .13);
}
.mood-pill[data-mood="calm"] { background: #FFF0D9; color: #B7792D; }
.mood-pill[data-mood="hungry"] { background: #FFEECB; color: #B97013; }
.mood-pill[data-mood="sad"] { background: #EAF1F6; color: #5D7F96; }
.mood-pill[data-mood="bliss"] { background: #FFE4E9; color: #E2587B; }

.cat-sub {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.3;
  color: #A3836D;
}

.xp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -2px;
  font-size: 10px;
  color: #A98A73;
}
.xp-label { flex: none; font-weight: 600; }
.xp-track {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #F1E0D0;
  box-shadow: inset 0 1px 2px rgba(150, 100, 60, .08);
}
.xp-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #FFD08A, #FF983F);
  transition: width .55s cubic-bezier(.22, .75, .3, 1);
}
.xp-num {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #B2947E;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.stat-card {
  padding: 9px 10px 10px;
  border-radius: 16px;
  background: #FFFDF9;
  border: 1px solid #F2E1D0;
  box-shadow: 0 4px 12px rgba(160, 100, 50, .05);
}
.stat-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-ic {
  flex: none;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}
.stat-ic .mp-icon { width: 15px; height: 15px; }
.stat-ic.food { background: #FFE8D3; color: #F0771F; }
.stat-ic.mood { background: #FFE4EA; color: #EF6288; }
.stat-name {
  flex: 1;
  font-size: 10.5px;
  font-weight: 600;
  color: #8C6B55;
  white-space: nowrap;
}
.stat-val {
  font-size: 14px;
  font-weight: 800;
  color: #4B3121;
  font-variant-numeric: tabular-nums;
}
.stat-card.low .stat-val { color: #E05349; }
.stat-card.low .stat-ic { animation: softPulse 1.8s ease-in-out infinite; }
@keyframes softPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.bar {
  height: 7px;
  margin-top: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: #F3E4D6;
  box-shadow: inset 0 1px 2px rgba(140, 90, 50, .08);
}
.bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width .6s cubic-bezier(.22, .75, .3, 1);
}
#satBar { background: linear-gradient(90deg, #FFC06B, #FF8A3D); }
#moodBar { background: linear-gradient(90deg, #FFB3C3, #F56C90); }

/* 放置收益卡 */
.idle-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
  padding: 11px 13px;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(90% 150% at 100% 0%, rgba(255, 227, 181, .5) 0%, rgba(255, 227, 181, 0) 52%),
    linear-gradient(135deg, #FFA154 0%, #F98936 46%, #F0711C 100%);
  box-shadow: 0 10px 22px rgba(226, 105, 24, .26), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.idle-paw {
  position: absolute;
  right: 44px;
  bottom: -30px;
  width: 92px;
  height: 92px;
  color: #fff;
  opacity: .11;
  transform: rotate(-14deg);
  pointer-events: none;
}
.idle-main {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.idle-ic {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.idle-ic .mp-icon { width: 20px; height: 20px; color: #fff; }
.idle-txt { min-width: 0; }
.idle-txt h2 {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .3px;
  line-height: 1.2;
}
.idle-txt p {
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.2;
  color: rgba(255, 255, 255, .82);
  white-space: nowrap;
}
.idle-rate {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1;
}
.idle-rate strong {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(160, 70, 10, .12);
}
.idle-rate span {
  margin-top: 3px;
  font-size: 9px;
  color: rgba(255, 255, 255, .8);
}

/* 操作按钮 */
.actions {
  display: flex;
  gap: 9px;
  margin-top: 1px;
}
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 56px;
  padding: 0 14px;
  border-radius: 18px;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, opacity .2s ease;
  user-select: none;
}
.btn .mp-icon { width: 20px; height: 20px; }

.btn.primary {
  flex: 1.4;
  color: #fff;
  background: linear-gradient(135deg, #FFA453 0%, #FA8330 55%, #F06E18 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    0 9px 18px rgba(233, 110, 26, .3);
}
.btn.primary .cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 1px;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 800;
  background: rgba(255, 255, 255, .23);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  font-variant-numeric: tabular-nums;
}
.btn.primary .cost svg { width: 13px; height: 13px; display: block; }

.btn.ghost {
  flex: 1;
  color: #6C4A33;
  background: #FFFDF8;
  border: 1.5px solid #F0D7BF;
  box-shadow: 0 5px 13px rgba(160, 100, 50, .08);
}
.btn.ghost .mp-icon { color: #F0771F; }

.btn:active {
  transform: translateY(2px) scale(.985);
  box-shadow: 0 2px 6px rgba(150, 80, 30, .16);
}
.btn.shake { animation: btnShake .36s ease; }
@keyframes btnShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.hint {
  margin-top: -1px;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: .2px;
  color: #B99B84;
}

/* ============ 提示条 ============ */
.toast {
  position: fixed;
  z-index: 110;
  top: calc(env(safe-area-inset-top) + 74px);
  left: 50%;
  max-width: 84vw;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(60, 39, 26, .92);
  color: #FFF8EE;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 20px rgba(60, 30, 10, .24);
  opacity: 0;
  transform: translate(-50%, -7px) scale(.94);
  transition: opacity .22s ease, transform .25s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ============ 离线收益弹窗 ============ */
.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  opacity: 0;
  transition: opacity .24s ease;
}
.modal[hidden] { display: none; }
.modal.show { opacity: 1; }
.modal-veil {
  position: absolute;
  inset: 0;
  background: rgba(61, 35, 18, .45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  width: min(86vw, 330px);
  padding: 27px 22px 19px;
  border-radius: 27px;
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, #FFF7E8 0%, #FFF9F1 48%, #FFF4E6 100%);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 26px 60px rgba(82, 44, 16, .34);
  opacity: 0;
  transform: translateY(18px) scale(.94);
  transition: opacity .26s ease, transform .34s cubic-bezier(.34, 1.4, .64, 1);
}
.modal.show .modal-card { opacity: 1; transform: translateY(0) scale(1); }

.moon-badge {
  width: 58px;
  height: 58px;
  margin: -3px auto 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #F07A24;
  background: linear-gradient(150deg, #FFE7C4, #FFD09A);
  box-shadow: 0 8px 18px rgba(223, 129, 42, .22), inset 0 1px 0 #fff;
}
.moon-badge .mp-icon { width: 27px; height: 27px; }

.modal-kicker {
  font-size: 10.5px;
  letter-spacing: 2.4px;
  font-weight: 700;
  color: #C4966E;
}
.modal-card h2 {
  margin-top: 5px;
  font-size: 22px;
  letter-spacing: .5px;
  font-weight: 800;
  color: #3D291B;
}
.modal-copy {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.6;
  color: #96765F;
}
.offline-amount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 13px 0 17px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #FFF1DF;
  border: 1px dashed #F2CBA5;
  color: #7A5236;
  font-size: 12px;
  font-weight: 600;
}
.offline-amount strong {
  font-size: 31px;
  line-height: 1;
  font-weight: 800;
  color: #EE7018;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
}
.btn.wide { width: 100%; height: 52px; border-radius: 16px; }
.modal-foot {
  margin-top: 10px;
  font-size: 9.5px;
  color: #BB9C84;
}

/* ============ 小屏适配 ============ */
@media (max-height: 700px) {
  .scene { min-height: 258px; }
  .sheet { gap: 8px; padding-top: 6px; }
  .name-line h1 { font-size: 22px; }
  .cat-sub { margin-top: 2px; }
  .stat-card { padding: 7px 9px 8px; }
  .idle-card { min-height: 56px; padding: 9px 12px; }
  .btn { height: 50px; border-radius: 16px; }
  .hint { display: none; }
  .window { top: calc(env(safe-area-inset-top) + 56px); }
  .speech { top: 27%; }
}

@media (max-width: 350px) {
  .player-txt small { display: none; }
  .player-chip { padding-right: 9px; }
  .wallet { padding-right: 9px; }
  .btn.primary { padding: 0 10px; }
  .btn { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
