.recommendation-mascot {
  position: fixed;
  right: 4px;
  bottom: 2px;
  z-index: 950;
  width: 94px;
  height: 94px;
}

.extension-install-prompt.has-moru-companion { right: 112px; }
.owner-command-dock.has-moru-companion { right: 112px !important; }
.mascot-trigger {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 88px;
  height: 88px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 12px 15px #0008);
  animation: moru-hop 5.4s ease-in-out infinite;
}
.mascot-trigger img { width: 100%; height: 100%; object-fit: contain; }
.mascot-trigger::after {
  content: "A reading recommendation?";
  position: absolute;
  right: 72px;
  bottom: 58px;
  width: max-content;
  border: 1px solid var(--rf-line);
  border-radius: 10px 10px 2px;
  padding: 7px 9px;
  color: var(--rf-text);
  background: var(--rf-surface);
  font: 750 .62rem system-ui;
  opacity: 0;
  transform: translateY(5px);
  transition: .18s ease;
  pointer-events: none;
}
.mascot-trigger:hover::after,
.mascot-trigger:focus-visible::after { opacity: 1; transform: none; }
.recommendation-mascot.is-thinking .mascot-trigger { animation: moru-think .55s ease-in-out infinite; }
.mascot-panel {
  position: absolute;
  right: 6px;
  bottom: 86px;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--rf-line);
  border-radius: 14px 14px 4px;
  padding: 15px;
  color: var(--rf-text);
  background: color-mix(in srgb, var(--rf-surface) 96%, var(--rf-bg));
  box-shadow: 0 22px 55px #0009;
}
.mascot-panel[hidden] { display: none; }
.mascot-panel header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mascot-panel header span { display: grid; }
.mascot-panel header small { color: var(--rf-secondary); font-size: .57rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.mascot-panel header strong { font-size: .84rem; }
.mascot-panel header button { border: 0; color: var(--rf-muted); background: none; font-size: 1.2rem; cursor: pointer; }
.mascot-status { margin: 14px 0; color: var(--rf-muted); font-size: .73rem; }
.mascot-card { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; }
.mascot-card > img { width: 78px; height: 112px; border-radius: 7px; object-fit: cover; background: var(--rf-bg); }
.mascot-card > div { min-width: 0; }
.mascot-card small,
.mascot-card strong,
.mascot-card p { display: block; }
.mascot-card small { color: var(--rf-secondary); font-size: .56rem; font-weight: 800; }
.mascot-card strong { margin: 3px 0; overflow: hidden; font-size: .9rem; white-space: nowrap; text-overflow: ellipsis; }
.mascot-card p { display: -webkit-box; overflow: hidden; margin: 7px 0; color: var(--rf-muted); font-size: .66rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.mascot-card nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mascot-card nav a,
.mascot-card nav button { border: 0; padding: 0; color: var(--rf-primary); background: none; font-size: .62rem; font-weight: 850; text-decoration: none; cursor: pointer; }
.mascot-card nav a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mascot-card nav button { flex: 0 0 auto; color: var(--rf-muted); }
.mascot-card nav .mascot-house-link { flex: 0 0 100%; color: var(--rf-secondary); }
.recommendation-feedback { display: flex; align-items: center; gap: 5px; margin: 8px 0; }
.recommendation-feedback > span { margin-right: 3px; color: var(--rf-muted); font-size: .58rem; font-weight: 750; }
.recommendation-feedback button { width: 29px; height: 27px; display: grid; place-items: center; border: 1px solid var(--rf-line); border-radius: 8px; padding: 0; color: var(--rf-muted); background: var(--rf-bg); font-size: .82rem; cursor: pointer; transition: .16s ease; }
.recommendation-feedback button:hover,.recommendation-feedback button:focus-visible,.recommendation-feedback button.active { border-color: var(--rf-secondary); color: var(--rf-text); background: color-mix(in srgb,var(--rf-secondary) 12%,var(--rf-bg)); transform: translateY(-1px); }
.recommendation-feedback button:disabled { opacity: .55; cursor: wait; transform: none; }
@keyframes moru-hop {
  0%, 76%, 100% { transform: translateY(0) rotate(0); }
  82% { transform: translateY(-9px) rotate(-3deg); }
  88% { transform: translateY(0) rotate(3deg); }
  92% { transform: translateY(-3px) rotate(0); }
}
@keyframes moru-think { 50% { transform: translateY(-5px) rotate(2deg); } }
@media (max-width: 600px) {
  .recommendation-mascot { right: 2px; bottom: 2px; }
  .extension-install-prompt.has-moru-companion { right: 82px; width: calc(100vw - 94px); }
  .mascot-trigger { width: 72px; height: 72px; }
  .mascot-panel { right: 0; bottom: 72px; }
  .mascot-trigger::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot-trigger,
  .recommendation-mascot.is-thinking .mascot-trigger { animation: none; }
}
