/* 开屏沿用证书站的头像、站名入场方式，样式仅作用于开屏。 */
:root {
  --tm-front-splash-ready: 1;
}

html.front-splash-open,
html.front-splash-open body {
  overflow: hidden !important;
}

html.front-splash-open body > :not(#frontSplash):not(script):not(style):not(link) {
  visibility: hidden !important;
}

#frontSplash {
  --splash-background: #fff;
  --splash-title: #141820;
  --splash-muted: #8b93a5;
  --splash-button: #f3f5f8;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--splash-background);
  color: var(--splash-title);
  font-family: var(--front-font-family, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif);
  opacity: 1;
  outline: none;
  transition: opacity .4s ease;
  touch-action: manipulation;
}

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

#frontSplash .front-splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: min(920px, 100%);
  padding: 28px;
}

#frontSplash .front-splash-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  max-width: 100%;
}

#frontSplash .front-splash-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border: 1px solid rgba(20, 24, 36, .06);
  border-radius: 50%;
  background: var(--splash-button);
  box-shadow: 0 14px 32px rgba(28, 35, 52, .08);
  font-size: 36px;
  font-weight: 600;
  opacity: 0;
}

#frontSplash .front-splash-avatar img {
  grid-area: 1 / 1;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#frontSplash .front-splash-letter {
  grid-area: 1 / 1;
}

#frontSplash .front-splash-avatar img[hidden] {
  display: none;
}

#frontSplash .front-splash-copy {
  flex: 0 1 auto;
  min-width: 0;
  text-align: left;
  opacity: 0;
}

#frontSplash .front-splash-title {
  max-width: min(520px, 58vw);
  margin: 0;
  overflow: hidden;
  color: var(--splash-title);
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: .03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}


#frontSplash .front-splash-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 152px;
  min-height: 44px;
  padding: 11px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--splash-button);
  box-shadow: none;
  color: var(--splash-title);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  opacity: 0;
  transition: background .18s ease, transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}

#frontSplash .front-splash-enter svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}


#frontSplash button:focus-visible {
  outline: 2px solid var(--splash-muted);
  outline-offset: 4px;
}

#frontSplash.is-ready .front-splash-avatar {
  animation: front-splash-from-left .75s cubic-bezier(.22, 1, .36, 1) .08s both;
}

#frontSplash.is-ready .front-splash-copy {
  animation: front-splash-from-right .75s cubic-bezier(.22, 1, .36, 1) .14s both;
}

#frontSplash.is-ready .front-splash-enter {
  animation: front-splash-fade .45s ease .55s both;
}

#frontSplash.is-leaving {
  opacity: 0;
  pointer-events: none;
}

html.front-night #frontSplash {
  --splash-background: #141414;
  --splash-title: #f4f5f7;
  --splash-muted: #9ca3b3;
  --splash-button: #24262b;
}

@keyframes front-splash-from-left {
  from { opacity: 0; transform: translateX(-64px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes front-splash-from-right {
  from { opacity: 0; transform: translateX(64px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes front-splash-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (hover: hover) {
  #frontSplash .front-splash-enter:hover { transform: translateY(-1px); }
}

@media (max-width: 640px) {
  #frontSplash .front-splash-content { gap: 28px; padding: 24px; }
  #frontSplash .front-splash-brand { flex-direction: column; gap: 18px; }
  #frontSplash .front-splash-avatar { width: 84px; height: 84px; }
  #frontSplash .front-splash-copy { text-align: center; }
  #frontSplash .front-splash-title { max-width: 88vw; white-space: normal; overflow-wrap: anywhere; }
  #frontSplash.is-ready .front-splash-avatar { animation-name: front-splash-from-top; }
  #frontSplash.is-ready .front-splash-copy { animation-name: front-splash-from-bottom; }
}

@keyframes front-splash-from-top {
  from { opacity: 0; transform: translateY(-36px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes front-splash-from-bottom {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-height: 420px) and (orientation: landscape) {
  #frontSplash .front-splash-brand { flex-direction: row; }
  #frontSplash .front-splash-content { gap: 18px; padding: 18px; }
  #frontSplash .front-splash-avatar { width: 64px; height: 64px; }
  #frontSplash .front-splash-copy { text-align: left; }
  #frontSplash .front-splash-title { max-width: 60vw; font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  #frontSplash { transition: none; }
  #frontSplash.is-ready :is(.front-splash-avatar, .front-splash-copy, .front-splash-enter) {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
