/* ==========================================================================
   驸马那些事 · 视觉小说
   ========================================================================== */

:root {
  color-scheme: dark;
  --paper: #f4efe6;
  --paper-2: #ebe4d8;
  --ink: #171714;
  --muted: #7a7469;
  --night-muted: #b5aea2;
  --pink: #fb7299;
  --pink-deep: #e85f87;
  --cobalt: #315cd7;
  --cobalt-light: #7f9dff;
  --line: rgba(255, 255, 255, 0.14);
  --line-dark: rgba(23, 23, 20, 0.14);
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #0b0d12;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--pink);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

/* Background ------------------------------------------------------------- */

.vn-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #12151c;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: saturate(0.92) brightness(0.92);
  transition: filter 0.45s ease, opacity 0.55s ease;
}

.vn-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 8, 12, 0.62) 0%, transparent 26%),
    linear-gradient(0deg, rgba(6, 8, 12, 0.8) 0%, transparent 38%),
    linear-gradient(90deg, rgba(6, 8, 12, 0.18), transparent 24%, transparent 76%, rgba(6, 8, 12, 0.18));
}

.bg-lab {
  background-image: url("story-bg-lab.jpg");
  background-position: center 42%;
}

.bg-dorm {
  background-image: url("story-bg-dorm.jpg");
  background-position: center 46%;
}

.bg-cafeteria {
  background-image: url("story-bg-cafeteria.jpg");
  background-position: center 48%;
}

.bg-campus {
  background-image: url("story-bg-campus.jpg");
  background-position: center 52%;
}

.bg-classroom {
  background-image: url("story-bg-classroom.jpg");
  background-position: center 46%;
}

.bg-rain {
  background-image: url("story-bg-rain.jpg");
  background-position: center 54%;
}

.bg-infirmary {
  background-image: url("story-bg-infirmary.jpg");
  background-position: center 44%;
}

.bg-festival {
  background-image: url("story-bg-festival.jpg");
  background-position: center 46%;
}

.bg-library {
  background-image: url("story-bg-library.jpg");
  background-position: center 46%;
}

.bg-rooftop {
  background-image: url("story-bg-rooftop.jpg");
  background-position: center 38%;
}

.bg-graduation {
  background-image: url("story-bg-graduation.jpg");
  background-position: center 34%;
}

.bg-ending {
  background-image:
    linear-gradient(180deg, rgba(9, 11, 17, 0.42), rgba(9, 11, 17, 0.75)),
    url("story-bg-graduation.jpg");
  background-position: center 32%;
}

/* Navigation / HUD ------------------------------------------------------- */

.vn-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 56px) 26px;
  background: linear-gradient(180deg, rgba(6, 8, 12, 0.72), transparent);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: rgba(245, 240, 231, 0.62);
}

.vn-back,
.vn-download {
  transition: color 0.2s ease;
}

.vn-back:hover,
.vn-download:hover {
  color: var(--pink);
}

.vn-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.vn-brand span {
  color: rgba(245, 240, 231, 0.62);
}

.vn-brand b {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.vn-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 21;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.vn-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cobalt-light), var(--pink));
  transition: width 0.5s var(--ease);
}

.vn-stage {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
}

