@charset "UTF-8";

/**
 * COCO Liquid Glass UI
 * Public stylesheet entry · v1.9.8
 *
 * Usage:
 *   <link rel="stylesheet" href="coco.css">
 *
 * Theme overrides should be loaded after this file. The implementation is
 * kept in components.css so existing pages that use that file remain valid.
 */
@import url("./components.css?v=20260912-3");
@import url("./semantic.css?v=20260912-2");

:root {
  --ds-sky-parallax-x: 0px;
  --ds-sky-parallax-y: 0px;
}

/* 保留原始高清插画，以极慢的位移和缩放制造星空呼吸感。 */
body::before {
  inset: -3vmax;
  transform-origin: center;
  will-change: transform, filter;
  animation: ds-starcloud-drift 28s ease-in-out infinite alternate;
}

body::after { z-index: -1; }

.starcloud-live-sky {
  position: fixed;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
}

@keyframes ds-starcloud-drift {
  0% {
    filter: saturate(1) brightness(1);
    transform: translate3d(
      calc(var(--ds-sky-parallax-x) - 10px),
      calc(var(--ds-sky-parallax-y) - 6px),
      0
    ) scale(1.045);
  }
  52% {
    filter: saturate(1.025) brightness(1.018);
    transform: translate3d(
      calc(var(--ds-sky-parallax-x) + 4px),
      calc(var(--ds-sky-parallax-y) + 3px),
      0
    ) scale(1.058);
  }
  100% {
    filter: saturate(1.04) brightness(1.025);
    transform: translate3d(
      calc(var(--ds-sky-parallax-x) + 12px),
      calc(var(--ds-sky-parallax-y) - 2px),
      0
    ) scale(1.05);
  }
}

/* 中文大标题的字形可能超出行框，给渐变文字保留完整的底部绘制区域。 */
:is(h1, h2) > .ds-gradient-ink { padding-bottom: .08em; }

/* 保留组件库的移动下拉定位，避免桌面导航覆盖规则撑高页头、遮住标题。 */
@media (max-width: 980px) {
  .ds-header .ds-main-nav { position: absolute; }
}

/* 窄屏时把新背景的角色与右侧星球保留在可视范围内。 */
@media (max-width: 680px) {
  body::before,
  .ds-admin-page::before { background-position: 88% center; }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    inset: 0;
    animation: none !important;
    filter: none;
    transform: none;
    will-change: auto;
  }
  .starcloud-live-sky { display: none; }
}
