#s-game {
  display: block; /* flex を無効化して absolute 配置に任せる */
  background: #09090f;
  transition: background 1.4s ease, opacity 0.9s ease;
}

#canvas {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ── 単語: wrapper（位置・クリック）── */
.ww {
  position: absolute;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

/* ── 単語: inner（見た目・アニメ）── */
.wi {
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.1em;
  transition: color 0.2s ease, text-shadow 0.2s ease, opacity 0.2s ease;
  animation: wordFloat var(--dur, 6s) var(--delay, 0s) ease-in-out infinite;
}

@keyframes wordFloat {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(var(--fx, 0px), var(--fy, -8px)); }
  75%  { transform: translate(calc(var(--fx, 0px) * -0.6), calc(var(--fy, -8px) * 0.4)); }
  100% { transform: translate(0, 0); }
}

.ww:hover .wi {
  color: #fff !important;
  opacity: 1 !important;
  text-shadow: 0 0 18px rgba(255,255,255,0.45);
  animation-play-state: paused;
}

/* 選択時：ゴールド発光 + 拡大 */
.wi.chosen {
  animation: none !important;
  opacity: 1 !important;
  transform: scale(1.3) !important;
  display: inline-block;
  transition: color 0.08s, text-shadow 0.08s, transform 0.35s ease !important;
}

/* 非選択時：フェードアウト */
.wi.fade-out {
  opacity: 0 !important;
  transform: translateY(-10px) !important;
  transition: opacity 0.38s ease, transform 0.38s ease !important;
  pointer-events: none !important;
}

/* ── パーソナリティメーター ── */
#pm {
  position: fixed;
  bottom: 38px;
  left: 16px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}

#pm.visible {
  opacity: 1;
}

.pm-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 46px;
}

.pm-fill {
  width: 4px;
  height: 0%;
  border-radius: 2px 2px 0 0;
  transition: height 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  min-height: 2px;
}

.pm-label {
  font-size: 7px;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

/* ── UI テキスト ── */
#depth-ui {
  position: fixed;
  bottom: 14px;
  right: 16px;
  font-size: 9px;
  color: #dcdcdc;
  letter-spacing: 0.25em;
  pointer-events: none;
  z-index: 100;
}

#level-name-ui {
  position: fixed;
  top: 14px;
  left: 16px;
  font-size: 9px;
  color: #dcdcdc;
  letter-spacing: 0.4em;
  pointer-events: none;
  z-index: 100;
}

#guide-text {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: #dcdcdc;
  letter-spacing: 0.35em;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
}
