:root {
  --bg: #f3f5f8;
  --surface: #fff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --text-2: #475467;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --navy: #0e1a30;
  --blue: #2563eb;
  --blue-soft: #eff4ff;
  --amber: #d97706;
  --amber-soft: #fff7e8;
  --green: #079455;
  --green-soft: #ecfdf3;
  --red: #d92d20;
  --red-soft: #fef3f2;
  --shadow: 0 8px 28px rgba(16, 24, 40, 0.055);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 90% 0%, rgba(37, 99, 235, 0.045), transparent 26%),
    var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 max(22px, calc((100vw - 1460px) / 2));
  color: #fff;
  background: rgba(14, 26, 48, 0.97);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--navy);
  border-radius: 9px;
  background: #f4c66a;
  font: 800 14px Georgia, serif;
  letter-spacing: -0.04em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font: 700 14px Georgia, serif;
  letter-spacing: 0.12em;
}

.brand small {
  margin-top: 3px;
  color: #aebbd0;
  font-size: 10px;
}

.top-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 28px;
}

.top-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: #aebbd0;
  text-decoration: none;
  font-size: 12px;
}

.top-nav a:hover,
.top-nav a.active {
  color: #fff;
}

.top-nav a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #f4c66a;
}

.service-state {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c4cedd;
  font-size: 10px;
}

.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #47cd89;
  box-shadow: 0 0 0 4px rgba(71, 205, 137, 0.12);
}

.app {
  width: min(1460px, calc(100% - 40px));
  min-height: calc(100vh - 108px);
  margin: 0 auto;
  padding: 27px 0 30px;
}

.initial-loading,
.view-loading,
.error-view {
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 12px;
}

.error-view {
  color: var(--red);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #dbe4f0;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.kicker {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.page-heading h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.page-heading p:not(.kicker) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.heading-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

.primitive-button,
.back-button,
.watch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  font-size: 10px;
}

.primitive-button.primary,
.watch-button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.primitive-button:hover,
.back-button:hover,
.watch-button:hover {
  border-color: #9db8f5;
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card,
.panel,
.game-card,
.pulse-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 88px;
  padding: 14px 16px;
}

.stat-card span,
.stat-card strong {
  display: block;
}

.stat-card span {
  color: var(--muted);
  font-size: 9px;
}

.stat-card strong {
  margin-top: 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.games-board {
  padding: 17px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 17px;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.section-head a {
  color: var(--blue);
  font-size: 9px;
  text-decoration: none;
}

.game-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.game-card {
  min-height: 172px;
  padding: 15px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
}

.game-card:hover {
  border-color: #b8c9f4;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.07);
}

.game-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-card-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 9px;
  background: var(--accent);
  font: 700 16px Georgia, serif;
}

.game-card-name {
  min-width: 0;
}

.game-card-name strong,
.game-card-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card-name strong {
  font-size: 13px;
}

.game-card-name small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.status-pill {
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 99px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 8px;
}

.status-pill.demo {
  color: #b54708;
  background: var(--amber-soft);
}

.game-card-desc {
  min-height: 32px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.game-card-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.game-card-data span,
.game-card-data strong {
  display: block;
}

.game-card-data span {
  color: var(--faint);
  font-size: 7px;
}

.game-card-data strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-2);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.watch-card {
  padding: 17px;
}

.watch-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.watch-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  text-decoration: none;
}

.watch-item:hover {
  border-color: #b8c9f4;
}

.watch-item-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 7px;
  background: var(--accent, var(--blue));
  font: 700 11px Georgia, serif;
}

.watch-item-copy {
  min-width: 0;
  flex: 1;
}

.watch-item-copy strong,
.watch-item-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-item-copy strong {
  font-size: 10px;
}

.watch-item-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.watch-item-price {
  text-align: right;
}

.watch-item-price strong {
  display: block;
  color: var(--text);
  font: 600 10px "Segoe UI", Arial, sans-serif;
}

.watch-item-price small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.watch-empty {
  padding: 18px 12px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
  font-size: 9px;
  line-height: 1.7;
}

.health-card {
  padding: 17px;
}

