/* Metric-matched fallbacks: until Outfit/Inter arrive (display=swap) text is set in
   Arial resized to the web font's width and line metrics, so the swap does not move
   the layout (CLS). Measured against Outfit 700/800 and Inter 400/600 (Latin). */
@font-face {
  font-family: 'Outfit Fallback';
  src: local('Arial'), local('ArialMT');
  size-adjust: 95%;
  ascent-override: 105.26%;
  descent-override: 27.37%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('ArialMT');
  size-adjust: 104%;
  ascent-override: 93.17%;
  descent-override: 23.21%;
  line-gap-override: 0%;
}

/* GameMall brand tokens (mirror of src/brand.css; owner: gamemall-brand skill) */
:root {
  --gm-red: #e60012;
  --gm-red-hover: #b8000e;
  --gm-red-light: #f2404d;
  --gm-red-soft: #fde6e7;
  --gm-green: #087a38;
  --gm-green-bright: #3ddc84;
  --gm-ink: #111318;
  --gm-slate: #4a4d57;
  --gm-paper: #f6f6f8;
  --gm-font-brand: 'Outfit', 'Outfit Fallback', 'Helvetica Neue', Arial, sans-serif;
  /* UI spec v2: surfaces, status tints, radii, body font */
  --gm-muted: #8a8d96;
  --gm-line: #e6e6ea;
  --gm-line-strong: #d9d9df;
  --gm-chip: #f2f2f5;
  --gm-green-soft: #e6f4ec;
  --gm-amber-soft: #fef3c7;
  --gm-amber-ink: #92400e;
  --gm-radius-control: 10px;
  --gm-radius-card: 16px;
  --gm-font-body: Inter, 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans SC', sans-serif;
}

/* ==================== 导航栏容器 ==================== */

.fp-header-wrap {
  position: relative;
  z-index: 900;
  overflow: visible;
}

/* The header renders the same on every host page: the store, the static
 * support pages and the blog, whose VitePress theme sets border-box on every
 * element and a 16px/24px grey body. These are the store's values; keep them
 * ahead of the component rules below so those still win. Blog-only styles
 * belong in blog.css. */
.fp-header-wrap {
  font-size: 12px;
  line-height: normal;
  color: #000;
}

.fp-header,
.fp-header *,
.fp-header *::before,
.fp-header *::after {
  box-sizing: content-box;
}

.fp-header .fp-mobile-menu-btn {
  box-sizing: border-box;
}

/* The announcement bar sits in the page flow below the menu bar and pushes
 * the page down; it must never float over page content. */
.fp-header-wrap.fp-has-announcement {
  height: auto !important;
}

.fp-header {
  width: 100%;
  height: 60px;
  background-color: #000;
  z-index: 1001;
  position: relative;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ==================== 系统公告栏 ====================
 * UI spec v2 "Announcement bar": full-width strip under the header, Paper
 * background, 1px Line bottom border, ink text. Only warning, danger and
 * maintenance notices switch to the amber tint; no pink or gradient panels.
 */
.fp-announcement-bar {
  position: relative;
  z-index: 1;
  width: 100%;
  background: var(--gm-paper);
  border-bottom: 1px solid var(--gm-line);
  box-sizing: border-box;
  font-family: var(--gm-font-body);
}

.fp-announcement-bar--warning,
.fp-announcement-bar--danger,
.fp-announcement-bar--maintenance {
  background: var(--gm-amber-soft);
  border-bottom-color: #f5e1a4;
}

.fp-announcement-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 16px;
}

.fp-announcement-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.fp-announcement-slide.fp-announcement-slide--in {
  opacity: 1;
  transform: translateY(0);
}

.fp-announcement-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
}

.fp-announcement-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(920px, calc(100vw - 120px));
  flex-wrap: wrap;
}

.fp-announcement-content--link {
  cursor: pointer;
}

.fp-announcement-content--link:hover .fp-announcement-text {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fp-announcement-content--link:focus-visible {
  outline: 2px solid var(--gm-ink);
  outline-offset: 2px;
  border-radius: 4px;
}

.fp-announcement-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gm-slate);
}

.fp-announcement-icon svg {
  width: 16px;
  height: 16px;
}

.fp-announcement-icon--stock { color: var(--gm-green); }
.fp-announcement-icon--warning,
.fp-announcement-icon--danger,
.fp-announcement-icon--maintenance { color: var(--gm-amber-ink); }

.fp-announcement-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--gm-ink);
  line-height: 1.45;
  text-align: center;
  flex: 1 1 160px;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.fp-announcement-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--gm-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  pointer-events: none;
}

.fp-announcement-cta__arrow {
  line-height: 1;
  transition: transform 0.2s ease;
}

.fp-announcement-content--link:hover .fp-announcement-cta__arrow {
  transform: translateX(2px);
}

.fp-announcement-countdown-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fp-announcement-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fp-announcement-clock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gm-slate);
  flex-shrink: 0;
}

.fp-announcement-divider {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--gm-line-strong);
  flex-shrink: 0;
}

.fp-announcement-timer {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.fp-announcement-timer-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 4px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--gm-line-strong);
}

.fp-announcement-timer-digit {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gm-ink);
  line-height: 1;
}

.fp-announcement-timer-sep {
  font-size: 12px;
  font-weight: 700;
  color: var(--gm-slate);
  line-height: 1;
  padding: 0;
}

.fp-announcement-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fp-announcement-popup {
  background: #fff;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.fp-announcement-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.fp-announcement-popup-header h3 {
  margin: 0;
  font-size: 16px;
  color: #333;
}

.fp-announcement-popup-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #999;
  padding: 0 4px;
}

.fp-announcement-popup-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  white-space: pre-wrap;
}

@media (max-width: 768px) {
  .fp-announcement-inner {
    padding: 5px 10px;
  }

  .fp-announcement-content {
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    max-width: 100% !important;
  }

  .fp-announcement-main {
    flex: 1 1 0;
    min-width: 0;
    max-width: none !important;
    gap: 6px;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    text-align: left;
  }

  .fp-announcement-text {
    font-size: 12px;
    flex-basis: auto;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.4;
  }

  /* 可点击：仅保留箭头 */
  .fp-announcement-content--link .fp-announcement-cta__label {
    display: none;
  }

  .fp-announcement-content--link .fp-announcement-cta {
    flex-shrink: 0;
    margin-left: 0;
    padding: 0;
    align-self: center;
    margin-top: 1px;
  }

  /* 紧凑型倒计时 */
  .fp-announcement-countdown-wrap {
    gap: 4px;
    flex-shrink: 0;
  }

  .fp-announcement-countdown {
    gap: 3px;
  }

  .fp-announcement-clock-icon svg {
    width: 12px;
    height: 12px;
  }

  .fp-announcement-divider {
    height: 14px;
  }

  .fp-announcement-timer-box {
    min-width: 20px;
    height: 18px;
    padding: 0 2px;
    border-radius: 4px;
  }

  .fp-announcement-timer-digit {
    font-size: 10px;
  }

  .fp-announcement-timer-sep {
    font-size: 10px;
  }

  .fp-announcement-icon {
    width: 16px;
    height: 16px;
  }

  .fp-announcement-icon svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
}

