/* Highlighted term (VERY subtle: normal text + very light dotted underline) */
.oewn-hg-term{
  cursor: help;
  border-bottom: 1px dotted rgba(0,0,0,0.12);
  position: relative;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 500; /* minimal emphasis */
  transition: border-color 120ms ease-in-out, font-weight 120ms ease-in-out;
}

.oewn-hg-term:hover,
.oewn-hg-term:focus,
.oewn-hg-term.oewn-hg-active{
  border-bottom-color: rgba(0,0,0,0.22);
  font-weight: 600;
}

/* Tooltip bubble */
.oewn-hg-tooltip{
  position: absolute;
  z-index: 9999;
  left: 0;
  top: 1.6em;
  min-width: 240px;
  max-width: 340px;
  background: #111;
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.oewn-hg-title{
  font-size: 14px;
  margin-bottom: 6px;
}

.oewn-hg-row{
  margin: 4px 0;
}

.oewn-hg-label{
  opacity: 0.8;
  margin-right: 6px;
}

.oewn-hg-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.oewn-hg-btn{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.oewn-hg-btn:hover{
  background: rgba(255,255,255,0.14);
}

.oewn-hg-speed{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  opacity: 0.95;
}

.oewn-hg-speed input{
  width: 110px;
}

.oewn-hg-close{
  margin-left: auto;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  line-height: 1;
}

@media (max-width: 640px){
  .oewn-hg-tooltip{
    position: fixed;
    left: 12px !important;
    right: 12px;
    top: auto;
    bottom: 12px;
    max-width: none;
    min-width: 0;
  }
}

/* ---------------- Flashcard modal ---------------- */
.oewn-hg-fc-overlay{
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.oewn-hg-fc-overlay.is-open{ display: flex; }

.oewn-hg-fc-modal{
  width: min(520px, 100%);
  background: #0b0f19;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  padding: 14px;
  color: #fff;
  position: relative;
}

.oewn-hg-fc-x{
  position: absolute;
  right: 10px;
  top: 8px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.oewn-hg-fc-preview{
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 6px 12px;
}

.oewn-hg-fc-img{
  width: 100%;
  max-width: 360px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

.oewn-hg-fc-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.oewn-hg-fc-hint{
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.75;
  text-align: center;
}
