/* 地球Online · 悬浮陪伴位（黑白硬边 HUD） */
:root {
  --eo-pet-z: 98;
  --eo-pet-panel-z: 10050;
  --eo-pet-fx-z: 10060;
  --eo-pet-ink: var(--t0, #111111);
  --eo-pet-muted: var(--t2, rgba(0, 0, 0, 0.55));
  --eo-pet-faint: var(--t3, rgba(0, 0, 0, 0.38));
  --eo-pet-bg: var(--s0, #ffffff);
  --eo-pet-surface: var(--s2, #fafafa);
  --eo-pet-border: #111111;
  --eo-pet-edge: var(--edge-2, rgba(0, 0, 0, 0.14));
  --eo-pet-shadow: 8px 8px 0 #111;
  --eo-pet-shadow-sm: 0 4px 0 rgba(0, 0, 0, 0.18);
  --eo-pet-radius: 10px;
  --eo-pet-font: var(--font-ui, "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif);
  --eo-pet-mono: var(--font-code, "IBM Plex Mono", "Cascadia Mono", Consolas, monospace);
  --eo-pet-safe-bottom: env(safe-area-inset-bottom, 0px);
  --eo-pet-dock: 0px;
}

#eo-pet-root {
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  z-index: var(--eo-pet-z);
  font-family: var(--eo-pet-font);
  color: var(--eo-pet-ink);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;
}

html.eo-arena-page #eo-pet-root {
  --eo-pet-z: 260;
}

html.eo-arena-page #eo-pet-root.ep-over-sheet {
  --eo-pet-z: 10080;
}

html.eo-arena-page #ep-panel {
  z-index: 10090;
}

#eo-pet-root * { box-sizing: border-box; }
#eo-pet-root .ep-hit {
  pointer-events: auto;
  position: relative;
  width: 168px;
}

/* 贴在整块宠物组件上方（宠物头顶） */
#eo-pet-root .ep-float-above {
  position: absolute !important;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin: 0 0 8px !important;
  z-index: 26;
  pointer-events: auto;
}
#eo-pet-root .ep-above-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 36px);
  transform: translateX(-50%) translateY(6px);
  z-index: 24;
  width: max-content;
  max-width: min(92vw, 520px);
  margin: 0;
  padding: 6px 12px;
  background: var(--eo-pet-bg, #fff);
  border: 1px solid var(--eo-pet-border, #111);
  border-radius: 2px;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
  opacity: 0;
  pointer-events: none;
  transition: 0.18s cubic-bezier(0.22, 0.9, 0.28, 1);
}
#eo-pet-root .ep-above-tip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#eo-pet-root .ep-above-tip:not(.show) {
  visibility: hidden;
}

@media (max-width: 768px) {
  :root { --eo-pet-dock: 72px; }
  #eo-pet-root {
    bottom: calc(var(--eo-pet-dock) + 10px + var(--eo-pet-safe-bottom));
    right: max(10px, env(safe-area-inset-right, 0px));
  }
}

/* ── 收起 / 恢复 ── */
#eo-pet-root.is-collapsed .ep-hit,
#eo-pet-root.is-session-hidden .ep-hit {
  width: auto;
  min-width: 0;
}
.ep-collapsed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 26px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--eo-pet-bg);
  border: 1px solid var(--eo-pet-border);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--eo-pet-ink);
  font-family: var(--eo-pet-mono);
  line-height: 1;
}
.ep-collapsed:active { transform: translateY(1px); }

.ep-restore,
.ep-restore-fab-host .ep-restore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 17, 17, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
  flex-shrink: 0;
}
.ep-restore:active { transform: translateY(1px); }
.ep-restore img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: auto;
  pointer-events: none;
  display: block;
  border-radius: 50%;
}
.ep-restore-fab-host {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  margin: 0;
  padding: 0;
  line-height: 0;
}
#eo-pet-root.is-session-hidden {
  /* 有 FAB 时根节点隐藏，圆圈挂到联系GM栈里 */
}

/* ── 迷你宠物 ── */
.ep-mini {
  position: relative;
  width: 96px;
  height: 96px;
  cursor: pointer;
  margin: 0 auto;
  z-index: 8;
  overflow: visible;
}
.ep-mini:active { cursor: grabbing; }
.ep-mini::after { display: none; }