.fp-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fp-header-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==================== Logo样式 ==================== */
.fp-logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.fp-logo-link {
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
}

.fp-logo-link.gm-logo {
  gap: 8px;
}

.gm-logo-mark {
  width: 30px;
  height: 30px;
  display: block;
  flex-shrink: 0;
}

.gm-logo-word {
  font-family: var(--gm-font-brand);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}

.gm-logo-word span {
  color: var(--gm-red);
}

/* ==================== 主导航菜单 ==================== */
.fp-nav-menu {
  flex: 1;
  margin-left: 40px;
}

.fp-nav-list {
  display: flex;
  list-style: none;
  gap: 24px;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}

.fp-nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.fp-nav-item > a, .fp-nav-item > span {
  color: #fff !important;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  width: auto;
  height: 60px;
  padding: 0 15px; /* 增加左右内边距 */
  transition: color 0.2s ease;
  position: relative;
  justify-content: center;
}

.fp-nav-item > a:hover, .fp-nav-item > span:hover {
  color: #fff;
}

/* ==================== 下拉菜单系统 ==================== */
/* 主菜单下拉箭头 - 增加间距 */
.fp-nav-item.has-dropdown > a,
.fp-dropdown-toggle {
  padding-right: 32px; /* 从28px增加到32px */
}

.fp-nav-item.has-dropdown > a::after,
.fp-dropdown-toggle::after {
  content: "";
  position: absolute;
  right: 0px; /* 从12px增加到16px */
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #fff;
  transition: transform 0.3s ease;
}

.fp-nav-item.has-dropdown > a.fp-active::after,
.fp-dropdown-toggle.fp-active::after {
  transform: translateY(-50%) rotate(180deg);
}

/* 下拉菜单面板 */
.fp-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  border-radius: 4px;
  padding: 8px 0;
  display: none;
  z-index: 1001;
}

.fp-dropdown-menu.fp-show {
  display: block;
}

.fp-dropdown-item {
  display: block;
  padding: 10px 16px;
  color: rgba(117,117,117,0.8);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  line-height: normal;
}

.fp-dropdown-item:hover, .fp-nav-item:hover .fp-dropdown-toggle {
  cursor: pointer;
  background-color: rgba(255,255,255,.2);
  /*text-decoration: underline;*/
  text-decoration-color: #fff; /* 与品牌色一致 */
  text-underline-offset: 4px; /* 下划线距离文字间距 */
  transition: text-decoration 0.2s ease; /* 平滑过渡效果 */
}

.fp-nav-item > a.fp-dropdown-toggle, .fp-nav-item > span.fp-dropdown-toggle {
  padding-right: 30px;
}

.fp-nav-item > a.fp-dropdown-toggle::after, .fp-nav-item > span.fp-dropdown-toggle::after {
  right: 15px;
}

.fp-dropdown-menu .fp-dropdown-item:hover {
  text-decoration-color: #999;
  background-color: #f5f5f5;
}

.fp-dropdown-item-status {
  display: inline-block;
  border-radius: 8px;
  color: #f6f6f6;
  font-size: 12px;
  font-weight: 600;
  padding: 7px;
  margin-left: 10px;
  line-height: 1;
}
.fp-dropdown-item-status.item-hot {
  background: rgb(255, 103, 103)
}

.fp-dropdown-item-status.item-new {
  background: linear-gradient(90deg, rgb(47, 203, 203) 1%, rgb(139, 61, 255) 100%);
}