.health-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.health-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 8px;
}

.health-row .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.health-row .dot.demo {
  background: var(--amber);
}

.health-row strong {
  margin-left: auto;
  color: var(--text-2);
  font-size: 8px;
  font-weight: 500;
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.pulse-card {
  padding: 15px;
}

.pulse-list {
  display: grid;
  gap: 0;
  margin-top: 9px;
}

.pulse-row {
  min-height: 43px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #f0f2f5;
  color: var(--muted);
  font-size: 9px;
  text-decoration: none;
}

.pulse-row:last-child {
  border-bottom: 0;
}

.pulse-asset {
  min-width: 0;
}

.pulse-asset strong,
.pulse-asset small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-asset strong {
  color: var(--text);
  font-size: 9px;
}

.pulse-asset small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 7px;
}

.pulse-value {
  color: var(--text-2);
  font: 600 9px "Segoe UI", Arial, sans-serif;
}

.pulse-change {
  min-width: 42px;
  text-align: right;
  font: 600 9px "Segoe UI", Arial, sans-serif;
}

.change-up {
  color: var(--red) !important;
}

.change-down {
  color: var(--green) !important;
}

.pulse-skeleton {
  height: 38px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, #f5f7fa, transparent);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 9px;
}

.breadcrumbs a {
  color: var(--blue);
  text-decoration: none;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.game-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-mark {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 11px;
  background: var(--game-accent, var(--blue));
  font: 700 19px Georgia, serif;
}

.game-identity h1 {
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 25px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-identity p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.market-control {
  display: grid;
  gap: 5px;
}

.market-control label {
  color: var(--muted);
  font-size: 8px;
}

.market-control select {
  min-width: 180px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  background: #fff;
  font-size: 10px;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.game-table-panel {
  padding: 17px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 13px 0 10px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
}

.filter-button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 9px;
}

.filter-button.active {
  color: var(--blue);
  border-color: #b8c9f4;
  background: var(--blue-soft);
}

.table-search {
  width: 230px;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-soft);
}

.table-search span {
  color: var(--muted);
}

.table-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
}

.game-table-scroll {
  overflow-x: auto;
}

.game-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  table-layout: fixed;
}

.game-table th {
  height: 36px;
  padding: 0 7px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  text-align: right;
  font-size: 9px;
  font-weight: 500;
}

.game-table th:first-child {
  width: 27%;
  text-align: left;
}

.game-table th:nth-child(2) {
  width: 11%;
}

.game-table th:nth-child(3) {
  width: 16%;
}

.game-table th:nth-child(4) {
  width: 10%;
}

.game-table th:nth-child(5) {
  width: 12%;
}

.game-table th:nth-child(6) {
  width: 10%;
}

.game-table th:last-child {
  width: 50px;
  text-align: center;
}

.sort-button {
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: inherit;
}

.sort-button.active {
  color: var(--blue);
}

.game-table td {
  height: 59px;
  padding: 8px 7px;
  border-bottom: 1px solid #f0f2f5;
  color: var(--text-2);
  text-align: right;
  font-size: 10px;
}

.game-table tbody tr {
  cursor: pointer;
}

.game-table tbody tr:hover td {
  background: #f9fbfd;
}

.game-table td:first-child {
  text-align: left;
}

.game-table td:last-child {
  text-align: center;
}

.asset-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.asset-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--blue);
  border: 1px solid #dbe4f0;
  border-radius: 7px;
  background: var(--surface-soft);
  font-family: "Songti SC", serif;
  font-weight: 700;
}

.asset-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.asset-copy {
  min-width: 0;
}

.asset-copy strong,
.asset-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-copy strong {
  color: var(--text);
  font-size: 10px;
}

.asset-copy small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 8px;
}