.vn-scene-title {
  position: absolute;
  top: 82px;
  left: clamp(18px, 4vw, 56px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

#scene-place {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.86);
}

.vn-fiction {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.16em;
  color: var(--pink);
}

.vn-hud {
  position: absolute;
  top: 82px;
  right: clamp(18px, 4vw, 56px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.vn-stats {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.vn-stats b {
  font-weight: 600;
  color: var(--cobalt-light);
}

.vn-stats #chaos {
  color: var(--pink);
}

/* Sprites ---------------------------------------------------------------- */

.vn-sprite {
  position: absolute;
  bottom: clamp(180px, 24vh, 250px);
  z-index: 4;
  height: min(70vh, 720px);
  pointer-events: none;
  opacity: 0.9;
  filter: saturate(0.9) brightness(0.94);
  transform: translateY(5px);
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.55s var(--ease);
}

.vn-sprite img {
  position: relative;
  z-index: 1;
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.45));
  -webkit-user-drag: none;
  user-select: none;
}

.sprite-fuma {
  left: clamp(-10px, 3vw, 62px);
}

.sprite-meili {
  right: clamp(-10px, 3vw, 62px);
}

.sprite-fuma img {
  transform: scale(1.08);
  transform-origin: bottom center;
}

.sprite-meili img {
  transform: scale(0.9);
  transform-origin: bottom center;
}

.sprite-glow {
  position: absolute;
  bottom: 2%;
  left: 50%;
  z-index: 0;
  width: 72%;
  height: 20%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), transparent 75%);
  filter: blur(12px);
  transform: translateX(-50%);
}

.sprite-meili .sprite-glow {
  background: radial-gradient(closest-side, rgba(251, 114, 153, 0.2), transparent 75%);
}

.sprite-tag {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 2;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 10, 15, 0.4);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.vn-sprite.is-active {
  opacity: 1;
  filter: none;
  transform: translateY(0) scale(1.012);
}

.vn-sprite.is-dim {
  opacity: 0.46;
  filter: brightness(0.62) saturate(0.68);
  transform: translateY(9px) scale(0.975);
}

.vn-sprite.is-dim .sprite-tag {
  opacity: 0.55;
}

/* Dialogue --------------------------------------------------------------- */

.vn-dialogue {
  position: absolute;
  bottom: clamp(12px, 2.4vh, 24px);
  left: 50%;
  z-index: 8;
  width: min(980px, calc(100% - clamp(24px, 6vw, 80px)));
  max-height: min(54vh, 480px);
  overflow-y: auto;
  padding: 22px clamp(20px, 3vw, 34px) 13px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), transparent 36%),
    rgba(247, 242, 233, 0.96);
  color: var(--ink);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  scrollbar-width: thin;
}

.vn-dialogue::-webkit-scrollbar {
  width: 5px;
}

.vn-dialogue::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(23, 23, 20, 0.18);
}

.vn-dialogue.is-ending {
  background:
    radial-gradient(100% 100% at 100% 0%, rgba(251, 114, 153, 0.17), transparent 50%),
    rgba(247, 242, 233, 0.97);
}

.vn-speaker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: #4e4a42;
  color: #fff;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.12);
  transition: background 0.25s ease;
}

.vn-speaker.is-fuma {
  background: var(--cobalt);
}

.vn-speaker.is-meili {
  background: var(--pink);
}

.vn-speaker.is-ending {
  background: var(--ink);
}

.vn-ending-title {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.7vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.vn-text {
  min-height: 76px;
  margin-top: 9px;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  line-height: 1.9;
  letter-spacing: 0.01em;
  white-space: pre-line;
}

.vn-choices {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.vn-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease,
    transform 0.2s var(--ease);
}

.vn-choice:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  transform: translateX(3px);
}

.vn-choice-index {
  flex: 0 0 auto;
  padding-top: 1px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--pink-deep);
}

.vn-choice:hover .vn-choice-index {
  color: var(--pink);
}

.vn-dialogue-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
  padding-top: 9px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.vn-continue i {
  margin-left: 3px;
  font-style: normal;
  color: var(--pink-deep);
  animation: blink 1.2s ease-in-out infinite;
}

.vn-continue.is-hidden {
  visibility: hidden;
}

.vn-disclaimer {
  margin-left: auto;
  opacity: 0.6;
}

.vn-restart {
  padding: 5px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  font-size: 9px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.vn-restart:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.vn-noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 30;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  text-align: center;
}