.fp-dropdown-menu-grouped {
  padding: 15px;
  box-sizing: border-box;
  width: min(1200px, calc(100% - 32px));
  min-width: 0;
  max-height: calc(100vh - 76px);
  max-height: calc(100dvh - 76px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 25px;
  left: 50%;
  transform: translateX(-50%);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
@media (min-width: 769px) {
  .fp-nav-item-grouped {
    position: static;
  }
}
.fp-dropdown-menu.fp-dropdown-menu-grouped.fp-show {
  display: grid;
}

.fp-dropdown-submenu {
  margin-bottom: 0;
  flex: 0 0 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.fp-dropdown-submenu-group {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.group-break-column {
  break-after: column;
}

.fp-dropdown-group-title {
  color: #666;
  padding: 5px 15px;
  font-size: 15px;
  margin-top: 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
  font-weight: bold;
}

/* 用户菜单特殊样式 - 增加间距 */
.fp-user-menu .fp-dropdown-toggle {
  padding-right: 28px; /* 从24px增加到28px */
}

.fp-user-menu .fp-dropdown-menu {
  right: 0;
  left: auto;
}

/* ==================== 语言选择器 ==================== */
.fp-language-item {
  margin-left: 10px;
}

.fp-language-switcher {
  position: relative;
}

.fp-language-select {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 6px 24px 6px 12px;
  font-size: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.fp-language-select:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.fp-language-select option {
  color: #000;
}

/* ==================== 移动端适配 ==================== */
/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {
  .fp-nav-menu {
    position: fixed;
    top: 60px; /* 从顶部开始，紧贴导航栏 */
    right: 0;
    width: 60%;
    height: calc(100vh - 60px); /* 减去导航栏高度 */
    background-color: #000;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0; /* 移除内边距，使菜单紧贴顶部 */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    z-index: 999;
    transform: translateX(100%)
  }

  .fp-nav-menu.fp-active {
    transform: translateX(0)
  }

  .fp-nav-list {
    flex-direction: column;
    align-items: stretch;
    justify-content: start;
    gap: 0;
    padding-top: 0; /* 移除顶部内边距 */
  }

  .fp-nav-item {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.1); /* 添加分割线 */
  }

  .fp-nav-item > a {
    padding: 16px 24px; /* 增加垂直内边距 */
    height: auto;
    justify-content: space-between; /* 文字和箭头分居两侧 */
  }

  /* 移动端下拉箭头调整 */
  .fp-nav-item.has-dropdown > a::after,
  .fp-dropdown-toggle::after {
    right: 24px;
    transform: translateY(-50%) rotate(0deg); /* 初始状态箭头朝下 */
  }

  .fp-nav-item.has-dropdown > a.fp-active::after,
  .fp-dropdown-toggle.fp-active::after {
    transform: translateY(-50%) rotate(180deg); /* 激活状态箭头朝上 */
  }

  /* 下拉菜单面板 - 移动端样式 */
  .fp-dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    background-color: rgba(0,0,0,0.2); /* 更深的背景色 */
    border-radius: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 1003;
  }

  .fp-dropdown-menu.fp-show {
    max-height: 2000px; /* 足够大的值确保展开 */
    background-color: #f5f5f5;
    gap: 10px;
  }

  .fp-dropdown-menu-grouped {
    transform: translateX(0);
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .fp-dropdown-menu-grouped.fp-show {
    max-height: none;
  }

  .fp-dropdown-item {
    color: #333;
    padding: 14px 32px;
    border-top: 1px solid rgba(255,255,255,0.05); /* 子菜单项分割线 */
  }

  /* 二级菜单特殊处理 - 在右侧展示 */
  .fp-dropdown-submenu > .fp-dropdown-menu {
    position: static;
    width: 90%; /* 稍微缩进 */
    margin-left: 10%;
    background-color: rgba(0,0,0,0.3); /* 更深一级的背景色 */
  }

  .fp-dropdown-submenu > a::after {
    border-left-color: #fff;
    right: 24px;
    transform: translateY(-50%) rotate(90deg); /* 初始状态箭头朝右 */
  }

  .fp-dropdown-submenu > a.fp-active::after {
    transform: translateY(-50%) rotate(270deg); /* 激活状态箭头朝下 */
  }

  .fp-dropdown-group-title {
    border-bottom: 1px solid #ccc;
    padding: 14px 32px;
  }

  /* 语言选择器调整 */
  .fp-language-item {
    margin-left: 0;
  }

  .fp-language-select {
    width: 100%;
    max-width: 150px;
    padding: 8px 36px 8px 16px;
  }
}

/* ==================== 移动菜单按钮动画优化 ==================== */
.fp-mobile-menu-btn {
  transition: transform 0.3s ease;
}

.fp-mobile-menu-btn.fp-active {
  transform: rotate(90deg);
}

.fp-mobile-menu-btn span {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== 移动菜单按钮 ==================== */
.fp-mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.fp-mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #fff;
  margin: 3px 0;
  transition: all 0.3s ease;
}

.fp-mobile-menu-btn.fp-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.fp-mobile-menu-btn.fp-active span:nth-child(2) {
  opacity: 0;
}

.fp-mobile-menu-btn.fp-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .fp-mobile-menu-btn {
    display: flex;
  }
  
  body.fp-mobile-menu-open {
    overflow: hidden;
  }
}

/* 用户菜单特殊样式 */
.fp-user-menu-item .fp-dropdown-toggle {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fp-user-menu-item .fp-user-email {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== Signed-in state ====================
 * <html data-gm-auth="member|guest"> is set by the inline script after the
 * prerendered header and kept current by header.js. Guests are the default.
 */
html:not([data-gm-auth="member"]) .fp-header .fp-nav-item[data-auth="true"],
html[data-gm-auth="member"] .fp-header .fp-nav-item[data-auth="false"] {
  display: none;
}

/* ==================== GameMall header theme ====================
 * Light storefront header: white bar, ink text, pill nav, black Sign up
 * button. Red stays on the logo only (see gamemall-brand).
 */
.fp-header-wrap {
  background-color: #fff !important;
}

.fp-header {
  background-color: #fff;
  border-bottom: 1px solid #e8e8ec;
  box-shadow: none;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans SC', sans-serif;
}

.fp-container {
  padding: 0 24px;
  box-sizing: border-box;
}

.gm-logo-word {
  color: var(--gm-ink);
}

.fp-nav-list {
  gap: 4px;
}

@media (min-width: 769px) {
  .fp-nav-item {
    height: 60px;
  }
}

.fp-nav-item > a,
.fp-nav-item > span {
  color: var(--gm-slate) !important;
  font-size: 15px;
  font-weight: 500;
  text-transform: none;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--gm-radius-control);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.fp-nav-item > a:hover,
.fp-nav-item > span:hover,
.fp-nav-item > a.fp-active,
.fp-nav-item > a.gm-nav-current {
  color: var(--gm-ink) !important;
  background-color: #f2f2f5;
}

.fp-nav-item > a.gm-nav-current {
  font-weight: 600;
}

.fp-nav-item > a:focus-visible,
.fp-nav-item > span:focus-visible {
  outline: 2px solid var(--gm-ink);
  outline-offset: 2px;
}

.fp-nav-item > a.fp-dropdown-toggle,
.fp-nav-item > span.fp-dropdown-toggle {
  padding-right: 32px;
}

.fp-nav-item.has-dropdown > a::after,
.fp-dropdown-toggle::after,
.fp-nav-item > a.fp-dropdown-toggle::after {
  right: 14px;
  border-top-color: currentColor;
}

/* Language toggle: globe icon before the current language name. */
.fp-nav-item.fp-language-item > a.fp-dropdown-toggle {
  padding-left: 36px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a4d57' stroke-width='2'%3e%3ccircle cx='12' cy='12' r='9'/%3e%3cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3Z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 18px;
}

/* Sign in stays a text link; Sign up is the one filled button. */
.fp-nav-item > a[data-url-key="nav.register"] {
  margin-left: 6px;
  padding: 0 16px;
  border: 1px solid var(--gm-line-strong);
  border-radius: var(--gm-radius-control);
  background-color: #fff;
  color: var(--gm-ink) !important;
  font-weight: 600;
}

.fp-nav-item > a[data-url-key="nav.register"]:hover {
  border-color: #b9bac2;
  background-color: #fff;
}

.fp-user-menu-item .fp-dropdown-toggle {
  color: var(--gm-ink) !important;
}

.fp-dropdown-menu {
  border: 1px solid var(--gm-line);
  border-radius: var(--gm-radius-card);
  box-shadow: 0 12px 32px rgba(17, 19, 24, 0.08);
  padding: 6px;
}

.fp-dropdown-item {
  color: var(--gm-slate);
  border-radius: 8px;
  padding: 10px 12px;
}

.fp-dropdown-menu .fp-dropdown-item:hover {
  color: var(--gm-ink);
  background-color: #f2f2f5;
}

.fp-mobile-menu-btn span {
  background-color: var(--gm-ink);
}

@media (max-width: 768px) {
  .fp-container {
    padding: 0 16px;
  }

  .fp-nav-menu {
    background-color: #fff;
    border-left: 1px solid #e8e8ec;
    box-shadow: none;
    width: min(320px, 85%);
  }

  .fp-nav-menu.fp-active {
    box-shadow: -12px 0 32px rgba(17, 19, 24, 0.08);
  }

  .fp-nav-list {
    gap: 0;
  }

  .fp-nav-item {
    border-bottom: 1px solid #eeeef1;
  }

  .fp-nav-item > a,
  .fp-nav-item > span {
    height: auto;
    min-height: 52px;
    padding: 0 20px;
    border-radius: 0;
    justify-content: space-between;
  }

  .fp-nav-item > a.fp-dropdown-toggle,
  .fp-nav-item > span.fp-dropdown-toggle {
    padding-right: 44px;
  }

  .fp-nav-item.has-dropdown > a::after,
  .fp-dropdown-toggle::after,
  .fp-nav-item > a.fp-dropdown-toggle::after {
    right: 24px;
  }

  .fp-nav-item.fp-language-item > a.fp-dropdown-toggle {
    padding-left: 48px;
    background-position: 20px center;
  }

  .fp-nav-item:has(> a[data-url-key="nav.register"]) {
    border-bottom: 0;
    padding: 16px 20px;
    box-sizing: border-box;
  }

  .fp-nav-item > a[data-url-key="nav.register"] {
    margin-left: 0;
    min-height: 48px;
    justify-content: center;
    border-radius: var(--gm-radius-control);
  }

  .fp-dropdown-menu {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .fp-dropdown-menu.fp-show {
    background-color: var(--gm-paper);
  }

  .fp-dropdown-item {
    color: var(--gm-slate);
    padding: 14px 32px;
    border-radius: 0;
  }
}

/* ==================== Unread ticket reply dot ==================== */
.fp-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--gm-green, #087a38);
  vertical-align: middle;
}

.fp-mobile-menu-btn {
  position: relative;
}

.fp-mobile-menu-btn.fp-has-unread::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gm-green, #087a38);
  border: 2px solid #fff;
  box-sizing: content-box;
}

.fp-mobile-menu-btn.fp-has-unread.fp-active::after {
  display: none;
}

/* ==================== Toast ====================
 * UI spec v2 "Toast"; same look as the Vue app's .el-message (src/brand.css).
 * Top offset is set by showToast() so the stack sits below the header.
 */
.gm-toast-stack {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  pointer-events: none;
}

.gm-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(480px, 100%);
  padding: 12px 16px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--gm-line);
  border-radius: var(--gm-radius-control);
  box-shadow: 0 8px 24px rgba(17, 19, 24, 0.12);
  font-family: var(--gm-font-body);
  pointer-events: auto;
  animation: gm-toast-in 0.25s ease-out;
}

.gm-toast--leaving {
  animation: gm-toast-out 0.25s ease-in forwards;
}

.gm-toast__icon {
  display: inline-flex;
  flex-shrink: 0;
}

.gm-toast--success .gm-toast__icon { color: var(--gm-green); }
.gm-toast--error .gm-toast__icon { color: #f56c6c; }
.gm-toast--info .gm-toast__icon { color: var(--gm-slate); }

.gm-toast__text {
  margin: 0;
  color: var(--gm-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.gm-toast__close {
  flex-shrink: 0;
  border: 0;
  background: none;
  padding: 0 0 0 4px;
  color: var(--gm-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.gm-toast__close:hover { color: var(--gm-slate); }

@keyframes gm-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gm-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .gm-toast,
  .gm-toast--leaving { animation: none; }
}

/* GameMall footer: quiet, compact, Apple-style structure, but dressed like the
 * header: white surface, same #e8e8ec hairline, same logo size, same 1200px
 * shell and pill hover. Red only in the logo (see gamemall-brand ui-spec).
 * Tokens come from header.css (--gm-*), with fallbacks for pages without it. */
.fp-footer {
    --fp-ink: var(--gm-ink, #111318);
    --fp-slate: var(--gm-slate, #4a4d57);
    /* Readable secondary text: --gm-muted (#8a8d96, 3.3:1 on white) is only for
       disabled text, so the footer uses a grey that meets 4.5:1 (5.1:1). */
    --fp-muted: #6b6e78;
    --fp-line: #e8e8ec;
    --fp-chip: #f2f2f5;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 0 24px;
    color: var(--fp-slate);
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans SC', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    background: #fff;
    border-top: 1px solid var(--fp-line);
}

.fp-footer * {
    box-sizing: border-box;
}

.fp-footer .fp-container {
    display: block;
    width: 100%;
    /* The header's 1200px container includes its 24px gutters; the footer
     * puts its gutters on .fp-footer, so the content box is 1152px. This keeps
     * both logos on the same left edge on wide screens. */
    max-width: 1152px;
    margin: 0 auto;
    padding: 0;
}

.fp-footer a:focus-visible,
.fp-footer summary:focus-visible {
    outline: 2px solid var(--fp-ink);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Intro: logo + one-line positioning ---------- */
.fp-footer .fp-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 40px 0 28px;
    border-bottom: 1px solid var(--fp-line);
}

.fp-footer .fp-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: auto;
    text-decoration: none;
}

.fp-footer .fp-logo-img {
    display: block;
    width: 30px;
    height: 30px;
}

.fp-footer .gm-logo-word {
    font-family: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1;
    color: var(--fp-ink);
    white-space: nowrap;
}

.fp-footer .gm-logo-word span {
    color: var(--gm-red, #e60012);
}

.fp-footer .fp-intro-text {
    max-width: 720px;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--fp-slate);
}

.fp-footer .fp-platform-title {
    margin-right: 0.35em;
    font-family: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 800;
    color: var(--fp-ink);
}

.fp-footer .fp-platform-highlight {
    margin-left: 0.3em;
    color: var(--gm-green, #087a38);
}

/* Community icons (hidden while channel URLs are empty). */
.fp-footer .fp-social {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.fp-footer .fp-social-icon {
    position: relative;
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--fp-ink);
    transition: background-color 0.15s ease;
}

.fp-footer .fp-social-icon:hover {
    background: #2a2d35;
}

.fp-footer .fp-social-icon::before {
    content: '';
    position: absolute;
    inset: 7px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.fp-footer .fp-facebook::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23ffffff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.5 21v-7.8h2.6l.4-3h-3V8.3c0-.9.2-1.5 1.5-1.5h1.6V4.1c-.8-.1-1.6-.2-2.4-.2-2.4 0-4.1 1.5-4.1 4.1v2.2H7.9v3h2.7V21h2.9Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-twitter::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23ffffff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.4 3h3.1l-6.8 7.8 8 10.2h-6.3l-4.9-6.2L4.9 21H1.8L9 12.8 1.3 3h6.4l4.4 5.7L17.4 3Zm-1.1 16.2H18L6.8 4.7H5l11.3 14.5Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-youtube::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23ffffff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.5 7.1a3 3 0 0 0-2.1-2.1C17.6 4.5 12 4.5 12 4.5s-5.6 0-7.4.5a3 3 0 0 0-2.1 2.1C2 9 2 12 2 12s0 3 .5 4.9a3 3 0 0 0 2.1 2.1c1.8.5 7.4.5 7.4.5s5.6 0 7.4-.5a3 3 0 0 0 2.1-2.1C22 15 22 12 22 12s0-3-.5-4.9ZM10 15.5v-7l6 3.5-6 3.5Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-linkedin::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23ffffff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5 8.8H3.3V21h3.2V8.8ZM4.9 3A1.9 1.9 0 1 0 5 6.8 1.9 1.9 0 0 0 4.9 3Zm16 11c0-3.3-1.8-5.4-4.5-5.4-1.9 0-3.1 1-3.6 1.9V8.8H9.6V21h3.2v-6.2c0-1.9.9-3.1 2.5-3.1 1.5 0 2.3 1 2.3 3V21h3.3v-7Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-whatsapp::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.2 11.8a8.2 8.2 0 0 1-12.1 7.2L4 20l1.1-4a8.2 8.2 0 1 1 15.1-4.2Z'/%3E%3Cpath fill='%23ffffff' stroke='none' d='M8.4 7.4c.3-.5.6-.5.9-.5h.4c.2 0 .4.1.5.5l.8 2c.1.3.1.5-.1.7l-.6.7c-.2.2-.2.4-.1.6.7 1.2 1.6 2.1 2.9 2.8.2.1.4.1.6-.1l.8-1c.2-.2.4-.3.7-.2l2 .9c.3.1.5.3.5.5 0 .3-.2 1.5-.8 2-.6.6-1.5.8-2.4.6-1.1-.2-2.5-.8-4.2-2.3-2.2-1.9-3.6-4.3-3.7-5.5 0-.7.2-1.3.6-1.7Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-telegram::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23ffffff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.8 3.2 18.7 20c-.2 1.2-.9 1.5-1.9.9l-4.7-3.5-2.3 2.2c-.3.3-.5.5-1 .5l.3-4.8 8.8-8c.4-.3-.1-.5-.6-.2L6.4 14 1.7 12.5c-1-.3-1-1 .2-1.5L20.3 3.9c.9-.3 1.7.2 1.5-.7Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-qq::before {
    content: 'QQ';
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

/* ---------- Link columns ---------- */
.fp-footer .fp-footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    padding: 28px 0 32px;
    border-bottom: 1px solid var(--fp-line);
}

.fp-footer .fp-nav-section {
    min-width: 0;
}

.fp-footer .fp-nav-title {
    margin: 0 0 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--fp-ink);
}

.fp-footer .fp-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fp-footer .fp-nav-link {
    display: inline-block;
    padding: 4px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--fp-slate);
    text-decoration: none;
}

.fp-footer .fp-nav-link:hover,
.fp-footer .fp-legal-link:hover {
    color: var(--fp-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Support contact (inside the support column) */
.fp-footer .fp-support {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
    font-style: normal;
}

.fp-footer .fp-support-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    font-size: 12px;
}

.fp-footer .fp-support-row::before {
    content: '';
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.fp-footer .fp-support-row-mail::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%234a4d57' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}

.fp-footer .fp-support-row-time::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%234a4d57' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}


.fp-footer .fp-support-link {
    color: var(--fp-ink);
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.fp-footer .fp-support-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fp-footer .fp-support-meta {
    color: var(--fp-slate);
}

/* ---------- Bottom: merchant info, copyright, legal links, language ---------- */
.fp-footer .fp-footer-bottom {
    padding: 20px 0 32px;
}

.fp-footer .fp-legal-disclosure {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--fp-muted);
}

.fp-footer .fp-legal-title {
    font-weight: 600;
    color: var(--fp-slate);
}

.fp-footer .fp-legal-details {
    display: flex;
    flex-direction: column;
    flex: 1 1 100%;
    min-width: 0;
}

.fp-footer .fp-legal-line {
    margin: 0;
}

.fp-footer .fp-legal-value {
    color: var(--fp-muted);
}

.fp-footer .fp-footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 32px;
}

.fp-footer .fp-footer-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 32px;
    min-width: 0;
}

.fp-footer .fp-copyright {
    margin: 0;
    color: var(--fp-muted);
}

.fp-footer .fp-legal-links {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fp-footer .fp-legal-links li + li {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--fp-line);
}

.fp-footer .fp-legal-link {
    display: inline-block;
    padding: 4px 0;
    color: var(--fp-slate);
    text-decoration: none;
}

/* Language dropdown */
.fp-footer .fp-language-switcher {
    position: relative;
}

.fp-footer .fp-language-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    list-style: none;
    border-radius: var(--gm-radius-control, 10px);
    font-size: 12px;
    font-weight: 500;
    color: var(--fp-slate);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fp-footer .fp-language-toggle::-webkit-details-marker {
    display: none;
}

.fp-footer .fp-language-toggle:hover,
.fp-footer .fp-language-switcher[open] .fp-language-toggle {
    background: var(--fp-chip);
    color: var(--fp-ink);
}

.fp-footer .fp-language-globe,
.fp-footer .fp-language-caret {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.fp-footer .fp-language-globe {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%234a4d57' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-language-caret {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%234a4d57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    transition: transform 0.15s ease;
}

.fp-footer .fp-language-switcher[open] .fp-language-caret {
    transform: rotate(180deg);
}

.fp-footer .fp-language-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 10;
    min-width: 168px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--gm-line, #e6e6ea);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(17, 19, 24, 0.12);
}

.fp-footer .fp-language-link {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--gm-radius-control, 10px);
    font-size: 13px;
    color: var(--fp-slate);
    text-decoration: none;
}

.fp-footer .fp-language-link:hover,
.fp-footer .fp-language-link.is-active {
    background: var(--gm-chip, #f2f2f5);
    color: var(--fp-ink);
}

.fp-footer .fp-language-link.is-active {
    font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .fp-footer {
        padding: 0 16px;
    }

    .fp-footer .fp-intro {
        padding: 32px 0 24px;
    }

    .fp-footer .fp-footer-nav {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 0 24px;
    }

    .fp-footer .fp-legal-links {
        gap: 0 16px;
    }

    .fp-footer .fp-legal-links li + li {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }

    .fp-footer .fp-footer-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .fp-footer .fp-language-switcher {
        margin-left: -10px;
    }

    .fp-footer .fp-language-menu {
        left: 0;
        right: auto;
    }
}

/*
 * GameMall styles for the blog (VitePress, ../familypro_blog_system).
 * The build appends this file to header.css and footer.css as
 * fronted/sections/blog-sections.css, the one stylesheet the blog loads
 * (sites/gamemall/config/sites/gamemall.json "styles"). The --gm-* tokens from
 * header.css are available. Blog-only overrides; the rules follow the UI spec
 * (.agents/skills/gamemall-brand/references/ui-spec.md).
 *
 * The blog's components use scoped styles, and in the VitePress dev server the
 * theme's <style> tags land after this file. Component rules are therefore
 * prefixed with #VPContent so they win in both dev and the built site without
 * relying on load order.
 *
 * The URL carries no version query (the blog config does not allow one) and
 * the CDN caches it for hours: purge it after deploying a change.
 */

/* ==================== Theme tokens ==================== */

/* Map the VitePress and Element Plus palettes onto GameMall tokens so every
 * theme component (outline, tables, code, dividers) picks them up. Links and
 * selected states use ink, never red. The blog runs light-only
 * (appearance: false), so the dark palette is not mapped. */
:root {
  --vp-font-family-base: var(--gm-font-body);
  --vp-c-text-1: var(--gm-ink);
  --vp-c-text-2: var(--gm-slate);
  --vp-c-text-3: var(--gm-muted);
  --vp-c-divider: var(--gm-line);
  --vp-c-border: var(--gm-line-strong);
  --vp-c-gutter: var(--gm-line);
  --vp-c-bg: #fff;
  --vp-c-bg-alt: var(--gm-paper);
  --vp-c-bg-soft: var(--gm-paper);
  --vp-c-default-soft: var(--gm-chip);
  --vp-c-brand-1: var(--gm-ink);
  --vp-c-brand-2: var(--gm-slate);
  --vp-c-brand-3: var(--gm-ink);
  --vp-c-brand-soft: var(--gm-chip);
  --vp-code-color: var(--gm-ink);
  --vp-code-bg: var(--gm-chip);
  --el-font-family: var(--gm-font-body);
}

body {
  background: #fff;
  color: var(--gm-ink);
}

#VPContent a:focus-visible,
#VPContent button:focus-visible {
  outline: 2px solid var(--gm-ink);
  outline-offset: 2px;
}

/* ==================== Layout ==================== */

/* The GameMall header replaces the VitePress nav bar. */
.VPNav {
  display: none;
}

/* Its phone bar only offers "Return to top" on list pages and sticks over the
 * content below the (non-sticky) store header; articles use the blog's own
 * phone table of contents instead. */
.VPLocalNav {
  display: none;
}

#VPContent .VPDoc {
  padding-top: 32px !important;
}

/* Line the article up with the header: 1200px container, 24px gutter. */
@media (min-width: 1280px) {
  #VPContent .VPDoc {
    padding-left: 24px;
    padding-right: 24px;
  }

  #VPContent .VPDoc:not(.has-sidebar) .container {
    max-width: 1152px;
  }

  /* VitePress centres the article inside its column; start it at the
   * container edge instead, under the logo. */
  #VPContent .VPDoc.has-aside .container {
    justify-content: space-between;
  }

  #VPContent .VPDoc.has-aside .container > .content {
    max-width: 744px;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  #VPContent .VPDoc.has-aside .content-container {
    max-width: 744px;
    margin: 0;
  }

  /* Right column: a 320px sticky panel, like the purchase panel on the
   * product page. */
  #VPContent .VPDoc.has-aside .container {
    gap: 48px;
  }

  #VPContent .VPDoc.has-aside .aside {
    flex: 0 0 320px;
    max-width: 320px;
  }

  #VPContent .aside-container {
    width: 100%;
    top: 24px;
    height: auto;
    max-height: calc(100vh - 48px);
    padding-top: 0;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  #VPContent .aside-content {
    min-height: 0;
    padding-bottom: 0;
  }

  #VPContent .VPDocAside {
    padding: 20px;
    border: 1px solid var(--gm-line);
    border-radius: var(--gm-radius-card);
    background: #fff;
  }

  #VPContent .VPDocAside .spacer {
    display: none;
  }
}

