/* 桌宠样式。定位一律由 .dsh-pet（fixed）承担，内层只管画帧。 */
.dsh-pet {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9998;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: left, top;
  pointer-events: auto;
}
.dsh-pet--dragging { cursor: grabbing; }
.dsh-pet__sprite {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  background-repeat: no-repeat;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .25));
  transition: filter .2s ease;
  /* 尺寸由 JS 通过 transform: scale() 控制（见 extras.js applyScale），
     不在这里写死，否则用户改不了大小。 */
  transform-origin: bottom left;
}
.dsh-pet:hover .dsh-pet__sprite {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .38)) brightness(1.04);
}
html[data-mantine-color-scheme="dark"] .dsh-pet__sprite,
.theme--dark .dsh-pet__sprite {
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6));
}
html[data-mantine-color-scheme="dark"] .dsh-pet:hover .dsh-pet__sprite,
.theme--dark .dsh-pet:hover .dsh-pet__sprite {
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .7)) brightness(1.08);
}

/* 入口按钮：浮动在右下角，桌宠隐藏后依然可用 */
.pet-bar {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: flex;
  gap: 6px;
}
.pet-bar__btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .1);
  background: #fff;
  color: #1f2937;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .16);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pet-bar__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .24);
}
.pet-bar__btn:active { transform: translateY(0); }
.pet-bar__btn--off { opacity: .55; }
html[data-mantine-color-scheme="dark"] .pet-bar__btn,
.theme--dark .pet-bar__btn {
  background: #26282c;
  color: #e8eaed;
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
@media (max-width: 768px) {
  .dsh-pet { display: none !important; }
}

/* ── 尺寸面板 ─────────────────────────────────────────── */
.pet-bar__panel {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-right: 6px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .1);
  box-shadow: 0 2px 10px rgba(15, 23, 42, .16);
}
.pet-bar__panel-label { font-size: 12px; color: #475569; font-weight: 600; }
.pet-bar__panel-pct {
  font-size: 12px; color: #1f2937; font-weight: 700;
  min-width: 40px; text-align: right; font-variant-numeric: tabular-nums;
}
.pet-bar__range { width: 108px; accent-color: #6366f1; cursor: pointer; }
.pet-bar__panel-reset {
  font-size: 11px; padding: 2px 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(0, 0, 0, .12); background: #f8fafc; color: #475569;
}
.pet-bar__panel-reset:hover { background: #eef2ff; color: #4f46e5; }
html[data-mantine-color-scheme="dark"] .pet-bar__panel,
.theme--dark .pet-bar__panel {
  background: #26282c; border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
html[data-mantine-color-scheme="dark"] .pet-bar__panel-label,
.theme--dark .pet-bar__panel-label { color: #9aa0a6; }
html[data-mantine-color-scheme="dark"] .pet-bar__panel-pct,
.theme--dark .pet-bar__panel-pct { color: #e8eaed; }
html[data-mantine-color-scheme="dark"] .pet-bar__panel-reset,
.theme--dark .pet-bar__panel-reset {
  background: #2f3237; color: #cbd5e1; border-color: rgba(255, 255, 255, .14);
}
.dsh-pet { touch-action: none; }

/* 不乱跑开关 */
.pet-bar__stay {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #475569; font-weight: 600;
  cursor: pointer; user-select: none; white-space: nowrap;
}
.pet-bar__stay-box { accent-color: #6366f1; cursor: pointer; margin: 0; }
html[data-mantine-color-scheme="dark"] .pet-bar__stay,
.theme--dark .pet-bar__stay { color: #9aa0a6; }