@keyframes blink {
  50% {
    opacity: 0.25;
    transform: translateX(2px);
  }
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1100px) {
  .vn-sprite {
    height: min(62vh, 640px);
    bottom: clamp(170px, 23vh, 230px);
  }

  .sprite-fuma {
    left: -30px;
  }

  .sprite-meili {
    right: -30px;
  }
}

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .vn-nav {
    padding: 14px 16px 20px;
  }

  .vn-brand {
    position: absolute;
    left: 50%;
    gap: 6px;
    transform: translateX(-50%);
  }

  .vn-brand span,
  .vn-download {
    display: none;
  }

  .vn-brand b {
    font-size: 13px;
    white-space: nowrap;
  }

  .vn-back {
    font-size: 8px;
  }

  .vn-scene-title {
    top: 58px;
    left: 16px;
  }

  #scene-place {
    font-size: 10.5px;
  }

  .vn-hud {
    top: 58px;
    right: 16px;
    font-size: 6.5px;
  }

  .vn-sprite {
    height: 36vh;
    min-height: 225px;
    bottom: 235px;
  }

  .sprite-fuma {
    left: -12%;
  }

  .sprite-meili {
    right: -12%;
  }

  .sprite-tag {
    bottom: 4px;
    font-size: 5.5px;
  }

  .vn-dialogue {
    bottom: 10px;
    width: calc(100% - 20px);
    max-height: 53vh;
    padding: 17px 16px 10px;
    border-radius: 13px;
  }

  .vn-speaker {
    padding: 4px 10px;
    font-size: 10px;
  }

  .vn-text {
    min-height: 60px;
    font-size: 1rem;
    line-height: 1.82;
  }

  .vn-choice {
    padding: 9px 10px;
    font-size: 11px;
  }

  .vn-dialogue-foot {
    flex-wrap: wrap;
    gap: 7px;
    font-size: 6.5px;
  }

  .vn-disclaimer {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .vn-ending-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 420px) {
  .vn-sprite {
    height: 34vh;
    bottom: 225px;
  }

  .vn-dialogue {
    max-height: 54vh;
  }

  .vn-text {
    font-size: 0.95rem;
  }

  .vn-choice {
    font-size: 10.5px;
  }
}

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

/* Hearts / solo focus ---------------------------------------------------- */

.vn-hearts-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.vn-hearts-label {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.52);
}

.vn-hearts {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
}

.vn-heart {
  color: rgba(255, 255, 255, 0.18);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  transition: color 0.25s ease, transform 0.25s var(--ease),
    text-shadow 0.25s ease;
}

.vn-heart.is-filled {
  color: var(--pink);
  text-shadow: 0 0 9px rgba(251, 114, 153, 0.65);
}

.vn-chaos {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.48);
}

.vn-chaos b {
  color: #ffb37a;
  font-weight: 600;
}

.heart-float {
  position: absolute;
  top: -17px;
  right: 0;
  z-index: 5;
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
  pointer-events: none;
  animation: heart-float 1s var(--ease) both;
}

.heart-float.is-gain {
  color: var(--pink);
  text-shadow: 0 0 10px rgba(251, 114, 153, 0.7);
}

.heart-float.is-loss {
  color: #ffb37a;
}