@media (max-width: 1279px) {
  .blog-article-page #VPContent .VPDoc {
    padding-top: 16px !important;
  }
}

@media (max-width: 768px) {
  #VPContent .VPDoc {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ==================== Article body ==================== */

.vp-doc h1,
.vp-doc h2,
.vp-doc h3 {
  font-family: var(--gm-font-brand);
  color: var(--gm-ink);
}

.vp-doc h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Sections are separated by space, not rules, as on the store pages. */
.vp-doc h2 {
  margin: 56px 0 16px;
  padding-top: 0;
  border-top: 0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.vp-doc h3 {
  margin: 32px 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.vp-doc p,
.vp-doc li {
  color: var(--gm-ink);
}

/* Lead paragraph right under the title. */
.vp-doc > div > p:first-of-type {
  font-size: 18px;
  line-height: 1.7;
  color: var(--gm-slate);
}

.vp-doc ul > li::marker,
.vp-doc ol > li::marker {
  color: var(--gm-slate);
}

.vp-doc hr {
  border-top-color: var(--gm-line);
}

.vp-doc strong {
  color: var(--gm-ink);
  font-weight: 700;
}

.vp-doc a,
.vp-doc a:hover {
  color: var(--gm-ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vp-doc a:hover {
  color: var(--gm-slate);
}

.vp-doc img {
  border-radius: var(--gm-radius-card);
}

/* Tables: line borders, paper header row, no zebra stripes. VitePress makes
 * the table a scrolling block, so borders stay on the cells. */
.vp-doc tr,
.vp-doc tr:nth-child(2n) {
  background: #fff;
}

.vp-doc th,
.vp-doc td {
  border-color: var(--gm-line);
  font-size: 14px;
}

.vp-doc th {
  background: var(--gm-paper);
  color: var(--gm-slate);
  font-weight: 600;
}

/* From tablet up, tables fill the column inside one rounded border, like a
 * card. On phones they stay a horizontally scrolling block. */
@media (min-width: 769px) {
  .vp-doc table {
    display: table;
    width: 100%;
    margin: 24px 0;
    border: 1px solid var(--gm-line);
    border-radius: var(--gm-radius-control);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
  }

  .vp-doc tr {
    border: 0;
  }

  .vp-doc th,
  .vp-doc td {
    border: 0;
    border-bottom: 1px solid var(--gm-line);
    padding: 12px 16px;
  }

  .vp-doc tbody tr:last-child td {
    border-bottom: 0;
  }
}

.vp-doc blockquote {
  border-left: 2px solid var(--gm-line-strong);
  color: var(--gm-slate);
}

@media (max-width: 768px) {
  .vp-doc h1 {
    font-size: 28px;
  }

  .vp-doc h2 {
    margin-top: 40px;
    font-size: 24px;
  }

  .vp-doc > div > p:first-of-type {
    font-size: 16px;
  }

  .vp-doc h3 {
    font-size: 18px;
  }

  .vp-doc p,
  .vp-doc li {
    font-size: 15px;
  }
}

/* Breadcrumb: 13px slate, like the product page. */
#VPContent .breadcrumb {
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 0;
  font-size: 13px;
}

#VPContent .breadcrumb-link {
  color: var(--gm-slate);
}

#VPContent .breadcrumb-link:hover {
  color: var(--gm-ink);
  text-decoration: underline;
}

#VPContent .breadcrumb-current,
#VPContent .breadcrumb-separator {
  color: var(--gm-slate);
}

/* ==================== Article aside ==================== */

/* Author block at the top of the panel, divided from the contents list. */
#VPContent .blog-author-info {
  margin: 0 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gm-line);
}

