@keyframes wordmap-word-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes wordmap-panel-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.WordMap {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: #d8ddd6;
  background-image: radial-gradient(ellipse at 15% 8%, rgba(255, 255, 250, 0.5), transparent 55%), radial-gradient(ellipse at 85% 92%, rgba(40, 50, 40, 0.1), transparent 55%);
  color: #1c2228;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
}
.WordMap-Noise {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.15 0 0 0 0 0.18 0 0 0 0 0.15 0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/></svg>");
  opacity: 0.18;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.WordMap-Lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}
.WordMap-Connector {
  fill: none;
  stroke: rgba(28, 34, 40, 0.3);
  stroke-width: 1;
  stroke-dasharray: 2, 5;
}
.WordMap-Words {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.WordMap-Word {
  position: absolute;
  padding: 4px 8px;
  color: #1c2228;
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
  cursor: grab;
  user-select: none;
  touch-action: none;
  pointer-events: auto;
  animation: wordmap-word-in 0.45s ease-out;
  transition: color 0.15s ease;
}
.WordMap-Word:hover {
  color: #c4574a;
}
.WordMap-Hint {
  position: absolute;
  right: 22px;
  bottom: 16px;
  z-index: 5;
  color: #6a7077;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: 0.18em;
  text-align: right;
  text-transform: uppercase;
  pointer-events: none;
}
.WordMap-Panels {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.WordMap-Panel {
  position: absolute;
  width: 320px;
  background-color: #eaeee8;
  border: 1px solid rgba(28, 34, 40, 0.14);
  box-shadow: 0 14px 36px rgba(20, 30, 25, 0.2), 0 2px 6px rgba(20, 30, 25, 0.1);
  pointer-events: auto;
  animation: wordmap-panel-in 0.22s ease-out;
}
.WordMap-Panel-Header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  background-color: rgba(28, 34, 40, 0.045);
  border-bottom: 1px solid rgba(28, 34, 40, 0.08);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.WordMap-Panel-Close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: transparent;
  border: none;
  color: #6a7077;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.WordMap-Panel-Title {
  flex: 1;
  overflow: hidden;
  color: #1c2228;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.WordMap-Panel-Body {
  padding: 14px 16px 16px;
}
.WordMap-Panel-PartOfSpeech {
  margin-bottom: 6px;
  color: #6a7077;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.WordMap-Panel-Definition {
  color: #3a4148;
  font-size: 15px;
  line-height: 1.5;
}
.WordMap-Panel-Related {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(28, 34, 40, 0.14);
}
.WordMap-Panel-RelatedTitle {
  margin-bottom: 8px;
  color: #6a7077;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.WordMap-Panel-RelatedList {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.WordMap-Panel-RelatedWord {
  padding: 2px 0;
  background: transparent;
  border: none;
  color: #c4574a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(196, 87, 74, 0.4);
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.15s;
}
.WordMap-Panel-RelatedWord:hover {
  color: #9c3d33;
}
.WordMap-Panel-Empty {
  color: #6a7077;
  font-size: 13px;
}