/* 开场样式独立命名，不改变主站日夜主题；宇宙背景内使用白色品牌保证可读。 */
.cosmos[hidden] { display:none !important; }
.cosmos:focus { outline:none; }
body.cosmos-active { overflow:hidden; }
.cosmos {
  --intro-cloud:0;
  --intro-fade:0;
  position:fixed;
  inset:0;
  z-index:1000;
  overflow:hidden;
  isolation:isolate;
  color:#fff;
  background:transparent;
  font-family:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  opacity:1;
  transition:opacity 150ms ease-out;
}
.cosmos-space,
.cosmos-stars,
.cosmos-system,
.cosmos-vignette,
.cosmos-clouds {
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  pointer-events:none;
}
.cosmos-space {
  z-index:0;
  background:radial-gradient(ellipse at 50% 55%,#142137 0,#070e1b 45%,#02050b 85%);
  opacity:calc(1 - var(--intro-fade));
}
.cosmos-stars { z-index:1; opacity:calc(1 - var(--intro-fade)); }
.cosmos-system { z-index:2; opacity:calc(1 - var(--intro-fade)); }
.cosmos-vignette {
  z-index:3;
  background:radial-gradient(ellipse at 50% 52%,transparent 46%,rgb(1 3 8 / 28%) 83%,rgb(1 3 8 / 55%) 110%);
  opacity:calc(1 - var(--intro-fade));
}
/* 用低成本渐变连接地球大气和首页云海，避免整屏模糊或闪白。 */
.cosmos-clouds {
  z-index:4;
  background:
    radial-gradient(ellipse at 12% 72%,rgb(194 213 220 / 72%) 0,transparent 44%),
    radial-gradient(ellipse at 82% 64%,rgb(210 224 226 / 66%) 0,transparent 48%),
    radial-gradient(ellipse at 48% 103%,rgb(225 232 227 / 82%) 0,transparent 61%),
    linear-gradient(180deg,rgb(94 135 164 / 8%),rgb(175 202 212 / 38%) 65%,rgb(211 226 227 / 64%));
  opacity:calc(var(--intro-cloud) * (1 - var(--intro-fade)));
}
.cosmos-top {
  position:absolute;
  z-index:5;
  top:max(24px,calc(env(safe-area-inset-top) + 12px));
  left:max(40px,calc(env(safe-area-inset-left) + 20px));
  pointer-events:none;
  transition:opacity 220ms ease-out;
}
.cosmos-brand { display:flex; align-items:center; gap:17px; }
.cosmos-brand img {
  display:block;
  flex:none;
  height:auto;
  filter:brightness(0) invert(1);
  border:0;
  box-shadow:none;
}
.cosmos-brand-mark { width:47px; }
.cosmos-brand-wordmark { width:112px; }
.cosmos-copy {
  position:absolute;
  z-index:5;
  top:max(114px,calc(env(safe-area-inset-top) + 92px));
  left:24px;
  right:24px;
  text-align:center;
  pointer-events:none;
  transition:opacity 220ms ease-out;
}
.cosmos #cosmos-caption {
  margin:0;
  color:#dce5ee;
  font-size:14px;
  line-height:1.7;
  font-weight:400;
  letter-spacing:.12em;
}
.cosmos-bottom {
  position:absolute;
  z-index:6;
  right:max(40px,calc(env(safe-area-inset-right) + 20px));
  bottom:max(26px,calc(env(safe-area-inset-bottom) + 16px));
}
.cosmos #cosmos-enter {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  min-width:128px;
  min-height:44px;
  padding:11px 18px;
  border:1px solid rgb(225 234 242 / 45%);
  border-radius:28px;
  background:rgb(6 15 27 / 60%);
  color:#fff;
  font:inherit;
  font-size:12px;
  line-height:1.5;
  letter-spacing:.06em;
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  transition:background 120ms,border-color 120ms;
}
.cosmos #cosmos-enter:hover { background:#132236; border-color:#fff; }
.cosmos #cosmos-enter:focus-visible { outline:2px solid #fff; outline-offset:5px; }
.cosmos #cosmos-enter span { font-size:16px; line-height:1; }
.cosmos.is-revealing .cosmos-top,
.cosmos.is-revealing .cosmos-copy { opacity:0; }
.cosmos.is-leaving { opacity:0; }
/* 新镜头保留独立黑色幕布；三维层退场后，圆孔才从中央揭开首页。 */
.cosmos-clip-defs { position:absolute; width:0; height:0; overflow:hidden; }
.cosmos-scene {
  --scene-opacity:1;
  position:absolute;
  inset:0;
  z-index:0;
  overflow:hidden;
  background:#02050b;
  clip-path:url(#cosmos-reveal-clip);
  -webkit-clip-path:url(#cosmos-reveal-clip);
  pointer-events:none;
}
.cosmos-scene .cosmos-space { opacity:1; }
.cosmos-scene .cosmos-stars,
.cosmos-scene .cosmos-system,
.cosmos-scene .cosmos-vignette { opacity:var(--scene-opacity); }
/* 蓝白小点不加外描边、辉光或独立 CSS 动画，形变只跟随统一时间轴。 */
.cosmos-dot {
  --dot-x:50vw;
  --dot-y:50vh;
  --dot-size:12px;
  --dot-scale-x:1;
  --dot-scale-y:1;
  --dot-opacity:0;
  position:absolute;
  z-index:4;
  left:var(--dot-x);
  top:var(--dot-y);
  width:var(--dot-size);
  height:var(--dot-size);
  border:0;
  border-radius:50%;
  background:radial-gradient(circle at 40% 35%,#eefaff 0%,#a9d8ff 52%,#6399cf 100%);
  opacity:var(--dot-opacity);
  transform:translate(-50%,-50%) scale(var(--dot-scale-x),var(--dot-scale-y));
  pointer-events:none;
}
/* 保留旧云层样式供历史版本对照，新流程不启用云层和阶段文字。 */
.cosmos-clouds,.cosmos-copy { display:none; }
.cosmos #cosmos-enter {
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  padding:10px;
  border:0;
  border-radius:50%;
  background:transparent;
}
.cosmos #cosmos-enter:hover { background:rgb(255 255 255 / 9%); }
.cosmos #cosmos-enter svg { display:block; width:24px; height:24px; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
@media (max-width:600px) {
  .cosmos-top { top:max(20px,calc(env(safe-area-inset-top) + 10px)); left:max(22px,calc(env(safe-area-inset-left) + 14px)); }
  .cosmos-brand { gap:13px; }
  .cosmos-brand-mark { width:39px; }
  .cosmos-brand-wordmark { width:98px; }
  .cosmos-copy { top:max(112px,calc(env(safe-area-inset-top) + 86px)); left:20px; right:20px; }
  .cosmos #cosmos-caption { font-size:12px; letter-spacing:.08em; }
  .cosmos-bottom { right:max(22px,calc(env(safe-area-inset-right) + 14px)); bottom:max(24px,calc(env(safe-area-inset-bottom) + 14px)); }
}
@media (max-height:500px) and (min-width:601px) {
  .cosmos-top { top:max(14px,calc(env(safe-area-inset-top) + 8px)); left:max(24px,calc(env(safe-area-inset-left) + 16px)); }
  .cosmos-brand-mark { width:35px; }
  .cosmos-brand-wordmark { width:96px; }
  .cosmos-copy { top:80px; }
  .cosmos #cosmos-caption { font-size:12px; }
  .cosmos-bottom { right:max(24px,calc(env(safe-area-inset-right) + 16px)); bottom:max(14px,calc(env(safe-area-inset-bottom) + 8px)); }
}
@media (prefers-reduced-motion:reduce) {
  .cosmos,.cosmos * { transition:none !important; animation:none !important; }
}