#VPContent .blog-author-avatar {
  width: 40px;
  height: 40px;
  background: var(--gm-paper);
}

#VPContent .blog-author-name {
  margin-top: 0;
  color: var(--gm-ink);
  font-family: var(--gm-font-brand);
  font-size: 16px;
  font-weight: 700;
}

#VPContent .blog-author-avatar-link + .blog-author-name {
  margin-top: 8px;
}

#VPContent .blog-author-name:hover {
  color: var(--gm-ink);
  text-decoration: underline;
}

#VPContent .blog-author-job-title,
#VPContent .blog-post-dates {
  color: var(--gm-slate);
  font-size: 13px;
}

#VPContent .blog-post-dates {
  margin-top: 4px;
}

.VPDocAsideOutline .outline-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gm-slate);
}

/* Contents: wrap long Chinese headings instead of cutting them off. */
.VPDocAsideOutline .outline-link {
  padding: 5px 0;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  line-height: 1.45;
  font-size: 13px;
  color: var(--gm-slate);
}

.VPDocAsideOutline .outline-link:hover {
  color: var(--gm-ink);
}

.VPDocAsideOutline .outline-link.active {
  color: var(--gm-ink);
  font-weight: 600;
}

.VPDocAsideOutline .outline-marker {
  width: 2px;
  background-color: var(--gm-ink);
}

