:root,
[data-theme="dark"] {
  --bg: #101014;
  --surface: #202024;
  --surface-hover: #2a2a2e;
  --text: #ffffff;
  --strong: #ffffff;
  --muted: #a1a1a6;
  --accent: #26bbff;
  --accent-dark: #0074e4;
  --bar: rgba(16, 16, 20, 0.92);
  --line: rgba(255, 255, 255, 0.06);
  --radius: 8px;
  --radius-lg: 12px;
  --font: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max: 1280px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f8f9fc;
  --surface: #ffffff;
  --surface-hover: #e8ebf2;
  --text: #1a1a24;
  --strong: #0a0a0f;
  --muted: rgba(0, 0, 0, 0.62);
  --bar: rgba(248, 249, 252, 0.92);
  --line: rgba(0, 0, 0, 0.08);
  color-scheme: light;
}

[hidden] {
  display: none !important;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* 主页顶栏在有滚动条时会把居中内容左移半个滚动条宽。
   游戏厅页面经常不满一屏，预留同样的槽位，四字才能和主页对齐。 */
html {
  scrollbar-gutter: stable;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

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

/* —— Store top bar —— */
.store-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bar);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.store-bar-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.store-brand {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.6;
  color: var(--strong);
  white-space: nowrap;
}

.store-search-form {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.store-bar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  /* 68px 开关 + 14px 间距。开关本身脱离文档流，钉在顶栏右内边。 */
  padding-right: 82px;
}

.play-theme {
  position: absolute;
  top: 19px;
  right: 32px;
  z-index: 2;
  width: 68px;
  height: 34px;
  margin: 0;
  flex-shrink: 0;
  user-select: none;
}

.play-theme input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.play-theme-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  transition: background 0.25s, border-color 0.25s;
}

.play-theme-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2a3350;
  transition: transform 0.25s, background 0.25s;
  box-shadow: rgba(0, 0, 0, 0.22) 0 2px 6px;
  z-index: 1;
}

.play-theme input:checked + .play-theme-track {
  background: rgba(74, 108, 247, 0.12);
  border-color: #4a6cf7;
}

.play-theme input:checked + .play-theme-track::after {
  transform: translateX(34px);
  background: #f5b942;
}

.play-theme input:focus-visible + .play-theme-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.play-theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  z-index: 2;
  pointer-events: none;
}

.play-theme-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.play-theme-icon-dark {
  color: #c8e0ff;
}

.play-theme-icon-light {
  color: #f0a500;
}

.play-theme input:not(:checked) + .play-theme-track .play-theme-icon-dark {
  opacity: 1;
  transform: scale(1.1);
}

.play-theme input:not(:checked) + .play-theme-track .play-theme-icon-light {
  opacity: 0.5;
  transform: scale(0.9);
}

.play-theme input:checked + .play-theme-track .play-theme-icon-light {
  opacity: 1;
  color: #fff;
  transform: scale(1.1);
}

.play-theme input:checked + .play-theme-track .play-theme-icon-dark {
  opacity: 0.45;
  transform: scale(0.92);
}

[data-theme="light"] .play-theme-track {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .genre-chip.active {
  background: #1a1a24;
  color: #fff;
}

[data-theme="light"] .play-account-menu,
[data-theme="light"] .btn-board,
[data-theme="light"] .board-tab,
[data-theme="light"] .detail-back,
[data-theme="light"] .detail-info,
[data-theme="light"] .detail-info-row,
[data-theme="light"] .board-row,
[data-theme="light"] .game-card-badge {
  border-color: var(--line);
}

[data-theme="light"] .play-account-badge.player {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .detail-side-cover,
[data-theme="light"] .game-topbar {
  background: var(--surface);
  border-color: var(--line);
}

[data-theme="light"] .store-search,
[data-theme="light"] .store-login,
[data-theme="light"] .play-account-chip,
[data-theme="light"] .detail-side,
[data-theme="light"] .game-modal-card {
  border: 1px solid var(--line);
}

.store-search {
  width: 100%;
  max-width: 420px;
  justify-self: center;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  padding: 10px 16px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.store-search::placeholder {
  color: var(--muted);
}

.store-search:focus {
  border-color: rgba(38, 187, 255, 0.5);
  background: var(--surface-hover);
}

.store-login {
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 14px;
}

.store-login:hover {
  background: var(--surface-hover);
}

.play-account-coins {
  color: #f0c14b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.store-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.play-account-chip-wrap {
  position: relative;
}

.play-account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  max-width: 280px;
}

.play-account-chip:hover {
  background: var(--surface-hover);
}

.play-account-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #3a3a40;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  flex: 0 0 auto;
}

.play-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 96px;
}