.ep-sprite-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 禁止对 GIF 容器用 filter：祖先 filter 会迫使每帧重绘动画 */
  contain: layout style;
}
.ep-sprite-wrap::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 46px;
  height: 8px;
  margin-left: -23px;
  background: rgba(0, 0, 0, 0.14);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.ep-sprite {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: auto;
  animation: ep-idle 3.2s steps(2, end) infinite;
}
/* Codpet 真帧横条：JS ticker 切 background-position */
.ep-sprite.is-sheet {
  width: 88px;
  height: 88px;
  object-fit: none;
  object-position: 0 0;
  background-repeat: no-repeat;
  background-size: auto 88px;
  image-rendering: auto;
  animation: none;
}
.ep-sprite.is-gif {
  width: 88px;
  height: 88px;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  image-rendering: auto;
  animation: none !important;
  filter: none !important;
  /* 独立合成层，拖动/切换更稳 */
  transform: translateZ(0);
  backface-visibility: hidden;
}
.ep-sprite.is-gif img.ep-gif-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.ep-sprite.is-sheet[data-anim="eat"],
.ep-sprite.is-sheet[data-anim="play"],
.ep-sprite.is-sheet[data-anim="happy"] {
  animation: none;
}
.ep-sprite.is-sheet[data-anim="sleep"] {
  animation: none;
}
.ep-fx {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  pointer-events: none;
  image-rendering: auto;
  background-repeat: no-repeat;
  background-size: auto 88px;
  opacity: 0;
  z-index: 5;
}
.ep-fx.show {
  opacity: 1;
}
.ep-fx.fx-evolve {
  background-size: auto 88px;
}
.ep-mini[data-mood="hungry"] .ep-sprite.is-sheet,
.ep-mini[data-mood="sad"] .ep-sprite.is-sheet {
  filter: saturate(0.75) contrast(1.05);
}
.ep-mini[data-mood="weak"] .ep-sprite.is-sheet {
  filter: grayscale(0.4) brightness(0.92);
  animation-duration: 1.4s;
}
/* 非 GIF 的简易立绘才做 CSS 动画；GIF 再叠 animation/filter 会严重掉帧 */
.ep-mini[data-mood="hungry"] .ep-sprite:not(.is-sheet):not(.is-gif),
.ep-mini[data-mood="sad"] .ep-sprite:not(.is-sheet):not(.is-gif) {
  animation: ep-sad 2.6s ease-in-out infinite;
  filter: saturate(0.7) contrast(1.05);
}
.ep-mini[data-mood="weak"] .ep-sprite:not(.is-sheet):not(.is-gif) {
  animation: ep-weak 3s ease-in-out infinite;
  filter: grayscale(0.45) brightness(0.92);
}
.ep-mini[data-mood="sleep"] .ep-sprite:not(.is-sheet):not(.is-gif) { animation: ep-sleep 4s ease-in-out infinite; }
.ep-mini[data-mood="happy"] .ep-sprite:not(.is-sheet):not(.is-gif),
.ep-mini[data-mood="excited"] .ep-sprite:not(.is-sheet):not(.is-gif) { animation: ep-happy 1.6s ease-in-out infinite; }
#eo-pet-root.is-dragging {
  will-change: transform;
}

.ep-aura {
  display: none !important;
}

.ep-status-icons {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 2px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: max-content;
  max-width: none;
  pointer-events: none;
  z-index: 9;
}
.ep-status-icons.is-dead {
  top: -22px;
  bottom: auto;
}
.ep-status-icons span {
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: var(--eo-pet-font);
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
  background: var(--eo-pet-bg);
  border: 1px solid var(--eo-pet-border);
  border-radius: 2px;
  padding: 1px 5px;
  line-height: 1.3;
  box-shadow: none;
}
.ep-status-icons .ep-status-dead {
  color: #8b1a1a;
  border-color: #8b1a1a;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
}

