/* Keep inline lookup targets in the existing reading flow. */
.lookup-word {
  border-radius: 2px;
  cursor: help;
  -webkit-tap-highlight-color: transparent;
}

.lookup-word[aria-describedby="word-lookup-popup"] {
  background: var(--leaf);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .17em;
}

.lookup-popup {
  position: fixed;
  z-index: 20;
  max-width: min(19rem, calc(100vw - 16px));
  padding: 8px 11px;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 14px #0003;
  color: var(--ink);
  font: 400 .875rem/1.5 var(--ui);
  overflow-wrap: anywhere;
  pointer-events: none;
}

.lookup-title {
  color: var(--forest);
  font-weight: 750;
}

.lookup-meaning {
  margin-top: 2px;
  white-space: pre-line;
}

.lookup-base,
.lookup-hint {
  color: var(--muted);
  font-size: .8125rem;
}

.lookup-base {
  margin-top: 4px;
}

.lookup-hint {
  margin-bottom: 5px;
}
