@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;700;800&display=swap');

/* 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; }
}