.play-account-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.play-account-badge.employee {
  background: rgba(38, 187, 255, 0.18);
  color: var(--accent);
}

.play-account-badge.player {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.play-account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 6px;
  z-index: 50;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.play-account-menu a,
.play-account-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.play-account-menu a:hover,
.play-account-menu button:hover {
  background: var(--surface-hover);
}

.play-account-compact {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.play-account-game {
  color: var(--muted);
  font-size: 12px;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 64px;
}

/* —— Featured hero —— */
.store-hero {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 280px;
  margin-bottom: 28px;
  background: var(--surface);
}

.store-hero img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 360px;
  object-fit: cover;
  object-position: center center;
}

.store-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(16, 16, 20, 0.92) 0%,
    rgba(16, 16, 20, 0.55) 45%,
    rgba(16, 16, 20, 0.15) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px 40px;
  gap: 10px;
}

.store-hero-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.store-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
}

.store-hero p {
  margin: 0;
  max-width: 420px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.5;
}

.store-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  width: fit-content;
  padding: 10px 22px;
  border-radius: var(--radius);
  background: #fff;
  color: #111;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s, transform 0.15s;
}

.store-hero:hover .store-hero-btn {
  background: #e8e8ea;
}

/* —— Filters —— */
.genre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.genre-chip {
  border: 0;
  background: var(--surface);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}

.genre-chip:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.genre-chip.active {
  background: #fff;
  color: #111;
  font-weight: 600;
}

.section-heading {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
}

/* —— Card grid —— */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 24px;
}

.game-card {
  display: block;
  color: inherit;
  transition: transform 0.15s;
}

.game-card:hover {
  transform: translateY(-2px);
}

.game-card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.game-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: filter 0.2s, transform 0.25s;
}

.game-card:hover .game-card-cover img {
  filter: brightness(1.08);
  transform: scale(1.02);
}

.game-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.25) 35%,
    transparent 55%
  );
  pointer-events: none;
  transition: background 0.2s;
}

.game-card:hover .game-card-cover::before {
  opacity: 1;
}

.game-card-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.game-card-title-on-art {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.game-card-meta {
  padding-top: 10px;
}

.game-card-cat {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.game-card-name {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.game-card-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 11px;
}

.game-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.game-card-price.coming {
  color: var(--muted);
  font-weight: 500;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 48px 16px;
  font-size: 15px;
}

/* —— Detail page —— */
.detail-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px 64px;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 30%);
  grid-template-areas:
    "title side"
    "body side";
  gap: 12px 32px;
  align-items: start;
}

.detail-title {
  grid-area: title;
}

.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.detail-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.detail-back:hover {
  background: var(--surface-hover);
}

.detail-body {
  grid-area: body;
}

.detail-side {
  grid-area: side;
  position: sticky;
  top: 88px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.15;
}

.detail-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 20px;
}

.detail-genres span {
  background: var(--surface);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.gallery {
  margin-bottom: 28px;
}

.gallery-main {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.75);
}

.gallery-nav.prev {
  left: 12px;
}

.gallery-nav.next {
  right: 12px;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 96px;
  aspect-ratio: 16 / 9;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  background: var(--surface);
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.15s, border-color 0.15s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  opacity: 1;
  border-color: var(--accent);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-block {
  margin-bottom: 24px;
}

.detail-block h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.detail-block p,
.detail-block li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.detail-block p {
  margin: 0;
}

.detail-block ul {
  margin: 0;
  padding-left: 1.2em;
}

.detail-block li {
  margin-bottom: 6px;
}

.detail-side-cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  background: #16161a;
}

.detail-side-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.detail-side-cat {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.detail-side-price {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}

.btn-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #0a1520;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
  text-align: center;
}

.btn-play:hover:not(.disabled):not(:disabled) {
  filter: brightness(1.08);
}

.btn-play.disabled,
.btn-play:disabled {
  background: var(--surface-hover);
  color: var(--muted);
  cursor: not-allowed;
  filter: none;
  pointer-events: none;
}