/* Recommended products: prices are red where the reader can buy. */
#VPContent .recommended-products .heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gm-slate);
}

#VPContent .recommended-products .product {
  border-color: var(--gm-line);
  border-radius: var(--gm-radius-control);
}

#VPContent .recommended-products .product:hover {
  border-color: #c9cad1;
}

#VPContent .recommended-products .product img {
  background: var(--gm-paper);
}

#VPContent .recommended-products .product strong {
  font-family: var(--gm-font-brand);
  font-weight: 700;
}

#VPContent .recommended-products .product small {
  color: var(--gm-red);
  font-family: var(--gm-font-brand);
  font-weight: 800;
}

/* Phone table of contents */
#VPContent .mobile-article-toc {
  border-color: var(--gm-line);
  border-radius: var(--gm-radius-control);
}

#VPContent .mobile-article-toc.sticky {
  border-radius: 0;
  border-width: 0 0 1px;
  box-shadow: none;
}

#VPContent .mobile-article-toc a[aria-current] {
  color: var(--gm-ink);
  font-weight: 600;
}

/* ==================== After the article ==================== */

#VPContent .recommended-posts h2 {
  margin: 0 0 24px;
  font-family: var(--gm-font-brand);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gm-ink);
}

#VPContent .post-card {
  border-color: var(--gm-line);
  border-radius: var(--gm-radius-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

#VPContent .post-card:hover {
  border-color: #c9cad1;
  transform: translateY(-2px);
}

