/* 网页宠物只占实际角色与按钮的命中区域；其余透明区域让游戏继续接收输入。 */
#snt-web-pet {
  --pet-width: min(320px, 90vw);
  position: fixed; left: 0; top: 0; width: var(--pet-width);
  height: calc(var(--pet-width) * .75); z-index: 30; pointer-events: none;
  user-select: none; -webkit-user-select: none;
}
#snt-web-pet[hidden], #snt-pet-bubble[hidden], #snt-pet-toggle[hidden] { display: none !important; }
#snt-web-pet .pet-stage { position: absolute; inset: 18% 0 7%; }
#snt-web-pet video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  visibility: hidden; pointer-events: none; filter: url(#snt-pet-alpha-fix);
}
#snt-web-pet video.front { visibility: visible; }
#snt-pet-hit {
  position: absolute; left: 31.25%; right: 31.25%; top: 13.888889%; bottom: 6.944444%;
  pointer-events: auto; cursor: grab; touch-action: none;
}
#snt-pet-hit.dragging { cursor: grabbing; }
#snt-pet-close, #snt-pet-toggle {
  box-sizing: border-box; border: 1px solid #476271; border-radius: 50%;
  color: #edf4f7; background: #102532ed; pointer-events: auto;
  font: 16px/1 system-ui, 'Microsoft YaHei', sans-serif; cursor: pointer;
}
#snt-pet-close { position: absolute; left: 69%; top: 20%; width: 26px; height: 26px; padding: 0; }
#snt-pet-toggle {
  position: fixed; z-index: 31; right: 18px; bottom: 14px;
  display: flex; align-items: center; gap: 7px; border-radius: 18px;
  padding: 8px 12px; font-size: 12px; letter-spacing: .3px;
}
#snt-pet-toggle svg { width: 15px; height: 15px; }
#snt-pet-toggle[aria-pressed="true"] { background: #304e60ed; border-color: #8baebc; }
#snt-pet-close:hover, #snt-pet-toggle:hover { background: #3a586b; }
#snt-pet-close:focus-visible, #snt-pet-toggle:focus-visible { outline: 2px solid #c5e8f3; outline-offset: 3px; }
#snt-pet-bubble {
  box-sizing: border-box; position: fixed; z-index: 32; width: max-content;
  max-width: min(360px, calc(100vw - 24px)); padding: 12px 16px;
  color: #f1f5f8; background: #09202ef5; border: 1px solid #7395a6;
  border-radius: 12px; box-shadow: 0 6px 24px #0003; pointer-events: none;
  font: 16px/1.6 system-ui, 'Microsoft YaHei', sans-serif;
}
#snt-pet-text { white-space: pre-line; overflow-wrap: anywhere; }
#snt-pet-bubble::after {
  content: ''; position: absolute; left: var(--arrow-left, 50%); bottom: -7px;
  width: 12px; height: 12px; background: #09202e;
  border-right: 1px solid #7395a6; border-bottom: 1px solid #7395a6; transform: rotate(45deg);
}
#snt-pet-bubble[data-side="below"]::after { top: -7px; bottom: auto; transform: rotate(225deg); }
