/* ForeverRoute corner mascot — layered Tauren hunter. All artwork is the approved
   reference figure cut out and split into body / arm / blink layers. */
.fr-mascot {
  position: fixed;
  right: 14px;
  bottom: 0;
  z-index: 55;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  font-family: Inter, Arial, sans-serif;
}
.fr-mascot * { box-sizing: border-box; }

.fr-mascot-fig {
  pointer-events: auto;
  position: relative;
  display: block;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  height: var(--fr-mh, 300px);
  aspect-ratio: 538 / 556;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45));
}
.fr-mascot-fig:focus-visible { outline: 3px solid #e6b873; outline-offset: 4px; border-radius: 8px; }

.fr-mascot-idle {
  position: absolute;
  inset: 0;
  animation: frBob 5.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.fr-mascot-fig img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.fr-mascot-arm { transform-origin: 44.6% 35.0%; }
.fr-mascot-idle.fr-waving .fr-mascot-arm { animation: frWave 1.5s ease-in-out; }
.fr-mascot-blink {
  opacity: 0;
  transition: opacity .07s ease;
}
.fr-mascot-idle.fr-blinking .fr-mascot-blink { opacity: 1; }

@keyframes frBob {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-6px) scaleY(1.012); }
}
@keyframes frWave {
  0%, 100% { transform: rotate(0deg); }
  18% { transform: rotate(11deg); }
  40% { transform: rotate(-7deg); }
  62% { transform: rotate(7deg); }
  82% { transform: rotate(-4deg); }
}

.fr-mascot-bubble {
  pointer-events: auto;
  position: relative;
  order: -1;
  width: 248px;
  margin: 0 18px 10px 0;
  padding: 14px 15px 12px;
  background: linear-gradient(160deg, #2b1d22, #1a1317);
  border: 1px solid #9f7a53;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
  color: #f2e4d3;
  font-size: 13px;
  line-height: 1.55;
}
.fr-mascot-bubble[hidden] { display: none; }
.fr-mascot-bubble::after {
  content: '';
  position: absolute;
  right: 26px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  background: #1a1317;
  border-right: 1px solid #9f7a53;
  border-bottom: 1px solid #9f7a53;
}
.fr-mascot-bubble p { margin: 0 0 10px; }
.fr-mascot-links { display: flex; flex-direction: column; gap: 6px; }
.fr-mascot-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: #ffd9a0;
  font-weight: 700;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.fr-mascot-links a:hover { color: #fff; }
.fr-mascot-links a.fr-mascot-forum {
  justify-content: center;
  text-decoration: none;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 5px;
  border: 1px solid #d9a066;
  background: linear-gradient(180deg, #b03b3d, #83222a);
  color: #fff;
  font-size: 12px;
  letter-spacing: .2px;
}
.fr-mascot-links a.fr-mascot-forum:hover { filter: brightness(1.15); }

.fr-mascot-close {
  pointer-events: auto;
  position: absolute;
  top: 4px;
  right: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #e8cfae;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  text-shadow: 0 1px 3px #000;
}
.fr-mascot-close::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #1d1518cc;
  border: 1px solid #7c5a46;
}
.fr-mascot-close span { position: relative; }
.fr-mascot-close:hover::before { background: #40252b; border-color: #e6b873; }
.fr-mascot-close:focus-visible { outline: 3px solid #e6b873; outline-offset: 2px; }

/* Minimized state: small round chip with her face */
.fr-mascot-chip {
  pointer-events: auto;
  display: none;
  width: 56px;
  height: 56px;
  margin: 0 4px 10px 0;
  border-radius: 50%;
  border: 2px solid #9f7a53;
  background: #241a1f url('assets/mascot-chip.webp') center 18% / cover no-repeat;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .5);
  cursor: pointer;
}
.fr-mascot-chip:hover { border-color: #e6b873; transform: translateY(-2px); }
.fr-mascot-chip:focus-visible { outline: 3px solid #e6b873; outline-offset: 2px; }
.fr-mascot.fr-min .fr-mascot-fig,
.fr-mascot.fr-min .fr-mascot-bubble,
.fr-mascot.fr-min .fr-mascot-close { display: none; }
.fr-mascot.fr-min .fr-mascot-chip { display: block; }

/* Compact sizes for smaller viewports */
@media (max-width: 1100px) { .fr-mascot-fig { --fr-mh: 225px; } }
@media (max-width: 700px) {
  .fr-mascot { right: 8px; }
  .fr-mascot-fig { --fr-mh: 150px; }
  .fr-mascot-bubble { width: 214px; margin-right: 4px; font-size: 12px; }
  .fr-mascot-bubble::after { right: 18px; }
}
@media (max-width: 420px) {
  .fr-mascot-fig { --fr-mh: 118px; }
  .fr-mascot-bubble { width: 200px; }
}
@media (max-height: 480px) { .fr-mascot-fig { --fr-mh: 130px; } }

@media (prefers-reduced-motion: reduce) {
  .fr-mascot-idle { animation: none !important; }
  .fr-mascot-idle.fr-waving .fr-mascot-arm { animation: none !important; }
  .fr-mascot-blink { transition: none; }
  .fr-mascot-chip { transition: none; }
}