#VPContent .post-card img {
  border-radius: var(--gm-radius-control);
  background: var(--gm-paper);
}

#VPContent .post-card h3 {
  font-family: var(--gm-font-brand);
  font-weight: 700;
  color: var(--gm-ink);
}

#VPContent .share-container {
  margin-top: 48px;
}

#VPContent .share-header {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gm-slate);
}

#VPContent .share-btn {
  background: #fff;
  border: 1px solid var(--gm-line-strong);
  color: var(--gm-ink);
}

#VPContent .share-btn:hover {
  background: var(--gm-chip);
}

/* ==================== Blog home and author page ==================== */

#VPContent .site-blog-intro {
  max-width: 1200px;
  padding: 48px 24px 8px;
  text-align: left;
}

#VPContent .site-blog-intro h1,
#VPContent .author-name {
  margin: 0 0 12px;
  font-family: var(--gm-font-brand);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--gm-ink);
}

#VPContent .site-blog-intro p {
  max-width: 640px;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gm-slate);
}

#VPContent .author-page {
  max-width: 1200px;
  padding: 48px 24px 0;
}

#VPContent .author-profile {
  max-width: none;
  margin: 0 0 48px;
  padding: 0;
  gap: 24px;
}

#VPContent .author-avatar {
  width: 88px;
  height: 88px;
  background: var(--gm-paper);
}

#VPContent .author-job-title {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--gm-slate);
}

#VPContent .author-description {
  color: var(--gm-slate);
}

#VPContent .follow-x-btn {
  border-color: var(--gm-line-strong);
  border-radius: var(--gm-radius-control);
  color: var(--gm-ink);
}

#VPContent .follow-x-btn:hover {
  background: var(--gm-chip);
  box-shadow: none;
}

#VPContent .author-articles {
  padding: 0;
}

#VPContent .articles-heading {
  margin: 0;
  font-family: var(--gm-font-brand);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gm-ink);
  text-align: left;
}

#VPContent .article-empty {
  color: var(--gm-slate);
  text-align: left;
}

#VPContent .author-articles .blog-container {
  padding: 24px 0 0;
}

/* Post list */
#VPContent .blog-container {
  max-width: 1200px;
  padding: 32px 24px 24px;
}

#VPContent .category-filter {
  margin-bottom: 32px;
}

#VPContent .filter-header {
  margin-bottom: 12px;
}

#VPContent .filter-header h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gm-slate);
}

/* Category chips: the home page's platform filter. */
#VPContent .category-btn {
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--gm-line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--gm-ink);
  font-family: var(--gm-font-body);
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#VPContent .category-btn:hover {
  background: var(--gm-chip);
  border-color: var(--gm-line-strong);
  transform: none;
}

#VPContent .category-btn.active {
  background: var(--gm-ink);
  border-color: var(--gm-ink);
  color: #fff;
  font-weight: 600;
}

#VPContent .category-name {
  font-weight: inherit;
}

#VPContent .category-count {
  color: var(--gm-slate);
  font-size: 13px;
}

#VPContent .category-btn.active .category-count {
  color: rgba(255, 255, 255, 0.75);
}

#VPContent .blog-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

#VPContent .blog-item {
  min-width: 0;
  max-width: none;
}

