:root,
html[data-theme="peach"] {
  --bg: #F3EEE8;
  --bg-2: #F7F3EE;
  --card: #F8F4F0;
  --card-hover: #EFE8E2;
  --ink: #3A342F;
  --muted: #8A827A;
  --line: #E4DBD3;
  --accent: #B85C66;
  --accent-hover: #A44E58;
  --accent-2: #5E8F84;
  --accent-3: #B89658;
  --sky: #6A8498;
  --on-accent: #F7F3EE;
  --header-h: 56px;
  --max: 1440px;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: none;
  --shadow-hover: none;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
html[data-theme="mint"] {
  --bg: #EBF0EC;
  --bg-2: #F2F6F3;
  --card: #F4F7F5;
  --card-hover: #E4EBE6;
  --ink: #2E3732;
  --muted: #6E7A74;
  --line: #D4DED7;
  --accent: #4A7D6A;
  --accent-hover: #3E6B5A;
  --accent-2: #5A8790;
  --accent-3: #B08E48;
  --sky: #6A90A0;
  --on-accent: #F4F7F5;
  color-scheme: light;
}
html[data-theme="sky"] {
  --bg: #ECEFF3;
  --bg-2: #F3F5F8;
  --card: #F4F6F8;
  --card-hover: #E4E8EE;
  --ink: #2E343C;
  --muted: #6E7680;
  --line: #D5DBE4;
  --accent: #4A6E94;
  --accent-hover: #3E5E80;
  --accent-2: #5A8A94;
  --accent-3: #B08C50;
  --sky: #6A7CA0;
  --on-accent: #F4F6F8;
  color-scheme: light;
}
html[data-theme="grape"] {
  --bg: #F0EDF2;
  --bg-2: #F5F3F7;
  --card: #F6F4F8;
  --card-hover: #E8E4EE;
  --ink: #342F38;
  --muted: #76707C;
  --line: #DDD8E4;
  --accent: #6E5E86;
  --accent-hover: #5E4E74;
  --accent-2: #7A6A88;
  --accent-3: #B09058;
  --sky: #7A7E9C;
  --on-accent: #F6F4F8;
  color-scheme: light;
}
html[data-theme="moss"] {
  --bg: #E6EAD9;
  --bg-2: #EEF1E4;
  --card: #F0F2E8;
  --card-hover: #E2E6D4;
  --ink: #32362C;
  --muted: #6A7064;
  --line: #D0D6C2;
  --accent: #5A6E48;
  --accent-hover: #4C5E3C;
  --accent-2: #6A8470;
  --accent-3: #B09048;
  --sky: #6A8070;
  --on-accent: #F0F2E8;
  color-scheme: light;
}
html[data-theme="sand"] {
  --bg: #EDE4D2;
  --bg-2: #F4EDDE;
  --card: #F5EFE2;
  --card-hover: #E8DFCC;
  --ink: #3A342C;
  --muted: #7A7164;
  --line: #DDD2BC;
  --accent: #8E6844;
  --accent-hover: #7A5838;
  --accent-2: #A08A5C;
  --accent-3: #C08050;
  --sky: #A08868;
  --on-accent: #F5EFE2;
  color-scheme: light;
}
html[data-theme="ink"] {
  --bg: #1C1B19;
  --bg-2: #232220;
  --card: #262522;
  --card-hover: #2E2D29;
  --ink: #E4DFD6;
  --muted: #9A948A;
  --line: #3A3934;
  --accent: #C49A86;
  --accent-hover: #D4AA96;
  --accent-2: #7A9A8A;
  --accent-3: #C4B078;
  --sky: #8A96A8;
  --on-accent: #1C1B19;
  color-scheme: dark;
}
*, *::before, *::after {
  box-sizing: border-box;
  transition: none;
  animation: none;
  scroll-behavior: auto;
}
html, body { margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
  font-size: 15px;
  overflow-x: hidden;
}
html[data-theme="ink"] body { background: var(--bg); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }
.container { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.page { min-width: 0; }
.page > .container { width: 100%; margin: 0; }
.side-cats {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 10px 14px;
}
.side-title {
  font-size: 12px; color: var(--muted); font-weight: 700;
  padding: 4px 10px 10px; letter-spacing: .04em;
}
.side-cats a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.side-cats a span { font-size: 14px; line-height: 1; }
.side-cats a:hover { background: var(--card-hover); color: var(--ink); }
.side-cats a.is-active {
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
  color: var(--accent);
}
.muted { color: var(--muted); }
.ico { width: 16px; height: 16px; display: block; flex: none; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo img { border-radius: 10px; width: 36px; height: 36px; }
.logo strong { font-size: 17px; font-weight: 750; letter-spacing: .01em; display: block; line-height: 1.15; }
.logo small { color: var(--muted); font-size: 11px; display: none; }

.search-box {
  position: relative; display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 12px; height: 36px; width: 220px; flex: 0 0 220px; order: 2;
}
.search-box:focus-within {
  border-color: var(--accent);
}
.search-box input {
  flex: 1; border: 0; background: transparent; outline: none; color: var(--ink);
  font-size: 14px; height: 100%; padding: 0 10px;
}
.search-ico { color: var(--muted); }
.search-hint {
  font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 6px; padding: 0 6px; line-height: 18px; font-family: inherit;
}
.suggest {
  position: absolute; left: auto; right: 0; top: calc(100% + 10px);
  width: min(360px, 70vw);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; z-index: 50; max-height: 70vh; overflow: auto;
}
.suggest-group { padding: 8px 10px 4px; font-size: 11px; color: var(--muted); font-weight: 650; }
.suggest a, .suggest button {
  display: flex; gap: 10px; align-items: center; width: 100%;
  padding: 10px 10px; border: 0; background: transparent; color: var(--ink);
  border-radius: 12px; text-align: left; cursor: pointer; font-size: 14px;
}
.suggest a:hover, .suggest a.is-on, .suggest button:hover { background: var(--card-hover); border: 0; }
.suggest .k { font-size: 11px; color: var(--muted); margin-left: auto; }
.suggest mark {
  background: color-mix(in srgb, var(--accent-3) 28%, var(--card));
  color: var(--ink); border-radius: 4px; padding: 0 3px;
}
.suggest .g-fav { width: 22px; height: 22px; border-radius: 6px; }
.suggest .g-fav.g-mark { font-size: 12px; }

.search-toggle { flex: none; order: 2; }
.skin-wrap { position: relative; flex: none; order: 3; }
.skin-toggle { padding: 0; }
.skin-now {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--line);
}
.skin-card {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: min(236px, calc(100vw - 40px)); padding: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  z-index: 60;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--ink) 12%, transparent);
}
.skin-card[hidden] { display: none !important; }
.skin-card-title {
  margin: 0 0 10px; font-size: 12px; font-weight: 700;
  color: var(--muted); letter-spacing: .04em;
}
.skin-picker {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.skin-opt {
  display: flex; align-items: center; gap: 8px;
  width: 100%; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); cursor: pointer;
  font-size: 13px; font-weight: 600; text-align: left;
}
.skin-opt:hover { border-color: var(--accent); }
.skin-opt.is-on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
  color: var(--accent);
}
.skin-dot {
  width: 14px; height: 14px; border-radius: 50%; padding: 0;
  border: 2px solid var(--line); flex: none;
}
.skin-dot[data-skin="peach"] { background: #B85C66; }
.skin-dot[data-skin="mint"] { background: #4A7D6A; }
.skin-dot[data-skin="sky"] { background: #4A6E94; }
.skin-dot[data-skin="grape"] { background: #6E5E86; }
.skin-dot[data-skin="moss"] { background: #5A6E48; }
.skin-dot[data-skin="sand"] { background: #8E6844; }
.skin-dot[data-skin="ink"] { background: #1C1B19; border-color: #6A665C; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.is-on { border-color: var(--accent); color: var(--accent); }
.search-toggle { display: none; }
.nav-toggle { display: none; order: 4; flex: none; }

.site-nav { display: contents; }
.nav-inner {
  display: flex; gap: 4px; overflow-x: auto; padding: 0;
  flex: 1; min-width: 0; order: 1;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-inner a {
  white-space: nowrap; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; color: var(--muted); border: 1px solid transparent; font-weight: 600;
}
.nav-inner a:hover { color: var(--ink); background: var(--card); }
.nav-inner a.is-active {
  color: var(--on-accent); background: var(--accent); border-color: var(--accent);
}

.site-main { position: relative; z-index: 1; padding: 20px 0 56px; }
.ann-mask {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: rgba(44, 36, 56, .32);
  padding: 20px;
}
.ann-mask[hidden] { display: none !important; }
.ann-card {
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 26px; max-width: 420px;
  text-align: center; font-size: 15px; line-height: 1.6;
}

.hero {
  display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  gap: 12px; background: transparent; border: 0;
  padding: 2px 0; margin-bottom: 18px; flex-wrap: wrap;
}
.hero-card { padding: 0; background: none; border: 0; }
.hero-card h1 {
  font-size: 20px; margin: 0 0 2px; font-weight: 750; letter-spacing: -.02em; line-height: 1.3;
}
.hero-card p { margin: 0; color: var(--muted); font-size: 13px; max-width: 42ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stats { display: none; }
.stat { padding: 0; background: none; border: 0; text-align: right; }
.stat b { display: block; font-size: 18px; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }

.btn, .btn-play {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer; border-radius: 999px;
  padding: 7px 14px; font-weight: 700; font-size: 13px;
  background: var(--accent); color: var(--on-accent);
}
.btn:hover, .btn-play:hover { background: var(--accent-hover); }
.btn-ghost {
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--card); }
.btn-ghost.is-on { border-color: var(--accent); color: var(--accent); }
.btn-play { padding: 7px 14px; font-size: 13px; }
.g-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.btn-share { padding: 7px 12px; font-size: 13px; }

.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 8px 0 16px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.section-head a { color: var(--accent); font-weight: 650; font-size: 13px; }
.section-head .btn, .section-head .btn-play { color: var(--on-accent); }
.section-head .btn:hover, .section-head .btn-play:hover { color: var(--on-accent); }
.section-head .btn-ghost { color: var(--ink); }
.section-head .btn-ghost:hover { color: var(--accent); }
.section-tools {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: auto;
}
.section-tools .muted { font-size: 13px; }
.sort-switch {
  display: inline-flex; align-items: center; padding: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
.section-head .sort-switch a {
  color: var(--muted); font-weight: 550; font-size: 12px;
  padding: 5px 11px; border-radius: 999px; line-height: 1.2; text-decoration: none;
}
.section-head .sort-switch a:hover { color: var(--ink); }
.section-head .sort-switch a.is-on {
  color: var(--ink); font-weight: 650; background: var(--bg);
  box-shadow: 0 0 0 1px var(--line);
}

.game-grid {
  display: flex; flex-direction: column; gap: 10px;
  border: 0; border-radius: 0; overflow: visible;
  margin-bottom: 28px; background: transparent;
}
.rank-board {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px 12px; margin-bottom: 22px;
}
.rank-item {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 5px 8px 5px 6px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card);
}
.rank-item:hover { background: var(--card-hover); }
.rank-main {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1;
  color: inherit; text-decoration: none;
}
.rank-n {
  width: 18px; flex: none; text-align: center;
  font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.rank-item:nth-child(-n+3) .rank-n { color: var(--accent); }
.rank-item .g-fav { width: 22px; height: 22px; border-radius: 6px; }
.rank-item .g-fav.g-mark { font-size: 12px; }
.rank-name {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 650; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-main:hover .rank-name { color: var(--accent); }
.rank-type {
  flex: none; max-width: 7em;
  font-size: 11px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-play-sm { padding: 4px 10px; font-size: 12px; line-height: 1.2; }
.rank-board > .empty { grid-column: 1 / -1; margin: 0; }
.home-page .section-head { margin: 0 0 10px; }
.home-page .section-head h2 { font-size: 16px; }
.home-page .section-head a { font-size: 12px; font-weight: 600; color: var(--muted); }
.home-page .section-head a:hover { color: var(--accent); }
.home-page .game-grid { margin-bottom: 8px; }
.home-hot {
  display: grid; grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 12px; margin-bottom: 26px;
}
.home-hot > .empty { grid-column: 1 / -1; margin: 0; }
.home-hot-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 5px; min-width: 0;
  padding: 10px 8px 9px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); color: inherit; text-decoration: none;
}
.home-hot-card:hover {
  background: var(--card-hover);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
}
.hh-media {
  display: grid; place-items: center;
  width: 40px; height: 40px;
}
.hh-media .g-fav {
  width: 36px; height: 36px; border-radius: 10px;
  background: none; object-fit: contain;
}
.hh-media .g-fav.g-mark { font-size: 16px; background: var(--bg-2); }
.hh-cat {
  font-size: 11px; font-weight: 550; color: var(--muted);
  letter-spacing: .02em; line-height: 1.2;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hh-name {
  font-size: 14px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-hot-card:hover .hh-name { color: var(--accent); }
.related-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.game-tile {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; min-width: 0;
}
.game-tile:hover { background: var(--card-hover); }
.tile-main {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 0 0 4px; color: inherit; text-decoration: none; flex: 1;
}
.tile-media {
  display: block; background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.tile-cover {
  display: block; width: 100%; height: 120px; object-fit: cover;
}
.tile-icon {
  display: grid; place-items: center; height: 120px;
}
.tile-icon .g-fav {
  width: 52px; height: 52px; border-radius: 14px;
  border: 1px solid var(--line);
}
.tile-icon .g-fav.g-mark { font-size: 22px; background: var(--bg-2); }
.tile-name {
  padding: 0 14px; font-size: 15px; font-weight: 700;
  letter-spacing: -.02em; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-main:hover .tile-name { color: var(--accent); }
.tile-intro {
  padding: 0 14px; font-size: 12px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px 12px; margin-top: auto;
}
.tile-meta {
  display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1;
  flex-wrap: wrap;
}
.tile-meta .badge {
  padding: 0 6px; font-size: 10px; height: 18px; line-height: 18px;
  border-radius: 4px; opacity: .85;
}
.tile-cat, .tile-meta .muted { font-size: 12px; color: var(--muted); white-space: nowrap; }
.game-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--card);
}
.game-card:hover {
  background: var(--card-hover);
}
.g-main {
  display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1;
}
.g-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px; justify-content: center;
}
.g-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.g-fav {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: #fff; object-fit: contain;
}
.g-fav.g-mark {
  display: inline-grid; place-items: center;
  background: var(--bg-2); color: var(--ink);
  font-weight: 750; font-size: 13px; line-height: 1;
  letter-spacing: 0; user-select: none; object-fit: unset;
}
.sites-page .g-fav,
.game-card:has(a[href*="/go/site/"]) .g-fav { background: none; }
.sites-page .g-fav.g-mark,
.game-card:has(a[href*="/go/site/"]) .g-fav.g-mark { background: var(--bg-2); }
.game-hero .gh-head > .g-fav {
  width: 52px; height: 52px; border-radius: 14px; 
  border: 1px solid var(--line);
}
.game-hero .gh-head > .g-fav.g-mark { font-size: 18px; background: var(--bg-2); }
.g-name {
  font-size: 15px; font-weight: 650; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0;
  flex: 0 1 auto;
}
.g-name:hover, .g-main:hover .g-name { color: var(--accent); }
.g-intro {
  font-size: 12px; font-weight: 400; color: var(--muted);
  line-height: 1.45; letter-spacing: .01em; opacity: .82;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.g-tags { display: flex; align-items: center; gap: 6px; flex: none; }
.g-tags .badge {
  padding: 0 5px; font-size: 10px; font-weight: 500;
  letter-spacing: .02em; border-radius: 3px; opacity: .64;
  line-height: 16px; height: 16px;
}
.g-meta {
  margin-left: auto; color: var(--muted); font-size: 13px;
  white-space: nowrap; flex: none;
}
.cover {
  position: relative; display: block; aspect-ratio: 16/10;
  background: var(--bg-2); overflow: hidden; border-radius: 16px;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 36px; font-weight: 800; color: var(--accent);
  background: var(--bg);
  color: var(--accent);
}
html[data-theme="ink"] .cover-fallback {
  background: var(--card);
}
.btn-fav {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); font-size: 15px;
}
.btn-fav:hover, .btn-fav.is-on { border-color: var(--accent-3); color: var(--accent-3); }

.badge {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 650; letter-spacing: .01em; line-height: 1.4;
}
.badge-web, .badge-in {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
}
.badge-steam {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
}
.badge-out {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
}
.badge-hot {
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
  color: var(--accent);
}
.badge-new {
  background: color-mix(in srgb, var(--sky) 16%, var(--card));
  color: var(--sky);
}
.badge-rec {
  background: color-mix(in srgb, var(--accent-2) 16%, var(--card));
  color: var(--accent-2);
}
.badge-free {
  background: color-mix(in srgb, var(--accent-3) 18%, var(--card));
  color: var(--accent-3);
}
html[data-theme="ink"] .badge-web,
html[data-theme="ink"] .badge-in,
html[data-theme="ink"] .badge-out,
html[data-theme="ink"] .badge-steam {
  background: transparent; color: var(--muted); border-color: var(--line);
}
html[data-theme="ink"] .badge-free {
  background: color-mix(in srgb, var(--accent-3) 18%, var(--card));
  color: var(--accent-3);
}

.cat-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.cat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px;
  font-weight: 600;
}
.cat-card .ico { font-size: 14px; display: inline; width: auto; height: auto; }
.cat-card:hover {
  border-color: var(--accent); color: var(--accent);
}
.cat-card strong { font-weight: 650; }

.two-col { display: grid; grid-template-columns: 1fr; gap: 28px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 8px;
}
.panel h2 { font-size: 18px; margin: 10px 12px 6px; }
.list-row {
  display: flex; gap: 12px; align-items: center; padding: 12px 12px;
  border-bottom: 1px solid var(--line); font-size: 14px; border-radius: 12px;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--card-hover); }
.list-row .g-fav { margin-right: 2px; }
.list-row .n {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--bg); font-weight: 750; font-size: 12px; color: var(--muted);
}
.list-row:nth-child(-n+3) .n { background: var(--accent); color: var(--on-accent); }
.list-row:nth-child(2) .n { background: var(--sky); }
.list-row:nth-child(3) .n { background: var(--accent-2); }
.crumb { color: var(--muted); font-size: 13px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumb a:hover { color: var(--accent); }

.game-hero {
  display: grid; grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.12fr);
  gap: 28px 44px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 28px; margin-bottom: 32px;
  position: relative;
}
.game-hero.no-cover {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 56px 48px 44px;
  background-color: var(--card);
  background-image: radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%);
}
.game-hero.no-cover .gh-body {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 640px;
  position: static;
}
.game-hero.no-cover .gh-head {
  flex-direction: column; align-items: center; gap: 12px;
}
.game-hero.no-cover .gh-head > .g-fav {
  width: 96px; height: 96px; border-radius: 22px; 
  margin: 0; border: 1px solid var(--line); order: 0;
  background: #fff; object-fit: contain;
}
.game-hero.no-cover .gh-head > .g-fav.g-mark {
  font-size: 42px; background: var(--bg-2); color: var(--ink);
}
.game-hero.no-cover .gh-head .badge { order: 1; margin: 4px 0 0; }
.game-hero.no-cover .gh-titles { flex: none; width: 100%; order: 2; }
.game-hero.no-cover h1 {
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 750; letter-spacing: -.04em; line-height: 1.18;
}
.game-hero.no-cover .gh-en {
  margin-top: 8px; font-size: 15px; letter-spacing: .02em;
}
.game-hero.no-cover .gh-info {
  align-items: center; margin-top: 14px;
}
.game-hero.no-cover .gh-meta {
  justify-content: center; margin-top: 0; font-size: 13px;
}
.game-hero.no-cover .gh-tags { justify-content: center; }
.game-hero.no-cover .gh-top {
  flex-direction: column; align-items: center; width: 100%;
}
.game-hero.no-cover .gh-stat {
  align-items: center; text-align: center;
  margin-top: 16px; padding: 0;
}
.game-hero.no-cover .gh-play-row {
  width: auto; margin-top: 0; justify-content: center;
}
.game-hero.no-cover .gh-play,
.game-hero.no-cover .gh-luck {
  min-height: 38px; padding: 8px 18px; font-size: 14px;
}
.game-hero.no-cover .gh-tools {
  width: auto; margin-top: 2px; padding-top: 0;
  position: static; justify-content: center;
}
.game-hero.no-cover .gh-actions {
  flex-direction: column; align-items: center; width: 100%;
  margin-top: 22px; padding-top: 0; border: 0;
}
.game-hero.has-cover .gh-cover {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  align-self: start;
  padding: 0; margin: 0; border: 0;
  background: var(--bg-2);
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  font: inherit; color: inherit;
  line-height: 0;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
.game-hero.has-cover .cover-view {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  container-type: size;
  background: transparent;
}
.game-hero.has-cover .gh-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  min-height: 100%;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
  animation: cover-pan-y 32s ease-in-out infinite;
}
.game-hero.has-cover .gh-cover:hover img,
.game-hero.has-cover .gh-cover:focus-visible img {
  animation-play-state: paused;
}
@keyframes cover-pan-y {
  0%, 14% { transform: translateY(0); }
  46%, 60% { transform: translateY(min(0px, calc(100cqh - 100%))); }
  90%, 100% { transform: translateY(0); }
}
.cover-lightbox {
  position: fixed; inset: 0; z-index: 90;
  padding: 24px 16px; overflow: auto;
  background: rgba(28, 27, 25, .72);
  cursor: zoom-out;
  text-align: center;
}
.cover-lightbox img {
  display: inline-block; vertical-align: middle;
  max-width: min(1100px, 96vw);
  width: auto; height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.gh-body {
  min-width: 0;
  display: flex; flex-direction: column;
  position: relative;
  padding: 4px 4px 2px 0;
}
.gh-head { display: flex; align-items: flex-start; gap: 14px; min-width: 0; flex: 1; }
.gh-head > .g-fav {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--bg); flex: none; margin-top: 2px;
}
.gh-head > .g-fav.g-mark { font-size: 20px; background: var(--bg-2); }
.gh-titles { flex: 1; min-width: 0; }
.game-hero.has-cover h1 {
  margin: 0; font-size: 28px; font-weight: 750; letter-spacing: -.04em;
  line-height: 1.22; display: block;
}
.game-hero.has-cover .gh-head { padding-right: 0; }
.gh-en { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.gh-head .badge { margin-top: 4px; flex: none; }
.gh-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px 20px; min-width: 0;
}
.gh-info {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 16px;
}
.gh-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 10px; margin: 0; color: var(--muted); font-size: 13px;
}
.gh-meta a { color: var(--muted); }
.gh-meta a:hover { color: var(--accent); }
.gh-meta .badge { margin: 0; }
.gh-tags {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px; margin: 0;
}
.gh-tags a {
  color: var(--muted); font-size: 12px; font-weight: 550;
  letter-spacing: .01em;
  padding: 3px 10px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line);
}
.gh-tags a:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 18%, var(--line)); }
.gh-stat {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 3px; margin: 2px 0 0; padding: 0 26px 0 0;
  position: relative; flex: none; text-align: right;
}
.gh-stat::before { content: none; }
.gh-stat strong {
  font-size: 22px; font-weight: 750; letter-spacing: -.03em; line-height: 1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--ink);
}
.gh-stat span {
  font-size: 10px; font-weight: 650; letter-spacing: .16em;
  color: var(--muted);
}
.gh-actions {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 14px; margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.gh-play-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px; width: auto; max-width: 100%;
}
.gh-play,
.gh-luck {
  display: inline-flex; flex: none; width: auto;
  box-sizing: border-box; margin: 0;
  min-height: 42px; padding: 9px 20px;
  font-size: 14px; letter-spacing: 0; font-weight: 700;
  justify-content: center; white-space: nowrap;
}
.gh-play .ico,
.gh-luck .ico { width: 16px; height: 16px; }
.gh-report {
  position: absolute; top: 0; right: 0; z-index: 2;
  width: 26px; height: 26px; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 7px; background: transparent;
  color: var(--muted); cursor: pointer; opacity: .42;
}
.game-hero.no-cover .gh-report {
  top: 10px; right: 10px;
}
.gh-report:hover,
.gh-report:focus-visible {
  opacity: 1; color: var(--ink);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  outline: none;
}
.gh-report .ico { width: 14px; height: 14px; }
.gh-tools {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0; margin: 0; padding: 0; border: 0;
}
.gh-tool {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 0; padding: 0; border: 0; background: none;
  color: var(--muted); font: inherit; font-size: 12px; font-weight: 500;
  line-height: 1; cursor: pointer; white-space: nowrap;
  opacity: .78;
}
.gh-tool + .gh-tool::before {
  content: "·";
  margin: 0 10px;
  color: var(--line); font-weight: 400; opacity: 1;
}
.gh-tool:hover { color: var(--accent); opacity: 1; }
.gh-tool .ico { width: 13px; height: 13px; opacity: .7; }
.gh-tool:hover .ico { opacity: 1; }
.gh-tool[data-fav].is-on { color: var(--accent); opacity: 1; }
.btn .ico { flex: none; }
[data-fav].is-on .ico { fill: currentColor; }
.intro-block {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px 20px;
  margin: 0 0 28px;
  scroll-margin-top: 76px;
}
.intro-block h2 {
  margin: 0 0 12px; font-size: 18px; font-weight: 750;
  letter-spacing: -.02em;
}
.intro-body p {
  margin: 0; font-size: 15px; line-height: 1.85; color: var(--ink);
  word-break: break-word;
}
.intro-more {
  margin-top: 12px; padding: 0; border: 0; background: none;
  color: var(--accent); font: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer;
}
.intro-more:hover { text-decoration: underline; }

.gr-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.gr-modal[hidden] { display: none !important; }
.gr-modal-back {
  position: absolute; inset: 0;
  background: rgba(28, 27, 25, .55);
}
.gr-dialog {
  position: relative; z-index: 1;
  width: min(440px, 100%);
  max-height: min(88vh, 640px); overflow: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 22px 20px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.gr-dialog h2 {
  margin: 0 32px 8px 0; font-size: 18px; font-weight: 750;
  letter-spacing: -.02em;
}
.gr-x {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px; border: 0; background: none;
  font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer;
}
.gr-x:hover { color: var(--ink); }
.gr-lead { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.gr-need { margin: 0; font-size: 14px; }
.gr-need a { font-weight: 700; }
.gr-flash { margin: 0 0 12px; font-size: 13px; font-weight: 650; }
.gr-flash.is-ok { color: var(--ok, #4A7D6A); }
.gr-flash.is-err { color: var(--err, #A45C5C); }
.gr-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.gr-form label { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin: 0 0 6px; }
.gr-opt { font-weight: 500; }
.gr-form select,
.gr-form textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font: inherit; background: var(--bg); color: var(--ink);
  margin: 0 0 12px;
}
.gr-form textarea { min-height: 88px; resize: vertical; margin-bottom: 0; }
.gr-form select:focus,
.gr-form textarea:focus { outline: 0; border-color: var(--accent); }
.gr-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 10px;
}
.gr-row .btn { padding: 7px 14px; font-size: 13px; }

.prose {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.prose h3, .prose h1 { margin-top: 0; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tag {
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; color: var(--muted); font-weight: 600;
}

.transfer {
  max-width: 440px; margin: 48px auto; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 36px 28px;
}
.transfer h1 .g-fav { vertical-align: middle; margin-right: 8px; }
.transfer .count { font-size: 56px; color: var(--accent); line-height: 1; margin: 10px 0; font-variant-numeric: tabular-nums; font-weight: 800; }
.progress { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: 16px 0 20px; }
.progress > span {
  display: block; height: 100%; width: 0; background: var(--accent);
  animation: bar 3s linear forwards;
}
@keyframes bar { to { width: 100%; } }

.play-frame { background: var(--bg-2); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.play-frame iframe { width: 100%; height: 75vh; min-height: 480px; border: 0; background: var(--bg-2); }
.play-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.play-bar .hero-actions { flex: none; }

/* 电脑游玩页：去掉侧栏，给小黑屋原版 920×740 舞台足够空间 */
.play-page .shell {
	grid-template-columns: 1fr;
	gap: 0;
}
.play-page .side-cats { display: none; }
.play-page .site-main { padding: 8px 0 12px; }
.play-page .play-frame iframe {
	height: calc(100vh - 124px);
	height: calc(100dvh - 124px);
	min-height: 640px;
}

.nav-account {
  max-width: 7.5em; overflow: hidden; text-overflow: ellipsis;
}
.lb-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 22px;
}
.lb-tabs a {
  display: inline-flex; align-items: center;
  color: var(--muted); font-weight: 550; font-size: 13px;
  padding: 5px 12px; border-radius: 999px; line-height: 1.2;
  border: 1px solid var(--line); background: var(--card);
}
.lb-tabs a:hover { color: var(--ink); }
.lb-tabs a.is-on {
  color: var(--ink); font-weight: 650; background: var(--bg);
  box-shadow: 0 0 0 1px var(--line);
}
.fav-cat { margin-bottom: 18px; }
.fav-cat .section-head { margin: 0 0 8px; }
.fav-cat .section-head h2 { font-size: 16px; }
.fav-cat .rank-board { margin-bottom: 0; }
.lb-login-hint { margin: -8px 0 18px; }
.hot-boards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px 24px; align-items: start;
}
.hot-cat { margin-bottom: 0; scroll-margin-top: 18px; min-width: 0; }
.hot-cat .panel { margin-top: 8px; }
.hot-cat .list-row .muted { font-variant-numeric: tabular-nums; }
.lb-overview {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px; margin-bottom: 12px;
}
.lb-card, .lb-panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px 12px;
}
.lb-panel { margin-bottom: 28px; }
.lb-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 8px;
}
.lb-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.lb-head a { color: var(--muted); font-size: 12px; font-weight: 550; }
.lb-head a:hover { color: var(--accent); }
.lb-empty { margin: 8px 0 4px; font-size: 13px; }
.lb-list, .lb-table { list-style: none; margin: 0; padding: 0; }
.lb-list li, .lb-table li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 4px; border-radius: 8px; font-size: 13px;
}
.lb-table li { padding: 10px 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
.lb-table { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lb-table li:last-child { border-bottom: 0; }
.lb-list li.is-me, .lb-table li.is-me { background: var(--bg); }
.lb-list .n, .lb-table .n {
  width: 22px; flex: none; text-align: center;
  font-size: 12px; font-weight: 750; color: var(--muted);
}
.lb-list li.is-r1 .n, .lb-table li.is-r1 .n { color: var(--accent); }
.lb-list .who, .lb-table .who {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb-list .sc, .lb-table .sc {
  flex: none; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px;
}
.lb-list i, .lb-table i {
  font-style: normal; font-size: 10px; margin-left: 6px;
  color: var(--accent); font-weight: 650;
}
.lb-more {
  display: block; margin-top: 6px; padding: 6px 0 2px;
  text-align: center; font-size: 13px; font-weight: 550; color: var(--muted);
}
.lb-more:hover { color: var(--accent); }
.lb-play {
  display: inline-block; margin-top: 8px; font-size: 12px; color: var(--muted);
}
.lb-play:hover { color: var(--accent); }

.auth-card {
  max-width: 400px; margin: 8px auto 40px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px;
}
.auth-card h1 { font-size: 20px; margin: 0 0 8px; }
.auth-card .muted { margin: 0 0 18px; font-size: 13px; }
.auth-card form { display: flex; flex-direction: column; gap: 0; }
.auth-card label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.auth-card input[type=text],
.auth-card input[type=password],
.auth-card input:not([type]) {
  width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 12px; background: var(--bg); color: var(--ink); box-sizing: border-box;
}
.auth-card .btn { margin-top: 18px; height: 40px; }
.auth-card .btn-ghost { margin-left: 8px; }
.auth-tabs {
  display: inline-flex; align-items: center; padding: 2px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
}
.auth-tabs a {
  color: var(--muted); font-weight: 550; font-size: 13px;
  padding: 5px 14px; border-radius: 999px;
}
.auth-tabs a.is-on { color: var(--ink); font-weight: 650; background: var(--card); }
.form-err { color: #A45C5C; font-size: 13px; margin: 0 0 8px; }
.form-ok { color: #4A7D6A; font-size: 13px; margin: 0 0 14px; }
.auth-more { margin-top: 12px; font-size: 12px; color: var(--muted); }
.auth-more summary { cursor: pointer; user-select: none; list-style: none; }
.auth-more summary::-webkit-details-marker { display: none; }
.auth-more summary::after { content: " ▾"; font-size: 10px; }
.auth-more[open] summary { margin-bottom: 8px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.account-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px;
}
.account-tabs a {
  height: 34px; padding: 0 14px; display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font-size: 13px; font-weight: 650; color: var(--muted);
}
.account-tabs a.is-active {
  color: var(--on-accent); background: var(--accent); border-color: var(--accent);
}
.account-hub {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 40px;
}
.account-hub a {
  display: block; padding: 16px 16px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.account-hub strong { display: block; margin-bottom: 6px; font-size: 15px; }
.account-hub span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.account-grid {
  display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px; margin-bottom: 16px; align-items: start;
}
.account-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 16px; margin-bottom: 40px;
}
.account-card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.account-name { margin: 0 0 8px; font-size: 20px; font-weight: 750; }
.account-points { margin: 0 0 10px; font-size: 15px; font-weight: 650; }
.account-points b { color: var(--accent); font-size: 22px; font-variant-numeric: tabular-nums; }
.invite-card { margin-bottom: 16px; }
.invite-label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.invite-row { display: flex; gap: 8px; align-items: center; }
.invite-row input {
  flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 12px; background: var(--bg); color: var(--ink); box-sizing: border-box;
  font-size: 13px;
}
.invite-row .btn { margin: 0; height: 40px; flex: none; padding: 0 14px; }
.invite-code-hint { margin: 8px 0 0; }
.invite-list { margin-top: 12px; }
.account-card .muted { margin: 0 0 4px; font-size: 13px; }
.logout-form { margin-top: 16px; }
.logout-form .btn { margin-top: 0; }
.account-card .lb-table { border: 0; background: transparent; }
.account-card .lb-table li { padding-left: 0; padding-right: 0; }

.search-page input.big {
  width: 100%; height: 46px; border-radius: 999px; border: 1px solid var(--line);
  padding: 0 18px; background: var(--card); color: var(--ink); font-size: 15px;
}

.pager { display: flex; gap: 8px; justify-content: center; margin: 28px 0; flex-wrap: wrap; }
.pager a {
  min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px;
  border-radius: 8px; background: var(--card); border: 1px solid var(--line); font-size: 13px;
}
.pager a.is-current, .pager a:hover { border-color: var(--accent); color: var(--on-accent); background: var(--accent); }

.site-footer {
  margin-top: 8px;
  padding: 44px 0 22px;
  background: color-mix(in srgb, var(--card) 78%, var(--bg));
  border-top: 1px solid var(--line);
}
.footer-inner { display: flex; flex-direction: column; gap: 0; }
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 72px;
  align-items: start;
}
.site-footer h4 {
  margin: 0 0 14px; font-size: 11px; font-weight: 700;
  color: var(--muted); letter-spacing: .16em;
}
.footer-logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.footer-logo img { width: 28px; height: 28px; border-radius: 8px; display: block; }
.footer-logo strong { font-size: 16px; font-weight: 750; letter-spacing: .01em; }
.footer-brand p {
  margin: 0; max-width: 36ch; color: var(--muted);
  font-size: 13px; line-height: 1.8;
}
.footer-nav .footer-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 36px;
}
.footer-links a,
.footer-links .muted {
  display: block; margin: 0; padding: 0;
  color: var(--ink); font-size: 13px; font-weight: 600;
  opacity: .7; line-height: 1.7; white-space: nowrap;
}
.footer-links a:hover { opacity: 1; color: var(--accent); }
.footer-friends {
  display: flex; align-items: baseline; gap: 14px 28px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--line);
}
.footer-friends h4 { margin: 0; flex: none; }
.footer-friends .footer-links {
  display: flex; flex-wrap: wrap; gap: 6px 20px; flex: 1; min-width: 0;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px 16px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.copy-text {
  margin: 0; display: flex; align-items: center; flex-wrap: wrap;
  color: var(--muted); font-size: 12px; line-height: 1.5;
}
.copy-text a { color: var(--muted); }
.copy-text a:hover { color: var(--accent); }
.copy-sep { margin: 0 8px; color: var(--line); font-weight: 700; }
.copy-sitemap {
  font-size: 11px; color: var(--muted); opacity: .34;
  letter-spacing: .08em; text-transform: lowercase; flex: none;
}
.copy-sitemap:hover { opacity: .62; color: var(--muted); }
.empty { text-align: center; padding: 56px 16px; color: var(--muted); }

.transfer-page .side-cats { display: none; }
.transfer-page .shell { grid-template-columns: 1fr; }
.random-page .side-cats { display: none; }
.random-page .shell { grid-template-columns: 1fr; }
.random-page .site-main { padding: 0; }
.luck-page {
  min-height: calc(100vh - var(--header-h) - 140px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; position: relative;
  padding: 56px 20px 72px;
}
.luck-orb {
  position: relative; display: grid; place-items: center;
  width: 84px; height: 84px; margin: 0 0 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--accent) 22%, var(--card)), var(--card));
  border: 1px solid var(--line);
  color: var(--accent);
  animation: luck-float 5.2s ease-in-out infinite;
}
.luck-orb::after {
  content: ""; position: absolute; inset: -11px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  animation: luck-ring 5.2s ease-in-out infinite;
}
.luck-orb .ico { width: 26px; height: 26px; }
.luck-kicker {
  margin: 0 0 8px; font-size: 12px; font-weight: 650;
  letter-spacing: .2em; color: var(--muted);
}
.luck-page h1 {
  margin: 0 0 10px; font-size: clamp(28px, 5vw, 40px);
  font-weight: 750; letter-spacing: -.04em; line-height: 1.15;
}
.luck-lead {
  margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.6;
}
.luck-count {
  margin: 0 0 26px; color: var(--muted); font-size: 13px; font-weight: 550;
  letter-spacing: .04em; line-height: 1;
}
.luck-count b {
  display: inline-block; margin: 0 5px;
  color: var(--ink); font-size: 28px; font-weight: 750;
  letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums; vertical-align: -2px;
}
.luck-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 168px; height: 48px; padding: 0 28px;
  border-radius: 999px; overflow: hidden; position: relative;
  background: var(--accent); color: var(--on-accent);
  font-weight: 750; font-size: 16px; letter-spacing: .06em;
}
.luck-btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.luck-btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 35%, color-mix(in srgb, #fff 34%, transparent) 50%, transparent 65%);
  transform: translateX(-130%);
  animation: luck-shine 6s ease-in-out infinite;
}
.luck-btn.is-go {
  pointer-events: none; transform: scale(.98);
  opacity: .88;
}
.luck-meta { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
@keyframes luck-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes luck-ring {
  0%, 100% { opacity: .45; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.04); }
}
@keyframes luck-shine {
  0%, 58% { transform: translateX(-130%); }
  78%, 100% { transform: translateX(130%); }
}
@media (prefers-reduced-motion: reduce) {
  .luck-orb, .luck-orb::after, .luck-btn::before { animation: none; }
  .game-hero.has-cover .gh-cover img { animation: none; }
}

@media (max-width: 1100px) {
  .game-hero:not(.has-cover) { grid-template-columns: 1fr; }
  .game-hero.has-cover { grid-template-columns: minmax(200px, 0.72fr) minmax(0, 1fr); gap: 22px 28px; }
  .game-hero.has-cover h1 { font-size: 24px; }
  .footer-main { gap: 28px 40px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; gap: 16px; }
  .side-cats {
    position: static; display: flex; flex-wrap: nowrap;
    overflow-x: auto; gap: 6px; padding: 8px;
    scrollbar-width: none;
  }
  .side-cats::-webkit-scrollbar { display: none; }
  .side-title { display: none; }
  .side-cats a { flex: none; white-space: nowrap; }
  .related-grid { gap: 14px; }
}
@media (max-width: 720px) {
  .account-hub { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .invite-row { flex-wrap: wrap; }
  .invite-row .btn { width: 100%; }
  .site-header { margin-top: 5px; }
  .container { width: min(var(--max), calc(100% - 28px)); }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .logo { order: 0; }
  .search-toggle {
    display: grid; order: 1; margin-left: auto;
  }
  .skin-wrap { order: 2; }
  .nav-toggle { display: grid; order: 3; margin-left: 0; }
  .search-box {
    display: none; order: 4; flex: 1 1 100%; width: auto;
  }
  .search-box.is-open { display: flex; }
  .search-toggle.is-on { border-color: var(--accent); color: var(--accent); }
  .site-nav {
    display: none; width: 100%; order: 5; flex: 1 1 100%;
  }
  .site-nav.is-open {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; flex-wrap: wrap;
    padding: 4px 0 8px;
  }
  .site-nav.is-open .nav-inner { flex: 1; min-width: 0; order: 0; }
  .g-meta, .g-tags, .g-intro { display: none; }
  .search-hint { display: none; }
  .hero-card h1 { font-size: 18px; }
  .section-head { gap: 8px; }
  .section-tools { gap: 8px; }
  .section-head .sort-switch a { padding: 4px 9px; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rank-board,
  .home-page .rank-board { grid-template-columns: 1fr; gap: 5px; }
  .home-hot { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .home-hot-card { padding: 8px 6px 8px; }
  .hh-media { width: 34px; height: 34px; }
  .hh-media .g-fav { width: 30px; height: 30px; border-radius: 8px; }
  .hot-boards { grid-template-columns: 1fr; gap: 18px; }
  .tile-cover, .tile-icon { height: 100px; }
  .site-main { padding: 14px 0 48px; }
  .play-page .site-main { padding: 10px 0 16px; }
  .play-page .play-bar { margin-bottom: 8px; }
  .play-bar .hero-actions { width: 100%; }
  .play-frame iframe {
    height: calc(100vh - 160px);
    height: calc(100dvh - 160px);
    min-height: 78vh;
  }
  .site-footer {
    padding: 28px 0 calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .footer-main {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .footer-brand p { max-width: none; }
  .footer-logo img { width: 26px; height: 26px; }
  .footer-logo strong { font-size: 15px; }
  .footer-nav .footer-links { gap: 6px 24px; }
  .footer-friends {
    flex-direction: column; align-items: flex-start; gap: 10px;
    margin-top: 22px; padding-top: 18px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    text-align: center;
  }
  .copy-text {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    line-height: 1.55;
  }
  .copy-sep { display: none; }
  .copy-sitemap {
    align-self: center;
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: .12em;
  }
  .logo small { display: none; }
  .game-hero { padding: 18px 16px; }
  .game-hero.has-cover { grid-template-columns: 1fr; gap: 18px; padding: 16px; }
  .game-hero.has-cover h1 { font-size: 22px; }
  .game-hero.has-cover .gh-cover { border-radius: 12px; }
  .gh-stat { padding-right: 22px; }
  .gh-stat strong { font-size: 20px; }
  .gh-actions { margin-top: 18px; padding-top: 16px; }
  .game-hero.no-cover { padding: 36px 20px 28px; }
  .game-hero.no-cover h1 { font-size: clamp(24px, 7vw, 32px); }
  .game-hero.no-cover .gh-head > .g-fav {
    width: 72px; height: 72px;  border-radius: 18px;
  }
  .gh-head > .g-fav { width: 40px; height: 40px; }
  .gh-actions { margin-top: 16px; padding-top: 14px; }
  .gh-play, .gh-luck { min-height: 38px; padding: 7px 16px; font-size: 13px; }
  .intro-block { padding: 18px 16px 16px; }
}

.fb-box { margin: 28px 0 8px; scroll-margin-top: 76px; }
.fb-tip { margin: -6px 0 14px; font-size: 13px; }
.fb-need {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
}
.fb-need p { margin: 0; font-size: 14px; color: var(--ink); }
.fb-form {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 16px 14px; margin-bottom: 18px;
}
.fb-form label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; font-weight: 650; }
.fb-form input, .fb-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  background: var(--bg); color: var(--ink); font: inherit; box-sizing: border-box;
}
.fb-form textarea { min-height: 96px; resize: vertical; }
.fb-form input:focus, .fb-form textarea:focus {
  outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.fb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.fb-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.fb-list { list-style: none; margin: 0; padding: 0; }
.fb-list li {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px;
}
.fb-list li.is-wait { opacity: .78; border-style: dashed; }
.fb-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.fb-meta strong { color: var(--ink); font-size: 13px; }
.fb-meta em { font-style: normal; color: var(--accent); font-weight: 650; }
.fb-list p { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
@media (max-width: 640px) {
  .fb-row { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .home-hot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
