:root {
  --accent: #5642cf;
  --ink: #242831;
  --muted: #59616e;
  --canvas: #fff;
  --paper: #fff;
  --wash: #f6f7f9;
  --radius: 4px;
  --control-radius: 3px;
  --shadow-control: 0 1px 3px rgb(27 33 45 / 9%), 0 3px 8px -3px rgb(27 33 45 / 12%);
  --shadow-surface: 0 2px 6px rgb(27 33 45 / 7%), 0 8px 21px -8px rgb(27 33 45 / 14%);
  --shadow-raised: 0 3px 8px rgb(27 33 45 / 9%), 0 12px 26px -9px rgb(27 33 45 / 19%);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --quick: 150ms var(--ease-out);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: light;
  font-synthesis: none;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  --tint: color-mix(in srgb, var(--accent) 6%, var(--paper));
  --accent-ink: color-mix(in srgb, var(--accent) 85%, #252638);
  --shadow-hover: 0 0 0 1px color-mix(in srgb, var(--accent) 48%, transparent), var(--shadow-raised);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.35; }
h1, h2, h3, p, dd, a { overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[id] { scroll-margin-top: 24px; }
.shell { width: min(100% - 64px, 1240px); margin-inline: auto; }
.interior { padding-block: 24px 64px; }
.surface { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-surface); }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 10;
  inset: 8px auto auto 8px;
  padding: 8px 16px;
  border-radius: var(--control-radius);
  background: var(--paper);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 19px;
  border: 0;
  border-radius: var(--control-radius);
  box-shadow: var(--shadow-control);
  font-weight: 700;
  line-height: 1.4;
  transition: color var(--quick), background-color var(--quick), box-shadow var(--quick), transform var(--quick);
}
.button-primary { background: var(--accent-ink); color: white; }
.button-primary:hover { background: color-mix(in srgb, var(--accent-ink) 80%, var(--ink)); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-ink);
  font-weight: 700;
}
.text-link:hover { text-decoration: underline; text-underline-offset: .24em; }
.price { color: var(--accent-ink); font-size: 1.08rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.preview-banner { padding: 6px 16px; background: var(--tint); color: var(--accent-ink); text-align: center; font-size: 13px; }
.site-header { position: relative; z-index: 3; background: var(--paper); box-shadow: 0 3px 14px -5px rgb(27 33 45 / 15%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 73px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; font-weight: 750; font-size: 19px; letter-spacing: -.025em; }
.brand img { width: auto; max-width: min(220px, 100%); height: auto; max-height: 42px; object-fit: contain; object-position: left; }
.header-inner .brand img { max-height: 56px; }
.brand-symbol { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: var(--radius); background: var(--accent-ink); color: #fff; }
.gamepad-mark {
  position: relative;
  display: block;
  width: 21px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 7px 7px 5px 5px;
  background:
    linear-gradient(currentColor, currentColor) 4px 50% / 5px 1px no-repeat,
    linear-gradient(currentColor, currentColor) 6px 50% / 1px 5px no-repeat,
    radial-gradient(circle, currentColor 1px, transparent 1.25px) 11px 2px / 5px 5px no-repeat,
    radial-gradient(circle, currentColor 1px, transparent 1.25px) 13px 4px / 5px 5px no-repeat;
}
.site-nav { display: flex; align-items: stretch; justify-content: flex-end; flex-wrap: wrap; gap: 2px 27px; font-weight: 600; }
.site-nav > a, .site-nav > .nav-group > summary { position: relative; display: flex; align-items: center; min-height: 73px; padding: 8px 3px; color: var(--muted); transition: color var(--quick); }
.site-nav a:hover, .site-nav summary:hover, .site-nav [aria-current="page"], .nav-group:has([aria-current="page"]) > summary { color: var(--accent-ink); }
.site-nav > a::before, .site-nav > .nav-group > summary::before {
  content: '';
  position: absolute;
  inset: auto 3px 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--quick);
}
.site-nav > a:focus-visible::before, .site-nav > .nav-group > summary:focus-visible::before { transform: scaleX(1); }
.site-nav > [aria-current="page"], .site-nav > .nav-group:has([aria-current="page"]) > summary { font-weight: 750; }
.nav-group { position: relative; }
.nav-group summary { list-style: none; cursor: pointer; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: ''; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg) translateY(-2px); transition: transform var(--quick); }
.nav-group summary::after { margin-inline-start: 9px; }
.nav-dropdown { position: absolute; right: 0; top: 100%; display: grid; gap: 4px; min-width: 176px; max-width: min(310px, 85vw); padding: 8px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-raised); }
.nav-dropdown a, .nav-dropdown summary { display: block; padding: 7px 10px; border-radius: var(--control-radius); }
.nav-dropdown a:hover, .nav-dropdown summary:hover { background: var(--tint); }
.nav-dropdown .nav-dropdown { position: static; min-width: 0; margin-inline-start: 10px; padding: 2px 0 2px 6px; box-shadow: none; }
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  min-height: 42px;
  padding: 6px 11px;
  border: 0;
  box-shadow: var(--shadow-control);
  border-radius: var(--control-radius);
  background: white;
  cursor: pointer;
}
.menu-lines { width: 14px; height: 12px; border-block: 2px solid; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }

.site-footer {
  padding-top: clamp(30px, 4vw, 51px);
  box-shadow: 0 -4px 16px -7px rgb(27 33 45 / 14%);
  background: var(--paper);
  color: var(--ink);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(18px, 5vw, 72px);
  padding-bottom: clamp(26px, 3.6vw, 44px);
}
.footer-brand p { max-width: 38ch; margin-top: 12px; color: var(--muted); }
.footer-menus { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 22px clamp(22px, 4vw, 52px); }
.footer-menu { min-width: 0; max-width: min(24ch, 100%); }
.footer-menu h2 { margin-bottom: 9px; color: var(--ink); font-size: 15px; }
.footer-menu ul { display: grid; gap: 6px; padding: 0; margin: 0; list-style: none; }
.footer-menu li ul { margin: 6px 0 0 10px; }
.footer-menu a, .footer-content a, .back-to-top { transition: color var(--quick); }
.footer-menu a:hover, .footer-content a:hover, .back-to-top:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: .22em; }
.footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, 1fr);
  grid-template-areas: "copyright content top";
  align-items: center;
  gap: clamp(8px, 2vw, 24px);
  padding-block: 17px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.footer-copyright { grid-area: copyright; justify-self: start; overflow-wrap: anywhere; }
.footer-content { grid-area: content; min-width: 0; text-align: center; overflow-wrap: anywhere; }
.footer-content :is(img, table, pre, video) { max-width: 100%; }
.footer-content img { margin-inline: auto; }
.footer-content pre { white-space: pre-wrap; }
.back-to-top { grid-area: top; justify-self: end; text-align: end; padding-block: 6px; }
.back-to-top span { display: inline-block; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 650; }
.breadcrumb a:hover { color: var(--accent-ink); text-decoration: underline; }
.empty-state { padding: clamp(28px, 5vw, 54px) 20px; border-radius: var(--radius); background: var(--paper); text-align: center; box-shadow: var(--shadow-surface); }
.empty-state h2 { margin-bottom: 8px; font-size: 20px; }
.empty-state p { color: var(--muted); }
.missing-page { margin-block: 34px; }
.missing-page p { margin-block: 12px 20px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 18px; margin-top: 26px; color: var(--muted); font-size: 13px; }
.pagination-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pagination-pages > * { display: grid; place-items: center; min-width: 38px; height: 38px; padding-inline: 7px; border-radius: var(--control-radius); }
.pagination-pages > :is(a, [aria-current]) { background: var(--paper); box-shadow: var(--shadow-control); }
.pagination-pages > [aria-current] { color: white; background: var(--accent-ink); font-weight: 750; }
.pagination-pages > a:hover { color: var(--accent-ink); }
.pagination-pages .page-gap, .pagination-pages .page-disabled { background: none; color: var(--muted); }
.pagination-pages .page-gap { min-width: 21px; }

.prose { font-size: 16px; line-height: 1.86; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose :is(h1, h2, h3, h4) { margin-block: 1.4em .5em; font-weight: 750; }
.prose p { margin-block: .65em; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: .17em; }
.prose img { height: auto; margin-block: 16px; border-radius: var(--control-radius); }
.prose video, .prose iframe { display: block; max-width: 100%; }
.prose pre { max-width: 100%; overflow: auto; padding: 13px 16px; border-radius: var(--control-radius); background: var(--wash); line-height: 1.55; }
.prose blockquote { margin-inline: 0; padding: 8px 16px; color: var(--muted); background: var(--tint); border-radius: var(--control-radius); }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose :is(th, td) { padding: 7px 12px; border: 0; text-align: left; }
.prose th { background: var(--tint); }
.prose tbody tr:nth-child(even) { background: var(--wash); }
.content-field h2 { margin-bottom: 9px; font-size: 20px; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; }
.image-grid img { border-radius: var(--control-radius); }
.file-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }

@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  .interior { padding-block: 18px 42px; }
  .header-inner { flex-wrap: wrap; gap: 0 12px; min-height: 61px; padding-block: 9px; }
  .header-inner .brand { max-width: calc(100% - 85px); font-size: 16px; }
  .header-inner .brand img { max-height: 44px; }
  .brand-symbol { flex-basis: 33px; width: 33px; height: 33px; }
  .site-nav { flex-basis: 100%; display: grid; justify-content: stretch; gap: 4px; padding-block: 8px 3px; margin-top: 8px; }
  .site-nav > a, .site-nav > .nav-group > summary { min-height: 42px; padding: 7px 10px; border: 0; border-radius: var(--control-radius); }
  .site-nav > a::before, .site-nav > .nav-group > summary::before { display: none; }
  .site-nav > [aria-current="page"] { background: var(--tint); }
  .nav-dropdown { position: static; margin-inline-start: 10px; padding-left: 6px; box-shadow: none; }
  .site-footer { padding-top: 30px; }
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand .brand { max-width: 100%; }
  .footer-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr) minmax(0, 1fr); gap: 4px; font-size: 12px; }
}
@keyframes reveal-panel {
  from { opacity: .55; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@media (hover: hover) and (pointer: fine) {
  .site-nav > a:hover::before, .site-nav > .nav-group > summary:hover::before { transform: scaleX(1); }
  .button:hover, .menu-toggle:hover, .pagination-pages > a:hover { box-shadow: var(--shadow-hover); }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .nav-group[open] > .nav-dropdown, .filter-branch[open] > .filter-tree,
  .product-panel[role="tabpanel"]:not([hidden]) { animation: reveal-panel 180ms var(--ease-out); }
  .back-to-top span, .text-link > span { transition: transform var(--quick); }
  .button:active, .menu-toggle:active, .gallery-thumb:active, .pagination-pages > a:active { transform: translateY(1px); }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .menu-toggle[aria-expanded="true"] + .site-nav { animation: reveal-panel 160ms var(--ease-out); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .button:hover:not(:active) { transform: translateY(-1px); }
  .back-to-top:hover span { transform: translateY(-2px); }
  .text-link:hover > span { transform: translateX(2px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  [aria-current="page"], [role="tab"][aria-selected="true"] { text-decoration: underline; }
  :focus-visible { outline-color: Highlight; }
}