@keyframes heart-float {
  0% {
    opacity: 0;
    transform: translateY(5px) scale(0.8);
  }
  18% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

.vn-stage.is-solo .sprite-fuma {
  right: auto;
  left: 50%;
  transform: translateX(-50%) scale(1.035);
}

.vn-stage.is-solo .sprite-fuma img {
  transform: scale(1.1);
}

.vn-static .sprite-meili.is-away,
.sprite-meili.is-away {
  opacity: 0;
  pointer-events: none;
  transform: translateX(34px) scale(0.96);
}

@media (max-width: 760px) {
  .vn-hearts {
    font-size: 11px;
  }

  .vn-hearts-label {
    font-size: 7.5px;
  }

  .vn-hearts-wrap {
    gap: 4px;
  }

  .vn-chaos {
    font-size: 6px;
  }

  .vn-stage.is-solo .sprite-fuma {
    left: 50%;
    transform: translateX(-50%) scale(1.02);
  }

  .vn-stage.is-solo .sprite-fuma img {
    transform: scale(1.05);
  }
}

/* Soft portrait vignette: blend the cutout canvas into the scene */
.vn-sprite img {
  -webkit-mask-image: radial-gradient(ellipse 78% 84% at 50% 44%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 84% at 50% 44%, #000 58%, transparent 100%);
}

.vn-hearts {
  font-size: 18px;
  gap: 3px;
}

@media (max-width: 760px) {
  .vn-hearts {
    font-size: 14px;
    gap: 2px;
  }
}

.vn-hearts-wrap {
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(8, 10, 15, 0.3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

@media (max-width: 760px) {
  .vn-hearts-wrap {
    padding: 3px 6px;
  }
}

.vn-back-step {
  padding: 5px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  font-size: 9px;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.vn-back-step:hover:not(:disabled) {
  border-color: var(--pink-deep);
  background: var(--pink);
  color: #fff;
}

.vn-back-step:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

@media (max-width: 760px) {
  .vn-back-step {
    padding: 4px 8px;
    font-size: 8px;
  }
}

/* Music control --------------------------------------------------------- */

.vn-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vn-bgm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 10, 15, 0.28);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease, border-color 0.2s ease,
    background 0.2s ease;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.vn-bgm:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.vn-bgm[aria-pressed="true"] {
  border-color: rgba(251, 114, 153, 0.6);
  background: rgba(251, 114, 153, 0.16);
  color: var(--pink);
}

.vn-bgm-icon {
  font-size: 11px;
  line-height: 1;
}

/* Overview -------------------------------------------------------------- */

.vn-overview {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
}

.vn-overview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 11, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.vn-overview-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(460px, calc(100% - 24px));
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), transparent 34%),
    var(--paper);
  color: var(--ink);
  box-shadow: -26px 0 80px rgba(0, 0, 0, 0.32);
  animation: overview-in 0.32s var(--ease);
}

.vn-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 26px 12px;
  border-bottom: 1px solid var(--line-dark);
}

.vn-overview-kicker {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  color: var(--pink-deep);
}

.vn-overview-head h2 {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.05em;
}

.vn-overview-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.vn-overview-close:hover {
  background: var(--ink);
  color: var(--paper);
}

.vn-overview-hint {
  padding: 12px 26px 0;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
}

.vn-overview-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 18px 28px;
  scrollbar-width: thin;
}

.vn-overview-list::-webkit-scrollbar {
  width: 5px;
}

.vn-overview-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(23, 23, 20, 0.18);
}

.vn-overview-chapter {
  margin: 18px 8px 5px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: var(--pink-deep);
}

.vn-overview-step {
  display: block;
  width: 100%;
  padding: 10px 10px 11px;
  border-bottom: 1px solid rgba(23, 23, 20, 0.08);
  border-radius: 7px;
  text-align: left;
  transition: background 0.18s ease;
}

button.vn-overview-step:hover {
  background: rgba(251, 114, 153, 0.1);
}

.vn-overview-step.is-current {
  background: rgba(49, 92, 215, 0.07);
}

.vn-overview-step.is-current .vn-overview-meta::after {
  content: "  ·  当前";
  color: var(--cobalt);
}

.vn-overview-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.vn-overview-meta b {
  color: var(--pink-deep);
  font-weight: 600;
}