/* 圆框下方：停靠气泡 + 睡觉文案 + 提示 */
.ep-under {
  position: relative;
  width: 168px;
  margin: 0 auto;
  padding-bottom: 2px;
  pointer-events: auto;
  z-index: 6;
}
.ep-dock {
  position: relative;
  width: 168px;
  height: 48px;
  margin: -4px auto 0;
  overflow: visible;
}
.ep-dock-btn {
  position: absolute;
  left: 50%;
  top: 0;
  min-width: 40px;
  padding: 5px 9px;
  border: 1px solid var(--eo-pet-border, #111);
  border-radius: 999px;
  background: var(--eo-pet-bg, #fff);
  color: var(--eo-pet-ink, #111);
  font: 600 11px/1.2 var(--eo-pet-font);
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
  z-index: 2;
  transform: translate(-50%, 0);
}
.ep-dock-btn:hover {
  background: #111;
  color: #fff;
}
.ep-dock-mid {
  z-index: 3;
}
.ep-dock-mid[hidden] {
  display: none !important;
}

/* 听歌迷你控制条（收起/隐藏下方横排） */
.ep-music-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  width: 168px;
  margin: 2px auto 0;
  padding: 4px 0 0;
  pointer-events: auto;
  z-index: 7;
  position: relative;
}
.ep-music-bar[hidden] {
  display: none !important;
}
.ep-music-now {
  font-size: 10px;
  line-height: 1.25;
  color: var(--eo-pet-muted, rgba(0,0,0,0.55));
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 2px;
}
.ep-music-ctls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}
.ep-music-ctl {
  flex: 1;
  min-width: 0;
  padding: 5px 2px;
  border: 1px solid var(--eo-pet-border, #111);
  border-radius: 999px;
  background: var(--eo-pet-bg, #fff);
  color: var(--eo-pet-ink, #111);
  font: 600 10px/1.2 var(--eo-pet-font);
  cursor: pointer;
  white-space: nowrap;
}
.ep-music-ctl:hover {
  background: #111;
  color: #fff;
}
.ep-music-ctl.ep-music-expand {
  flex: 0.85;
  font-size: 9px;
}
.ep-music-ctl.ep-music-close {
  flex: 0.85;
  font-size: 9px;
}

.ep-sleep-line {
  margin-top: 2px;
  text-align: center;
  font-size: 11px;
  line-height: 1.35;
  color: var(--eo-pet-muted, rgba(0,0,0,0.55));
  font-family: var(--eo-pet-font);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.ep-sleep-line .ep-sleep-zzz {
  display: inline-block;
  margin-left: 2px;
  font-weight: 700;
  letter-spacing: 0.04em;
  animation: ep-zzz-bounce 1.6s ease-in-out infinite;
}
.ep-sleep-line .ep-sleep-text {
  animation: ep-sleep-fade 2.4s ease-in-out infinite;
}
.ep-sleep-line .ep-sleep-name {
  font-weight: 700;
  color: var(--eo-pet-ink, #111);
}
@keyframes ep-zzz-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-3px); opacity: 1; }
  70% { transform: translateY(-1px); opacity: 0.75; }
}
@keyframes ep-sleep-fade {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}
.ep-sleep-line[hidden] {
  display: none !important;
}

.ep-bubble {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  margin: 6px auto 0;
  max-width: 160px;
  background: var(--eo-pet-bg);
  border: 1px solid var(--eo-pet-border);
  border-radius: var(--eo-pet-radius);
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.4;
  box-shadow: none;
  opacity: 0;
  transform: translateY(4px);
  transition: 0.22s cubic-bezier(0.22, 0.9, 0.28, 1);
  pointer-events: none;
  white-space: pre-wrap;
  z-index: 3;
  text-align: center;
}
.ep-bubble.show { opacity: 1; transform: none; }
@media (max-width: 768px) {
  .ep-bubble {
    max-width: min(180px, 70vw);
  }
}

.ep-local-toast {
  position: relative;
  margin: 6px auto 0;
  max-width: 168px;
  background: #111;
  color: #fff;
  padding: 6px 10px;
  border-radius: 2px;
  border: 1px solid #111;
  font-family: var(--eo-pet-font);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0;
  z-index: 8;
  opacity: 0;
  transition: 0.22s;
  pointer-events: none;
  text-align: center;
  box-shadow: none;
  display: none;
}
.ep-local-toast.show {
  display: block;
  opacity: 1;
}

.ep-toolbar {
  display: none;
}
.ep-tool-btn {
  min-width: 34px;
  min-height: 26px;
  border-radius: 2px;
  border: 1px solid var(--eo-pet-border);
  background: var(--eo-pet-bg);
  font-size: 10px;
  cursor: pointer;
  line-height: 1;
  padding: 0 8px;
  color: var(--eo-pet-muted);
  font-family: var(--eo-pet-font);
  letter-spacing: 0;
  box-shadow: none;
}
.ep-tool-btn:hover,
.ep-tool-btn:active {
  color: var(--eo-pet-ink);
  background: var(--eo-pet-surface);
}

/* ── 遮罩 ── */
.ep-mask {
  position: fixed;
  inset: 0;
  z-index: calc(var(--eo-pet-panel-z) - 1);
  background: rgba(5, 4, 3, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.ep-mask.show {
  opacity: 1;
  pointer-events: auto;
}

/* 自定义确认框（永久关闭等） */
.ep-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 4, 3, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.ep-confirm-overlay.show {
  display: flex;
}
.ep-confirm-card {
  width: min(320px, 92vw);
  background: var(--eo-pet-bg, #fff);
  border: 1px solid var(--eo-pet-border, #111);
  border-radius: 2px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.12);
  padding: 16px 16px 14px;
  font-family: var(--eo-pet-font, inherit);
  color: var(--eo-pet-ink, #111);
}
.ep-confirm-msg {
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}
.ep-confirm-input {
  width: 100%;
  box-sizing: border-box;
  margin: -6px 0 14px;
  border: 1px solid var(--eo-pet-border, #111);
  border-radius: 2px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--eo-pet-bg, #fff);
}
.ep-confirm-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}
.ep-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* 一起听歌 · 本地歌单面板（无网易云 iframe） */
.ep-music-panel {
  position: relative;
  width: min(280px, 82vw);
  margin: 8px auto 0;
  background: var(--eo-pet-bg, #fff);
  border: 1px solid var(--eo-pet-border, #111);
  border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
  padding: 8px;
  text-align: left;
  z-index: 6;
  animation: ep-panel-in 0.18s cubic-bezier(0.22, 0.9, 0.28, 1);
}
.ep-music-panel.ep-float-above {
  width: min(280px, 82vw);
}
.ep-music-panel[hidden] { display: none !important; }
.ep-music-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
}
.ep-music-panel-ctls {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.ep-music-panel-ctls .ep-music-ctl {
  flex: 1;
}
.ep-music-list {
  max-height: min(280px, 42vh);
  overflow: auto;
  border: 1px solid var(--eo-pet-edge, rgba(0,0,0,.14));
  border-radius: 4px;
  background: var(--eo-pet-surface, #fafafa);
  -webkit-overflow-scrolling: touch;
}
.ep-music-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: 12px/1.3 var(--eo-pet-font);
  color: var(--eo-pet-ink, #111);
}
.ep-music-item:last-child { border-bottom: 0; }
.ep-music-item:hover { background: rgba(0,0,0,.04); }
.ep-music-item.is-active {
  background: #111;
  color: #fff;
}
.ep-music-idx {
  flex: 0 0 18px;
  opacity: 0.45;
  font-size: 10px;
  text-align: right;
}
.ep-music-item.is-active .ep-music-idx { opacity: 0.7; }
.ep-music-item-t {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-music-empty {
  padding: 16px 10px;
  text-align: center;
  font-size: 12px;
  color: var(--eo-pet-muted, rgba(0,0,0,.55));
}
.ep-music-tip {
  margin: 6px 0 0;
  font-size: 10px;
  color: var(--eo-pet-muted, rgba(0,0,0,.55));
  line-height: 1.4;
}
.ep-confirm-actions .ep-btn {
  min-width: 72px;
}

/* ── 功能面板 ── */
.ep-panel {
  position: fixed;
  z-index: var(--eo-pet-panel-z);
  display: none;
  flex-direction: column;
  width: min(360px, calc(100vw - 24px));
  max-width: calc(100vw - 16px);
  max-height: min(560px, calc(100vh - 24px - var(--eo-pet-safe-bottom)));
  background: var(--eo-pet-bg);
  border: 1px solid var(--eo-pet-border);
  border-radius: var(--eo-pet-radius);
  box-shadow: var(--eo-pet-shadow);
  overflow: hidden;
  pointer-events: auto;
  transform-origin: bottom right;
}
.ep-panel.open {
  display: flex;
  animation: ep-panel-in 0.22s cubic-bezier(0.22, 0.9, 0.28, 1);
}

@media (max-width: 768px) {
  .ep-panel {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none;
    bottom: calc(8px + var(--eo-pet-dock) + var(--eo-pet-safe-bottom)) !important;
    top: auto !important;
    max-height: min(72vh, calc(100vh - var(--eo-pet-dock) - 24px - var(--eo-pet-safe-bottom)));
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.12), var(--eo-pet-shadow);
  }
  .ep-panel::before {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    margin: 8px auto 0;
    border-radius: 0;
    background: #111;
    flex: 0 0 auto;
    opacity: 0.35;
  }
}

.ep-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px 12px;
  border-bottom: 1px solid var(--eo-pet-edge);
  background: var(--eo-pet-bg);
}
.ep-panel-head img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: auto;
  background: var(--eo-pet-surface);
  border-radius: 2px;
  border: 1px solid var(--eo-pet-border);
}
.ep-panel-head .ep-meta { flex: 1; min-width: 0; }
.ep-panel-head .ep-kicker {
  font-family: var(--eo-pet-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eo-pet-faint);
  margin-bottom: 4px;
}
.ep-panel-head .ep-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--eo-pet-ink);
}
.ep-panel-head .ep-sub {
  font-family: var(--eo-pet-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--eo-pet-muted);
  margin-top: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-panel-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.ep-close-x {
  width: 32px;
  height: 32px;
  border: 1px solid var(--eo-pet-border);
  border-radius: 2px;
  background: var(--eo-pet-bg);
  font-size: 16px;
  cursor: pointer;
  color: var(--eo-pet-ink);
  line-height: 1;
  box-shadow: 2px 2px 0 #111;
}
.ep-close-x:hover { background: var(--eo-pet-surface); }

.ep-bars {
  padding: 10px 12px 2px;
  display: grid;
  gap: 7px;
  border-bottom: 1px solid var(--eo-pet-edge);
}
.ep-bar-row {
  display: grid;
  grid-template-columns: 36px 1fr 30px;
  gap: 6px;
  align-items: center;
  font-family: var(--eo-pet-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--eo-pet-muted);
}
.ep-bar {
  height: 6px;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.ep-bar > i {
  display: block;
  height: 100%;
  border-radius: 0;
  background: #111;
  width: 0%;
  transition: width 0.35s cubic-bezier(0.22, 0.9, 0.28, 1);
}
.ep-bar.mood > i { background: #333; }
.ep-bar.energy > i { background: #555; }
.ep-bar.health > i { background: #111; }

.ep-tabs {
  display: flex;
  gap: 0;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--eo-pet-edge);
}
.ep-tabs::-webkit-scrollbar { display: none; }
.ep-tab {
  flex: 0 0 auto;
  border: 0;
  border-right: 1px solid var(--eo-pet-edge);
  background: transparent;
  border-radius: 0;
  padding: 10px 12px;
  font-size: 11px;
  cursor: pointer;
  color: var(--eo-pet-muted);
  font-family: var(--eo-pet-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ep-tab:last-child { border-right: 0; }
.ep-tab.active {
  background: #111;
  color: #fff;
  font-weight: 600;
}

.ep-body {
  padding: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
  font-size: 13px;
  background: var(--eo-pet-bg);
}

.ep-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ep-btn {
  border: 1px solid var(--eo-pet-border);
  background: var(--eo-pet-bg);
  border-radius: var(--eo-pet-radius);
  padding: 11px 10px;
  min-height: 42px;
  cursor: pointer;
  font-size: 13px;
  color: var(--eo-pet-ink);
  font-family: var(--eo-pet-font);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: none;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.ep-btn:hover { background: var(--eo-pet-surface); }
.ep-btn:active { transform: translateY(1px); }
.ep-btn.primary {
  background: #111;
  color: #fff;
  border-color: #111;
  box-shadow: var(--eo-pet-shadow-sm);
  font-family: var(--eo-pet-mono);
  letter-spacing: 0.08em;
  font-size: 12px;
}
.ep-btn.primary:hover {
  background: transparent;
  color: #111;
}
.ep-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.ep-chat-log {
  height: min(160px, 28vh);
  overflow-y: auto;
  background: var(--eo-pet-surface);
  border: 1px solid var(--eo-pet-edge);
  border-radius: 2px;
  padding: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.55;
}
.ep-chat-log .me {
  color: var(--eo-pet-ink);
  margin: 5px 0;
  font-family: var(--eo-pet-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.ep-chat-log .pet { color: var(--eo-pet-ink); margin: 5px 0; }
.ep-chat-row { display: flex; gap: 6px; }
.ep-chat-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--eo-pet-border);
  border-radius: 2px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--eo-pet-bg);
  font-family: inherit;
  color: var(--eo-pet-ink);
}
.ep-chat-row input:focus {
  outline: none;
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(0, 0, 0, 0.18));
}
.ep-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.ep-chat-quick .ep-btn {
  padding: 6px 10px;
  font-size: 12px;
}

/* 悬浮迷你通信窗 */
.ep-mini-chat {
  position: relative;
  width: min(220px, 72vw);
  margin: 6px auto 0;
  background: var(--eo-pet-bg, #fff);
  border: 1px solid var(--eo-pet-border, #111);
  border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
  padding: 8px;
  text-align: left;
  z-index: 5;
  animation: ep-panel-in 0.18s cubic-bezier(0.22, 0.9, 0.28, 1);
}
.ep-mini-chat.ep-float-above {
  width: min(240px, 78vw);
}
.ep-mini-chat[hidden] { display: none !important; }
.ep-mini-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ep-mini-chat-x {
  border: 1px solid var(--eo-pet-border, #111);
  background: transparent;
  width: 22px;
  height: 22px;
  line-height: 1;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  border-radius: 2px;
}
.ep-mini-chat-x:hover { background: var(--eo-pet-surface, #f3f3f3); }
.ep-mini-chat-log {
  height: 110px;
  overflow-y: auto;
  background: var(--eo-pet-surface, #f7f7f7);
  border: 1px solid var(--eo-pet-edge, #ddd);
  border-radius: 2px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.45;
  margin-bottom: 6px;
}
.ep-mini-chat-log .me {
  margin: 4px 0;
  font-family: var(--eo-pet-mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.03em;
}
.ep-mini-chat-log .pet { margin: 4px 0; }
.ep-mini-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.ep-mini-chat-quick button {
  border: 1px solid var(--eo-pet-border, #111);
  background: var(--eo-pet-bg, #fff);
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
}
.ep-mini-chat-quick button:hover { background: var(--eo-pet-surface, #f3f3f3); }
.ep-mini-chat-row {
  display: flex;
  gap: 4px;
}
.ep-mini-chat-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--eo-pet-border, #111);
  border-radius: 2px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: inherit;
  background: var(--eo-pet-bg, #fff);
}
.ep-mini-chat-row .ep-btn {
  padding: 6px 10px;
  font-size: 12px;
  flex-shrink: 0;
}

.ep-list { display: grid; gap: 8px; }
.ep-card {
  border: 1px solid var(--eo-pet-border);
  border-radius: 2px;
  padding: 10px 12px;
  background: var(--eo-pet-bg);
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.08);
}
.ep-card img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  flex-shrink: 0;
}
.ep-card .ep-card-main { flex: 1; min-width: 0; }
.ep-card .t {
  font-weight: 650;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-card .d {
  font-family: var(--eo-pet-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--eo-pet-muted);
  margin-top: 2px;
}

.ep-adopt.is-simple {
  width: 128px;
  min-width: 0;
  max-width: 128px;
  padding: 7px 8px 7px;
  text-align: center;
  border-radius: 6px;
  box-shadow: 2px 2px 0 #111;
}
.ep-adopt-ask {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  letter-spacing: 0;
}
.ep-adopt-yesno {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.ep-adopt-yesno .ep-btn {
  width: 100%;
  min-height: 26px;
  padding: 3px 4px;
  font-size: 11px;
  border-radius: 4px;
  box-shadow: none;
}
.ep-adopt-tip {
  max-width: 160px;
  padding: 8px 10px;
  background: #fff;
  border: 2px solid #111;
  box-shadow: 3px 3px 0 #111;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: #111;
  animation: epAdoptTipIn .28s ease;
}
@keyframes epAdoptTipIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.ep-guest, .ep-adopt {
  width: min(240px, calc(100vw - 28px));
  background: var(--eo-pet-bg);
  border: 1px solid var(--eo-pet-border);
  border-radius: var(--eo-pet-radius);
  padding: 16px 14px;
  box-shadow: var(--eo-pet-shadow);
  text-align: left;
  font-size: 13px;
}
.ep-guest .ep-kicker,
.ep-adopt .ep-kicker {
  font-family: var(--eo-pet-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eo-pet-faint);
  margin-bottom: 8px;
}
.ep-guest .ep-title,
.ep-adopt .ep-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--eo-pet-ink);
}
.ep-guest .ep-desc,
.ep-adopt .ep-desc {
  font-size: 12px;
  color: var(--eo-pet-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.ep-toast {
  display: none !important;
}

.ep-evolve-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--eo-pet-fx-z);
  background: rgba(5, 4, 3, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: auto;
}
.ep-evolve-overlay.show { display: flex; }
.ep-evolve-card {
  text-align: center;
  color: #fff;
  animation: ep-evolve-pop 0.9s ease;
  max-width: 90vw;
  border: 1px solid #fff;
  padding: 28px 24px;
  box-shadow: 8px 8px 0 rgba(255, 255, 255, 0.2);
}
.ep-evolve-card .ep-kicker {
  font-family: var(--eo-pet-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 12px;
}
.ep-evolve-card img {
  width: min(150px, 42vw);
  height: min(150px, 42vw);
  object-fit: contain;
  filter: drop-shadow(0 0 0 transparent);
}
.ep-evolve-card h3 {
  margin: 12px 0 4px;
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ep-evolve-card p {
  margin: 0;
  opacity: 0.75;
  font-family: var(--eo-pet-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.ep-game {
  border: 1px solid var(--eo-pet-border);
  border-radius: 2px;
  height: min(150px, 28vh);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    var(--eo-pet-surface);
  background-size: 16px 16px, 16px 16px, auto;
  margin-bottom: 8px;
}
.ep-game-snack {
  position: absolute;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--eo-pet-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.1s;
  touch-action: manipulation;
  background: #111;
  color: #fff;
  border: 1px solid #111;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}
.ep-game-snack:active { transform: scale(1.15); }
.ep-game-score {
  font-family: var(--eo-pet-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--eo-pet-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.ep-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.ep-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 0;
  background: #111;
  animation: ep-float-up 2.4s linear infinite;
}

.ep-hint {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--eo-pet-muted);
  line-height: 1.5;
  font-family: var(--eo-pet-mono);
  letter-spacing: 0.02em;
}

@keyframes ep-sheet-idle {
  from { background-position: 0 0; }
  to { background-position: -384px 0; }
}
@keyframes ep-sheet-play {
  from { background-position: 0 0; }
  to { background-position: -384px 0; }
}
@keyframes ep-sheet-evolve {
  from { background-position: 0 0; opacity: 1; }
  to { background-position: -576px 0; opacity: 0; }
}
@keyframes ep-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes ep-happy {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.03); }
}
@keyframes ep-sad {
  0%, 100% { transform: translateY(2px); }
  50% { transform: translateY(4px); }
}
@keyframes ep-weak {
  0%, 100% { transform: translateY(3px) scale(0.96); opacity: 0.9; }
  50% { transform: translateY(5px) scale(0.94); opacity: 0.75; }
}
@keyframes ep-sleep {
  0%, 100% { transform: translateY(4px); }
  50% { transform: translateY(6px); }
}
@keyframes ep-pulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.04); opacity: 0.9; }
}
@keyframes ep-legend {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes ep-evolve-pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes ep-float-up {
  0% { transform: translateY(70px); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-20px); opacity: 0; }
}
@keyframes ep-panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 弧形 / 二级横排悬浮气泡 */
#eo-pet-root.has-arc .ep-hit {
  z-index: 2;
}
.ep-arc-layer {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 0;
  height: 0;
  z-index: 20;
  pointer-events: none;
}
.ep-arc-btn {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  min-width: 48px;
  max-width: 76px;
  padding: 7px 9px;
  border: 2px solid var(--eo-pet-border, #111);
  border-radius: 999px;
  background: var(--eo-pet-bg, #fff);
  color: var(--eo-pet-ink, #111);
  font: 600 11px/1.2 var(--eo-pet-font);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none;
  cursor: pointer;
  opacity: 0;
  animation: ep-arc-pop 0.28s cubic-bezier(0.22, 0.9, 0.28, 1) forwards;
}
.ep-arc-btn:hover,
.ep-arc-btn:focus-visible {
  background: #111;
  color: #fff;
  outline: none;
}
.ep-arc-back {
  display: none !important;
}
.ep-arc-layer.is-row {
  left: 50%;
  top: auto;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: min(300px, 92vw);
  height: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: auto;
  z-index: 21;
}
.ep-arc-layer.is-row .ep-arc-btn {
  position: static;
  left: auto;
  top: auto;
  transform: none !important;
  max-width: none;
  min-width: 0;
  flex: 0 0 auto;
}
@keyframes ep-arc-pop {
  from { opacity: 0; filter: blur(2px); }
  to { opacity: 1; filter: none; }
}
/* 照料：数据卡在宠物正上方 */
.ep-stats-float {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: calc(100% + 52px);
  transform: translateX(-50%);
  width: 176px;
  z-index: 19;
  pointer-events: auto;
  background: var(--eo-pet-bg, #fff);
  border: 2px solid var(--eo-pet-border, #111);
  box-shadow: none;
  padding: 8px 8px 6px;
  animation: ep-arc-pop 0.22s cubic-bezier(0.22, 0.9, 0.28, 1) forwards;
}
.ep-stats-float .ep-stats-head {
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--eo-pet-edge, rgba(0,0,0,0.14));
}
.ep-stats-float .ep-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--eo-pet-ink, #111);
}
.ep-stats-float .ep-sub {
  margin-top: 2px;
  font-family: var(--eo-pet-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--eo-pet-muted);
  line-height: 1.35;
  word-break: break-all;
}
.ep-stats-float .ep-bars-compact {
  padding: 0;
  border: 0;
  gap: 5px;
}
.ep-stats-float .ep-bar-row {
  grid-template-columns: 28px 1fr 24px;
  font-size: 9px;
}
.ep-explore-banner {
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  z-index: 4;
  min-width: 120px;
  max-width: min(240px, 78vw);
  padding: 4px 8px;
  border: 1px solid var(--eo-pet-border, #111);
  background: var(--eo-pet-bg, #fff);
  box-shadow: none;
  font-family: var(--eo-pet-mono);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--eo-pet-ink, #111);
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
}
.ep-explore-banner.is-claim {
  pointer-events: auto;
}
.ep-explore-banner .ep-claim-btn {
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font: 600 10px/1 var(--eo-pet-font);
  padding: 3px 8px;
  margin-left: 4px;
  cursor: pointer;
  border-radius: 2px;
}
.ep-explore-banner[hidden] {
  display: none !important;
}
@media (max-width: 768px) {
  .ep-arc-btn {
    min-width: 42px;
    max-width: 70px;
    padding: 6px 7px;
    font-size: 11px;
  }
  .ep-stats-float {
    width: min(168px, calc(100vw - 24px));
    bottom: calc(100% + 52px);
  }
  .ep-arc-layer.is-row {
    max-width: min(280px, 94vw);
    gap: 5px;
  }
}

.ep-shop-head {
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--eo-pet-ink, #111);
}
.ep-shop-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.ep-shop-cat {
  border: 1px solid var(--eo-pet-border, #111);
  background: #fff;
  color: #333;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  font-family: inherit;
  border-radius: 2px;
}
.ep-shop-cat.active {
  background: #111;
  color: #fff;
}
.ep-shop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ep-shop-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--eo-pet-border, #111);
  padding: 8px;
  background: var(--eo-pet-bg, #fff);
}
.ep-shop-ico {
  flex: 0 0 auto;
}
.ep-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #111;
  background: #f3f3f3;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: #111;
}
.ep-ico[data-cat="food"] { background: #fff4e5; }
.ep-ico[data-cat="water"] { background: #e8f4ff; }
.ep-ico[data-cat="toy"] { background: #f3e8ff; }
.ep-ico[data-cat="clean"] { background: #e9fff3; }
.ep-ico[data-cat="heal"] { background: #ffe8e8; }
.ep-ico[data-cat="explore"] { background: #fff8e0; }
.ep-ico[data-cat="revive"] { background: #eee; }
.ep-shop-main {
  flex: 1;
  min-width: 0;
}
.ep-shop-main .t {
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ep-shop-tag {
  font-size: 10px;
  font-weight: 600;
  border: 1px solid #111;
  padding: 0 5px;
  line-height: 1.5;
  background: #f7f7f7;
}
.ep-shop-main .d {
  font-size: 11px;
  color: var(--eo-pet-muted, #666);
  margin-top: 2px;
  line-height: 1.4;
}
.ep-shop-gain {
  margin-top: 4px;
  font-size: 11px;
  color: #0a6;
  line-height: 1.45;
  font-weight: 600;
}
.ep-shop-card .ep-btn {
  flex: 0 0 auto;
  align-self: center;
}
.ep-card-main .ep-ico {
  width: 22px;
  height: 22px;
  font-size: 11px;
  vertical-align: middle;
  margin-right: 2px;
}

.ep-theater {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ep-theater.show { display: flex; }
.ep-theater-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 214, 170, .35), transparent 45%),
    radial-gradient(ellipse at 70% 80%, rgba(160, 196, 255, .28), transparent 50%),
    rgba(18, 16, 22, .58);
  backdrop-filter: blur(3px);
}
.ep-theater.theme-night .ep-theater-veil {
  background:
    radial-gradient(ellipse at 40% 15%, rgba(120, 150, 220, .35), transparent 45%),
    radial-gradient(ellipse at 70% 70%, rgba(80, 70, 120, .35), transparent 50%),
    rgba(10, 14, 28, .66);
}
.ep-theater.theme-long .ep-theater-veil,
.ep-theater.theme-miss .ep-theater-veil {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 255, 255, .08), transparent 42%),
    repeating-linear-gradient(
      -12deg,
      rgba(255, 255, 255, .03) 0 2px,
      transparent 2px 7px
    ),
    rgba(0, 0, 0, .72);
  backdrop-filter: grayscale(1) blur(2px);
}
.ep-theater-stage {
  position: relative;
  width: min(420px, 94vw);
  border: 2px solid #1c1a17;
  background:
    linear-gradient(180deg, #fffaf1 0%, #f4efe4 55%, #ebe3d4 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  padding: 22px 20px 18px;
  text-align: center;
  animation: epTheaterIn .45s cubic-bezier(.2, .9, .2, 1);
}
.ep-theater.theme-night .ep-theater-stage {
  background: linear-gradient(180deg, #1d2438 0%, #2a3148 60%, #1a2030 100%);
  color: #f2f5ff;
  border-color: #9eb0d8;
}
.ep-theater.theme-long .ep-theater-stage,
.ep-theater.theme-miss .ep-theater-stage {
  background:
    linear-gradient(180deg, #f7f7f7 0%, #efefef 48%, #e4e4e4 100%);
  color: #111;
  border: 2px solid #111;
  box-shadow: 8px 8px 0 #111;
}
@keyframes epTheaterIn {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.ep-theater-fx {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.ep-theater-deco {
  position: absolute;
  width: 28px;
  height: 28px;
  opacity: .75;
  animation: epFloat 3.6s ease-in-out infinite;
}
.ep-theater-deco.d1 { left: 8%; top: 12%; }
.ep-theater-deco.d2 { right: 10%; top: 18%; animation-delay: .4s; width: 22px; }
.ep-theater-deco.d3 { left: 14%; bottom: 18%; animation-delay: .8s; }
.ep-theater-deco.d4 { right: 16%; bottom: 22%; animation-delay: 1.1s; width: 20px; }
.ep-theater-deco.d5 { left: 46%; top: 8%; animation-delay: .2s; width: 18px; }
@keyframes epFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.ep-theater-kicker {
  position: relative;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .65;
  margin-bottom: 4px;
}
.ep-theater-title {
  position: relative;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: .04em;
}
.ep-theater-pet {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 8px 0 14px;
}
.ep-theater-pet img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .18));
}
.ep-theater-pet img.is-gif {
  width: 120px;
  height: 120px;
  image-rendering: auto;
}
.ep-theater.theme-long .ep-theater-pet img,
.ep-theater.theme-miss .ep-theater-pet img,
.ep-theater-pet img.is-gif {
  filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, .28));
  border: 2px solid #111;
  background: #fff;
  padding: 4px;
  box-sizing: content-box;
}
.ep-theater.theme-long .ep-theater-deco,
.ep-theater.theme-miss .ep-theater-deco {
  filter: none;
  opacity: .9;
}
.ep-theater.theme-long .ep-theater-kicker,
.ep-theater.theme-miss .ep-theater-kicker {
  letter-spacing: .28em;
  opacity: .5;
}
.ep-theater.theme-long .ep-theater-title,
.ep-theater.theme-miss .ep-theater-title {
  border-bottom: 2px solid #111;
  display: inline-block;
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.ep-theater.theme-long .ep-theater-chip,
.ep-theater.theme-miss .ep-theater-chip {
  border-color: #111;
  background: #fff;
  color: #111;
}
.ep-theater.theme-long .ep-theater-choices .ep-btn,
.ep-theater.theme-miss .ep-theater-choices .ep-btn {
  background: #fff;
  border: 2px solid #111;
  color: #111;
  box-shadow: 3px 3px 0 #111;
  border-radius: 0;
}
.ep-theater.theme-long .ep-theater-choices .ep-btn.primary,
.ep-theater.theme-miss .ep-theater-choices .ep-btn.primary {
  background: #111;
  color: #fff;
}
.ep-theater.theme-long .ep-theater-choices .ep-btn.primary span,
.ep-theater.theme-miss .ep-theater-choices .ep-btn.primary span {
  color: rgba(255, 255, 255, .72);
}
.ep-theater-pet img.is-enter {
  animation: epPetEnter .6s cubic-bezier(.2, 1.2, .3, 1);
}
.ep-theater-pet img.is-bounce {
  animation: epPetBounce .55s ease;
}
@keyframes epPetEnter {
  from { opacity: 0; transform: translateY(20px) scale(.8); }
  to { opacity: 1; transform: none; }
}
@keyframes epPetBounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px) scale(1.05); }
  70% { transform: translateY(2px); }
}
.ep-theater-hours {
  font-size: 12px;
  opacity: .7;
}
.ep-theater-line {
  position: relative;
  min-height: 48px;
  font-size: 15px;
  line-height: 1.55;
  margin: 4px 8px 14px;
}
.ep-theater-line.pop {
  animation: epLinePop .35s ease;
}
@keyframes epLinePop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.ep-theater-acts {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  min-height: 28px;
  margin-bottom: 10px;
}
.ep-theater-chip {
  font-size: 11px;
  border: 1px solid currentColor;
  padding: 2px 8px;
  opacity: 0;
  transform: translateY(4px);
}
.ep-theater-chip.show {
  opacity: .75;
  transform: none;
  transition: .25s ease;
}
.ep-theater-choices {
  position: relative;
  display: grid;
  gap: 8px;
}
.ep-theater-choices .ep-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
}
.ep-theater-choices .ep-btn b { font-size: 14px; }
.ep-theater-choices .ep-btn span {
  font-size: 11px;
  opacity: .65;
  font-weight: 500;
}

.ep-prank-node { pointer-events: none; z-index: 11000; }
.ep-prank-prints { position: fixed; inset: 0; }
.ep-prank-paw {
  position: absolute;
  width: 34px;
  height: 34px;
  opacity: 0;
  animation: epPawIn .5s ease forwards;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .15));
}
@keyframes epPawIn {
  from { opacity: 0; transform: scale(.4); }
  to { opacity: .82; }
}
.ep-prank-wiggle {
  animation: epWiggle .2s linear 22 !important;
}
@keyframes epWiggle {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-3px) rotate(-2deg); }
  75% { transform: translateX(3px) rotate(2deg); }
}
body.ep-prank-invert {
  filter: invert(1) hue-rotate(180deg);
  transition: filter .35s ease;
}
.ep-prank-sticky {
  position: fixed;
  width: 132px;
  z-index: 11020;
  animation: epStickyIn .35s ease;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18));
}
.ep-prank-sticky img { width: 100%; display: block; }
.ep-prank-sticky p {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 38px;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #5a4a1c;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.ep-prank-sticky.is-out { animation: epStickyOut .5s ease forwards; }
@keyframes epStickyIn {
  from { opacity: 0; transform: rotate(-8deg) scale(.85); }
  to { opacity: 1; transform: rotate(-2deg); }
}
@keyframes epStickyOut {
  to { opacity: 0; transform: translateY(-20px) rotate(6deg); }
}
.ep-prank-snack {
  position: fixed;
  top: -40px;
  z-index: 11010;
  background: #fff4e5;
  border: 2px solid #111;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  animation: epSnackDrop 5.2s ease forwards;
}
@keyframes epSnackDrop {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translateY(75vh) rotate(28deg); opacity: 0; }
}
.ep-prank-stolen {
  outline: 2px dashed #c45c5c !important;
  outline-offset: 2px;
  color: #c45c5c !important;
}
.ep-prank-trail { position: fixed; inset: 0; z-index: 11005; }
.ep-prank-trail-paw {
  position: absolute;
  width: 22px;
  height: 22px;
  opacity: .8;
  animation: epTrailFade 2.2s ease forwards;
}
@keyframes epTrailFade {
  to { opacity: 0; transform: scale(.5); }
}
.ep-arena-badge {
  position: fixed;
  right: 18px;
  bottom: 120px;
  z-index: 11030;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #fff8e8, #ffe7b0);
  border: 2px solid #1c1a17;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
  animation: epBadgeIn .4s ease;
}
.ep-arena-badge img { width: 22px; height: 22px; }
.ep-arena-badge.is-out { animation: epBadgeOut .35s ease forwards; }
@keyframes epBadgeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes epBadgeOut {
  to { opacity: 0; transform: translateY(10px); }
}


