/* Tap Mini Games — 站点公共样式。
 * 主题色由服务端注入 --accent / --accent-ink；游戏卡片用各自的 --c。
 * 只有一套深色主题（游戏站的惯例），所有颜色走下面的 token。 */

:root {
  --accent: #5b5bd6;
  --accent-ink: #fff;
  --accent-text: color-mix(in srgb, var(--accent) 62%, #fff);

  --bg: #090b11;
  --bg-2: #0d1017;
  --surface: #12151e;
  --surface-2: #181c27;
  --surface-3: #202534;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #eef0f6;
  --text-2: #c3c8d6;
  --muted: #8a92a6;
  --ok: #34d399;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --maxw: 1320px;
  --gutter: 24px;
  --header-h: 64px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
          "Hiragino Sans", "Yu Gothic UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15.5px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }

.i { width: 18px; height: 18px; flex: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 14px; border-radius: var(--r-sm); font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ============ header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 11, 17, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-name { font-weight: 750; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 78%, #fff), color-mix(in srgb, var(--accent) 72%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px -6px color-mix(in srgb, var(--accent) 80%, transparent);
}
.logo-mark svg { width: 100%; height: 100%; }

.site-nav {
  display: flex; align-items: center; gap: 4px; margin-left: 12px; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 36px; padding: 0 12px; border-radius: 10px;
  color: var(--muted); font-size: 14.5px; font-weight: 550;
  transition: color .15s, background-color .15s;
}
.nav-link .i { width: 17px; height: 17px; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active { color: var(--text); background: var(--surface-3); }
.nav-link.is-active .i { color: var(--accent-text); }

/* ---- language switcher ---- */
.lang { position: relative; margin-left: auto; flex: none; }
.lang > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 10px 0 11px; border-radius: 10px;
  border: 1px solid var(--line-2); color: var(--text-2); font-size: 14px;
  transition: border-color .15s, color .15s;
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary .i { width: 16px; height: 16px; }
.lang > summary:hover, .lang[open] > summary { color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.lang-chev { transition: transform .2s var(--ease); opacity: .7; }
.lang[open] .lang-chev { transform: rotate(180deg); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  list-style: none; margin: 0; padding: 6px; min-width: 180px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, .7);
}
.lang-list a { display: block; padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-size: 14.5px; }
.lang-list a:hover { background: var(--surface-3); color: var(--text); }
.lang-list a.is-current { color: var(--accent-text); font-weight: 650; }

/* ============ buttons, chips ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 18px; border-radius: 12px; white-space: nowrap;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font-weight: 650; font-size: 15px; cursor: pointer;
  transition: transform .15s var(--ease), background-color .15s, border-color .15s, box-shadow .2s, filter .15s;
}
.btn:hover { border-color: rgba(255, 255, 255, .22); background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink); border-color: transparent;
  box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--accent) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, .04); }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
  font-size: 14px; font-weight: 550; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip .i { width: 16px; height: 16px; }
a.chip:hover { background: var(--surface-3); color: var(--text); }
.chip.is-active { background: color-mix(in srgb, var(--accent) 20%, var(--surface-2)); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--text); }
.chip-n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip-glass { background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(8px); height: 28px; font-size: 12.5px; padding: 0 10px; }
.chip-glass .i { width: 14px; height: 14px; }
.chip-ok { height: 24px; padding: 0 9px; font-size: 12.5px; color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }

/* ============ cover art (卡片封面 / 海报 / 分享图共用) ============ */
.cover {
  --pattern: linear-gradient(transparent, transparent);
  position: relative; display: grid; place-items: center; overflow: hidden;
  aspect-ratio: 16 / 10; border-radius: 12px; color: #fff; isolation: isolate;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(255, 255, 255, .28), transparent 55%),
    radial-gradient(90% 80% at 0% 110%, rgba(0, 0, 0, .45), transparent 60%),
    var(--pattern),
    linear-gradient(150deg, color-mix(in srgb, var(--c, var(--accent)) 92%, #fff) 0%, var(--c, var(--accent)) 38%, color-mix(in srgb, var(--c, var(--accent)) 45%, #07080d) 100%);
}
.cover[data-cat="arcade"] {
  --pattern:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 24px);
}
.cover[data-cat="puzzle"] { --pattern: repeating-conic-gradient(rgba(255, 255, 255, .075) 0 25%, transparent 0 50%) 0 0 / 34px 34px; }
.cover[data-cat="card"] {
  --pattern:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 1.5px, transparent 1.5px 16px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .07) 0 1.5px, transparent 1.5px 16px);
}
.cover[data-cat="board"] { --pattern: repeating-conic-gradient(rgba(0, 0, 0, .16) 0 25%, transparent 0 50%) 0 0 / 44px 44px; }
.cover[data-cat="casual"] { --pattern: radial-gradient(rgba(255, 255, 255, .16) 1.6px, transparent 2.2px) 0 0 / 18px 18px; }
.cover[data-cat="opensource"] { --pattern: repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 12px, rgba(255, 255, 255, .07) 12px 14px, transparent 14px 30px) 0 0 / 30px 9px; }

.cover-icon {
  display: grid; place-items: center; width: 42%; max-width: 128px; aspect-ratio: 1; border-radius: 27%;
  background: linear-gradient(160deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 16px 32px -12px rgba(0, 0, 0, .55);
  backdrop-filter: blur(3px);
  transition: transform .35s var(--ease);
}
.cover-icon .gi { width: 66%; height: 66%; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25)); }
.cover-sm { border-radius: 9px; }
.cover-sm .cover-icon { width: 58%; border-radius: 26%; }

/* ============ game cards ============ */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
}
.grid-lg { gap: 20px; margin-top: 8px; }