.favorite-button {
  width: 28px;
  height: 28px;
  color: var(--faint);
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.favorite-button:hover {
  background: var(--surface-soft);
}

.favorite-button.active {
  color: #e39a17;
}

.empty-row {
  height: 150px !important;
  color: var(--muted) !important;
  text-align: center !important;
  cursor: default !important;
}

.item-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.item-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-title .asset-mark {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.item-title h1 {
  margin: 0;
  overflow: hidden;
  font-size: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.item-actions {
  display: flex;
  gap: 7px;
}

.item-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.item-kpi {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.item-kpi span,
.item-kpi strong {
  display: block;
}

.item-kpi span {
  color: var(--muted);
  font-size: 8px;
}

.item-kpi strong {
  margin-top: 7px;
  overflow: hidden;
  color: var(--text);
  font: 700 20px "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-kpi small {
  margin-left: 4px;
  color: var(--muted);
  font: 400 8px "Microsoft YaHei", sans-serif;
}

.chart-panel {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.chart-head h2 {
  margin: 0;
  font-size: 17px;
}

.chart-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.chart-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.legend {
  display: flex;
  gap: 13px;
  color: var(--muted);
  font-size: 9px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend i {
  width: 13px;
  height: 3px;
  border-radius: 99px;
}

.legend .price {
  background: var(--blue);
}

.legend .volume {
  background: #b9cdf7;
}

.range-tabs {
  display: flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.range-tab {
  padding: 6px 9px;
  color: var(--muted);
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.range-tab.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.chart-summary {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.chart-summary b {
  margin-left: 4px;
  color: var(--text);
}

.chart-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 2px;
}

.chart-wrap svg {
  width: 100%;
  height: 390px;
  display: block;
}

.chart-tooltip {
  position: absolute;
  z-index: 4;
  width: 166px;
  padding: 10px 11px;
  pointer-events: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16);
  font-size: 10px;
}

.tooltip-date {
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 600;
}

.tooltip-price {
  color: var(--text);
  font: 700 15px "Segoe UI", Arial, sans-serif;
}

.tooltip-price span {
  color: var(--muted);
  font: 400 8px "Microsoft YaHei", sans-serif;
}

.tooltip-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.chart-empty {
  min-height: 330px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  line-height: 1.7;
}

.item-lower {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 11px;
}

.info-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow);
}

.info-card h3 {
  margin: 0 0 8px;
  font-size: 11px;
}

.info-row {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  border-bottom: 1px solid #f0f2f5;
  color: var(--muted);
  font-size: 9px;
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row strong {
  max-width: 60%;
  overflow: hidden;
  color: var(--text-2);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.source-note {
  margin-top: 7px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
}

.cross-server-card {
  margin-top: 11px;
  padding: 15px;
  border: 1px solid #f0d49e;
  border-radius: 10px;
  background: var(--amber-soft);
}

.cross-server-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cross-server-head h3 {
  margin: 0;
  font-size: 12px;
}

.cross-server-head span {
  color: #9a6700;
  font-size: 8px;
}

.cross-server-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.cross-box {
  padding: 10px;
  border: 1px solid rgba(217, 119, 6, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.62);
}

.cross-box span,
.cross-box strong {
  display: block;
}

.cross-box span {
  color: #8a5b07;
  font-size: 8px;
}

.cross-box strong {
  margin-top: 4px;
  color: var(--text);
  font: 700 14px "Segoe UI", Arial, sans-serif;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.source-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow);
}

.source-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.source-card-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  background: var(--accent);
  font: 700 14px Georgia, serif;
}

.source-card-head h2 {
  margin: 0;
  font-size: 14px;
}

.source-card-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.source-card ul {
  margin: 13px 0 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.75;
}

.source-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.source-card-footer span {
  color: var(--muted);
  font-size: 8px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: 320px;
  padding: 11px 14px;
  color: #fff;
  border-radius: 8px;
  background: var(--navy);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.22);
  font-size: 10px;
}

.mobile-nav {
  display: none;
}

.page-footer {
  width: min(1460px, calc(100% - 40px));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 0 2px 23px;
  color: var(--faint);
  font-size: 8px;
}

/* Scalable game directory, multi-market comparison, and readability */
.game-directory-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.genre-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.genre-tabs::-webkit-scrollbar {
  display: none;
}

.genre-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
}

.genre-button.active {
  color: var(--blue);
  border-color: #b8c9f4;
  background: var(--blue-soft);
}

.directory-search {
  width: 230px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-soft);
}

.directory-search span {
  color: var(--muted);
  font-size: 17px;
}

.directory-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.directory-count {
  margin-top: 11px;
  color: var(--muted);
  text-align: right;
  font-size: 11px;
}

.status-pill.mixed {
  color: #7f4b00;
  background: #fff2d8;
}

.status-pill.unavailable {
  color: var(--muted);
  background: #f2f4f7;
}

.health-row .dot.mixed {
  background: #e39a17;
}

.health-row .dot.unavailable {
  background: #98a2b3;
}

.market-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.favorite-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.favorite-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow);
}

