html[data-cg-skin] .stage {
  background-image:
    linear-gradient(rgba(255, 255, 255, .42), rgba(255, 255, 255, .42)),
    var(--cg-home-landscape) !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

/* CG 是完整首页画面；隐藏默认云朵、彩虹、旗帜和地面，避免叠在皮肤上。 */
html[data-cg-skin] .stage > * { display: none !important; }
html[data-cg-skin] .stage > .cg-home-video,
html[data-cg-skin] .stage > .cg-home-video-shade { display: block !important; }
.cg-home-video,
.cg-home-video-shade { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cg-home-video { z-index: 0; object-fit: cover; }
.cg-home-video-shade { z-index: 1; background: rgba(255,255,255,.42); }
html[data-cg-skin="yararara"] .cg-home-video-shade,
html[data-cg-skin="yararara_performance"] .cg-home-video-shade { background: rgba(255,255,255,.16); }

/* 呀啦啦啦皮肤本身是高饱和红色舞台图，只加轻遮罩保证首页按钮可读。 */
html[data-cg-skin="yararara"] .stage {
  background-image:
    linear-gradient(rgba(255, 255, 255, .16), rgba(255, 255, 255, .16)),
    var(--cg-home-landscape) !important;
}

/* 皮肤配置会按底图明暗自动选择底部署名颜色，深色背景不再出现黑字。 */
html[data-cg-footer-tone="light"] .credit-line {
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 2px 4px rgba(0, 0, 0, .72);
}

/* 茜色世界底图只画装饰，标题、按钮与底栏由真实 DOM 绘制。 */
html[data-cg-skin="qianse"] .hero { top: -5vh; }
html[data-cg-skin="qianse"] .logo-wrap { visibility: visible; transform: none; }
html[data-cg-skin="qianse"] .logo { width: min(680px, 88vw); }
html[data-cg-skin="qianse"] .logo text {
  font-family: "YouYuan", "Yuanti SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 100px;
  font-weight: 900;
}
html[data-cg-skin="qianse"] .logo .lc { animation: qianseLogoCharBob 3.4s ease-in-out infinite; }
@keyframes qianseLogoCharBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
html[data-cg-skin="qianse"] .logo-confetti { display: none; }
html[data-cg-skin="qianse"] .logo .t-outer { fill: url(#qianseLogoGradient); stroke: #F0508C; stroke-width: 24px; }
html[data-cg-skin="qianse"] .logo .t-inner { fill: url(#qianseLogoGradient); stroke: #fff; stroke-width: 11px; }
html[data-cg-skin="qianse"] .game-subtitle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 0;
  background: transparent;
  color: #F0508C;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  font-size: clamp(12px, 2.2vw, 15px);
  font-weight: 900;
  letter-spacing: 9px;
}
html[data-cg-skin="qianse"] .game-subtitle::before,
html[data-cg-skin="qianse"] .game-subtitle::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border: 2px solid #3A2E3E;
  border-radius: 50%;
  background: #FFD93D;
}
html[data-cg-skin="qianse"] .start-button {
  margin-top: clamp(24px, 5vh, 40px);
  padding: 15px 58px;
  background: #FF6FA5;
  color: #fff;
  border-color: #3A2E3E;
  box-shadow: 5px 5px 0 #3A2E3E;
  font-size: clamp(18px, 2.8vw, 22px);
  letter-spacing: 8px;
  text-indent: 8px;
  text-shadow: 0 2px 0 rgba(58, 46, 62, .25);
  animation: none;
}
html[data-cg-skin="qianse"] .start-button:hover,
html[data-cg-skin="qianse"] .start-button:focus-visible { background: #ff8dbc; }
html[data-cg-skin="qianse"] .credits {
  flex-direction: row;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 8px 14px 18px;
  color: rgba(58, 46, 62, .75);
  font-size: 13px;
}
html[data-cg-skin="qianse"] .creator-actions { gap: 7px; }
html[data-cg-skin="qianse"] .credit-line { order: 1; color: rgba(58, 46, 62, .75); font-size: 13px; }
html[data-cg-skin="qianse"] .creator-actions { order: 2; }
html[data-cg-skin="qianse"] .creator-actions::before { content: "·"; color: rgba(58, 46, 62, .35); }
html[data-cg-skin="qianse"] .creator-actions button {
  min-height: 0;
  padding: 0;
  border: 0;
  border-bottom: 3px solid #FF6FA5;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #3A2E3E;
  font-size: 15px;
  line-height: 1.45;
  transform: none;
}
html[data-cg-skin="qianse"] .creator-actions button + button::before {
  content: "·";
  display: inline-block;
  margin-right: 7px;
  color: rgba(58, 46, 62, .35);
}
html[data-cg-skin="qianse"] .ad-sign { top: auto; bottom: 64px; left: 20px; transform: rotate(-4deg); }
html[data-cg-skin="qianse"] .ad-sign-board {
  padding: 8px 14px;
  border: 3px dashed #F0508C;
  background: #fff;
  box-shadow: 3px 3px 0 rgba(240, 80, 140, .25);
  color: #F0508C;
  animation: none;
}
html[data-cg-skin="qianse"] .ad-sign-board::before,
html[data-cg-skin="qianse"] .ad-sign-board::after { display: none; }
html[data-cg-skin="qianse"] .mp-fab { background: #FFD93D; --fab-sh: #3A2E3E; }
html[data-cg-skin="qianse"] .support-reward-entry { background: #ffe1ec; color: #c43e72; box-shadow: 3px 3px 0 #ff70aa; }
html[data-cg-skin="qianse"] .stage > .stripe { display: block !important; }

@media (max-height: 520px) {
  html[data-cg-skin="qianse"] .logo { width: min(400px, 58vw); }
  html[data-cg-skin="qianse"] .logo text { font-size: 96px; }
  html[data-cg-skin="qianse"] .game-subtitle { margin-top: 8px; letter-spacing: 6px; }
  html[data-cg-skin="qianse"] .start-button {
    margin-top: 14px;
    padding: 9px 44px;
    border-width: 3px;
    box-shadow: 4px 4px 0 #3A2E3E;
    font-size: 16px;
  }
  html[data-cg-skin="qianse"] .credits { gap: 5px; padding: 4px 14px 18px; }
  html[data-cg-skin="qianse"] .ad-sign { top: auto; bottom: 46px; left: 14px; }
  html[data-cg-skin="qianse"] .ad-sign-board { padding: 5px 11px; font-size: 12px; }
}

@media (orientation: portrait) {
  html[data-cg-skin] .stage {
    background-image:
      linear-gradient(rgba(255, 255, 255, .42), rgba(255, 255, 255, .42)),
      var(--cg-home-portrait) !important;
  }

  html[data-cg-skin="yararara"] .stage {
    background-image:
      linear-gradient(rgba(255, 255, 255, .16), rgba(255, 255, 255, .16)),
      var(--cg-home-portrait) !important;
  }

  /* 茜色世界移动端：广告牌回到顶部；底栏恢复为原版文字链接与粉色下划线。 */
  html[data-cg-skin="qianse"] .ad-sign {
    top: max(18px, calc(env(safe-area-inset-top) + 10px));
    bottom: auto;
    left: max(14px, env(safe-area-inset-left));
  }
  html[data-cg-skin="qianse"] .credits {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 5px;
    padding: 7px max(10px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }
  html[data-cg-skin="qianse"] .creator-actions {
    order: 1;
    display: flex;
    justify-content: center;
    width: auto;
    max-width: calc(100vw - 20px);
    gap: 7px;
  }
  html[data-cg-skin="qianse"] .credit-line {
    order: 2;
    width: 100%;
    text-align: center;
    font-size: 12px;
  }
  html[data-cg-skin="qianse"] .creator-actions button,
  html[data-cg-skin="qianse"] .creator-actions .support-reward-entry {
    position: static;
    width: auto;
    max-width: none;
    min-height: 0;
    padding: 0;
    border: 0;
    border-bottom: 3px solid #FF6FA5;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #3A2E3E;
    font-size: clamp(12px, 3.7vw, 16px);
    line-height: 1.45;
    transform: none;
  }
}

.cg-skin-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  align-items: stretch;
}
.cg-card { min-height: 300px; }
.cg-image-button { width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.cg-image-button:disabled { cursor: not-allowed; }
.cg-card .cg-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #efeae0;
}
.cg-lock-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  box-sizing: border-box;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #efeae0;
  color: #9b9488;
  font: 900 46px/1 inherit;
}
.cg-card h2 { margin: 10px 0 3px; font-size: 22px; }
.cg-card p { margin: 0; color: #70695c; font-weight: 800; line-height: 1.45; }
.cg-card .cg-artist { margin-bottom: 3px; color: #288d86; font-size: 13px; }
.cg-card .achievement-status { margin-top: auto; }
.cg-restore {
  display: block;
  grid-column: 1 / -1;
  width: min(320px, calc(100% - 32px));
  margin: 0 auto 14px;
  min-height: 46px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  font: 900 15px/1 inherit;
}

.cg-preview-modal {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 5vw;
  color: #fff;
  background: rgba(15, 19, 24, .82);
}
.cg-preview-modal img,
.cg-preview-modal video {
  max-width: min(1100px, 92vw);
  max-height: 78vh;
  object-fit: contain;
  border: 4px solid #fff;
  border-radius: 16px;
}
.cg-preview-modal strong { font-size: 20px; }
.cg-preview-artist { color: #bdeeea; font-size: 15px; font-weight: 900; }
.cg-preview-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border: 3px solid #1d1d1d;
  border-radius: 50%;
  background: #ffd93d;
  font: 900 20px/1 inherit;
}

@media (max-width: 640px) {
  .cg-card { min-height: 260px; }
  .cg-card h2 { font-size: 19px; }
}
