:root {
  --paper: #efe1c7;
  --ink: #15110f;
  --ink-dim: rgba(21, 17, 15, 0.74);
  --brick: #8f1d22;
  --brick-2: #b53632;
  --line: rgba(21, 17, 15, 0.22);
  --shadow: rgba(20, 14, 11, 0.22);
}

.floating-kf {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 1px solid rgba(21, 17, 15, 0.18);
  background: linear-gradient(120deg, var(--brick), var(--brick-2));
  color: #fff7f3;
  font-size: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 1200;
  box-shadow: 0 10px 22px var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  animation: kfBreath 2.1s ease-in-out infinite;
}

.floating-kf .kf-face-icon {
  width: 30px;
  height: 30px;
  display: block;
  color: #fff7f3;
}

.floating-kf:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 14px 28px var(--shadow);
}

.floating-kf .kf-tip {
  position: absolute;
  right: 68px;
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(244, 234, 215, 0.97);
  color: var(--ink);
  font-size: 12px;
  opacity: 0;
  transform: translateX(6px);
  pointer-events: none;
  transition: 0.2s ease;
}

.floating-kf:hover .kf-tip {
  opacity: 1;
  transform: translateX(0);
}

.kf-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.38);
  z-index: 1300;
  opacity: 1;
  transition: opacity 0.22s ease;
}

.kf-modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.kf-modal-content {
  width: min(390px, 92vw);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 16px 34px var(--shadow);
  transform: translateY(0) scale(1);
  transition: transform 0.22s ease;
}

.kf-modal.hidden .kf-modal-content {
  transform: translateY(8px) scale(0.98);
}

.kf-modal-content h3 {
  color: var(--ink);
  margin-bottom: 8px;
}

.kf-modal-content p {
  color: var(--ink-dim);
  margin-bottom: 12px;
}

.kf-modal-content img {
  width: 190px;
  height: 220px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin: 0 auto 12px;
  display: block;
}

.kf-close {
  border: 1px solid rgba(21, 17, 15, 0.2);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  color: #fff7f3;
  background: linear-gradient(120deg, var(--brick), var(--brick-2));
}

@keyframes kfBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