.btn-board {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.btn-board:hover {
  background: var(--surface-hover);
}

.modal-error {
  min-height: 1.2em;
  color: #ff8b8b;
}

.board-tabs {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.board-tab {
  flex: 1;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.board-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a1520;
}

.board-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  text-align: left;
  max-height: 360px;
  overflow: auto;
}

.board-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.board-rank {
  color: var(--muted);
}

.board-label {
  color: var(--accent);
}

.login-panel {
  width: min(420px, calc(100% - 32px));
  margin: 72px auto;
  padding: 28px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.login-panel .login-tab {
  width: auto;
  margin-top: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
}

.login-panel .login-tab.active {
  background: var(--accent);
  color: #0a1520;
  font-weight: 700;
}

.login-panel h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.login-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.login-panel label {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.login-panel label + label {
  margin-top: 14px;
}

.login-panel input {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: none;
}

.login-panel input:focus {
  border-color: rgba(38, 187, 255, 0.5);
}

.login-panel button {
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #0a1520;
  font-weight: 700;
  cursor: pointer;
}

.login-home {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.detail-info {
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.detail-info-row .label {
  color: var(--muted);
}

.detail-info-row .value {
  color: var(--text);
  text-align: right;
}

.detail-missing {
  max-width: 560px;
  margin: 80px auto;
  text-align: center;
  padding: 24px;
}

.detail-missing h1 {
  margin: 0 0 12px;
  font-size: 28px;
}

.detail-missing p {
  color: var(--muted);
  margin: 0 0 20px;
}

.detail-missing a {
  color: var(--accent);
}

/* —— Game shell —— */
.game-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.game-topbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(16, 16, 20, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 10;
}

.game-topbar-left {
  justify-self: start;
}

.game-topbar-center {
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
}

.game-topbar-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.game-topbar a {
  color: var(--muted);
  font-size: 13px;
}

.game-topbar a:hover {
  color: var(--text);
}

.btn-restart {
  border: 0;
  background: var(--surface);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.btn-restart:hover {
  background: var(--surface-hover);
}

.game-stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  min-height: 0;
  overflow: hidden;
}

.game-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.game-modal[hidden] {
  display: none;
}

.game-modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: min(360px, 100%);
  text-align: center;
}

.game-modal-card.board-card {
  width: min(480px, 100%);
}

.game-modal-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.game-modal-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.game-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.game-modal-actions button,
.game-modal-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: var(--radius);
  border: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.btn-primary {
  background: var(--accent);
  color: #0a1520;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text);
}

.btn-secondary:hover {
  filter: brightness(1.1);
}

.game-modal-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.game-modal-actions button:disabled:hover {
  filter: none;
}

.game-modal-actions .rank-level {
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
}

.rank-level-name {
  font-size: 15px;
  line-height: 1.3;
}

.rank-level-detail {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted);
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "side"
      "body";
  }

  .detail-side {
    position: static;
  }

  .detail-side-cover {
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .store-bar-inner {
    padding: 0 16px;
    height: 56px;
    gap: 12px;
  }

  .store-brand {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .play-theme {
    top: 11px;
    right: 16px;
  }
}

@media (max-width: 600px) {
  .store-bar-inner {
    flex-wrap: wrap;
    height: auto;
    gap: 12px;
    padding: 0 16px 12px;
  }

  .store-brand {
    height: 56px;
    display: flex;
    align-items: center;
  }

  .store-search-form {
    flex: 1 0 100%;
    order: 3;
  }

  .store-search {
    max-width: none;
  }

  .store-main {
    padding: 20px 16px 48px;
  }

  .store-hero-overlay {
    padding: 24px 20px;
  }

  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .detail-bar,
  .detail-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .game-topbar {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    padding: 8px 10px;
  }

  .game-topbar-center {
    font-size: 13px;
  }

  .game-topbar-right {
    gap: 8px;
    font-size: 12px;
  }

  .play-account-game {
    display: none;
  }

  .play-account-name {
    display: none;
  }
}

.store-page-title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.seo-game-list {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.seo-game-list h2 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
}

.seo-game-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.seo-game-list li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.seo-game-list a {
  color: var(--accent);
  font-weight: 600;
  margin-right: 8px;
}

.seo-game-list a:hover {
  text-decoration: underline;
}

.seo-more {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 32px;
}

.seo-more h2 {
  margin: 12px 0;
  font-size: 20px;
  font-weight: 700;
}

.seo-more p {
  margin: 0;
}

.seo-more ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.seo-more a {
  color: var(--accent);
  font-weight: 600;
}

.seo-more a:hover {
  text-decoration: underline;
}

.store-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.store-footer-beian {
  color: var(--muted);
}

.store-footer-beian:hover {
  color: var(--text);
}