.vn-overview-text {
  margin-top: 4px;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.vn-overview-empty {
  padding: 28px 12px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
}

.vn-overview-btn {
  padding: 5px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  font-size: 9px;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.vn-overview-btn:hover {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: #fff;
}

@keyframes overview-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 760px) {
  .vn-nav-actions {
    gap: 7px;
  }

  .vn-bgm {
    padding: 4px 7px;
    font-size: 7px;
  }

  .vn-bgm-text {
    display: none;
  }

  .vn-overview-panel {
    width: 100%;
  }

  .vn-overview-head {
    padding: 20px 18px 10px;
  }

  .vn-overview-head h2 {
    font-size: 1.55rem;
  }

  .vn-overview-hint {
    padding: 10px 18px 0;
    font-size: 9.5px;
  }

  .vn-overview-list {
    padding: 6px 10px 22px;
  }

  .vn-overview-btn {
    padding: 4px 8px;
    font-size: 8px;
  }
}

/* Perspective selector -------------------------------------------------- */

.vn-select {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 28px;
  background:
    radial-gradient(55% 65% at 20% 18%, rgba(49, 92, 215, 0.24), transparent 65%),
    radial-gradient(50% 60% at 82% 20%, rgba(251, 114, 153, 0.2), transparent 65%),
    rgba(8, 10, 15, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.vn-select-panel {
  width: min(930px, 100%);
  margin: auto;
  text-align: center;
}

.vn-select-kicker {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--pink);
}

.vn-select-panel h1 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--paper);
}

.vn-select-sub {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(245, 240, 231, 0.58);
}

.vn-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 26px;
  text-align: left;
}

.vn-select-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 0 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(18, 21, 31, 0.82);
  color: var(--paper);
  text-align: left;
  transition: border-color 0.22s ease, transform 0.22s var(--ease),
    background 0.22s ease;
}

.vn-select-card:hover {
  border-color: var(--pink);
  background: rgba(25, 27, 39, 0.95);
  transform: translateY(-3px);
}

.vn-select-image {
  display: block;
  height: 280px;
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 50% 40%, rgba(255, 255, 255, 0.14), transparent 65%),
    #151825;
}

.vn-select-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.4));
  transition: transform 0.35s var(--ease);
}

.vn-select-card:hover .vn-select-image img {
  transform: scale(1.035);
}

.vn-select-card .vn-select-kicker,
.vn-select-card strong,
.vn-select-role,
.vn-select-desc {
  margin-right: 18px;
  margin-left: 18px;
}

.vn-select-card .vn-select-kicker {
  margin-top: 14px;
  color: var(--pink);
}

.vn-select-card:nth-child(1) .vn-select-kicker {
  color: var(--cobalt-light);
}

.vn-select-card strong {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.05em;
}

.vn-select-role {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  color: rgba(245, 240, 231, 0.52);
}

.vn-select-desc {
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.7;
  color: rgba(245, 240, 231, 0.72);
}

.vn-select-note {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 8px;
  color: rgba(245, 240, 231, 0.4);
}

#perspective-label {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.55);
}

.vn-overview-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vn-overview-switch {
  padding: 7px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.vn-overview-switch:hover {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: #fff;
}

/* Solo focus works for either protagonist */
.vn-stage.is-solo .sprite-fuma:not(.is-away),
.vn-stage.is-solo .sprite-meili:not(.is-away) {
  right: auto;
  left: 50%;
  transform: translateX(-50%) scale(1.035);
}

@media (max-width: 760px) {
  .vn-select {
    padding: 16px;
    align-items: flex-start;
  }

  .vn-select-panel {
    padding: 18px 0 24px;
  }

  .vn-select-panel h1 {
    font-size: 2.7rem;
  }

  .vn-select-sub {
    font-size: 10px;
  }

  .vn-select-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
  }

  .vn-select-image {
    height: 190px;
  }

  .vn-select-card strong {
    font-size: 1.5rem;
  }

  .vn-select-note {
    line-height: 1.8;
  }

  .vn-overview-switch {
    padding: 5px 7px;
    font-size: 7px;
  }

  .vn-stage.is-solo .sprite-meili:not(.is-away) {
    left: 50%;
    transform: translateX(-50%) scale(1.02);
  }
}
