#oretanCharacterWalker {
  --ocw-x: 82;
  --ocw-y: 0;
  --ocw-face: 1;
  --ocw-bubble-shift: -50%;
  --ocw-arrow-left: 50%;
  --ocw-ink: #4a3f4a;
  --ocw-muted: #827382;
  --ocw-gold: #c6a96d;
  --ocw-pink: #f3b8c2;

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  color: var(--ocw-ink);
  overflow: hidden;
}

#oretanCharacterWalker *,
#oretanCharacterWalker *::before,
#oretanCharacterWalker *::after {
  box-sizing: border-box;
}

#oretanCharacterWalker [hidden] {
  display: none !important;
}

#oretanCharacterWalker .ocw-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#oretanCharacterWalker .ocw-avatar {
  position: absolute;
  left: calc(var(--ocw-x) * 1%);
  bottom: calc(14px + var(--ocw-y) * 1px);
  width: 86px;
  height: 132px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 14px rgba(67, 45, 57, 0.18));
  transition: filter 0.2s ease, opacity 0.35s ease;
}

#oretanCharacterWalker .ocw-avatar:hover {
  filter: drop-shadow(0 10px 18px rgba(67, 45, 57, 0.26));
}

#oretanCharacterWalker .ocw-avatar-wrap {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(var(--ocw-face));
  transform-origin: center bottom;
}

#oretanCharacterWalker .ocw-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

#oretanCharacterWalker .ocw-avatar.is-walking .ocw-avatar-wrap {
  animation: ocwBob 0.72s ease-in-out infinite alternate;
}

#oretanCharacterWalker .ocw-avatar.is-idle .ocw-avatar-wrap {
  animation: ocwBreathe 3.4s ease-in-out infinite;
}

#oretanCharacterWalker .ocw-avatar.is-peeking {
  opacity: 0.92;
}

#oretanCharacterWalker .ocw-avatar.is-peeking .ocw-avatar-wrap {
  animation: ocwPeek 2.2s ease-in-out infinite;
}

@keyframes ocwBob {
  from { transform: scaleX(var(--ocw-face)) translateY(0) rotate(-1deg); }
  to { transform: scaleX(var(--ocw-face)) translateY(-5px) rotate(1deg); }
}

@keyframes ocwBreathe {
  0%, 100% { transform: scaleX(var(--ocw-face)) translateY(0) scale(1); }
  50% { transform: scaleX(var(--ocw-face)) translateY(-2px) scale(1.012); }
}

@keyframes ocwPeek {
  0%, 100% { transform: scaleX(var(--ocw-face)) translateY(0) rotate(0deg); }
  50% { transform: scaleX(var(--ocw-face)) translateY(-3px) rotate(2deg); }
}

#oretanCharacterWalker .ocw-badge {
  position: absolute;
  top: 12px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f2a7b4, #d66d86);
  color: #fff;
  border: 2px solid #fff;
  font-size: 13px;
  line-height: 16px;
  font-weight: 700;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(95, 55, 68, 0.25);
  animation: ocwBadge 0.9s ease-in-out infinite alternate;
}

@keyframes ocwBadge {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-4px) scale(1.08); }
}

#oretanCharacterWalker .ocw-bubble {
  position: absolute;
  left: calc(var(--ocw-x) * 1%);
  bottom: calc(150px + var(--ocw-y) * 1px);
  width: min(330px, calc(100vw - 28px));
  transform: translateX(var(--ocw-bubble-shift));
  pointer-events: auto;
  animation: ocwBubbleIn 0.28s ease-out both;
}

#oretanCharacterWalker .ocw-bubble-inner {
  position: relative;
  padding: 14px 14px 13px;
  border-radius: 18px;
  border: 1.5px solid rgba(198, 169, 109, 0.72);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.96), rgba(255,255,255,0) 40%),
    linear-gradient(135deg, rgba(255,252,246,0.96), rgba(246,235,241,0.94));
  box-shadow:
    0 14px 34px rgba(69, 48, 62, 0.18),
    inset 0 0 0 1px rgba(255,255,255,0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#oretanCharacterWalker .ocw-bubble-inner::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(198, 169, 109, 0.35);
  border-radius: 14px;
  pointer-events: none;
}