.favorite-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.favorite-card-head > div {
  min-width: 0;
  flex: 1;
}

.favorite-card-head strong,
.favorite-card-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-card-head strong {
  font-size: 15px;
}

.favorite-card-head small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.favorite-card-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 17px 0;
}

.favorite-card-price strong {
  font: 700 25px "Segoe UI", Arial, sans-serif;
}

.favorite-card-price span {
  font: 600 13px "Segoe UI", Arial, sans-serif;
}

.empty-view {
  min-height: 300px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.legend .secondary {
  background: var(--amber);
}

.tooltip-dual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
  color: var(--text-2);
  font-size: 11px;
}

.tooltip-dual b {
  color: var(--text);
  font: 700 12px "Segoe UI", Arial, sans-serif;
}

.compare-table {
  min-width: 760px;
}

.compare-table th:first-child {
  width: 34%;
}

.compare-table th:nth-child(2),
.compare-table th:nth-child(3) {
  width: 16%;
}

.compare-table th:nth-child(4),
.compare-table th:nth-child(5) {
  width: 12%;
}

body {
  font-size: 15px;
}

.topbar {
  height: 76px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  font-size: 15px;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  font-size: 12px;
}

.top-nav a {
  font-size: 14px;
}

.service-state {
  font-size: 12px;
}

.kicker {
  font-size: 11px;
}

.page-heading h1 {
  font-size: 36px;
}

.page-heading p:not(.kicker) {
  font-size: 14px;
}

.heading-meta {
  font-size: 12px;
}

.stat-card {
  min-height: 102px;
  padding: 17px 18px;
}

.stat-card span {
  font-size: 12px;
}

.stat-card strong {
  margin-top: 10px;
  font-size: 24px;
}

.stat-card small {
  margin-top: 6px;
  font-size: 11px;
}

.section-head h2 {
  font-size: 20px;
}

.section-head p {
  font-size: 12px;
}

.section-head a {
  font-size: 12px;
}

.game-card {
  min-height: 196px;
  padding: 18px;
}

.game-card-mark {
  width: 46px;
  height: 46px;
  font-size: 18px;
}

.game-card-name strong {
  font-size: 16px;
}

.game-card-name small {
  font-size: 11px;
}

.status-pill {
  padding: 5px 9px;
  font-size: 10px;
}

.game-card-desc {
  min-height: 40px;
  font-size: 12px;
}

.game-card-data span {
  font-size: 10px;
}

.game-card-data strong {
  font-size: 12px;
}

.watch-item-copy strong {
  font-size: 13px;
}

.watch-item-copy small,
.health-row,
.health-row strong {
  font-size: 11px;
}

.watch-item-price strong {
  font-size: 13px;
}

.watch-item-price small {
  font-size: 10px;
}

.watch-empty,
.pulse-row {
  font-size: 12px;
}

.pulse-asset strong,
.pulse-value,
.pulse-change {
  font-size: 12px;
}

.pulse-asset small {
  font-size: 10px;
}

.breadcrumbs {
  font-size: 12px;
}

.game-mark {
  width: 56px;
  height: 56px;
  font-size: 21px;
}

.game-identity h1 {
  font-size: 30px;
}

.game-identity p {
  font-size: 12px;
}

.market-control label {
  font-size: 11px;
}

.market-control select {
  min-width: 190px;
  height: 42px;
  font-size: 12px;
}

.filter-button {
  min-height: 34px;
  font-size: 11px;
}

.table-search {
  width: 260px;
  height: 38px;
}

