:root[data-theme="light"] {
  color-scheme: light;
  --ink: #162336;
  --muted: #526579;
  --dim: #5f7185;
  --bg: #ffffff;
  --panel: #ffffff;
  --line: #d8e2eb;
  --teal: #0f766e;
  --blue: #2563a8;
  --amber: #9a6700;
  --red: #b42318;
}

:root[data-theme="dark"] { color-scheme: dark; --dim: #71879b; }

.stats { margin-top: 72px; margin-bottom: 16px; }
.stats-explanation {
  width: calc(100% - 64px);
  max-width: 1176px;
  margin: 0 auto 96px;
  padding: 14px 16px;
  border-left: 3px solid var(--teal);
  border-radius: 0 9px 9px 0;
  background: color-mix(in srgb, var(--panel) 92%, var(--teal) 8%);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.stats-explanation b { color: var(--ink); }
.stats-explanation p { margin: 0; }
.feature-definitions {
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.feature-definitions > div { padding-top: 8px; border-top: 1px solid var(--line); }
.feature-definitions dt { display: inline; color: var(--ink); font-weight: 700; }
.feature-definitions dd { display: inline; margin: 0; }
.stats-explanation .compatibility-note { margin-top: 10px; }
.section-heading h1 { font-size: 36px; line-height: 1.1; letter-spacing: -.04em; margin: 0; }
.controls { grid-template-columns: minmax(220px, 1.45fr) repeat(5, minmax(112px, 1fr)); }

@media (min-width: 901px) {
  main { padding-top: 56px; }
  .stats { margin-top: 0; }
}

[data-theme="light"] body { background: #fff; color: var(--ink); }
[data-theme="light"] .site-header { background: rgba(255, 255, 255, .94); border-bottom-color: #d8e2eb; }
[data-theme="light"] .brand-mark { border-color: var(--teal); color: var(--teal); }
[data-theme="light"] .hero-orbit .orbit { border-color: rgba(15, 118, 110, .23); }
[data-theme="light"] .orbit-a { border-color: rgba(37, 99, 168, .2) !important; }
[data-theme="light"] .orbit-core { background: radial-gradient(circle at 35% 28%, #c7f0e8, #e6f7f4 58%, #f7fbfb); color: var(--teal); box-shadow: 0 0 80px rgba(15, 118, 110, .14), inset 0 0 30px rgba(15, 118, 110, .08); }
[data-theme="light"] .stat { background: #f8fafc; border-color: var(--line); }
[data-theme="light"] .search-wrap input,
[data-theme="light"] .controls select { background: #fff; border-color: var(--line); color: var(--ink); }
[data-theme="light"] .table-wrap { background: #fff; border-color: var(--line); }
[data-theme="light"] th { background: #f1f5f9; color: #526579; }
[data-theme="light"] td { border-top-color: #e6edf3; }
[data-theme="light"] tbody tr:hover { background: #f0faf8; }
[data-theme="light"] .notes { background: #f4f7fa; border-top-color: var(--line); }
[data-theme="light"] .site-footer { background: #fff; }

.theme-toggle {
  width: 44px;
  flex: 0 0 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.theme-toggle #theme-label { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.feedback-link {
  min-height: 44px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.feedback-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.github-link {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.github-link svg { width: 19px; height: 19px; fill: currentColor; }
.feedback-link:hover,
.github-link:hover { border-color: var(--teal); color: var(--teal); }
.theme-toggle:hover { border-color: var(--teal); color: var(--teal); }
.theme-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="light"] .theme-icon-sun,
[data-theme="dark"] .theme-icon-moon { display: none; }

th { text-align: center; }
.game-identity { display: flex; align-items: flex-start; gap: 12px; min-width: 220px; }
.cover,
.cover-placeholder { width: 48px; height: 72px; aspect-ratio: 2 / 3; flex: 0 0 48px; border-radius: 6px; object-fit: cover; }
.cover { background: var(--panel); }
.cover-placeholder { display: grid; place-items: center; background: #102234; border: 1px solid var(--line); color: var(--muted); font: 700 11px ui-monospace, monospace; text-align: center; }
[data-theme="light"] .cover { background: #eaf0f4; }
[data-theme="light"] .cover-placeholder { background: linear-gradient(145deg, #dce9ed, #f4f8f9); border-color: #d0dfe5; color: #4d7474; }
.cover-placeholder[hidden] { display: none; }
.title-zh { display: block; line-height: 1.35; }
.title-en { display: block !important; color: var(--dim) !important; font-size: 11px !important; line-height: 1.35 !important; font-weight: 500 !important; }
.card-top .game-identity { min-width: 0; flex: 1; }
.card-top .cover,
.card-top .cover-placeholder { width: 52px; height: 78px; flex-basis: 52px; }
.store-links { display: flex; flex-wrap: wrap; gap: 6px; min-width: 150px; }
.store-link {
  min-height: 30px;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--panel) 88%, var(--teal) 12%);
  color: var(--ink);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.store-link i { color: var(--teal); font-size: 10px; font-style: normal; }
.store-link:hover { border-color: var(--teal); color: var(--teal); background: color-mix(in srgb, var(--panel) 80%, var(--teal) 20%); }
.store-link:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.feature { display: inline-flex; align-items: center; gap: 5px; border-color: var(--line); color: var(--ink); }
.feature i { font-style: normal; font-weight: 700; }
.feature-item { display: inline-flex; max-width: 100%; flex-direction: column; align-items: flex-start; }
.feature-item.is-expanded { width: 100%; flex-basis: 100%; }
.feature-info {
  width: 20px;
  height: 20px;
  margin: -2px -3px -2px 0;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  touch-action: manipulation;
  transition: color .18s ease, background-color .18s ease;
}
.feature-info svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.feature-info:hover,
.feature-info[aria-expanded="true"] { color: var(--teal); background: color-mix(in srgb, var(--panel) 70%, var(--teal) 30%); }
.feature-info:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.feature-note {
  width: 100%;
  max-width: 320px;
  margin-top: 5px;
  padding: 8px 10px;
  border-left: 2px solid var(--teal);
  border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--panel) 88%, var(--teal) 12%);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
}
.feature-note[hidden] { display: none; }
.feature-note-link {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: var(--blue);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color .18s ease, text-decoration-color .18s ease;
}
.feature-note-link:hover { color: var(--teal); text-decoration-thickness: 2px; }
.feature-note-link:focus-visible { border-radius: 2px; outline: 2px solid var(--teal); outline-offset: 2px; }
.external-link-icon {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-note-links { display: block; margin-top: 4px; }
.feature-note-links b { color: var(--ink); font-weight: 650; }

@media (max-width: 900px) {
  .controls { grid-template-columns: 1fr 1fr; }
  .feedback-link { width: auto; flex: 0 0 auto; padding: 0 11px; }
}

@media (max-width: 640px) {
  .stats { margin-top: 48px; margin-bottom: 16px; }
  .stats-explanation {
    width: calc(100% - 36px);
    margin-bottom: 72px;
    padding: 13px 14px;
    display: block;
  }
  .feature-definitions { grid-template-columns: 1fr; gap: 8px; }
  .game-identity { gap: 10px; }
  .cover,
  .cover-placeholder { width: 52px; height: 78px; flex-basis: 52px; }
  .card-details .card-detail { display: block; color: var(--muted); font-size: 11px; }
  .card-details .card-detail b { display: block; color: var(--dim); font-size: 10px; font-weight: 500; margin-bottom: 5px; }
  .card-features { grid-column: 1 / -1; }
  .card-features .feature { display: inline-flex; width: max-content; max-width: 100%; margin: 0 4px 4px 0; }
  .card-features .features { display: flex; }
  .card-features .feature-item.is-expanded { width: 100%; }
  .card-features .feature-note { max-width: none; margin: 1px 0 8px; font-size: 11px; }
  .card-features .feature-info { width: 28px; height: 28px; margin: -6px -7px -6px 0; }
  .card-stores { grid-column: 1 / -1; }
  .card-stores .store-links { min-width: 0; gap: 8px; }
  .card-stores .store-link { min-height: 44px; padding: 8px 11px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .feedback-link,
  .github-link,
  .store-link,
  .feature-info,
  .feature-note-link { transition: none; }
}

.tester-entry {
  max-width: 1176px;
  margin: 0 auto 16px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 90%, var(--teal) 10%);
}
.tester-entry-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--teal) 45%, var(--line));
  border-radius: 14px;
  color: var(--teal);
}
.tester-entry-icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tester-entry p { margin: 0 0 3px; color: var(--teal); font: 700 9px ui-monospace, monospace; letter-spacing: .14em; }
.tester-entry h1 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; }
.tester-entry > div > span { color: var(--muted); font-size: 12px; }
.tester-entry > a {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--teal);
  border-radius: 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}
.tester-entry > a:hover { color: var(--bg); background: var(--teal); }

@media (max-width: 900px) {
  .tester-entry { width: calc(100% - 64px); }
}

@media (max-width: 640px) {
  .tester-entry { width: calc(100% - 36px); margin-bottom: 0; padding: 18px; grid-template-columns: auto 1fr; }
  .tester-entry-icon { width: 46px; height: 46px; }
  .tester-entry > div > span { display: none; }
  .tester-entry > a { grid-column: 1 / -1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .tester-entry > a { transition: none; }
}
