/* 晴空棋岛 · 云海棋局开场 */
html.startup-splash-active { overflow: hidden; }

#startupSplash {
  position: fixed; inset: 0; z-index: 200000; overflow: hidden; isolation: isolate;
  color: #f9fbf7; background: #80c8f1; opacity: 1; visibility: visible;
  pointer-events: none;
  transition: opacity 420ms cubic-bezier(.22,.75,.24,1), visibility 420ms linear;
}
#startupSplash[hidden] { display: none !important; }
#startupSplash.is-dismissing { opacity: 0; visibility: hidden; }

.startup-splash-sky, .startup-splash-atmosphere { position: absolute; inset: 0; }
.startup-splash-sky { z-index: 0; overflow: hidden; }
.startup-splash-sky img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: center;
  transform: scale(1.055); animation: sky-drift 8s ease-in-out infinite alternate;
  user-select: none; -webkit-user-drag: none;
}
.startup-splash-atmosphere {
  z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11,59,99,.21) 0%, rgba(25,102,145,.04) 23%, rgba(236,247,246,.02) 58%, rgba(21,75,101,.29) 100%),
    radial-gradient(ellipse at 50% 45%, transparent 20%, rgba(22,84,122,.1) 100%);
}

.startup-splash-brand {
  position: absolute; z-index: 3; top: clamp(48px,7.8vh,92px); left: 18px; right: 18px;
  text-align: center; color: #f9fbf7; text-shadow: 0 2px 14px rgba(15,63,95,.42);
  pointer-events: none;
}
.startup-splash-kicker {
  margin: 0 0 8px; color: rgba(250,253,247,.94);
  font: 800 10px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing: .23em; animation: copy-arrive 620ms cubic-bezier(.2,.8,.25,1) 70ms both;
}
.startup-splash-kicker span { padding: 0 5px; color: #f3cf76; }
.startup-splash-title {
  margin: 0; color: #fffdf4;
  font: 900 clamp(32px,8vw,56px)/1.06 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;
  letter-spacing: .11em; text-indent: .11em;
  text-shadow: 0 3px 0 rgba(26,81,105,.18), 0 6px 22px rgba(15,63,95,.44);
  animation: title-arrive 780ms cubic-bezier(.16,.84,.25,1) 140ms both;
}
.startup-splash-subtitle {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin: 11px 0 0;
  color: rgba(247,252,246,.96);
  font: 700 clamp(12px,2.8vw,15px)/1.4 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;
  letter-spacing: .12em; text-shadow: 0 2px 10px rgba(15,63,95,.48);
  animation: copy-arrive 650ms cubic-bezier(.2,.8,.25,1) 330ms both;
}
.startup-splash-subtitle i {
  width: 4px; height: 4px; border-radius: 50%; background: #f3cf76;
  box-shadow: 0 0 9px rgba(255,224,145,.9);
}

.startup-splash-board {
  position: absolute; z-index: 2; top: 52%; left: 50%;
  width: min(80vw,42vh,520px); aspect-ratio: 1;
  transform: translate(-50%,calc(-50% + 7vh)) scale(.86); opacity: 0;
  isolation: isolate; will-change: transform, opacity;
  animation: board-arrive 1.34s cubic-bezier(.17,.82,.24,1) 120ms both;
}
.startup-splash-board::before {
  content: ""; position: absolute; z-index: -1; left: 12%; right: 12%; bottom: 1%; height: 15%;
  border-radius: 50%; background: radial-gradient(ellipse, rgba(24,67,83,.25), rgba(24,67,83,0) 72%);
  pointer-events: none;
}
.startup-splash-board > img, .startup-splash-board > canvas {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none;
}
.startup-splash-board > img { object-fit: contain; }
.startup-splash-board > canvas { z-index: 1; }
.startup-splash-board-orbit {
  position: absolute; inset: 5%; z-index: 2; border: 1px solid rgba(255,238,184,.68);
  border-radius: 50%; opacity: 0; transform: scale(.88); pointer-events: none;
  animation: board-orbit 1.05s cubic-bezier(.16,.84,.25,1) 1.25s both;
}

.startup-splash-footer {
  position: absolute; z-index: 4; right: max(20px,env(safe-area-inset-right));
  bottom: max(20px,env(safe-area-inset-bottom)); left: max(20px,env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  color: rgba(249,252,246,.96); text-shadow: 0 2px 10px rgba(14,58,83,.42); pointer-events: none;
}
.startup-splash-status {
  display: inline-flex; align-items: center; gap: 9px; min-width: 0;
  font: 700 11px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;
  letter-spacing: .08em; white-space: nowrap;
}
.startup-splash-status i {
  width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #f5d47e;
  box-shadow: 0 0 0 4px rgba(246,215,139,.2), 0 0 13px rgba(255,237,178,.88);
  animation: island-beacon 1.25s ease-in-out infinite;
}
.startup-splash-skip {
  min-height: 40px; padding: 0 16px; border: 1px solid rgba(255,255,255,.58);
  border-radius: 999px; color: #fffdf4; background: rgba(29,88,113,.3);
  box-shadow: 0 6px 18px rgba(19,73,97,.15), inset 0 1px 0 rgba(255,255,255,.26);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font: 800 12px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;
  cursor: pointer; pointer-events: auto; touch-action: manipulation;
  transition: background 160ms ease, transform 160ms ease;
}
.startup-splash-skip:hover, .startup-splash-skip:focus-visible {
  background: rgba(29,88,113,.48); outline: 2px solid rgba(255,255,255,.82); outline-offset: 2px;
}
.startup-splash-skip:active { transform: scale(.96); }

@keyframes sky-drift {
  from { transform: scale(1.055) translate3d(0,.35%,0); }
  to { transform: scale(1.075) translate3d(0,-.35%,0); }
}
@keyframes board-arrive {
  0% { opacity: 0; transform: translate(-50%,calc(-50% + 8vh)) scale(.84); }
  68% { opacity: 1; transform: translate(-50%,calc(-50% - .7vh)) scale(1.018); }
  100% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
@keyframes board-orbit {
  0% { opacity: 0; transform: scale(.88); }
  32% { opacity: .9; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.12); }
}
@keyframes title-arrive {
  0% { opacity: 0; transform: translateY(14px) scale(.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes copy-arrive {
  0% { opacity: 0; transform: translateY(9px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes island-beacon {
  0%,100% { transform: scale(.92); opacity: .76; }
  50% { transform: scale(1.12); opacity: 1; }
}

@media (max-width: 390px) {
  .startup-splash-brand { top: 7.2vh; }
  .startup-splash-board { width: min(82vw,42vh,520px); }
  .startup-splash-status { font-size: 10px; letter-spacing: .04em; }
}
@media (max-height: 680px) {
  .startup-splash-brand { top: 5vh; }
  .startup-splash-board { top: 53%; width: min(72vw,38vh,480px); }
  .startup-splash-footer { bottom: max(12px,env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  #startupSplash, #startupSplash *, #startupSplash *::before, #startupSplash *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .startup-splash-board { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  .startup-splash-board-orbit { display: none; }
}