/* Post card: white, 1px line, radius 16, no shadow; hover darkens the border. */
#VPContent .blog-link {
  border-radius: var(--gm-radius-card);
  transition: transform 0.2s ease;
}

#VPContent .blog-link:hover {
  transform: translateY(-2px);
}

#VPContent .blog-link:focus {
  outline: none;
}

#VPContent .blog-link:focus-visible {
  outline: 2px solid var(--gm-ink);
  outline-offset: 2px;
}

#VPContent .blog-article {
  border: 1px solid var(--gm-line);
  border-radius: var(--gm-radius-card);
  box-shadow: none;
  transition: border-color 0.2s ease;
}

#VPContent .blog-link:hover .blog-article {
  border-color: #c9cad1;
  box-shadow: none;
}

#VPContent .blog-image-container {
  background: var(--gm-paper);
}

#VPContent .blog-link:hover .blog-image {
  transform: none;
}

#VPContent .blog-content {
  padding: 20px;
}

#VPContent .blog-category {
  margin-bottom: 10px;
}

#VPContent .category-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gm-chip);
  color: var(--gm-slate);
  font-size: 12px;
  font-weight: 600;
}

#VPContent .blog-title {
  margin: 0 0 12px;
  border: 0;
  padding: 0;
  font-family: var(--gm-font-brand);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  color: var(--gm-ink);
}

#VPContent .blog-date {
  font-size: 13px;
  color: var(--gm-slate);
}

#VPContent .empty-blog-list {
  color: var(--gm-slate);
  text-align: left;
}

/* Pagination: ink for the current page, control radius. */
#VPContent .pagination-container {
  margin-top: 48px;
}

#VPContent .el-pagination {
  --el-color-primary: var(--gm-ink);
  --el-pagination-button-bg-color: #fff;
  --el-pagination-hover-color: var(--gm-ink);
  --el-pagination-border-radius: var(--gm-radius-control);
  --el-pagination-font-size: 14px;
  font-family: var(--gm-font-body);
}

#VPContent .el-pagination.is-background .btn-prev,
#VPContent .el-pagination.is-background .btn-next,
#VPContent .el-pagination.is-background .el-pager li {
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--gm-line-strong);
  border-radius: var(--gm-radius-control);
}

#VPContent .el-pagination.is-background .el-pager li.is-active {
  border-color: var(--gm-ink);
}

#VPContent .el-pagination .el-input__wrapper {
  border-radius: var(--gm-radius-control);
}

@media (max-width: 1024px) {
  #VPContent .blog-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  #VPContent .site-blog-intro {
    padding: 32px 16px 0;
  }

  #VPContent .site-blog-intro h1,
  #VPContent .author-name {
    font-size: 28px;
  }

  #VPContent .site-blog-intro p {
    font-size: 15px;
  }

  #VPContent .blog-container {
    padding: 24px 16px 16px;
  }

  #VPContent .author-page {
    padding: 32px 16px 0;
  }

  #VPContent .author-profile {
    align-items: flex-start;
    text-align: left;
  }

  #VPContent .articles-heading,
  #VPContent .recommended-posts h2 {
    font-size: 24px;
  }

  #VPContent .blog-list {
    gap: 16px;
  }

  #VPContent .blog-title {
    font-size: 18px;
  }
}

@media (max-width: 640px) {
  #VPContent .blog-list {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

@media (max-width: 430px) {
  #VPContent .blog-title {
    font-size: 16px;
  }
}

/* ==================== Review fixes (2026-11-25) ==================== */

/* Breadcrumb ends at "Blog": the article title is the H1 right below, and the
 * SEO title in the last crumb is long and worded differently. The structured
 * data breadcrumb is built separately and keeps the full trail. */
#VPContent .article-breadcrumb .breadcrumb-item:last-child,
#VPContent .article-breadcrumb .breadcrumb-item:nth-last-child(2) .breadcrumb-separator {
  display: none;
}

/* Author and date above the title on phone and tablet, where the right-hand
 * panel that holds them is hidden (the theme renders this block for GameMall
 * only). */
#VPContent .gm-article-meta {
  display: none;
}

@media (max-width: 1279px) {
  #VPContent .gm-article-meta {
    display: block;
    margin: 0 0 12px;
  }

  #VPContent .gm-article-meta .blog-author-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: baseline;
    text-align: left;
    gap: 4px 8px;
    margin: 0;
    padding: 0;
    border: 0;
  }

  #VPContent .gm-article-meta .blog-author-avatar-link,
  #VPContent .gm-article-meta .blog-author-job-title {
    display: none;
  }

  #VPContent .gm-article-meta .blog-author-name {
    margin: 0;
    font-family: var(--gm-font-body);
    font-size: 13px;
    font-weight: 600;
  }

  #VPContent .gm-article-meta .blog-post-dates {
    display: flex;
    gap: 8px;
    margin: 0;
  }

  #VPContent .gm-article-meta .blog-post-dates p {
    margin: 0;
    line-height: 1.4;
  }

  #VPContent .gm-article-meta .blog-post-dates p::before {
    content: '·';
    margin-right: 8px;
  }
}

/* The product card also closes the article on desktop; in the right-hand
 * panel it sits under a long contents list and is often off screen. */
@media (min-width: 1280px) {
  #VPContent .mobile-recommended-products {
    display: block;
    margin-top: 48px;
  }
}

/* Post list: no filter row while there is only one category, no pager while
 * there is only one page. */
#VPContent .category-filter:has(.category-btn:nth-child(2):last-child),
#VPContent .pagination-container:has(.el-pager li:only-child) {
  display: none;
}

/* Phone tables: the first column stays put while the rest scrolls, wrapping
 * less, and a soft edge shadow shows there is more to the side. The shadow is
 * the classic background-attachment trick: white covers scroll with the
 * content and hide the shadows at either end. Cells are transparent so the
 * shadows show through; the sticky column keeps a white background. */
@media (max-width: 768px) {
  .vp-doc table {
    margin: 20px 0;
    background:
      linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) left center / 32px 100% no-repeat local,
      linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) right center / 32px 100% no-repeat local,
      radial-gradient(farthest-side at 100% 50%, rgba(17, 19, 24, 0.16), rgba(17, 19, 24, 0)) right center / 12px 100% no-repeat scroll;
    -webkit-overflow-scrolling: touch;
  }

  .vp-doc tr,
  .vp-doc tr:nth-child(2n) {
    background: transparent;
  }

  .vp-doc th,
  .vp-doc td {
    min-width: 96px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
  }

  .vp-doc th:first-child,
  .vp-doc td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 148px;
    max-width: 168px;
    background: #fff;
    box-shadow: inset -1px 0 0 var(--gm-line);
  }

  .vp-doc th:first-child {
    background: var(--gm-paper);
  }
}
