/* ===========================================================
   novel.css — a tela da visual novel em si
   =========================================================== */

.vn {
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  background: #000;
  font-family: var(--font-body);
}

/* --- camada de fundo --- */
.vn__background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-deep);
  transition: opacity 0.5s ease;
}

.vn__background.is-fading { opacity: 0; }

/* leve vinheta pra caixa de diálogo se destacar */
.vn__vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

/* --- sprite do personagem --- */
.vn__character {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 78%;
  max-width: 60%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.vn__character.is-visible { opacity: 1; }

/* --- topo: sair / voltar ao site --- */
.vn__exit {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 20;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-decoration: none;
  background: rgba(27, 31, 46, 0.55);
  padding: 6px 12px;
  border-radius: 2px;
  border: 1px solid var(--line);
}

.vn__exit:hover { color: var(--ink); }

/* --- caixa de diálogo --- */
.vn__dialogue {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  padding: 0 5% 5%;
  cursor: pointer;
}

.vn__dialogue-box {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(27, 31, 46, 0.88);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 22px 28px 26px;
  backdrop-filter: blur(2px);
}

.vn__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent-calm);
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}

.vn__name.is-tense { color: var(--accent-warn); }

.vn__text {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink);
  min-height: 3.3em;
}

/* cursor piscante no fim do texto enquanto espera clique */
.vn__continue {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  opacity: 0;
  animation: vn-blink 1.1s infinite;
}

.vn__continue.is-visible { opacity: 1; }

@keyframes vn-blink {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.9; }
}

/* --- escolhas --- */
.vn__choices {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(27, 31, 46, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.vn__choices.is-active { opacity: 1; pointer-events: auto; }

.vn__choice-btn {
  font-family: var(--font-ui);
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 14px 26px;
  width: min(560px, 90%);
  text-align: left;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.vn__choice-btn:hover,
.vn__choice-btn:focus-visible {
  border-color: var(--accent-warn);
  background: var(--bg-elevated-2);
  transform: translateX(3px);
}

/* --- botão de percepção --- */
.vn__signal-btn {
  position: absolute;
  right: 5%;
  bottom: calc(100% + 10px);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: rgba(27, 31, 46, 0.75);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.vn__signal-btn.is-visible { opacity: 1; pointer-events: auto; }
.vn__signal-btn.is-caught { border-color: var(--accent-calm); color: var(--accent-calm); }

/* --- cartão de abertura de fase --- */
.vn__chapter {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 24px;
  background: var(--bg-deep);
}

.vn__chapter.is-active { display: flex; }

.vn__chapter-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-calm);
  margin: 0;
}

.vn__chapter-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  margin: 0;
  max-width: 16ch;
}

.vn__chapter-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0 0 10px;
}

.vn__chapter-continue {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--bg-deep);
  background: var(--ink);
  border: none;
  padding: 12px 28px;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}

.vn__chapter-continue:hover,
.vn__chapter-continue:focus-visible { background: var(--accent-warn); color: var(--ink); }

/* --- reflexão de fim de ato --- */
.vn__reflection {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg-deep);
}

.vn__reflection.is-active { display: flex; }

.vn__reflection-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0;
}

.vn__reflection-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vn__reflection-list .is-caught { color: var(--accent-calm); }
.vn__reflection-list .is-missed { color: var(--accent-warn); }

.vn__reflection-continue {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 10px 24px;
  cursor: pointer;
  border-radius: 2px;
}

/* --- fim de história / reflexão --- */
.vn__end-text {
  max-width: 540px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}

.vn__end-resource {
  max-width: 440px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 6px 0 0;
}

.vn__end {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  padding: 24px;
  background: var(--bg-deep);
}

.vn__end.is-active { display: flex; }

.vn__end h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0;
}

.vn__end ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vn__end ul .is-caught { color: var(--accent-calm); }
.vn__end ul .is-missed { color: var(--accent-warn); }

@media (max-width: 640px) {
  .vn__dialogue-box { padding: 16px 18px 20px; }
  .vn__text { font-size: 1rem; }
}

