/* =====================================================
   用語ツールチップ（details / summary）
   ===================================================== */

.pill-tip {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  margin: 0 0.08em;
}

.pill-tip__details {
  position: relative;
  display: inline-block;
}

.pill-tip__summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 1.8em;
  padding: 0.08em 0.65em;
  border-radius: 999px;
  border: 1px solid rgba(60, 59, 135, 0.25);
  background: rgba(60, 59, 135, 0.06);
  color: #3c3b87;
  font-size: 0.95em;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
}

.pill-tip__summary::-webkit-details-marker {
  display: none;
}

.pill-tip__summary:focus-visible {
  outline: 2px solid rgba(104, 103, 175, 0.35);
  outline-offset: 3px;
}

.pill-tip__icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  border-radius: 999px;
  border: 1px solid rgba(60, 59, 135, 0.35);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.pill-tip__details[open] .pill-tip__icon {
  background: rgba(104, 103, 175, 0.10);
  border-color: rgba(104, 103, 175, 0.55);
}

.pill-tip__popover {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(260px, 85vw);
  max-width: min(260px, 85vw);
  min-width: min(220px, 85vw);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff;
  color: #343434;
  font-size: 1.35rem;
  line-height: 1.7;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  z-index: 50;
  display: none;
}

.pill-tip__popover::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid rgba(0, 0, 0, .12);
  border-top: 1px solid rgba(0, 0, 0, .12);
}

.pill-tip__details[open] .pill-tip__popover {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .pill-tip__details:hover .pill-tip__popover,
  .pill-tip__summary:focus-visible + .pill-tip__popover {
    display: block;
  }
}

.pill-tip__ruby {
  margin: 0 0 4px;
  font-size: 1.2rem;
  color: #666;
}

.pill-tip__desc {
  margin: 0;
}