.live2d-stage {
  position: fixed;
  right: var(--live2d-offset-x, 22px);
  bottom: var(--live2d-offset-y, 20px);
  z-index: 10;
  width: var(--live2d-width, 320px);
  height: var(--live2d-height, 580px);
  pointer-events: none;
}

.live2d-stage.is-left {
  right: auto;
  left: var(--live2d-offset-x, 22px);
}

.live2d-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.yuki-terminal {
  position: absolute;
  z-index: 1;
  top: calc(18px + var(--yuki-dialogue-offset-y, 0px));
  left: calc(50% + var(--yuki-dialogue-offset-x, 0px));
  width: min(290px, 88%);
  transform: translateX(-50%);
  padding: 11px 13px 12px;
  overflow: hidden;
  border: 1px solid rgba(206, 232, 231, 0.72);
  border-radius: 3px;
  color: #f3ffff;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0, rgba(255, 255, 255, 0.022) 1px, transparent 1px, transparent 4px),
    linear-gradient(135deg, rgba(13, 19, 23, 0.94), rgba(27, 32, 35, 0.91));
  box-shadow:
    0 0 0 1px rgba(132, 201, 202, 0.16) inset,
    0 0 10px rgba(192, 238, 238, 0.26),
    0 10px 26px rgba(20, 33, 37, 0.3);
  font-family: "MS Gothic", "Noto Sans Mono CJK SC", Consolas, monospace;
  letter-spacing: 0.045em;
  text-shadow: 0 0 5px rgba(228, 255, 255, 0.95), 0 0 13px rgba(186, 240, 242, 0.5);
}

.yuki-terminal::after {
  position: absolute;
  right: 18px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(206, 232, 231, 0.72);
  border-bottom: 1px solid rgba(206, 232, 231, 0.72);
  background: #1b2023;
  content: "";
  transform: rotate(45deg);
}

.yuki-terminal-label {
  display: inline;
  margin-right: 1ch;
  color: #b9edeb;
  font-size: 11px;
  letter-spacing: 0.13em;
}

.yuki-terminal-text {
  display: inline;
  font-size: 13px;
  line-height: 1.5;
}

.yuki-terminal-cursor {
  display: inline-block;
  width: 0.58em;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.13em;
  background: #eaffff;
  box-shadow: 0 0 8px rgba(225, 255, 255, 0.9);
  animation: yuki-terminal-blink 0.95s steps(2, jump-none) infinite;
}

@keyframes yuki-terminal-blink {
  50% { opacity: 0; }
}

@media (max-width: 700px) {
  .live2d-stage {
    --live2d-width: min(var(--live2d-width, 320px), 62vw);
    --live2d-height: min(var(--live2d-height, 580px), 76vh);
    opacity: 0.93;
  }

  .yuki-terminal {
    top: calc(8px + var(--yuki-dialogue-offset-y, 0px));
    width: min(240px, 100%);
    padding: 9px 10px;
  }

  .yuki-terminal-text {
    font-size: 11px;
  }
}
