@charset "UTF-8";

/* 只新增日月开关；白天继承现有 UI，夜间覆盖颜色，不改产品布局。 */
.coco-theme-toggle {
  position: relative;
  isolation: isolate;
  flex: none;
  width: 138px;
  height: 56px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(160deg, #62a7e7, #bde7ff);
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 500ms, border-color 500ms, transform 220ms cubic-bezier(.34,1.56,.64,1);
}
.coco-theme-toggle:active { transform: scale(.965); }
@media (hover: hover) and (pointer: fine) { .coco-theme-toggle:hover { transform: scale(1.02); } }
.coco-theme-toggle::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: inherit;
  box-shadow: none;
  pointer-events: none;
  content: "";
}
.coco-theme-toggle:focus-visible { outline: 3px solid var(--ds-purple); outline-offset: 4px; }
/* Match the reference's desktop framing: a 1.1× canvas clipped at the pill's origin. */
.coco-theme-toggle canvas { position: absolute; z-index: 3; inset: 0; width: 110%; height: 110%; pointer-events: none; }
.coco-theme-toggle:not([data-orb="webgl"]) canvas { visibility: hidden; }
.coco-theme-clouds, .coco-theme-stars { position: absolute; inset: 0; pointer-events: none; transition: opacity 350ms, transform 650ms cubic-bezier(.34,1.4,.45,1); }
.coco-theme-clouds { z-index: 2; }
.coco-theme-clouds i { position: absolute; right: -7px; bottom: -4px; width: 39px; height: 20px; border-radius: 30px; background: #f8fcff; box-shadow: -20px 8px 0 #eef8ff, -34px 13px 0 #fff, 6px -13px 0 -1px #eef8ff; }
.coco-theme-clouds i:nth-child(2) { right: 18px; bottom: -12px; width: 30px; opacity: .7; transform: scale(1.1); }
.coco-theme-clouds i:nth-child(3) { right: -2px; bottom: 18px; width: 20px; height: 14px; opacity: .5; transform: scale(.7); box-shadow: -12px 5px 0 #fff; }
.coco-theme-stars { z-index: 1; opacity: 0; transform: translateY(-22px); }
.coco-theme-stars i { position: absolute; top: 12px; left: 14px; width: 8px; height: 8px; background: #fff2bd; clip-path: polygon(50% 0,62% 36%,100% 50%,62% 63%,50% 100%,37% 63%,0 50%,37% 36%); }
.coco-theme-stars i:nth-child(2) { top: 28px; left: 28px; width: 6px; height: 6px; }
.coco-theme-stars i:nth-child(3) { top: 10px; left: 43px; width: 5px; height: 5px; }
.coco-theme-stars i:nth-child(4) { top: 23px; left: 56px; width: 7px; height: 7px; }
.coco-theme-stars i:nth-child(5) { top: 34px; left: 13px; width: 4px; height: 4px; }
.coco-theme-orb { position: absolute; z-index: 3; top: 6px; left: 6px; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #fff5a7, #ffbd43 45%, #e97b16); box-shadow: 0 0 12px #ffcb6c; transition: transform 650ms cubic-bezier(.34,1.4,.45,1), background 400ms; }
.coco-theme-toggle[data-orb="webgl"] .coco-theme-orb { visibility: hidden; }
.coco-theme-toggle[data-orb="webgl"] :is(.coco-theme-clouds, .coco-theme-stars) { visibility: hidden; }
.coco-theme-toggle[aria-checked="true"] { border-color: rgb(163 173 236 / 35%); background: linear-gradient(145deg, #12162b, #343158); box-shadow: none; }
.coco-theme-toggle[aria-checked="true"] .coco-theme-clouds { opacity: 0; transform: translateY(26px); }
.coco-theme-toggle[aria-checked="true"] .coco-theme-stars { opacity: 1; transform: none; }
.coco-theme-toggle[aria-checked="true"] .coco-theme-stars i { animation: coco-toggle-twinkle 3s ease-in-out infinite alternate; }
.coco-theme-toggle[aria-checked="true"] .coco-theme-stars i:nth-child(even) { animation-delay: -1.5s; }
@keyframes coco-toggle-twinkle { from { opacity: .55; } to { opacity: 1; } }
.coco-theme-toggle[aria-checked="true"] .coco-theme-orb { transform: translateX(90px); background: radial-gradient(circle at 30% 28%, #e4e8f3, #a0aac1 52%, #606a88); box-shadow: inset -4px -2px 6px #525978, 0 0 7px rgb(180 196 255 / 30%); }

:root[data-coco-theme="night"] {
  color-scheme: dark;
  --ds-paper: #10152b;
  --ds-ink: #f2f0ff;
  --ds-muted: #bbc2df;
  --ds-subtle: #a5aecf;
  --ds-line: rgb(168 182 239 / 20%);
  --ds-logo-navy: #e7ecff;
  --ds-purple: #b6a3ff;
  --ds-glass: rgb(23 31 62 / 72%);
  --ds-glass-strong: rgb(28 37 70 / 90%);
  --ds-glass-border: rgb(169 181 235 / 22%);
  --ds-input: rgb(22 30 58 / 80%);
  --ds-overlay: rgb(8 13 32 / 78%);
  --ds-control-ink: #e1d9ff;
}
/* 保留原始插画和流星画布，只在夜间调暗插画，不对产品截图做滤镜。 */
:root[data-coco-theme="night"] body::before { animation-name: coco-night-drift; }
@keyframes coco-night-drift {
  0% { filter: brightness(.28) saturate(1.25); transform: translate3d(calc(var(--ds-sky-parallax-x) - 10px), calc(var(--ds-sky-parallax-y) - 6px), 0) scale(1.045); }
  52% { filter: brightness(.3) saturate(1.3); transform: translate3d(calc(var(--ds-sky-parallax-x) + 4px), calc(var(--ds-sky-parallax-y) + 3px), 0) scale(1.058); }
  100% { filter: brightness(.28) saturate(1.25); transform: translate3d(calc(var(--ds-sky-parallax-x) + 12px), calc(var(--ds-sky-parallax-y) - 2px), 0) scale(1.05); }
}
:root[data-coco-theme="night"] body::after { background: radial-gradient(ellipse at 14% 0%, rgb(89 48 154 / 24%), transparent 60%), linear-gradient(180deg, rgb(12 19 48 / 28%), rgb(14 20 45 / 40%)); }
:root[data-coco-theme="night"] .ds-header .ds-nav,
:root[data-coco-theme="night"] .ds-header.is-scrolled .ds-nav { border-color: var(--ds-line); background: rgb(19 27 55 / 68%); box-shadow: inset 0 1px 0 rgb(204 206 255 / 12%); }
:root[data-coco-theme="night"] .ds-header .coco-surface-liquid-layer { opacity: .18; }
:root[data-coco-theme="night"] .ds-main-nav a { color: var(--ds-muted); }
:root[data-coco-theme="night"] .ds-main-nav a[aria-current="page"],
:root[data-coco-theme="night"] .ds-main-nav a:hover { color: #d2bfff; }
:root[data-coco-theme="night"] :is(.ds-nav .ds-icon-btn, .ds-btn-secondary, .ds-header-explore, .ds-header-login, .ds-badge) { color: var(--ds-ink); background: rgb(86 87 155 / 22%); border-color: var(--ds-line); text-shadow: none; }
:root[data-coco-theme="night"] :is(.ds-glass:not(.ds-nav), .support-placeholder) { background: rgb(27 36 67 / 85%); background-image: none; border-color: var(--ds-line); box-shadow: none; }
:root[data-coco-theme="night"] .ds-glass::before,
:root[data-coco-theme="night"] .ds-glass::after { opacity: .1; }
:root[data-coco-theme="night"] :is(.home-art-glow, .home-art-mascot-glow) { opacity: .16; }
:root[data-coco-theme="night"] .home-art-logo { mix-blend-mode: normal; }
:root[data-coco-theme="night"] .home-art-label { color: var(--ds-muted); background: #232d52; border-color: var(--ds-line); }
:root[data-coco-theme="night"] :is(.store-card, .store-modal-panel) { background: #1b2442; border-color: rgb(142 156 220 / 25%); box-shadow: none; }
:root[data-coco-theme="night"] .store-card { border-bottom-color: var(--card-a); }
:root[data-coco-theme="night"] :is(.store-card-body, .store-modal-copy) { background: transparent; }
:root[data-coco-theme="night"] :is(.store-search, .store-sort, .store-modal-close, .store-modal-gallery-next, .store-modal-status) { color: var(--ds-ink); background: #263152; border-color: var(--ds-line); }
:root[data-coco-theme="night"] :is(.store-card-specs > span, .store-modal-tags span) { background: rgb(137 139 222 / 14%); }
:root[data-coco-theme="night"] .store-card-specs b { color: #ccbaff; }
:root[data-coco-theme="night"] .store-card-specs span:nth-child(2) b { color: #7cc5ff; }
:root[data-coco-theme="night"] .store-card-specs span:nth-child(3) b { color: #ffa4d9; }
:root[data-coco-theme="night"] :is(.store-card-body > p, .store-card-specs small, .store-card-eyebrow, .status.soon) { color: var(--ds-muted); }
:root[data-coco-theme="night"] .store-sort select { color: var(--ds-ink); background: transparent; background-image: none; }
:root[data-coco-theme="night"] :is(.store-card h2, .store-modal-pitch h2) { filter: brightness(1.28); }
:root[data-coco-theme="night"] .store-tab.is-active { color: #ded3ff; background: #3a3267; }
:root[data-coco-theme="night"] :is(.store-modal-review, .store-modal-review-state) { background: #273355; }
:root[data-coco-theme="night"] .store-modal-unavailable { background: #303958; }
:root[data-coco-theme="night"] .store-modal-backdrop { background: rgb(6 11 30 / 76%); }
:root[data-coco-theme="night"] :is(.store-modal-close img, .store-modal-gallery-next img, .store-modal-facts img) { filter: brightness(0) invert(1); }
:root[data-coco-theme="night"] :is(.store-footer, .coco-footer, .home-proof, .store-modal-section h3, .store-modal-highlights li) { border-color: var(--ds-line); }

/* 问题公示沿用原结构；登录、表单与正文使用可读的夜间对比度。 */
:root[data-coco-theme="night"] .issues-page { color: var(--ds-ink); --coco-issue-ink-soft: var(--ds-muted); }
:root[data-coco-theme="night"] :is(.issue-panel, .issue-message, .issue-dialog, #issue-dialog, .issue-form, .issue-upload, .issue-admin-game, .issue-stat, .issue-empty, .issue-preview) { color: var(--ds-ink); background: #1b2442; border-color: var(--ds-line); box-shadow: none; }
:root[data-coco-theme="night"] :is(.issue-tabs, .issue-message-head, .issue-summary, .issue-admin-panel, .issue-chip) { color: var(--ds-muted); background: #253051; border-color: var(--ds-line); }
:root[data-coco-theme="night"] :is(.issue-heading p, .issue-row p, .issue-meta, .issue-sidebar h2, .issue-tab, .game-filter, .issue-count, .issue-form label, .issue-form small, .issue-hint, .issue-status-message, .issue-markdown) { color: var(--ds-muted); }
:root[data-coco-theme="night"] :is(.issue-heading .issue-eyebrow, .issue-tab[aria-pressed="true"], .game-filter[aria-pressed="true"]) { color: #c7b6ff; }
:root[data-coco-theme="night"] .game-filter[aria-pressed="true"] { background: #39305e; }
:root[data-coco-theme="night"] :is(.issue-button:not(.primary), .issues-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .issues-page select, .issues-page textarea) { color: var(--ds-ink); background: #253051; background-image: none; border-color: var(--ds-line); }
:root[data-coco-theme="night"] :is(.issue-row, .issue-toolbar, .issue-tabs, .issue-message-head, .issue-markdown th, .issue-markdown td) { border-color: var(--ds-line); }
:root[data-coco-theme="night"] .issue-markdown :is(pre, code) { color: #e1d9ff; background: #111a34; }
:root[data-coco-theme="night"] .issue-auth-dialog { color: var(--ds-ink) !important; background: linear-gradient(145deg, rgb(37 44 83 / 96%), rgb(19 33 59 / 96%)) !important; border-color: var(--ds-line) !important; }
:root[data-coco-theme="night"] .issue-auth-dialog :is(label, p, small, .ds-auth-tab) { color: var(--ds-muted); }
:root[data-coco-theme="night"] .issue-auth-dialog .issue-auth-tabs button { color: var(--ds-muted); }
:root[data-coco-theme="night"] .issue-auth-dialog .issue-auth-tabs button.is-active { color: var(--ds-ink); background: #354064; box-shadow: none; }
:root[data-coco-theme="night"] .issue-auth-dialog::backdrop { background: rgb(6 11 30 / 72%) !important; }
:root[data-coco-theme="night"] .issue-auth-dialog #dialog-close { color: var(--ds-ink); background: #354064; border-color: var(--ds-line); box-shadow: none; }
:root[data-coco-theme="night"] .issues-page .issue-auth-form input:not([type="checkbox"]) { color: var(--ds-ink); background: #253051; box-shadow: none; }
:root[data-coco-theme="night"] .coco-issue-page { --coco-issue-line: var(--ds-line); --coco-issue-ink-soft: var(--ds-muted); }
:root[data-coco-theme="night"] :is(.coco-surface, .coco-issue-console) { color: var(--ds-ink); background: rgb(27 36 67 / 85%); background-image: none; border-color: var(--ds-line); }
:root[data-coco-theme="night"] :is(.coco-issue-filter, .coco-issue-search, .coco-issue-card, .coco-issue-list-panel, .coco-issue-submit-panel, .coco-issue-note, .issue-detail-aside section, .label-choice, .resolution-choice) { color: var(--ds-muted); background: rgb(27 36 67 / 85%); border-color: var(--ds-line); }
:root[data-coco-theme="night"] :is(.coco-issue-filter.is-active, .coco-issue-filter[aria-pressed="true"]) { color: #ded3ff; background: #39305e; }
:root[data-coco-theme="night"] .issue-form :is(.label-choice, .resolution-choice):has(input:checked) { color: var(--ds-ink); background: #39305e; border-color: #9e8edd; }

@media (max-width: 980px) {
  :root[data-coco-theme="night"] .ds-header .ds-main-nav { border-color: var(--ds-line); background: rgb(24 33 63 / 97%); box-shadow: none; }
}
@media (max-width: 680px) {
  .coco-theme-toggle { width: 108px; height: 44px; }
  .coco-theme-orb { width: 30px; height: 30px; }
  .coco-theme-toggle[aria-checked="true"] .coco-theme-orb { transform: translateX(64px); }
  .ds-header-actions { gap: 6px; }
  .ds-header-actions #account-button { max-width: 84px; overflow: hidden; text-overflow: ellipsis; padding-inline: 9px; font-size: 12px; }
  .coco-theme-stars i:nth-child(4) { left: 40px; }
}
@media (max-width: 400px) {
  .issues-page .ds-nav { padding-inline: 7px; gap: 4px; }
  .issues-page .ds-brand { gap: 5px; font-size: 12px; }
  .issues-page .ds-brand img { width: 30px; height: 30px; }
  .issues-page .ds-header-actions #account-button { max-width: 70px; padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .coco-theme-toggle, .coco-theme-toggle * { transition: none; animation: none !important; }
  :root[data-coco-theme="night"] body::before { animation: none !important; filter: brightness(.29) saturate(1.25); }
}
