#screen-game {
  background: #0a0810;
}

.game-stage {
  position: absolute;
  inset: 0;
}

.game-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #2a2438 0%, #16121f 100%);
  background-size: cover;
  background-position: center;
  transition: opacity 0.6s var(--ease-out);
}

.game-char-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.game-char-layer img {
  position: absolute;
  bottom: 0;
  max-height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
  transition: opacity 0.45s, transform 0.45s var(--ease-out);
}

.game-char-layer img.pos-left { left: 4%; }
.game-char-layer img.pos-center { left: 50%; transform: translateX(-50%); }
.game-char-layer img.pos-right { right: 4%; }

.game-fade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s;
  z-index: 5;
}

.game-fade.is-active {
  opacity: 1;
}

.game-hud {
  position: absolute;
  top: 56px;
  right: 20px;
  z-index: 8;
}

.affection-panel {
  padding: 12px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  min-width: 140px;
}

.affection-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.affection-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  padding: 4px 0;
}

.affection-list .bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.affection-list .bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 2px;
  transition: width 0.5s var(--ease-out);
}

.game-toolbar {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  display: flex;
  gap: 6px;
}

.tool-btn {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 143, 171, 0.4);
}

.game-ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  padding: 0 clamp(16px, 4vw, 48px) clamp(20px, 3vh, 36px);
}

.dialogue-box {
  position: relative;
  padding: 22px 28px 36px;
  background: linear-gradient(180deg, rgba(16, 14, 24, 0.55) 0%, rgba(12, 10, 18, 0.88) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 4px 4px 12px 12px;
  backdrop-filter: blur(12px);
  min-height: 120px;
  cursor: pointer;
}

.dialogue-box.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.speaker {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent-soft);
  letter-spacing: 0.16em;
  margin-bottom: 10px;
  min-height: 1.2em;
}

.speaker:empty {
  display: none;
}

.dialogue-text {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  line-height: 1.85;
  font-weight: 300;
  letter-spacing: 0.06em;
  min-height: 3.7em;
}

.dialogue-text .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: var(--accent-soft);
  vertical-align: text-bottom;
  animation: blink 0.9s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.dialogue-next {
  position: absolute;
  right: 18px;
  bottom: 12px;
  font-size: 0.75rem;
  color: var(--text-dim);
  animation: bounce 1.4s ease-in-out infinite;
}

.dialogue-next.is-hidden {
  display: none;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.choice-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  max-width: 520px;
}

.choice-panel[hidden] {
  display: none;
}

.choice-btn {
  padding: 14px 20px;
  text-align: left;
  background: rgba(24, 20, 36, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 0.94rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.choice-btn:hover:not(:disabled) {
  border-color: rgba(255, 143, 171, 0.5);
  background: rgba(40, 34, 56, 0.9);
  transform: translateX(6px);
}

.choice-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.choice-btn--side {
  border-left: 3px solid var(--accent);
}

.choice-btn__tag {
  display: block;
  font-size: 0.72rem;
  color: var(--accent-soft);
  margin-top: 4px;
  letter-spacing: 0.12em;
}
