/* ===================================================
   OKAPO LAB — LIKE / SHARE
   記事・アプリ・ゲーム共通。既存ページへ影響しないよう
   okapo-reactions 接頭辞のクラスだけで構成する。
=================================================== */
.okapo-reactions {
  --okapo-reactions-bg: rgba(8, 10, 18, 0.92);
  --okapo-reactions-panel: rgba(17, 20, 34, 0.96);
  --okapo-reactions-line: rgba(142, 160, 220, 0.24);
  --okapo-reactions-blue: #7f9cff;
  --okapo-reactions-purple: #a777ff;
  --okapo-reactions-text: #f7f8ff;
  --okapo-reactions-muted: #a4abc1;
  position: relative;
  width: 100%;
  min-width: 0;
  margin: clamp(28px, 5vw, 52px) 0 0;
  padding: 18px;
  border: 1px solid var(--okapo-reactions-line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(167, 119, 255, 0.12), transparent 45%),
    var(--okapo-reactions-bg);
  color: var(--okapo-reactions-text);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  font-family: "Noto Sans JP", sans-serif;
  box-sizing: border-box;
  isolation: isolate;
}

.okapo-reactions *,
.okapo-reactions *::before,
.okapo-reactions *::after {
  box-sizing: border-box;
}

.okapo-reactions__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.okapo-reactions__button {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--okapo-reactions-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--okapo-reactions-text);
  font: 500 0.82rem/1.2 "Noto Sans JP", sans-serif;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.okapo-reactions__button:hover,
.okapo-reactions__button:focus-visible {
  border-color: rgba(127, 156, 255, 0.72);
  background: rgba(127, 156, 255, 0.11);
}

.okapo-reactions__button:focus-visible {
  outline: 2px solid var(--okapo-reactions-purple);
  outline-offset: 3px;
}

.okapo-reactions__button:active {
  transform: translateY(1px);
}

.okapo-reactions__button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.okapo-reactions__like[aria-pressed="true"] {
  border-color: rgba(167, 119, 255, 0.78);
  background: linear-gradient(135deg, rgba(127, 156, 255, 0.28), rgba(167, 119, 255, 0.24));
}

.okapo-reactions__flame {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  overflow: visible;
}

.okapo-reactions__flame path {
  fill: transparent;
  stroke: #d9deef;
  stroke-width: 1.8;
  transition: fill 0.22s ease, stroke 0.22s ease, filter 0.22s ease;
}

.okapo-reactions__like[aria-pressed="true"] .okapo-reactions__flame path {
  fill: #050507;
  stroke: #c7b3ff;
  filter: drop-shadow(0 0 5px rgba(167, 119, 255, 0.8));
}

.okapo-reactions__count {
  min-width: 1.4em;
  color: #cbd5ff;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.okapo-reactions__share-wrap {
  min-width: 0;
}

.okapo-reactions-modal-open {
  overflow: hidden;
}

.okapo-reactions__modal {
  --okapo-reactions-line: rgba(142, 160, 220, 0.24);
  --okapo-reactions-purple: #a777ff;
  --okapo-reactions-text: #f7f8ff;
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  width: min(92vw, 480px);
  max-width: 480px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(127, 156, 255, 0.46);
  border-radius: 20px;
  background: rgba(8, 12, 24, 0.96);
  color: var(--okapo-reactions-text, #f7f8ff);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.78), 0 0 45px rgba(112, 104, 255, 0.12);
  font-family: "Noto Sans JP", sans-serif;
  box-sizing: border-box;
}

.okapo-reactions__modal::backdrop {
  background: rgba(0, 0, 0, 0.76);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.okapo-reactions__modal-panel {
  position: relative;
  padding: clamp(28px, 6vw, 42px);
  background:
    radial-gradient(circle at 100% 0%, rgba(167, 119, 255, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(16, 22, 43, 0.98), rgba(8, 12, 24, 0.98));
}

.okapo-reactions__modal-title {
  margin: 0 38px 24px 0;
  color: #f7f8ff;
  font: 500 clamp(1.15rem, 4vw, 1.45rem)/1.5 "Noto Sans JP", sans-serif;
  letter-spacing: 0.03em;
}

.okapo-reactions__modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  color: #c7cde0;
  font-size: 1.35rem;
}

.okapo-reactions__modal-actions {
  display: grid;
  gap: 10px;
}

.okapo-reactions__modal-actions .okapo-reactions__button {
  width: 100%;
  min-height: 52px;
  justify-content: center;
  border-color: rgba(127, 156, 255, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: #f7f8ff;
  font-size: 0.9rem;
  white-space: normal;
  text-align: center;
}

.okapo-reactions__modal-actions .okapo-reactions__button:hover,
.okapo-reactions__modal-actions .okapo-reactions__button:focus-visible {
  border-color: rgba(167, 119, 255, 0.82);
  background: linear-gradient(135deg, rgba(127, 156, 255, 0.18), rgba(167, 119, 255, 0.16));
}

.okapo-reactions__modal-status {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: #b9c5ee;
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: center;
}

.okapo-reactions__modal-status:empty {
  margin-top: 0;
  min-height: 0;
}

.okapo-reactions__status {
  min-height: 1.4em;
  margin: 9px 2px 0;
  color: var(--okapo-reactions-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.okapo-reactions__status:empty {
  display: none;
}

/* ゲーム一覧カード内では、既存CTAの下へコンパクトに収める。 */
.work-card .okapo-reactions {
  margin-top: 18px;
  padding: 12px;
  border-radius: 12px;
  box-shadow: none;
}

.work-card .okapo-reactions__button {
  min-height: 40px;
  padding: 8px 11px;
  font-size: 0.74rem;
}

@media (max-width: 560px) {
  .okapo-reactions {
    padding: 14px;
  }

  .okapo-reactions__bar {
    align-items: stretch;
  }

  .okapo-reactions__like,
  .okapo-reactions__share-wrap {
    flex: 1 1 145px;
  }

  .okapo-reactions__share-toggle {
    width: 100%;
  }

  .okapo-reactions__modal {
    width: min(90vw, 480px);
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }

  .okapo-reactions__modal-panel {
    padding: 28px 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .okapo-reactions__button,
  .okapo-reactions__flame path {
    transition: none;
  }
}