.table-search input {
  font-size: 12px;
}

.game-table {
  min-width: 920px;
}

.game-table th {
  height: 42px;
  font-size: 12px;
}

.sort-button {
  font-size: 12px;
}

.game-table td {
  height: 68px;
  font-size: 13px;
}

.asset-mark {
  width: 38px;
  height: 38px;
}

.asset-copy strong {
  font-size: 13px;
}

.asset-copy small {
  font-size: 10px;
}

.favorite-button {
  font-size: 19px;
}

.item-title .asset-mark {
  width: 56px;
  height: 56px;
}

.item-title h1 {
  font-size: 30px;
}

.item-title p {
  font-size: 12px;
}

.primitive-button,
.back-button,
.watch-button {
  min-height: 42px;
  padding: 0 15px;
  font-size: 12px;
}

.item-kpi {
  padding: 16px 17px;
}

.item-kpi span {
  font-size: 11px;
}

.item-kpi strong {
  font-size: 25px;
}

.item-kpi small {
  font-size: 10px;
}

.chart-head h2 {
  font-size: 20px;
}

.chart-head p,
.chart-summary,
.legend,
.range-tab {
  font-size: 11px;
}

.chart-summary b {
  font-size: 11px;
}

.info-card h3 {
  font-size: 14px;
}

.info-row {
  min-height: 38px;
  font-size: 12px;
}

.info-row strong {
  font-size: 12px;
}

.source-note {
  font-size: 10px;
}

.source-card-head h2 {
  font-size: 17px;
}

.source-card-head p,
.source-card-footer span {
  font-size: 11px;
}

.source-card ul {
  font-size: 12px;
}

.page-footer {
  font-size: 10px;
}

@media (max-width: 1080px) {
  .home-grid {
    grid-template-columns: 1fr;
  }

  .side-stack {
    grid-template-columns: 1fr 1fr;
  }

  .pulse-grid {
    grid-template-columns: 1fr;
  }

  .item-lower {
    grid-template-columns: 1fr 1fr;
  }

  .favorite-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 780px) {
  .topbar {
    grid-template-columns: 1fr auto;
    height: calc(62px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 14px 0;
  }

  .top-nav {
    display: none;
  }

  .app {
    width: calc(100% - 22px);
    padding-top: 18px;
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-stats,
  .game-stats,
  .item-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-card-grid {
    grid-template-columns: 1fr;
  }

  .game-directory-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .directory-search {
    width: 100%;
  }

  .side-stack {
    grid-template-columns: 1fr;
  }

  .game-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .market-control {
    width: 100%;
  }

  .market-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .market-control select {
    width: 100%;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-tabs {
    overflow-x: auto;
  }

  .filter-button {
    flex: 0 0 auto;
  }

  .table-search {
    width: 100%;
  }

  .item-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .item-actions {
    width: 100%;
  }

  .item-actions > * {
    flex: 1;
  }

  .chart-head {
    flex-direction: column;
  }

  .chart-head {
    gap: 10px;
  }

  .chart-actions {
    width: 100%;
    justify-content: space-between;
  }

  .chart-wrap svg {
    height: 310px;
  }

  .item-lower {
    grid-template-columns: 1fr;
  }

  .cross-server-grid {
    grid-template-columns: 1fr;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }

  .favorite-grid {
    grid-template-columns: 1fr;
  }

  .page-footer {
    width: calc(100% - 22px);
    flex-direction: column;
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    height: calc(64px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 24px rgba(16, 24, 40, 0.06);
    backdrop-filter: blur(16px);
  }

  .mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    color: var(--faint);
    text-decoration: none;
    font-size: 11px;
  }

  .mobile-nav a span {
    font-size: 17px;
    line-height: 1;
  }

  .mobile-nav a.active {
    color: var(--blue);
  }
}

@media (max-width: 500px) {
  .service-state span:last-child {
    display: none;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .game-identity h1 {
    font-size: 21px;
  }

  .chart-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-summary {
    justify-content: flex-start;
    gap: 12px;
  }

  .chart-wrap svg {
    height: 270px;
  }
}
