/* Tap-to-gloss widget. */
.gloss-cand,
.gloss-tap {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: inherit;
  border-radius: 0.18em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.gloss-tap {
  cursor: pointer;
  text-decoration: underline dotted rgba(240, 184, 110, 0.45);
  text-underline-offset: 0.2em;
  transition: background-color 0.12s ease, text-decoration-color 0.12s ease;
}
.gloss-tap:hover,
.gloss-tap:focus-visible {
  background: rgba(240, 184, 110, 0.22);
  text-decoration-color: rgba(240, 184, 110, 0.85);
  outline: none;
}
.gloss-pop {
  position: fixed;
  z-index: 80;
  max-width: min(36rem, calc(100vw - 1.6rem));
  max-height: min(44vh, 18rem);
  overflow: auto;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  background: var(--bg-elev, #1e1916);
  color: var(--text, #f4ead4);
  border: 1px solid var(--border, rgba(240, 184, 110, 0.45));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  font-size: 0.85rem;
  font-weight: 550;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: break-word;
  pointer-events: auto;
}
.gloss-pop-miss {
  font-weight: 500;
  color: var(--muted, #b8a98a);
}