#oretanCharacterWalker .ocw-bubble::after {
  content: "";
  position: absolute;
  left: var(--ocw-arrow-left);
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: rgba(255, 252, 246, 0.96);
  border-right: 1.5px solid rgba(198, 169, 109, 0.72);
  border-bottom: 1.5px solid rgba(198, 169, 109, 0.72);
  transform: translateX(-50%) rotate(45deg);
}

@keyframes ocwBubbleIn {
  from { opacity: 0; transform: translateX(var(--ocw-bubble-shift)) translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateX(var(--ocw-bubble-shift)) translateY(0) scale(1); }
}

#oretanCharacterWalker .ocw-bubble-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

#oretanCharacterWalker .ocw-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: #9b7b3e;
  font-weight: 700;
}

#oretanCharacterWalker .ocw-close {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.65);
  color: #9b7b8c;
  font-size: 18px;
  line-height: 20px;
  cursor: pointer;
}

#oretanCharacterWalker .ocw-close:hover {
  background: #fff;
  color: #d66d86;
}

#oretanCharacterWalker .ocw-text {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 0.82rem;
  line-height: 1.72;
  color: var(--ocw-ink);
}

#oretanCharacterWalker .ocw-text strong {
  color: #4d6f95;
}

#oretanCharacterWalker .ocw-text small {
  color: var(--ocw-muted);
  line-height: 1.55;
}

#oretanCharacterWalker .ocw-choices {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
}

#oretanCharacterWalker .ocw-choice {
  width: 100%;
  border: 1px solid rgba(198, 169, 109, 0.38);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.68);
  color: var(--ocw-ink);
  font-family: inherit;
  font-size: 0.76rem;
  line-height: 1.35;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

#oretanCharacterWalker .ocw-choice:hover {
  transform: translateX(3px);
  background: #fff;
  border-color: rgba(198, 169, 109, 0.85);
}

#oretanCharacterWalker .ocw-cmd-index {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(198, 169, 109, 0.15);
  border: 1px solid rgba(198, 169, 109, 0.42);
  color: #9b7b3e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.65rem;
  font-weight: 700;
}

#oretanCharacterWalker .ocw-choice.is-correct {
  background: rgba(183, 216, 181, 0.34);
  border-color: #8ab989;
}

#oretanCharacterWalker .ocw-choice.is-wrong {
  background: rgba(243, 184, 194, 0.34);
  border-color: #d9798b;
}

#oretanCharacterWalker .ocw-choice:disabled {
  cursor: default;
  opacity: 0.84;
}

#oretanCharacterWalker .ocw-sound {
  position: absolute;
  right: 18px;
  bottom: 126px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1.5px solid rgba(198, 169, 109, 0.68);
  background: rgba(255, 252, 246, 0.92);
  box-shadow: 0 8px 18px rgba(69, 48, 62, 0.12);
  cursor: pointer;
  pointer-events: auto;
  display: grid;
  place-items: center;
  font-size: 15px;
}

#oretanCharacterWalker .ocw-sound:hover {
  background: #fff;
}

#oretanCharacterWalker .ocw-confetti {
  position: absolute;
  bottom: calc(144px + var(--ocw-y) * 1px);
  left: calc(var(--ocw-x) * 1%);
  width: 7px;
  height: 7px;
  border-radius: 2px;
  pointer-events: none;
  animation: ocwConfetti 1.55s ease-out forwards;
}

@keyframes ocwConfetti {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), var(--dy)) rotate(360deg) scale(0.72);
  }
}

@media (max-width: 640px) {
  #oretanCharacterWalker .ocw-avatar {
    width: 72px;
    height: 110px;
    bottom: calc(8px + var(--ocw-y) * 1px);
  }

  #oretanCharacterWalker .ocw-bubble {
    bottom: calc(120px + var(--ocw-y) * 1px);
    width: min(300px, calc(100vw - 20px));
  }

  #oretanCharacterWalker .ocw-bubble-inner {
    padding: 12px 12px 11px;
  }

  #oretanCharacterWalker .ocw-text {
    font-size: 0.78rem;
  }

  #oretanCharacterWalker .ocw-choice {
    font-size: 0.72rem;
    padding: 6px 9px;
  }

  #oretanCharacterWalker .ocw-sound {
    right: 12px;
    bottom: 108px;
  }

  #oretanCharacterWalker .ocw-confetti {
    bottom: calc(118px + var(--ocw-y) * 1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #oretanCharacterWalker *,
  #oretanCharacterWalker *::before,
  #oretanCharacterWalker *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  #oretanCharacterWalker {
    display: none !important;
  }
}
