/* ===========================================================
   Sticky mascot (левый нижний угол)
   Вне-брендовый зелёный кот; emoji-placeholder до финального SVG.
   =========================================================== */

.mascot-sticky {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.mascot-sticky .mascot-face {
  pointer-events: auto;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: #E6F9D1;
  box-shadow: 0 4px 0 #B5D984, 0 10px 24px -10px rgba(30, 90, 0, .35);
  display: inline-grid;
  place-items: center;
  font-size: 44px;
  line-height: 1;
  transition: transform 140ms ease, box-shadow 140ms ease;
  animation: mascotFloat 3.4s ease-in-out infinite;
}

.mascot-sticky .mascot-face:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #B5D984, 0 14px 28px -10px rgba(30, 90, 0, .4);
}

.mascot-sticky .mascot-face:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #B5D984;
}

.mascot-sticky .mascot-emoji {
  display: inline-block;
  transform: translateY(1px);
}

/* Bubble рисуется слева от кота как колбаска с хвостиком вниз-влево,
   чтобы указывать на маскота. */
.mascot-sticky .mascot-bubble {
  pointer-events: auto;
  max-width: 260px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 18px -8px rgba(47, 37, 17, .35);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
  position: relative;
  margin-bottom: 14px;
  animation: mascotBubbleIn 200ms ease-out;
}

.mascot-sticky .mascot-bubble::after {
  content: '';
  position: absolute;
  left: 22px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
  border-bottom-right-radius: 3px;
}

.mascot-sticky[data-emotion="happy"] .mascot-face {
  background: #D9F5B3;
  box-shadow: 0 4px 0 #A2C96B, 0 10px 24px -10px rgba(30, 90, 0, .4);
}
.mascot-sticky[data-emotion="sad"] .mascot-face {
  background: #FFE1E1;
  box-shadow: 0 4px 0 #E2A1A1;
}
.mascot-sticky[data-emotion="thinking"] .mascot-face {
  background: #EEF2FF;
  box-shadow: 0 4px 0 #C7CCF5;
}

.mascot-sticky.mascot-bounce .mascot-face {
  animation: mascotBounce 520ms ease;
}
.mascot-sticky.mascot-shake .mascot-face {
  animation: mascotShake 380ms ease;
}

@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes mascotBounce {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-14px) scale(1.06); }
  60%  { transform: translateY(0) scale(.97); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes mascotShake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
@keyframes mascotBubbleIn {
  from { opacity: 0; transform: translateY(4px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* Mobile ----------------------------------------------------- */
@media (max-width: 640px) {
  .mascot-sticky {
    left: 12px;
    bottom: 12px;
    gap: 8px;
  }
  .mascot-sticky .mascot-face {
    width: 60px;
    height: 60px;
    font-size: 32px;
  }
  .mascot-sticky .mascot-bubble {
    max-width: calc(100vw - 96px);
    font-size: 13px;
    padding: 8px 12px;
  }
}

/* Reduced-motion и test-mode отключают анимацию */
@media (prefers-reduced-motion: reduce) {
  .mascot-sticky .mascot-face,
  .mascot-sticky.mascot-bounce .mascot-face,
  .mascot-sticky.mascot-shake .mascot-face,
  .mascot-sticky .mascot-bubble { animation: none !important; }
}

body.test-mode .mascot-sticky .mascot-face,
body.test-mode .mascot-sticky.mascot-bounce .mascot-face,
body.test-mode .mascot-sticky.mascot-shake .mascot-face,
body.test-mode .mascot-sticky .mascot-bubble {
  animation: none !important;
  transition: none !important;
}

/* ===========================================================
   PRE-card — блок «что сейчас будешь делать»
   =========================================================== */
.pre-card .pre-steps-title {
  margin-top: var(--space-md);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--info);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 4px;
}
.pre-card ol.pre-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-weight: 600;
}
.pre-card ol.pre-steps li + li {
  margin-top: 4px;
}

/* ===========================================================
   Hint button
   =========================================================== */
.hint-wrap {
  margin-top: var(--space-md);
}
.hint-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFF3C2;
  color: #7C5A00;
  border: 1px solid #F1D880;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 3px 0 #E2BF5C;
  transition: transform 100ms, box-shadow 100ms, opacity 120ms;
}
.hint-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #E2BF5C; }
.hint-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #E2BF5C; }
.hint-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.hint-btn .hint-count {
  font-variant-numeric: tabular-nums;
  color: #7C5A00;
  opacity: .8;
}

.hint-popover {
  margin-top: 8px;
  padding: 10px 12px;
  background: #FFFBEA;
  border: 1px solid #F1D880;
  border-radius: var(--radius-md);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.45;
  animation: fadeIn 200ms ease-out;
}
