/* 标题界面：无实景背景，可在 config 中替换 */
#screen-title {
  overflow: hidden;
}

.title-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 72% 38%, rgba(255, 182, 210, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 18% 72%, rgba(142, 198, 255, 0.18), transparent 50%),
    linear-gradient(168deg, #1a1528 0%, #2a2240 38%, #3d2f4a 62%, #1e1a2e 100%);
  background-size: cover;
  background-position: center;
}

.title-bg.has-image {
  background-color: #12101a;
}

.title-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 6, 16, 0.55) 0%, transparent 42%),
    linear-gradient(0deg, rgba(8, 6, 16, 0.35) 0%, transparent 28%);
}

.title-petals {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.55;
}

.title-petals::before,
.title-petals::after {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image:
    radial-gradient(3px 4px at 20% 30%, rgba(255, 170, 200, 0.5), transparent),
    radial-gradient(2px 3px at 60% 20%, rgba(255, 200, 220, 0.4), transparent),
    radial-gradient(3px 3px at 80% 70%, rgba(255, 160, 190, 0.35), transparent),
    radial-gradient(2px 2px at 35% 80%, rgba(255, 190, 210, 0.45), transparent);
  background-size: 280px 240px;
  animation: petals-drift 48s linear infinite;
}

.title-petals::after {
  animation-duration: 62s;
  animation-direction: reverse;
  opacity: 0.7;
}

@keyframes petals-drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(4%, 8%) rotate(3deg); }
}

.title-character-wrap {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: min(58vw, 720px);
  height: 96%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: none;
}

.title-character-wrap[hidden] {
  display: none;
}

.title-character {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom right;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.35));
}

.title-character-shadow {
  position: absolute;
  bottom: 4%;
  right: 12%;
  width: 42%;
  height: 8%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35), transparent 70%);
  transform: scaleY(0.5);
}

.title-menu {
  position: absolute;
  left: clamp(28px, 6vw, 88px);
  top: 50%;
  z-index: 10;
  transform: translateY(-50%);
  pointer-events: auto;
}

.title-menu-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.title-btn {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  min-width: clamp(200px, 22vw, 280px);
  padding: 15px 28px 15px 36px;
  transform: skewX(-14deg);
  background: rgba(22, 20, 32, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition:
    background 0.25s var(--ease-soft),
    border-color 0.25s,
    transform 0.25s var(--ease-out),
    box-shadow 0.25s;
}

.title-btn span {
  display: block;
  pointer-events: none;
  transform: skewX(14deg);
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  white-space: nowrap;
}

.title-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.25s;
}

.title-btn:hover,
.title-btn:focus-visible {
  background: rgba(36, 32, 52, 0.72);
  border-color: rgba(255, 143, 171, 0.45);
  transform: skewX(-14deg) translateX(6px);
  box-shadow: 0 8px 28px rgba(255, 100, 150, 0.12);
}

.title-btn:hover::before,
.title-btn:focus-visible::before {
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
}

.title-btn:active {
  transform: skewX(-14deg) translateX(3px);
}

.title-btn--disabled {
  opacity: 0.45;
}

.title-btn--disabled:hover {
  transform: skewX(-14deg);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.title-btn--muted span {
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: var(--text-dim);
}

.title-hint {
  position: absolute;
  left: clamp(28px, 6vw, 88px);
  bottom: 28px;
  z-index: 4;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

@media (max-width: 768px) {
  .title-character-wrap {
    width: 70vw;
    opacity: 0.85;
  }

  .title-menu {
    left: 20px;
  }

  .title-btn {
    min-width: 180px;
    padding: 12px 20px 12px 28px;
  }

  .title-btn span {
    letter-spacing: 0.18em;
    text-indent: 0.18em;
    font-size: 0.9rem;
  }
}
