/* The source PNGs and idle-preview.html are kept unchanged in assets/mascot/v1/. */
.tsuk-mascot {
  --mascot-size: 200px;
  --mascot-right: 12px;
  --mascot-bottom: 0px;
  --mascot-safe-left: env(safe-area-inset-left, 0px);
  --mascot-safe-right: env(safe-area-inset-right, 0px);
  --mascot-safe-top: env(safe-area-inset-top, 0px);
  --mascot-safe-bottom: env(safe-area-inset-bottom, 0px);
  position: fixed;
  z-index: 2147483647; /* Keep drag and restore targets above site navigation/overlays. */
  right: max(var(--mascot-right), env(safe-area-inset-right, 0px));
  bottom: max(var(--mascot-bottom), env(safe-area-inset-bottom, 0px));
  --mascot-extent: min(var(--mascot-size), calc(100vw - var(--mascot-safe-left) - var(--mascot-safe-right) - 6px), calc(100vh - var(--mascot-safe-top) - var(--mascot-safe-bottom) - 6px));
  width: var(--mascot-extent);
  height: var(--mascot-extent);
  pointer-events: none;
  contain: layout style;
}
.tsuk-mascot[hidden], .tsuk-mascot [hidden] { display: none !important; }
.tsuk-mascot__art, .tsuk-mascot__sway, .tsuk-mascot__breath, .tsuk-mascot__image {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.tsuk-mascot__sway { transform-origin: 50% 90%; animation: tsuk-mascot-sway 6.3s ease-in-out infinite; }
.tsuk-mascot__breath { transform-origin: 50% 80%; animation: tsuk-mascot-breathe 3.6s ease-in-out infinite; }
.tsuk-mascot__image { object-fit: contain; user-select: none; -webkit-user-select: none; }
.tsuk-mascot[data-running="false"] .tsuk-mascot__sway,
.tsuk-mascot[data-running="false"] .tsuk-mascot__breath { animation-play-state: paused; }
.tsuk-mascot[data-reduced="true"] .tsuk-mascot__sway,
.tsuk-mascot[data-reduced="true"] .tsuk-mascot__breath { animation: none; transform: none; }
.tsuk-mascot__art { touch-action: none; }
.tsuk-mascot__breath { position: relative; }
.tsuk-mascot__hit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; stroke: none; }
.tsuk-mascot__hit path { pointer-events: fill; touch-action: none; cursor: grab; }
.tsuk-mascot[data-dragging="true"] .tsuk-mascot__hit path { cursor: grabbing; }
.tsuk-mascot__toggle {
  position: absolute;
  right: 0;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(65, 81, 115, .09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: 18px/1 system-ui, sans-serif;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.tsuk-mascot[data-expanded="false"] .tsuk-mascot__toggle { cursor: grab; }
.tsuk-mascot[data-dragging="true"] .tsuk-mascot__toggle { cursor: grabbing; }
.tsuk-mascot__toggle svg { width: 17px; height: 17px; }
.tsuk-mascot__toggle:hover { color: var(--blue); border-color: var(--blue); }
.tsuk-mascot__toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.tsuk-mascot[data-expanded="false"] { width: 34px; height: 42px; }
@keyframes tsuk-mascot-breathe { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(1.006); } }
@keyframes tsuk-mascot-sway { 0%,100% { transform: rotate(0deg); } 25% { transform: rotate(.58deg); } 50% { transform: rotate(0deg); } 75% { transform: rotate(-.58deg); } }
@media (max-width: 1100px) { .tsuk-mascot { --mascot-size: 180px; --mascot-right: 8px; } }
@media (max-width: 760px) { .tsuk-mascot { --mascot-size: 120px; --mascot-right: 8px; --mascot-bottom: 6px; } }
@media (prefers-reduced-motion: reduce) {
  .tsuk-mascot__sway, .tsuk-mascot__breath { animation: none; transform: none; }
}
