/* ── インライン用語マーカー ── */
.term{
  border-bottom: 1px dashed currentColor;
  cursor: help;
  position: relative;
  padding-bottom: 1px;
  transition: color .2s;
  outline: none;
}
.term:hover,
.term:focus-visible{ color: var(--accent, #0066ff); }
.term:focus-visible{
  outline: 2px solid var(--accent, #0066ff);
  outline-offset: 3px;
  border-radius: 2px;
}
.term::after{
  content: "?";
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px;
  font-family: var(--sans, system-ui);
  font-size: 9px; font-weight: 700;
  background: var(--bg-soft, #f5f5f7);
  border: 1px solid var(--ink-3, #86868b);
  border-radius: 50%;
  color: var(--ink-2, #515154);
  margin-left: 4px;
  vertical-align: super;
  line-height: 1;
  transition: background .2s, color .2s, border-color .2s;
}
.term:hover::after,
.term:focus-visible::after{
  background: var(--accent, #0066ff);
  color: #fff;
  border-color: var(--accent, #0066ff);
}

/* ── popover ── */
.term-popover{
  position: absolute;
  z-index: 9999;
  background: #1d1d1f;
  color: #fff;
  padding: 16px 18px 14px;
  border-radius: 12px;
  font-family: var(--sans, system-ui);
  font-size: 13.5px;
  line-height: 1.7;
  max-width: 320px;
  min-width: 240px;
  box-shadow: 0 12px 32px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.06);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.term-popover.above{ transform: translateY(6px); }
.term-popover.show{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.term-popover .tp-label{
  font-size: 12px; font-weight: 700;
  letter-spacing: .04em;
  color: #ff8e7d;
  margin-bottom: 8px;
}
.term-popover .tp-def{
  margin-bottom: 12px;
  color: rgba(255,255,255,.92);
}
.term-popover .tp-link{
  display: inline-block;
  font-size: 12px; font-weight: 600;
  color: #7aa8ff;
  border-bottom: 1px solid rgba(122,168,255,.4);
  padding-bottom: 1px;
  text-decoration: none;
}
.term-popover .tp-link:hover{
  border-bottom-color: #7aa8ff;
}

/* スマホ */
@media (max-width: 640px){
  .term-popover{
    max-width: calc(100vw - 24px);
    font-size: 13px;
  }
}