.card {
  position: relative; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s, background-color .25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  background: var(--surface-2);
  box-shadow: 0 22px 40px -22px color-mix(in srgb, var(--c) 70%, transparent);
}
.card-link { display: block; padding: 8px; height: 100%; }
.card:hover .cover-icon { transform: scale(1.06) rotate(-2deg); }
.cover-play {
  position: absolute; right: 10px; bottom: 10px;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: #0b0d12; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(6px) scale(.9);
  transition: opacity .2s, transform .25s var(--ease);
}
.cover-play .i { width: 17px; height: 17px; margin-left: 2px; }
.card:hover .cover-play, .card-link:focus-visible .cover-play { opacity: 1; transform: none; }
/* 悬停显示主视觉：<img> 由 site.js 在第一次悬停时插入，加载好（.has-art）才淡入 */
.cover-art {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06); transition: opacity .3s var(--ease), transform .6s var(--ease);
}
.cover-play { z-index: 2; }
.card:hover .has-art .cover-art, .card-link:focus-visible .has-art .cover-art { opacity: 1; transform: none; }
.card-body { display: block; padding: 12px 8px 6px; }
.card-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tag {
  margin-top: 4px; color: var(--muted); font-size: 13.5px; line-height: 1.45; min-height: 2.9em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.card-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta .i { width: 14px; height: 14px; opacity: .8; }

/* ============ home: hero ============ */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 140%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 18% 30%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%),
    radial-gradient(35% 45% at 85% 20%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 44px);
  mask-image: radial-gradient(70% 80% at 50% 30%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 80% at 50% 30%, #000, transparent);
}
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center;
  padding-top: 64px; padding-bottom: 64px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 13px 6px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2);
  color: var(--text-2); font-size: 13.5px; font-weight: 550;
}
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.hero-title { margin-top: 20px; font-size: clamp(36px, 5.4vw, 64px); line-height: 1.04; font-weight: 800; letter-spacing: -.035em; }
.hero-tagline { margin-top: 14px; font-size: clamp(18px, 2vw, 22px); color: var(--text); font-weight: 550; letter-spacing: -.01em; }
.hero-intro { margin-top: 12px; max-width: 560px; color: var(--muted); font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: 14px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .i { width: 17px; height: 17px; color: var(--accent-text); }

.spotlight {
  position: relative; display: block; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line-2); box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--c) 70%, #000), var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.spotlight:hover { transform: translateY(-4px) rotate(-.4deg); }
.spotlight:hover .cover-icon { transform: scale(1.05) rotate(-3deg); }
.cover-xl { aspect-ratio: 16 / 11; border-radius: 0; }
.cover-xl .cover-icon { width: 34%; transform: translateY(-14%); }
.spotlight-body {
  position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 64px 26px 24px; padding-right: 100px;
  background: linear-gradient(to top, rgba(6, 7, 11, .92) 10%, rgba(6, 7, 11, .55) 60%, transparent);
}
.spotlight-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; }
.spotlight-tag { color: var(--text-2); font-size: 15px; }
.spotlight-meta { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.spotlight-meta .i { width: 15px; height: 15px; }
.spotlight-play {
  position: absolute; right: 24px; bottom: 26px;
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: #fff; color: #0b0d12; box-shadow: 0 14px 30px -8px rgba(0, 0, 0, .7);
  transition: transform .25s var(--ease);
}
.spotlight-play .i { width: 24px; height: 24px; margin-left: 3px; }
.spotlight:hover .spotlight-play { transform: scale(1.08); }

/* ============ sections ============ */
.section { padding-top: 48px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 20px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 750; letter-spacing: -.015em; line-height: 1.25; }
.section-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); color: var(--accent-text); }
.section-icon .i { width: 17px; height: 17px; }
.section-desc { margin-top: 6px; max-width: 720px; color: var(--muted); font-size: 14.5px; }
.section-link {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  color: var(--accent-text); font-weight: 650; font-size: 14.5px;
}
.section-link .i { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.section-link:hover .i { transform: translateX(3px); }

/* 分类磁贴 */
.cat-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); }
.cat-tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, background-color .2s, transform .2s var(--ease);
}
.cat-tile:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--accent) 45%, transparent); transform: translateY(-2px); }
.cat-tile-icon {
  grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.cat-tile-icon .i { width: 22px; height: 22px; }
.cat-tile-name { font-weight: 700; font-size: 15.5px; }
.cat-tile-count { color: var(--muted); font-size: 13px; }

/* 首页「为什么」 */
.why {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: start;
  margin-top: 56px; padding: 40px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 60%);
  border: 1px solid var(--line);
}
.why-copy p { margin-top: 14px; color: var(--text-2); }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.features li {
  display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 14px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
}
.features strong { font-size: 15.5px; margin-top: 8px; }
.features li > span:last-child { color: var(--muted); font-size: 14px; line-height: 1.5; }
.feature-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); }
.feature-icon .i { width: 20px; height: 20px; }

