/* ─── SHINRAI Engagement System ─── */
/* Brand-aligned: ink #0a0a0a / paper #f5f1ea / red #D0021B / gold #E8B84B */

.shinrai-engagement {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 32px 0;
  border-top: 2px solid #e0ddd6;
  border-bottom: 2px solid #e0ddd6;
  margin: 48px 0;
  flex-wrap: wrap;
  font-family: 'Sarabun', system-ui, sans-serif;
}

.engagement-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.engagement-views {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  color: #6a6760;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 10px;
  letter-spacing: 0.02em;
}

.engagement-views svg {
  width: 20px;
  height: 20px;
  fill: #6a6760;
  flex-shrink: 0;
}

/* Like / Love buttons */
.btn-like,
.btn-love {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid #d0cdc6;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  color: #0a0a0a;
  font-family: inherit;
  user-select: none;
  font-weight: 600;
}

.btn-like:hover { border-color: #E8B84B; background: rgba(232,184,75,0.08); }
.btn-love:hover { border-color: #D0021B; background: rgba(208,2,27,0.05); }

.btn-like:focus-visible,
.btn-love:focus-visible,
.btn-share:focus-visible {
  outline: 3px solid #E8B84B;
  outline-offset: 2px;
}

.btn-like.active {
  border-color: #E8B84B;
  background: rgba(232,184,75,0.14);
  color: #b8922e;
}

.btn-love.active {
  border-color: #D0021B;
  background: rgba(208,2,27,0.10);
  color: #D0021B;
}

.btn-like .icon,
.btn-love .icon {
  font-size: 22px;
  line-height: 1;
}

.shinrai-engagement .count {
  font-size: 15px;
  font-weight: 700;
  min-width: 14px;
  font-family: 'IBM Plex Mono', monospace;
}

/* Share buttons */
.share-group {
  display: flex;
  gap: 8px;
  margin-left: auto;
  align-items: center;
}

.btn-share {
  width: 48px;
  height: 48px;
  border: 2px solid #d0cdc6;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.btn-share:hover {
  border-color: #E8B84B;
  background: rgba(232,184,75,0.08);
}

.btn-share svg {
  width: 22px;
  height: 22px;
  fill: #4a4843;
  transition: fill 0.2s;
  display: block;
}

.btn-share:hover svg { fill: #0a0a0a; }

/* Animations */
@keyframes pulse-scale {
  0% { transform: scale(1); }
  40% { transform: scale(1.30); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.shinrai-engagement .animate .icon { animation: pulse-scale 0.35s ease; }
.shinrai-engagement .shake { animation: shake 0.3s ease; }

/* Toast notification */
.shinrai-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0a0a0a;
  color: #f5f1ea;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  pointer-events: none;
  font-family: 'Sarabun', system-ui, sans-serif;
  white-space: nowrap;
}

.shinrai-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Knowledge Hub Aggregate Stats ─── */
.hub-stats {
  background: #0a0a0a;
  border: 1px solid #2e2e2e;
  padding: 16px 24px;
  margin: 0 0 48px;
  display: flex;
  align-items: center;
  font-family: 'Sarabun', system-ui, sans-serif;
}

.hub-stats-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}

.hub-stats-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #E8B84B;
  font-weight: 500;
  margin-right: 8px;
}

.hub-stats-item {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: #969696;
}

.hub-stats-item span {
  color: #f5f1ea;
  font-weight: 700;
  font-size: 15px;
}

.hub-stats-sep {
  color: #4a4a4a;
  font-size: 14px;
}

.hub-stats-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: .1em;
  color: #6a6760;
  margin-left: auto;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .shinrai-engagement {
    gap: 12px;
    padding: 24px 0;
  }
  .share-group {
    margin-left: 0;
    width: 100%;
    margin-top: 12px;
  }
  .btn-like, .btn-love {
    padding: 10px 18px;
    font-size: 15px;
  }
  .btn-like .icon,
  .btn-love .icon {
    font-size: 20px;
  }
  .btn-share {
    width: 44px;
    height: 44px;
  }
  .btn-share svg {
    width: 20px;
    height: 20px;
  }
  .engagement-views {
    width: 100%;
    margin-bottom: 8px;
    font-size: 14px;
  }
  .hub-stats {
    padding: 12px 16px;
    margin: 0 0 32px;
  }
  .hub-stats-inner {
    gap: 10px;
  }
  .hub-stats-label {
    width: 100%;
    margin-bottom: 4px;
    margin-right: 0;
  }
  .hub-stats-badge {
    margin-left: 0;
    width: 100%;
    margin-top: 4px;
  }
}
