:root {
  --brand: #534ab7;
  --brand-dark: #3c3489;
  --brand-soft: #eeedfe;
  --ink: #2c2c2a;
  --muted: #5f5e5a;
  --line: #e5e7eb;
  --surface: #f7f7f8;
  --arena: #1a1a2e;
  --radius: 12px;
  --wrap: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink);
  line-height: 1.7;
  background: #fff;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

/* header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  flex-shrink: 0;
}

.logo__mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
}

.logo__name {
  font-size: 15px;
  font-weight: 600;
}

.search {
  margin-left: auto;
}

.search input {
  width: 148px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
}

.search input:focus {
  border-color: var(--brand);
}

@media (min-width: 768px) {
  .search input {
    width: 224px;
  }
}

.nav {
  border-top: 1px solid var(--line);
}

.nav__list {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 0;
  font-size: 13px;
}

.nav__link {
  white-space: nowrap;
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--muted);
}

.nav__link:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

/* buttons */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
}

.btn:hover {
  background: var(--brand-dark);
  color: #fff;
}

/* grids */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* cards */
.card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.card:hover {
  border-color: var(--brand);
}

.card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.card__body {
  padding: 12px;
}

.card__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.card--cat {
  padding: 16px;
  color: var(--ink);
}

/* headings */
.h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
}

.h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
}

.h3 {
  margin: 32px 0 8px;
  font-size: 18px;
  font-weight: 600;
}

@media (min-width: 768px) {
  .h1 {
    font-size: 36px;
  }
}

.lede {
  margin: 12px 0 0;
  max-width: 680px;
  font-size: 15px;
  color: var(--muted);
}

.section {
  padding: 40px 0;
}

.hero {
  padding: 40px 0 8px;
}

@media (min-width: 768px) {
  .hero {
    padding: 56px 0 8px;
  }
}

/* game area */
.arena {
  margin-top: 20px;
  width: 100%;
  /* --arena-max 由页面按游戏比例注入：限高 70vh 反推出的最大宽度 */
  max-width: var(--arena-max, min(100%, 124.44vh));
}

.arena__frame {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--arena);
}

.arena__frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: var(--game-aspect, 16 / 9);
  border: 0;
}

/* content */
.prose {
  max-width: 720px;
}

.prose p {
  margin: 0 0 16px;
  font-size: 15px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 15px;
}

.prose li {
  margin-bottom: 8px;
}

.cols {
  display: grid;
  gap: 32px;
  max-width: 720px;
  margin-top: 32px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 768px) {
  .cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ad slot */
.ad-slot {
  margin: 24px 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
}

@media (min-width: 768px) {
  .ad-slot {
    min-height: 90px;
  }
}

/* faq */
.faq {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* breadcrumb */
.crumbs {
  padding: 16px 0;
  font-size: 13px;
  color: var(--muted);
}

.crumbs span {
  margin: 0 8px;
}

/* misc */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.accent-bar {
  height: 6px;
  width: 40px;
  border-radius: 999px;
  margin-bottom: 8px;
}

/* footer */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.site-footer__inner {
  padding: 40px 0;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 13px;
}

.site-footer__links a {
  color: var(--muted);
}

.site-footer__copy {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.text-muted {
  color: var(--muted);
}

.text-15 {
  font-size: 15px;
}

.search-page-input {
  width: 100%;
  max-width: 420px;
  margin-top: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
}

.search-page-input:focus {
  border-color: var(--brand);
}