/* ============ listing / page head ============ */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-top: 22px; color: var(--muted); font-size: 13.5px; }
.crumbs a:hover { color: var(--text); }
.crumbs .i { width: 14px; height: 14px; opacity: .6; }
.crumbs [aria-current] { color: var(--text-2); }

.page-head { padding-bottom: 26px; }
.page-head-row { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.page-icon {
  display: grid; place-items: center; width: 60px; height: 60px; flex: none; border-radius: 17px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 80%, #fff), color-mix(in srgb, var(--accent) 60%, #000));
  color: var(--accent-ink); box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}
.page-icon .i { width: 28px; height: 28px; }
.page-title { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.025em; line-height: 1.12; }
.page-intro { margin-top: 6px; max-width: 760px; color: var(--muted); font-size: 16px; }
.page-count { margin-top: 18px; color: var(--muted); font-size: 14px; }
.chips { display: flex; gap: 8px; margin-top: 24px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }

/* ============ game page ============ */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; margin-top: 18px; align-items: start; }

.player {
  --stage-max: calc(100vh - var(--header-h) - 150px);
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -50px color-mix(in srgb, var(--c) 60%, #000);
}
.player-stage {
  position: relative; width: 100%; background: #05060a;
  max-height: max(320px, var(--stage-max)); min-height: 300px; outline: none;
}
.game-mount { position: absolute; inset: 0; overflow: hidden; }
.game-mount > * { width: 100%; height: 100%; }

.game-status {
  --pattern: linear-gradient(transparent, transparent);
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
  color: var(--text-2); overflow: hidden;
  background:
    radial-gradient(60% 70% at 50% 40%, color-mix(in srgb, var(--c) 38%, transparent), transparent 75%),
    var(--pattern),
    linear-gradient(180deg, color-mix(in srgb, var(--c) 18%, #07080d), #06070b);
}
.game-status[data-cat="arcade"] { --pattern: repeating-linear-gradient(0deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 28px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 28px); }
.game-status[data-cat="puzzle"] { --pattern: repeating-conic-gradient(rgba(255, 255, 255, .035) 0 25%, transparent 0 50%) 0 0 / 40px 40px; }
.game-status[data-cat="card"] { --pattern: repeating-linear-gradient(45deg, rgba(255, 255, 255, .04) 0 1.5px, transparent 1.5px 18px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .04) 0 1.5px, transparent 1.5px 18px); }
.game-status[data-cat="board"] { --pattern: repeating-conic-gradient(rgba(255, 255, 255, .03) 0 25%, transparent 0 50%) 0 0 / 52px 52px; }
.game-status[data-cat="casual"] { --pattern: radial-gradient(rgba(255, 255, 255, .08) 1.6px, transparent 2.2px) 0 0 / 22px 22px; }
.game-status[data-cat="opensource"] { --pattern: repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 14px, rgba(255, 255, 255, .04) 14px 16px, transparent 16px 34px) 0 0 / 34px 11px; }
.game-status.is-loading, .game-status.is-error { font-size: 15px; gap: 16px; align-content: center; }
.game-status.is-loading::before {
  content: ""; width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .14); border-top-color: var(--c);
  animation: spin .8s linear infinite;
}
.game-status.is-error { color: #fda4af; }
@keyframes spin { to { transform: rotate(360deg); } }

.poster { display: flex; flex-direction: column; align-items: center; max-width: 520px; }
.poster-art {
  display: grid; place-items: center; width: 108px; height: 108px; border-radius: 30px; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 85%, #fff), var(--c) 40%, color-mix(in srgb, var(--c) 55%, #000));
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 24px 50px -16px color-mix(in srgb, var(--c) 85%, #000);
  animation: float 5s ease-in-out infinite;
}
.poster-art .gi { width: 64%; height: 64%; }
@keyframes float { 50% { transform: translateY(-6px); } }
.poster-title { margin-top: 22px; color: var(--text); font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.poster-tag { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.btn-play {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 24px;
  height: 58px; padding: 0 32px 0 26px; border: 0; border-radius: 999px; cursor: pointer;
  background: #fff; color: #0b0d12; font-size: 17px; font-weight: 750; letter-spacing: -.005em;
  box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--c) 90%, #000), 0 0 0 6px rgba(255, 255, 255, .08);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.btn-play .i { width: 20px; height: 20px; }
.btn-play:hover { transform: scale(1.04); box-shadow: 0 22px 46px -12px color-mix(in srgb, var(--c) 95%, #000), 0 0 0 8px rgba(255, 255, 255, .1); }
.btn-play:disabled { opacity: .6; cursor: progress; transform: none; }
.poster-note { margin-top: 14px; color: var(--muted); font-size: 13px; }

.player-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px 12px 16px; border-top: 1px solid var(--line); background: var(--surface);
}
.player-id { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 260px; }
.player-icon {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 85%, #fff), color-mix(in srgb, var(--c) 60%, #000));
}
.player-icon .gi { width: 70%; height: 70%; }
.player-id-text { min-width: 0; }
.player-title { font-size: 19px; font-weight: 750; letter-spacing: -.015em; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-sub { margin-top: 1px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tool {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 13px; border-radius: 11px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.tool:hover { background: var(--surface-3); color: var(--text); border-color: rgba(255, 255, 255, .2); }
.tool-exit { background: #fff; color: #0b0d12; border-color: transparent; }
.tool-exit:hover { background: #e9ebf2; color: #0b0d12; }
.player-hint { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding: 0 4px; color: var(--muted); font-size: 13px; }
/* App（app-bridge.js 给 <html> 加 data-tap-app）：安卓没有键盘，换成返回键 / 音量键的提示 */
.player-hint.hint-touch, html[data-tap-app="android"] .player-hint.hint-keys { display: none; }
html[data-tap-app="android"] .player-hint.hint-touch { display: flex; }
.player-hint .i { width: 16px; height: 16px; margin-top: 2px; }

/* 网页全屏：播放器脱离文档流，铺满整个视口（不受页面宽度限制），页面滚动锁住。
   标题栏移到顶部作为工具条；真正的全屏（Fullscreen API）另由按钮触发。 */
html.tap-lock, html.tap-lock body { overflow: hidden; }
.player.is-theater {
  position: fixed; inset: 0; z-index: 1000; margin: 0 !important;
  display: flex; flex-direction: column;
  width: 100vw; height: 100vh; height: 100dvh;
  border: 0; border-radius: 0; box-shadow: none; background: #000;
}
.player.is-theater .player-bar {
  order: -1; flex: none; flex-wrap: nowrap; gap: 10px;
  padding: 6px 8px 6px 10px; padding-top: max(6px, env(safe-area-inset-top));
  background: #0b0d13; border-top: 0; border-bottom: 1px solid var(--line);
}
.player.is-theater .player-icon { width: 32px; height: 32px; border-radius: 9px; }
.player.is-theater .player-title { font-size: 15.5px; }
.player.is-theater .player-sub { display: none; }
.player.is-theater .tool { height: 36px; }
.player.is-theater .player-stage {
  flex: 1 1 auto; width: 100%; height: auto; min-height: 0; max-height: none;
  aspect-ratio: auto !important; /* 盖掉内联的 aspect-ratio */
}

/* 真正的全屏（Fullscreen API）：让浏览器自己决定尺寸 */
.player-stage:fullscreen { aspect-ratio: auto !important; width: 100%; height: 100%; max-height: none; min-height: 0; }
.player-stage:-webkit-full-screen { aspect-ratio: auto !important; width: 100%; height: 100%; max-height: none; min-height: 0; }

/* ---- game article ---- */
.game-article { margin-top: 12px; }
.block { padding: 30px 0; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block h2 { display: flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 750; letter-spacing: -.015em; line-height: 1.3; }
.block-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); color: var(--accent-text); }
.block-icon .i { width: 17px; height: 17px; }
.block p { margin-top: 12px; color: var(--text-2); max-width: 78ch; }
.block .lead { color: var(--text); font-size: 17px; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.tags li { padding: 5px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; }

.steps { counter-reset: step; margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding: 2px 0 0 46px; color: var(--text-2); min-height: 32px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); color: var(--accent-text);
  font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums;
}
.controls { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.controls li { padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14.5px; }

.faq { margin-top: 16px; display: grid; gap: 10px; }
.faq details { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 18px; font-weight: 650;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-chev { color: var(--muted); transition: transform .2s var(--ease); }
.faq details[open] .faq-chev { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--text-2); }

/* ---- 说明文档（data/guides）：背景故事、术语表、普通列表 ---- */
.guide-note {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 18px; padding: 11px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px;
}
.guide-note .i { width: 16px; height: 16px; margin-top: 2px; color: var(--accent-text); flex: none; }
.guide-prose p { line-height: 1.75; }
.guide-prose p:first-of-type { color: var(--text); font-size: 16.5px; }
.bullets { margin: 14px 0 0; padding-left: 20px; color: var(--text-2); display: grid; gap: 6px; }
.terms { margin: 16px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.terms > div { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.terms dt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 700; color: var(--text); }
.term-tag {
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.terms dd { margin: 6px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }

/* ---- aside ---- */
/* 不再 sticky：加了主视觉以后侧栏常常比视口高，sticky 会把底部的「更多游戏」一直藏着 */
.game-aside { display: grid; gap: 18px; }
.game-art {
  margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: var(--r-lg); background: #07080d;
  border: 1px solid var(--line); box-shadow: 0 30px 60px -36px color-mix(in srgb, var(--c) 80%, #000);
}
.game-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.panel { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.panel-title { display: flex; align-items: center; gap: 9px; font-size: 15.5px; font-weight: 700; margin-bottom: 14px; }
.panel-title .i { width: 17px; height: 17px; color: var(--accent-text); }
.facts { margin: 0; display: grid; }
.facts > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.facts dt .i { width: 15px; height: 15px; }
.facts dd { margin: 0; text-align: right; color: var(--text); font-weight: 550; }
.facts dd a { color: var(--accent-text); }
.facts dd a:hover { text-decoration: underline; }

.mini-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.mini { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px; margin: 0 -6px; border-radius: 12px; transition: background-color .15s; }
.mini:hover { background: var(--surface-2); }
.mini .cover { aspect-ratio: 16 / 10; }
.mini-text { display: flex; flex-direction: column; min-width: 0; }
.mini-text strong { font-size: 14.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-text span { color: var(--muted); font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.panel-more { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; padding: 10px; border-radius: 11px; background: var(--surface-2); color: var(--text-2); font-size: 14px; font-weight: 600; }
.panel-more:hover { background: var(--surface-3); color: var(--text); }
.panel-more .i { width: 16px; height: 16px; }

/* ---- 实机截图 ---- */
.shots { margin-top: 26px; }
.shots-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.shots-title { display: flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 750; letter-spacing: -.015em; line-height: 1.3; }
.shots-nav { display: flex; gap: 6px; }
.shots-nav .tool { width: 40px; padding: 0; justify-content: center; }
.shots-nav .tool:disabled { opacity: .35; cursor: default; }
.shots-nav .i { width: 18px; height: 18px; }
.shots-static .shots-nav { display: none; }
.shots-track {
  display: flex; gap: 12px; margin: 0; padding: 0 0 10px; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.shots-track::-webkit-scrollbar { display: none; } /* 有左右按钮，触屏直接滑 */
.shots-track li { flex: none; scroll-snap-align: start; }
.shot {
  display: block; overflow: hidden; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2);
  transition: border-color .2s;
}
.shot:hover, .shot:focus-visible { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
/* 高度统一、宽度按游戏画面比例（模板里写了 aspect-ratio），图没加载完也不会跳 */
.shot img { display: block; height: clamp(150px, 22vw, 230px); width: auto; transition: transform .4s var(--ease); }
.shot:hover img { transform: scale(1.03); }

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 56px 76px;
  border: 0; background: transparent; color: #fff;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(5, 7, 12, .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lightbox-fig { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0; max-width: 100%; }
.lightbox-fig img { display: block; max-width: 100%; max-height: calc(100vh - 140px); border-radius: 12px; box-shadow: 0 30px 80px -30px #000; }
.lightbox-fig figcaption { color: rgba(255, 255, 255, .65); font-size: 13px; font-variant-numeric: tabular-nums; }
.lightbox-btn {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer;
  transition: background-color .15s;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, .18); }
.lightbox-btn[hidden] { display: none; }
.lightbox-btn:focus:not(:focus-visible) { outline: none; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-close { right: 16px; top: 16px; }

/* ============ static pages ============ */
.doc { max-width: 820px; margin: 22px 0 0; }
.doc-head { display: flex; align-items: center; gap: 18px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.doc section { padding-top: 26px; }
.doc h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.doc p { margin-top: 8px; color: var(--text-2); }
.doc a { color: var(--accent-text); }
.doc a:hover { text-decoration: underline; }
.lang-note {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 34px; padding: 13px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px;
}
.lang-note .i { width: 16px; height: 16px; margin-top: 2px; color: var(--accent-text); }

/* ============ 404 ============ */
.error-hero { padding: 56px 0 8px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.error-code {
  font-size: clamp(88px, 14vw, 160px); font-weight: 900; line-height: 1; letter-spacing: -.06em;
  background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--accent) 70%, #fff) 45%, color-mix(in srgb, var(--accent) 40%, transparent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-hero .page-title { margin-top: 10px; }
.error-hero .hero-actions { justify-content: center; }

/* ============ footer ============ */
.site-footer { margin-top: 72px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding-top: 40px; padding-bottom: 36px; }
.footer-brand p { margin-top: 14px; max-width: 440px; color: var(--muted); font-size: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.footer-col a { color: var(--text-2); width: fit-content; }
.footer-col a:hover { color: var(--text); }
.footer-h { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding-top: 20px; padding-bottom: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.footer-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.footer-langs .i { width: 15px; height: 15px; margin-right: 2px; }
.footer-langs a:hover, .footer-langs a[aria-current] { color: var(--text); }
.footer-langs span { opacity: .4; }

/* ============ responsive ============ */
@media (max-width: 1100px) {
  .game-layout { grid-template-columns: minmax(0, 1fr); }
  .game-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); align-items: start; }
  .hero-inner { gap: 36px; }
  .why { grid-template-columns: 1fr; padding: 30px; }
}
@media (max-width: 860px) {
  :root { --gutter: 16px; --header-h: 104px; }
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; row-gap: 6px; }
  .site-nav { order: 3; width: 100%; margin: 0 -6px; padding: 0 6px; }
  .nav-link { height: 34px; padding: 0 11px; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 44px; }
  .spotlight-body { padding: 48px 18px 18px; padding-right: 84px; }
  .spotlight-play { width: 52px; height: 52px; right: 18px; bottom: 20px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .shots-title { font-size: 19px; }
  .lightbox { padding: 56px 12px 84px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 18px; transform: none; }
  .lightbox-prev { left: calc(50% - 58px); }
  .lightbox-next { right: calc(50% - 58px); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-link { padding: 6px; }
  .card-body { padding: 10px 4px 4px; }
  .card-title { font-size: 14.5px; }
  .card-tag { font-size: 12.5px; }
  .card-meta > span + span { display: none; }
  .section { padding-top: 38px; }
  .section-title { font-size: 19px; }
  .section-head { align-items: flex-start; }
  .section-desc { display: none; }
  .features { grid-template-columns: 1fr; }
  .why { padding: 22px 18px; margin-top: 40px; }
  .page-icon { width: 48px; height: 48px; border-radius: 14px; }
  .page-icon .i { width: 22px; height: 22px; }
  .player { border-radius: var(--r); margin: 0 calc(var(--gutter) * -1); border-left: 0; border-right: 0; border-radius: 0; }
  .player-stage { min-height: 260px; }
  .player-bar { padding: 10px 12px; }
  .tool span { display: none; }
  .tool { width: 40px; padding: 0; justify-content: center; }
  .player.is-theater .tool { width: 36px; }
  .poster-art { width: 84px; height: 84px; border-radius: 24px; }
  .btn-play { height: 52px; font-size: 16px; margin-top: 18px; }
  .poster-note { display: none; }
  .hero-actions .btn { flex: 1 1 auto; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .lang-current { display: none; }
  .cover-xl { aspect-ratio: 4 / 3.4; }
  .cover-xl .cover-icon { width: 30%; transform: translateY(-48%); }
  .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cat-tile { padding: 11px 12px; column-gap: 10px; }
  .cat-tile-icon { width: 38px; height: 38px; border-radius: 11px; }
  .cat-tile-icon .i { width: 19px; height: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============ 老板键（boss.js 生成假界面；故意做成浅色的在线表格） ============ */
.player-boss { margin-top: 6px; align-items: center; }
.kbd-row { display: inline-flex; gap: 3px; flex: none; }
kbd {
  display: inline-grid; place-items: center; min-width: 30px; height: 20px; padding: 0 5px; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-width: 2px;
  color: var(--text-2); font: 600 11px/1 var(--font);
}

.boss {
  position: fixed; inset: 0; z-index: 2147483647; display: flex; flex-direction: column;
  background: #fff; color: #202124; color-scheme: light;
  font: 13px/1.4 "Segoe UI", Arial, "Microsoft YaHei", "PingFang SC", "Microsoft JhengHei", sans-serif;
  cursor: default; user-select: none; -webkit-user-select: none;
}
.boss svg { display: block; }
.boss-top { display: flex; align-items: center; gap: 10px; padding: 8px 16px 2px 10px; }
.boss-app svg { width: 34px; height: 40px; }
.boss-doc { flex: 1; min-width: 0; }
.boss-name { display: flex; align-items: center; gap: 8px; font-size: 18px; color: #1f1f1f; white-space: nowrap; }
.boss-star { color: #5f6368; font-size: 16px; }
.boss-menus { display: flex; gap: 2px; align-items: center; margin-top: 1px; white-space: nowrap; overflow: hidden; }
.boss-menus span { padding: 2px 7px; border-radius: 4px; color: #3c4043; font-size: 14px; }
.boss-menus span:hover { background: #f1f3f4; }
.boss-menus .boss-saved { color: #5f6368; font-size: 13px; text-decoration: underline; margin-left: 6px; }
.boss-menus .boss-saved:hover { background: none; }
.boss-share { padding: 8px 20px; border-radius: 18px; background: #c2e7ff; color: #001d35; font-weight: 600; font-size: 14px; }
.boss-avatar { width: 32px; height: 32px; border-radius: 50%; background: #8e7cc3; flex: none; }
.boss-tools {
  display: flex; align-items: center; gap: 2px; margin: 6px 8px 0; padding: 4px 8px; border-radius: 22px;
  background: #edf2fa; white-space: nowrap; overflow: hidden;
}
.boss-tool { min-width: 26px; padding: 3px 6px; border-radius: 4px; color: #444746; text-align: center; font-size: 13px; }
.boss-tool.wide { padding: 3px 9px; }
.boss-tool:hover { background: #dde3ea; }
.boss-sep { width: 1px; height: 18px; margin: 0 5px; background: #c7c7c7; }
.boss-fbar { display: flex; align-items: center; height: 30px; margin-top: 6px; border-top: 1px solid #e1e3e1; border-bottom: 1px solid #e1e3e1; }
.boss-ref { width: 90px; padding: 0 10px; border-right: 1px solid #e1e3e1; color: #444746; }
.boss-fx { padding: 0 10px; color: #80868b; font-style: italic; font-family: Georgia, serif; border-right: 1px solid #e1e3e1; }
.boss-formula { flex: 1; padding: 0 10px; color: #1f1f1f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boss-grid { flex: 1; overflow: auto; background: #fff; }
.boss-grid table { border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.boss-grid th, .boss-grid td {
  height: 23px; padding: 0 6px; border-right: 1px solid #e2e3e3; border-bottom: 1px solid #e2e3e3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400;
}
.boss-grid td { width: 104px; min-width: 104px; max-width: 104px; color: #1f1f1f; }
.boss-grid td[data-c="0"] { width: 150px; min-width: 150px; max-width: 150px; }
.boss-grid thead th { position: sticky; top: 0; z-index: 2; background: #f8f9fa; color: #444746; font-size: 11.5px; text-align: center; }
.boss-grid tbody th { position: sticky; left: 0; z-index: 1; width: 46px; min-width: 46px; background: #f8f9fa; color: #444746; font-size: 11.5px; text-align: center; }
.boss-grid .boss-corner { left: 0; z-index: 3; }
.boss-grid td.hd { background: #e6f4ea; font-weight: 700; color: #0d652d; }
.boss-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.boss-grid td.neg { color: #c5221f; }
.boss-grid td.b { font-weight: 700; }
.boss-grid td.tot { border-top: 2px solid #202124; background: #f8f9fa; }
.boss-grid td.st0 { color: #137333; }
.boss-grid td.st1 { color: #b06000; background: #fef7e0; }
.boss-grid td.st2 { color: #c5221f; background: #fce8e6; }
.boss-grid td.sel { outline: 2px solid #1a73e8; outline-offset: -2px; }
.boss-tabs {
  display: flex; align-items: center; gap: 2px; height: 38px; padding: 0 8px;
  background: #f8f9fa; border-top: 1px solid #e1e3e1; white-space: nowrap; overflow: hidden;
}
.boss-add { width: 30px; text-align: center; color: #5f6368; font-size: 18px; }
.boss-tab { padding: 6px 16px; border-radius: 4px; color: #444746; font-weight: 500; }
.boss-tab.on { background: #e1e9f7; color: #0b57d0; }
.boss-stat { margin-left: auto; color: #444746; font-size: 12px; padding-right: 8px; }

/* ============ 分享图（og.html，仅 dev 截图用） ============ */
body.og { width: 1200px; height: 630px; overflow: hidden; display: block; min-height: 0; background: #07080d; }
body.og-k-logo { width: 512px; height: 512px; background: transparent; }
.og-logo .logo-mark { width: 512px; height: 512px; border-radius: 0; box-shadow: none; }
.og-card {
  position: relative; display: flex; align-items: center; gap: 56px; width: 1200px; height: 630px; padding: 64px 72px;
  background:
    radial-gradient(50% 70% at 20% 30%, color-mix(in srgb, var(--c, var(--accent)) 40%, transparent), transparent 70%),
    radial-gradient(40% 60% at 95% 100%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    #07080d;
}
.og-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 48px);
}
.og-cover { flex: none; width: 440px; aspect-ratio: 1; border-radius: 48px; box-shadow: 0 40px 80px -30px color-mix(in srgb, var(--c) 80%, #000); border: 1px solid rgba(255, 255, 255, .2); }
.og-cover .cover-icon { width: 48%; max-width: none; border-radius: 28%; }
/* 游戏主视觉（assets/art/<slug>.jpg）：铺满方块，左下角压一枚小图标，和站内卡片对得上 */
.og-art { position: relative; overflow: hidden; background: #07080d center / cover no-repeat; }
.og-art .og-art-badge {
  position: absolute; left: 22px; bottom: 22px; width: 96px; border-radius: 26px; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 85%, #fff), color-mix(in srgb, var(--c) 70%, #07080d));
}
.og-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.og-chip { height: 40px; padding: 0 16px; font-size: 20px; gap: 10px; }
.og-chip .i { width: 20px; height: 20px; }
.og-title { margin-top: 22px; font-size: 76px; line-height: 1.02; font-weight: 850; letter-spacing: -.04em; }
.og-tag { margin-top: 18px; font-size: 28px; line-height: 1.35; color: var(--text-2); }
.og-play { display: flex; align-items: center; gap: 18px; margin-top: 30px; color: var(--muted); font-size: 22px; }
.og-play-btn { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 26px 0 20px; border-radius: 999px; background: #fff; color: #0b0d12; font-weight: 750; font-size: 22px; }
.og-play-btn .i { width: 22px; height: 22px; }
.og-site { display: flex; align-items: center; gap: 14px; margin-top: 40px; font-size: 24px; font-weight: 700; }
.og-site .logo-mark { width: 48px; height: 48px; border-radius: 13px; }
.og-host { color: var(--muted); font-weight: 500; }
.og-site-card { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 0; }
.og-site-card .og-site { margin-top: 0; }
.og-site-card .og-title { font-size: 92px; margin-top: 30px; }
.og-icons { position: relative; z-index: 1; display: flex; gap: 18px; }
.og-mini { width: 160px; aspect-ratio: 1; border-radius: 34px; border: 1px solid rgba(255, 255, 255, .18); }
.og-mini .cover-icon { width: 62%; }

/* ============ accounts（登录、注册、个人中心、云存档） ============ */
.account-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none; max-width: 180px;
  height: 36px; padding: 0 12px 0 10px; border-radius: 10px;
  border: 1px solid var(--line-2); color: var(--text-2); font-size: 14px; font-weight: 600;
  transition: border-color .15s, color .15s, background-color .15s;
}
.account-btn .i { width: 16px; height: 16px; flex: none; }
.account-btn:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
/* App 里登录后点头像的小菜单（account.js 的 appMenu） */
.account-menu {
  position: fixed; z-index: 60; display: grid; min-width: 200px; padding: 6px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.account-menu-who { padding: 8px 10px 6px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu button {
  padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--text-2);
  font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
}
.account-menu button:hover { background: var(--surface-2); color: var(--text); }
.account-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-btn.is-in { padding-left: 5px; }

.avatar {
  display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 80%, #fff), color-mix(in srgb, var(--accent) 60%, #000));
  color: var(--accent-ink); font-size: 13px; font-weight: 750; line-height: 1;
}
.avatar-lg { width: 64px; height: 64px; font-size: 28px; box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--accent) 80%, transparent); }

.auth { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 360px); gap: 28px; justify-content: center; align-items: start; margin: 34px auto 10px; }
.auth-narrow { grid-template-columns: minmax(0, 460px); }
.auth-card { padding: 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.auth-head .page-icon { width: 52px; height: 52px; border-radius: 15px; }
.auth-head .page-icon .i { width: 24px; height: 24px; }
.auth-head .page-title { font-size: clamp(24px, 3vw, 30px); }
.auth-head .page-intro { font-size: 14.5px; }
.auth-alt { margin-top: 18px; color: var(--muted); font-size: 14px; text-align: center; }
.auth-alt a, .form-aside a, .check a { color: var(--accent-text); font-weight: 600; }
.auth-alt a:hover, .form-aside a:hover, .check a:hover { text-decoration: underline; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

.auth-perks { padding: 24px 6px; }
.auth-perks-h { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.auth-perks ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.auth-perks li { display: flex; gap: 13px; align-items: flex-start; }
.auth-perks li div { display: flex; flex-direction: column; gap: 2px; }
.auth-perks strong { font-size: 15px; }
.auth-perks li div span { color: var(--muted); font-size: 14px; }

.btn-block { display: flex; width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn-sm .i { width: 15px; height: 15px; }
.btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.btn-google:hover { background: #f4f6fb; border-color: #c6cad2; }
.btn-danger { background: color-mix(in srgb, #ef4444 16%, var(--surface-2)); color: #fecaca; border-color: color-mix(in srgb, #ef4444 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, #ef4444 26%, var(--surface-2)); }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 13.5px; font-weight: 650; color: var(--text-2); }
.field em { font-style: normal; font-weight: 500; color: var(--muted); }
.field small { color: var(--muted); font-size: 12.5px; }
.field input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.form-aside { margin-top: -4px; font-size: 13.5px; text-align: right; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

.alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); font-size: 14px; }
.alert-error { background: color-mix(in srgb, #ef4444 12%, var(--surface)); border-color: color-mix(in srgb, #ef4444 40%, transparent); color: #fecaca; }
.alert-ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: #bbf7d0; }
.alert-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

.profile-head { display: flex; align-items: center; gap: 18px; margin: 28px 0 22px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.profile-id { flex: 1; min-width: 0; }
.profile-id .page-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14.5px; }
.profile-points { display: flex; flex-direction: column; align-items: flex-end; padding: 12px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.profile-points-n { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--accent-text); }
.profile-points-l { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.profile-points-l .i { width: 14px; height: 14px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.profile-main .block:first-child { padding-top: 6px; }
.profile-side { display: grid; gap: 16px; }
.panel-note { margin: -4px 0 14px; color: var(--muted); font-size: 13.5px; }
.panel-danger { border-color: color-mix(in srgb, #ef4444 30%, transparent); }

.table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 11px 14px; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; }
.table thead th { border-top: 0; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.table td a { color: var(--accent-text); font-weight: 600; }
.table td a:hover { text-decoration: underline; }
.td-actions { text-align: right !important; }

.points-log { margin: 14px 0 0; padding: 0; list-style: none; display: grid; }
.points-log li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.points-log li:first-child { border-top: 0; }
.points-log time { color: var(--muted); font-size: 12.5px; }
.points-delta { font-weight: 750; color: var(--ok); }
.points-delta.is-neg { color: #fca5a5; }

/* 游戏页的云存档状态与冲突弹窗 */
.player-cloud { margin-top: 6px; align-items: center; }
.player-cloud a { color: var(--accent-text); font-weight: 600; }
.player-cloud a:hover { text-decoration: underline; }
.player-cloud.is-ok .i { color: var(--ok); }
.player-cloud.is-busy .i { color: var(--accent-text); }
.player-cloud.is-error { color: #fca5a5; }
.cloud-dialog { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(5, 7, 12, .72); backdrop-filter: blur(4px); }
.cloud-dialog-card { width: min(440px, 100%); padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--text-2); font-size: 14.5px; }
.cloud-dialog-title { margin-bottom: 8px; color: var(--text); font-size: 18px; font-weight: 750; }
.cloud-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

@media (max-width: 960px) {
  .auth { grid-template-columns: minmax(0, 460px); }
  .auth-perks { padding: 0 6px; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .account-btn { padding: 0 9px; }
  .account-btn .account-label { display: none; }
  .account-btn.is-in { padding: 0 5px; }
  .auth { margin-top: 20px; }
  .auth-card { padding: 20px; }
  .profile-head { flex-wrap: wrap; }
  .profile-points { align-items: flex-start; width: 100%; }
}

/* 开源游戏的版权标注（游戏页 #open-source） */
.oss-credit .terms a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.oss-credit code { font-size: .92em; }
.oss-note { margin-top: 14px; color: var(--muted); font-size: 14px; }

/* 联机大厅：大厅页的各厅介绍（/lobby），分类页底部的「联机对战」 */
.lobby-hall { margin-top: 40px; scroll-margin-top: calc(var(--header-h) + 16px); }
.lobby-hall h2, .cat-online h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 750; letter-spacing: -.01em; }
.lobby-hall-intro, .cat-online-head p { margin-top: 6px; max-width: 820px; color: var(--muted); }
.lobby-glist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lobby-gitem {
  --c: var(--accent);
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  border-left: 3px solid var(--c);
}
.lobby-gitem h3 { font-size: 16.5px; font-weight: 700; }
.lobby-gitem h3 a:hover { color: var(--accent-text); }
.lobby-gitem p { color: var(--text-2); font-size: 14px; line-height: 1.6; }
.lobby-solo { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.lobby-solo .i { width: 15px; height: 15px; }
.lobby-solo:hover { color: var(--text); }
.cat-online { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.cat-online .btn { margin-top: 18px; }
.cat-online h2 .i { width: 22px; height: 22px; color: var(--accent-text); }
