/* wei.build 游戏站 —— 个人网站风格（2026-11-26，设计稿 ~/Downloads/wei-build-home-v2）
 * 暖白底 #FFFEFB、近黑粗字 #101010、鲜红 #FF3038 交互强调、钴蓝 #1552FF 错位硬边、淡黄 #FFF0A6 标签和高亮；方角，只有小标签带一点圆角，没有柔和阴影。
 * 骨架：顶栏（标识 | 游戏 / 排行榜 / 关于我 | 语言、我的游戏库、登录）+ 居中内容（最宽 1400）+ 页脚；手机（≤760px）导航收进汉堡菜单。
 * 卡片：整张是链接，白底细黑框 + 右下钴蓝错位边；封面 16:10 + 粗体名字 + 三个标签（主类型淡黄底）。没有"开始"按钮。
 * 标题字体 Archivo（中日韩用思源黑体 900），手写字 Caveat（"by me."、页脚标语）。 */
:root {
  --bg: #fffefb;
  --surface: #ffffff;
  --surface-2: #f6f3ea;
  --surface-3: #ece6d6;
  --ink: #101010;
  --line: #e2ddd0;
  --line-2: #101010;
  --text: #101010;
  --heading: #101010;
  --muted: #57534b;
  --dim: #8c877c;
  --red: #ff3038;
  --red-hi: #e81f27;
  --blue: #1552ff;
  --yellow: #fff0a6;
  --yellow-2: #ffd84a;
  --link: #e81f27;
  --ok: #18864a;
  --bad: #d6232b;
  --off: 6px 6px 0 var(--blue);
  --shadow: 6px 6px 0 var(--blue);
  --top-h: 84px;
  --cjk: "Noto Sans SC", "PingFang SC", "Microsoft YaHei";
  --sans: "Inter", var(--cjk), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Archivo", "Inter", var(--cjk), system-ui, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  /* 兼容旧样式名（游戏页、排行榜、账号弹窗里还在用） */
  --klein: var(--red);
  --klein-hi: var(--red-hi);
  --klein-soft: var(--yellow);
  --brand: var(--red);
  --card: var(--surface);
  /* 小装饰：红色三道"闪光"、像素小格（黄 / 红 / 蓝 / 红色雪花） */
  --spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M5 21l6-9M14 25l8-14M19 28l8-5' stroke='%23FF3038' stroke-width='3' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  --px-yellow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 60'%3E%3Cg fill='%23FFD84A'%3E%3Crect width='12' height='12'/%3E%3Crect x='12' y='12' width='12' height='12'/%3E%3Crect y='24' width='12' height='12'/%3E%3Crect x='12' y='36' width='12' height='12'/%3E%3Crect y='48' width='12' height='12'/%3E%3C/g%3E%3C/svg%3E");
  --px-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cg fill='%23FF3038'%3E%3Crect x='10' width='10' height='10'/%3E%3Crect y='10' width='10' height='10'/%3E%3Crect x='20' y='10' width='10' height='10'/%3E%3Crect x='10' y='20' width='10' height='10'/%3E%3C/g%3E%3C/svg%3E");
  --px-blue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 30'%3E%3Cg fill='%231552FF'%3E%3Crect x='30' width='10' height='10'/%3E%3Crect x='10' y='10' width='10' height='10'/%3E%3Crect x='30' y='10' width='10' height='10' fill-opacity='.0'/%3E%3Crect x='20' y='10' width='10' height='10' fill-opacity='.0'/%3E%3Crect x='20' width='10' height='10' fill-opacity='.0'/%3E%3Crect y='20' width='10' height='10'/%3E%3Crect x='20' y='20' width='10' height='10'/%3E%3Crect x='20' y='10' width='10' height='10'/%3E%3C/g%3E%3C/svg%3E");
  --px-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cg fill='%23FF3038'%3E%3Crect x='11' y='2' width='8' height='26'/%3E%3Crect x='2' y='11' width='26' height='8'/%3E%3Crect x='4' y='4' width='6' height='6'/%3E%3Crect x='20' y='4' width='6' height='6'/%3E%3Crect x='4' y='20' width='6' height='6'/%3E%3Crect x='20' y='20' width='6' height='6'/%3E%3C/g%3E%3C/svg%3E");
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M0 0h12L6 8z' fill='%23101010'/%3E%3C/svg%3E");
  color-scheme: light;
}
html[lang="zh-TW"] { --cjk: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei"; }
html[lang="ja"] { --cjk: "Noto Sans JP", "Hiragino Sans", "Yu Gothic"; }
html[lang="ko"] { --cjk: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic"; }

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { color: var(--heading); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.m-only { display: none !important; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--yellow); color: var(--ink); }

/* 小装饰 */
.spark { display: inline-block; flex: none; width: .62em; height: .62em; margin-left: .08em; vertical-align: .55em; background: var(--spark) center / contain no-repeat; }
.px { display: inline-block; flex: none; background: center / contain no-repeat; }
.px-yellow { width: 18px; height: 45px; background-image: var(--px-yellow); }
.px-red { width: 30px; height: 30px; background-image: var(--px-red); }
.px-blue { width: 40px; height: 30px; background-image: var(--px-blue); }
.px-red-star { width: 30px; height: 30px; background-image: var(--px-star); }
/* 红色手绘下划线（只画在前半截） */
.ul { position: relative; display: inline-block; }
.ul::after { content: ""; position: absolute; left: -2px; bottom: -.02em; width: 46%; height: .1em; min-height: 4px; border-radius: 999px; background: var(--red); transform: rotate(-1.2deg); }
.by-me { position: relative; display: inline-block; font-family: var(--hand); font-size: 34px; font-weight: 700; line-height: 1; transform: rotate(-6deg); }
.by-me::after { content: ""; position: absolute; left: 30%; right: -6px; bottom: -6px; height: 4px; border-radius: 999px; background: var(--red); transform: rotate(-4deg); }
.tb-rule { display: block; flex: none; width: 2px; height: 34px; background: var(--ink); }

/* ---------- 顶栏 ---------- */
.topbar { position: fixed; z-index: 50; left: 0; right: 0; top: 0; height: var(--top-h); display: flex; align-items: center; gap: 28px; padding: 0 max(24px, calc((100vw - 1400px) / 2)); background: var(--bg); }
.topbar::after { content: ""; position: absolute; left: max(24px, calc((100vw - 1400px) / 2)); right: max(24px, calc((100vw - 1400px) / 2)); bottom: 0; height: 2px; background: var(--ink); }
.brand { display: block; flex: none; line-height: 0; }
.brand img { display: block; width: auto; height: 58px; }
.top-nav { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-nav a { position: relative; z-index: 0; padding: 6px 16px; font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.top-nav a::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--red); opacity: .16; transform: skewX(-8deg) scaleX(0); transform-origin: left; transition: transform .22s ease, opacity .22s ease; }
.top-nav a:hover::before { transform: skewX(-8deg) scaleX(1); } /* 悬停：淡红色从左向右铺满整个按钮 */
.top-nav a.on { color: #fff; }
.top-nav a.on::before { transform: skewX(-8deg); opacity: 1; }
.tools { display: flex; align-items: center; gap: 8px; flex: none; }
.tb-btn { display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; border: 2px solid transparent; background: none; color: var(--ink); text-decoration: none; cursor: pointer; }
.tb-btn:hover { background: var(--yellow); border-color: var(--ink); }
.tb-btn .i { width: 22px; height: 22px; }
.tb-btn.on .i { fill: var(--red); color: var(--red); }
.tb-menu { display: none; }
.tb-menu .i { width: 28px; height: 28px; stroke-width: 2.6; }
.lang-slot { position: relative; }

/* 弹出层（语言菜单、账号菜单、下拉选择） */
.pop, .lang-menu, .acct-menu, .wsel-pop { background: var(--surface); border: 2px solid var(--ink); border-radius: 0; box-shadow: var(--off); }
.lang-menu { position: absolute; z-index: 60; right: 0; top: calc(100% + 10px); display: flex; flex-direction: column; min-width: 170px; padding: 6px; }
.lang-menu a { padding: 8px 12px; font-size: 15px; text-decoration: none; }
.lang-menu a:hover { background: var(--surface-2); }
.lang-menu a.on { background: var(--yellow); font-weight: 700; }

/* 账号：没登录是红框"登录"；登录后头像 + 名字 + 小箭头，菜单：我的游戏库 / 账号设置 / 退出登录 */
.acct-slot { position: relative; flex: none; }
.acct-chip { display: inline-flex; align-items: center; gap: 10px; max-width: 230px; height: 46px; padding: 0 10px 0 2px; border: 0; background: none; color: var(--ink); font-family: var(--display); font-size: 19px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.acct-chip .ava { width: 42px; height: 42px; font-size: 24px; border: 2px solid var(--ink); background: var(--surface); }
.acct-name { overflow: hidden; text-overflow: ellipsis; }
.acct-caret { width: 18px; height: 18px; stroke-width: 2.6; }
.acct-chip:hover .acct-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.acct-chip.login { gap: 8px; padding: 0 16px; border: 2px solid var(--red); color: var(--red); font-size: 18px; }
.acct-chip.login .i { width: 22px; height: 22px; }
.acct-chip.login:hover { background: var(--red); color: #fff; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; display: flex; flex-direction: column; min-width: 220px; padding: 6px; }
.acct-menu a, .acct-menu button { display: block; padding: 9px 14px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; text-align: left; text-decoration: none; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--surface-2); }
.acct-menu a.on { background: var(--yellow); font-weight: 700; }
.acct-menu hr { margin: 4px 8px; border: 0; border-top: 1.5px solid var(--line); }

/* 手机汉堡菜单 */
.m-menu { position: fixed; z-index: 49; left: 0; right: 0; top: var(--top-h); display: flex; flex-direction: column; padding: 8px 16px 16px; background: var(--bg); border-bottom: 2px solid var(--ink); box-shadow: 0 6px 0 var(--blue); }
.m-menu > a { padding: 12px 4px; border-bottom: 1.5px solid var(--line); font-family: var(--display); font-size: 22px; font-weight: 800; text-decoration: none; }
.m-menu > a.on { color: var(--red); }
.m-langs { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 14px 4px 0; font-size: 14px; }
.m-langs a { color: var(--muted); text-decoration: none; }
.m-langs a.on { color: var(--ink); font-weight: 700; }

/* ---------- 主区域 / 页脚 ---------- */
.main { min-height: 100dvh; display: flex; flex-direction: column; padding: var(--top-h) 24px 0; }
.main > * { width: 100%; max-width: 1400px; margin-left: auto; margin-right: auto; }
.panel { flex: 1; padding: 16px 0 48px; }
.site-footer { padding: 18px 0 calc(24px + env(safe-area-inset-bottom)); border-top: 2px solid var(--ink); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.foot-brand { line-height: 0; }
.foot-brand img { width: auto; height: 42px; }
.foot-slogan { position: relative; z-index: 0; margin: 0; padding: 4px 18px; font-family: var(--hand); font-size: 26px; font-weight: 700; line-height: 1.2; }
.foot-slogan::before { content: ""; position: absolute; z-index: -1; inset: 2px 0; background: var(--yellow); border-radius: 4px 14px 6px 12px; transform: rotate(-1.2deg); }
html:not([lang="en"]) .foot-slogan { font-family: var(--sans); font-size: 17px; font-weight: 600; font-style: italic; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-left: auto; font-size: 16px; }
.footer-links i { color: var(--muted); font-style: normal; }
.footer-links a { text-decoration: none; }
.footer-links a:hover, .footer-links a.on { color: var(--red); text-decoration: underline; text-underline-offset: 4px; }
.foot-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot-langs a { color: var(--muted); text-decoration: none; }
.foot-langs a:hover, .foot-langs a.on { color: var(--ink); }
.foot-langs a.on { font-weight: 700; }
.foot-copy { margin-left: auto; }

/* ---------- 标题 ---------- */
.page-head { position: relative; margin: 8px 0 26px; padding-left: 34px; }
.hero-px { position: absolute; left: 0; top: 10px; }
.page-title { margin: 0; font-family: var(--display); font-size: clamp(38px, 5vw, 64px); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.page-sub { margin: 10px 0 0; font-size: 19px; }
.shelf { margin: 0 0 44px; }
.sec-h { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; font-family: var(--display); font-size: clamp(26px, 3vw, 38px); font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.sec-h.big { font-size: clamp(30px, 3.6vw, 48px); }
.sec-rule { flex: 1; height: 2px; background: var(--ink); }
.shelf-h { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-family: var(--display); font-size: 22px; font-weight: 900; letter-spacing: -.01em; line-height: 1.3; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.crumbs span { color: var(--dim); }
.crumbs b { color: var(--ink); font-weight: 600; }
.link-red { display: inline-flex; align-items: center; gap: 4px; color: var(--red); font-family: var(--display); font-size: 21px; font-weight: 800; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.link-red .i { width: .95em; height: .95em; stroke-width: 2.8; }
.link-red:hover { color: var(--red-hi); }
.more-row { display: flex; justify-content: center; margin: 26px 0 0; }
.more-row.left { justify-content: flex-start; }

/* ---------- 游戏卡片：整张是链接 ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 28px; }
.gc { position: relative; min-width: 0; }
.gc-link { display: flex; flex-direction: column; height: 100%; padding: 7px 7px 12px; border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--off); color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.gc-cover { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface-2); }
.gc-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gc-title { display: block; overflow: hidden; margin: 8px 2px 0; font-family: var(--display); font-size: 24px; font-weight: 900; letter-spacing: -.02em; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.gc-tags { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin: 9px 2px 0; }
.tag { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 5px; background: var(--surface); font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; }
@media (hover: hover) {
  .gc-link:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--blue); }
}
.gc-link:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
/* 我的游戏库：卡片右上角的红色书签（点了取消收藏） */
.gc-fav { position: absolute; z-index: 2; right: 18px; top: 7px; width: 28px; height: 38px; padding: 0; border: 0; background: var(--red); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%); cursor: pointer; transition: transform .12s; }
.gc-fav .i { display: none; }
.gc-fav:hover { transform: translateY(2px); }
.gc-fav:not(.on) { background: var(--surface); outline: 2px solid var(--ink); }
@media (prefers-reduced-motion: reduce) { .gc-link, .gc-fav { transition: none; } }

/* ---------- 首页 ---------- */
/* 首页两列：左边内容（简介、游戏、说明），右边人物卡单独一列，宽屏时跟着页面滚动停在顶部 */
.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start; }
.home-main { min-width: 0; }
.me-col { position: sticky; top: calc(var(--top-h) + 20px); padding: 4px 8px 8px 0; }
.hero { margin: 4px 0 34px; }
.hero-l { position: relative; padding-left: 34px; }
.hero-h { margin: 0; font-family: var(--display); font-size: clamp(42px, 4.6vw, 66px); font-weight: 900; letter-spacing: -.035em; line-height: 1.02; }
.hero-h > span { display: block; }
.hero-h > span:last-child { position: relative; width: fit-content; }
.hero-h > span:last-child::after { content: ""; position: absolute; left: -2px; bottom: -.04em; width: 48%; height: 6px; border-radius: 999px; background: var(--red); transform: rotate(-1.2deg); }
.hero-sub { margin: 14px 0 0; font-size: 19px; line-height: 1.45; }
/* 站长人物卡：白底细黑框 + 钴蓝错位边；左边挥手小人（白底方块），右边 标签 / 名字 + by me. / 一句话 / 邮箱和社交账号 */
.me-card { display: flex; flex-direction: column; justify-content: center; gap: 16px; aspect-ratio: 3 / 5; padding: 24px 24px; border: 2px solid var(--ink); background: #fff; box-shadow: 8px 8px 0 var(--red); } /* 3:5 竖版，白底，上下结构：头像、名字、介绍、按钮依次往下，中间不画线；阴影用按钮红 */
.me-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.me-hgroup { display: flex; flex-direction: column; gap: 6px; }
.me-pic { display: block; flex: none; width: 150px; height: auto; margin-left: -10px; }
.me-info { display: flex; flex-direction: column; gap: 10px; }
.me-label { font-family: var(--display); font-size: 15px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.me-name { display: flex; align-items: flex-end; gap: 16px; font-family: var(--display); font-size: 52px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.me-name .by-me { margin-bottom: 4px; font-size: 30px; letter-spacing: 0; }
.me-bio { max-width: 34em; font-size: 16px; line-height: 1.55; }
.me-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.me-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.me-links a .i { width: 18px; height: 18px; }
.me-links .me-mail { background: var(--red); border-color: var(--red); color: #fff; }
.me-links .me-soc { justify-content: center; width: 40px; padding: 0; } /* 社交账号只放图标（名字在 aria-label/title 里） */
@media (hover: hover) { .me-links a:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); } }

/* 搜索 + 标签 + 排序 */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 34px; }
.tb-right { display: flex; align-items: center; gap: 18px; flex: 0 1 auto; min-width: 0; margin-left: auto; } /* 换行时也靠右 */
.shelf .toolbar { margin-bottom: 26px; } /* 首页：筛选条在「所有游戏」标题线下面 */
.tb-search { display: flex; align-items: center; gap: 10px; flex: 0 1 320px; width: 320px; min-width: 180px; height: 46px; padding: 0 12px; border: 2px solid var(--ink); background: var(--surface); }
.tb-search:focus-within { box-shadow: 4px 4px 0 var(--blue); }
.tb-search .i { width: 22px; height: 22px; stroke-width: 2.4; }
.tb-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--ink); font: inherit; font-size: 17px; outline: none; }
.tb-search input::placeholder { color: var(--dim); }
.tb-search input::-webkit-search-cancel-button { cursor: pointer; }
.tagbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.tagbar-l { margin-right: 4px; font-family: var(--display); font-size: 18px; font-weight: 800; white-space: nowrap; }
.chip { height: 38px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .12s; }
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--yellow); font-weight: 700; box-shadow: 2px 2px 0 var(--ink); }
.chip.big { height: 44px; padding: 0 30px; border-width: 2px; font-family: var(--display); font-size: 19px; font-weight: 700; }
.chip.big.on { font-weight: 800; }
.sort { flex: none; }
.sort select { height: 46px; min-width: 170px; padding: 0 44px 0 14px; border: 2px solid var(--ink); border-radius: 0; background: var(--surface) var(--chev) right 14px center / 13px 9px no-repeat; color: var(--ink); font: inherit; font-size: 17px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.sort select:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.lib-bar .lib-tabs { display: flex; gap: 14px; }
.lib-bar .tb-search { flex: 1 1 420px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 8px 0; padding: 30px 20px; border: 2px dashed var(--ink); color: var(--muted); font-size: 16px; text-align: center; }
.empty img { width: 96px; height: auto; }

/* 首页下面：广告位、作者卡片 */
.ad-wide { margin: 0 0 44px; }
.maker { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 30px; margin: 0 0 44px; padding: 20px 32px; border: 2px solid var(--ink); background: var(--yellow); box-shadow: 8px 8px 0 var(--blue); }
.maker-me { width: 130px; height: auto; }
.maker-h { margin: 0; font-family: var(--display); font-size: clamp(30px, 3.4vw, 46px); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }
.maker p { margin: 8px 0 0; font-size: 19px; }
.maker .by-me { margin-top: 6px; }

/* ---------- 按钮 ---------- */
.btn, .btn-primary, .btn-line, .btn-more { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 20px; border: 2px solid var(--ink); border-radius: 0; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s, box-shadow .12s; }
.btn, .btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn:hover, .btn-primary:hover { background: var(--red-hi); border-color: var(--red-hi); }
.btn-line, .btn.ghost, .btn-more { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn-line:hover, .btn.ghost:hover, .btn-more:hover { background: var(--yellow); }
.btn .i, .btn-primary .i, .btn-line .i, .btn-more .i { width: 17px; height: 17px; }
.btn-primary.wide { width: 100%; padding: 12px; font-size: 16px; }
.link-btn { padding: 4px 6px; border: 0; background: none; color: var(--link); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 2px solid transparent; background: none; color: var(--ink); cursor: pointer; }
.icon-btn .i { width: 21px; height: 21px; }
.icon-btn:hover { background: var(--yellow); border-color: var(--ink); }
.fav-btn.on { color: var(--red); }
.fav-btn.on .i { fill: currentColor; }

/* ---------- 排行榜里的切换 / 分页 ---------- */
.seg, .chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 30px; }
.pg { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; }
.pg:hover { background: var(--surface-2); }
.pg.on { background: var(--yellow); }
.pg:disabled { opacity: .35; cursor: default; }
.pg .i { width: 17px; height: 17px; }

/* ---------- 下拉选择（select.js，账号设置里的国家） ---------- */
.wsel { position: relative; display: block; }
.wsel-native { display: none !important; }
.wsel-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wsel-btn:focus-visible, .wsel.open .wsel-btn { box-shadow: 4px 4px 0 var(--blue); outline: none; }
.wsel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wsel-chev { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.wsel.open .wsel-chev { transform: rotate(180deg); }
.wsel-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; padding: 6px; }
.wsel.up .wsel-pop { top: auto; bottom: calc(100% + 6px); }
.wsel-q { width: 100%; margin-bottom: 6px; padding: 8px 10px; border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); font: inherit; outline: none; }
.wsel-q:focus { box-shadow: 3px 3px 0 var(--blue); }
.wsel-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; outline: none; }
.wsel-opt { padding: 8px 10px; font-size: 14px; cursor: pointer; }
.wsel-opt.on { background: var(--surface-2); }
.wsel-opt[aria-selected="true"] { background: var(--yellow); font-weight: 700; }

/* ---------- 游戏页 ---------- */
/* 尺寸策略参照 CrazyGames：右边固定一栏（300×250 广告 + 更多游戏 + 300×600 广告），游戏框 16:9，
   高度 = 窗口高 − 顶栏 − 下面一条 − 留白（宽屏 ≥1600 留得更多），框下面一条横幅广告位（820–1519 宽）。
   广告没接上时广告框不显示，但右栏宽度和游戏框尺寸不变，以后接广告不会挤动游戏。具体宽高由 app.js 的 fitStage 算 */
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; padding-top: 8px; }
.play-main { min-width: 0; }
.play-side { min-width: 0; }
.no-ads .ad-box { display: none !important; }
/* 游戏框 + 下面一条连成一张卡片 */
.stage-box { position: relative; display: flex; justify-content: center; align-items: center; width: var(--gw, 100%); height: var(--gh, auto); margin: 0 auto; border: 2px solid var(--ink); border-bottom: 0; background: #090b10; overflow: hidden; }
.stage { position: relative; overflow: hidden; background: #090b10; }
.stage.portrait { height: var(--gh, clamp(560px, calc(100dvh - 180px), 860px)); aspect-ratio: 9 / 16; }
.stage.landscape { width: 100%; height: var(--gh, auto); aspect-ratio: 16 / 9; }
.stage iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: #090b10; }
.stage-loading { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #a9adb8; background: #090b10; }
.spinner { width: 30px; height: 30px; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-hint { position: absolute; left: 20px; bottom: 18px; max-width: calc(50% - 190px); display: flex; gap: 8px; margin: 0; color: #a9adb8; font-size: 13px; line-height: 1.5; }
.stage-hint .i { width: 17px; height: 17px; margin-top: 2px; color: var(--yellow-2); }
.stage-box.landscape .stage-hint { display: none; }
/* 竖屏游戏两侧的印花背景（贴近各游戏画风、低对比，游戏本体仍是视觉中心）；提示文字改成白底小签，印花上也看得清 */
.stage-box.patterned { background-repeat: repeat; background-size: 420px 420px; background-position: center; } /* 灰白底 + 淡彩小图案（Codex 生成，四边接得上） */
.stage-box.patterned[data-bg="lianlian"] { background-color: #f2f0f3; background-image: url(/assets/img/games/lianlian-pattern.webp); }
.stage-box.patterned[data-bg="cross-link"] { background-color: #f1f0ed; background-image: url(/assets/img/games/crossmash-pattern.webp); }
.stage-box.patterned .stage { box-shadow: 0 0 0 2px var(--ink), 0 10px 30px rgba(0, 0, 0, .14); }
.stage-box.patterned .stage-hint { padding: 8px 12px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); }
.stage-box.patterned .stage-hint .i { color: var(--red); }
.fs-close { display: none; position: absolute; z-index: 6; right: max(12px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top)); width: 40px; height: 40px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: rgba(10, 12, 18, .7); color: #fff; cursor: pointer; }
.fs-close .i { width: 20px; height: 20px; }
/* 全屏规则前面加 body：压过上面给舞台定的尺寸（含 app.js 写在 style 上的宽高） */
body .stage:fullscreen, body .stage.pseudo-fs { border-radius: 0; }
body .stage:fullscreen { width: 100% !important; height: 100% !important; aspect-ratio: auto; }
.stage:fullscreen .fs-close, .stage.pseudo-fs .fs-close { display: grid; }
body .stage.pseudo-fs { position: fixed; inset: 0; z-index: 1000; width: 100vw !important; height: 100dvh !important; aspect-ratio: auto; margin: 0; }
/* 竖着拿手机玩横屏游戏：整个画面转 90° */
body .stage.pseudo-fs.rot { inset: auto; left: 100vw; top: 0; width: 100dvh !important; height: 100vw !important; transform: rotate(90deg); transform-origin: top left; }
body.fs-on { overflow: hidden; }
#btn-mute .i-off, #btn-mute.muted .i-on { display: none; }
#btn-mute.muted .i-off { display: block; }
.now-bar { display: flex; align-items: center; gap: 12px; width: var(--gw, 100%); margin: 0 auto; padding: 10px 10px 10px 14px; border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--off); }
.now-bar .game-ic { flex: none; width: 42px; height: 42px; border: 1.5px solid var(--ink); }
.now-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.now-t h1 { margin: 0; overflow: hidden; font-family: var(--display); font-size: 21px; font-weight: 900; letter-spacing: -.01em; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.now-t span { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ctrl-btns { display: flex; align-items: center; gap: 2px; }
.m-hint, .land-cta, .m-back, .m-gamebar { display: none; }
.hint-line { margin: 10px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.about { margin-top: 30px; padding: 20px 26px 26px; border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--off); }
.about-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.about-head h2 { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.about-tabs { display: flex; gap: 6px; margin-left: auto; }
.about-tabs a { padding: 5px 14px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--surface); font-size: 14px; font-weight: 500; text-decoration: none; }
.about-tabs a:hover { background: var(--surface-2); }
.about-tabs a.on { background: var(--yellow); font-weight: 700; }
.how-body { padding-top: 10px; scroll-margin-top: calc(var(--top-h) + 16px); }
.how-body [id] { scroll-margin-top: calc(var(--top-h) + 16px); }
.how-lead { max-width: 900px; margin: 0 0 6px; color: var(--text); font-size: 15.5px; line-height: 1.75; }
.how-body h2 { margin: 30px 0 12px; font-family: var(--display); font-size: 22px; font-weight: 900; letter-spacing: -.01em; }
.block-sub { margin: -6px 0 12px; color: var(--muted); }
.report { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; color: var(--muted); font-size: 13px; text-decoration: none; }
.report:hover { color: var(--red); }
.report .i { width: 16px; height: 16px; }
.like .shelf-h { font-size: 20px; margin-bottom: 12px; }
.side-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.side-grid .gc-link { padding: 4px 4px 7px; box-shadow: 4px 4px 0 var(--blue); }
.side-grid .gc-title { margin-top: 5px; font-size: 15px; }
.ad-box { position: relative; display: flex; min-height: 250px; margin-top: 24px; padding: 26px 12px 12px; border: 2px solid var(--ink); background: #f7f5ef; }
.ad-tag { position: absolute; left: 12px; top: 6px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ad-box .ad-slot { flex: 1; min-width: 0; }
.ad-rail { min-height: 600px; position: sticky; top: calc(var(--top-h) + 12px); }
.ad-top { margin: 0 0 20px; }
.ad-lead { display: none; justify-content: center; min-height: 0; margin: 16px auto 0; padding-top: 22px; width: var(--gw, 100%); }
.ad-lead .ad-slot { flex: 0 1 728px; height: 90px; }
.ad-slot.preview { display: grid; place-items: center; border: 1.5px dashed var(--ink); color: var(--dim); font-size: 13px; text-align: center; }
.ad-slot.live .ad-label { display: none; }
.ad-inline { display: none; }

/* 攻略区块（模式 / 怎么玩 / 特殊方块 / 技巧 / 常见问题），两款游戏共用 */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode, .steps li, .item, .tips-list li, .faq details, .hi-game { border: 1.5px solid var(--ink); background: var(--surface); }
.mode { display: flex; gap: 12px; align-items: flex-start; padding: 14px; }
.mode img { width: 48px; height: 48px; object-fit: contain; flex: none; }
.mode h3, .steps h3, .item h3, .hi-game h3 { margin: 0 0 4px; font-family: var(--display); font-size: 17px; font-weight: 800; }
.mode p, .steps p, .item p, .hi-game p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: s; }
.steps li { position: relative; padding: 14px 16px; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; display: grid; place-items: center; background: var(--yellow); border: 1.5px solid var(--ink); color: var(--ink); font-size: 13px; font-weight: 800; }
.steps h3 { margin-top: 10px; }
.step-art { position: relative; display: flex; align-items: center; justify-content: center; height: 76px; }
.t { display: block; width: 54px; aspect-ratio: 1; flex-shrink: 0; position: relative; z-index: 1; background: var(--ic) center / 70% no-repeat, url(img/tile-wood.webp) center / 100% 100%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.t.on { border-radius: 22%; box-shadow: 0 0 0 3px #7ee04f, 0 0 14px 4px rgba(126, 224, 79, .6); }
.t.push { animation: push 2s ease-in-out infinite; }
@keyframes push { 50% { transform: translateX(10px); } }
.beam { width: 52px; height: 7px; margin: 0 -4px; border-radius: 999px; background: linear-gradient(90deg, rgba(190, 255, 120, .3), #d8ff8a, rgba(190, 255, 120, .3)); box-shadow: 0 0 10px 3px rgba(200, 255, 120, .7); }
.combo-num { font-style: normal; font-size: 46px; font-weight: 900; color: transparent; background: linear-gradient(0deg, #ff3a00, #ff9a00 45%, #ffe27a); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 3px 0 #7a2b00); }
.t.cream { background: var(--ic) center / 74% no-repeat, #fff8ea; border: 2px solid #e6d3ad; border-radius: 22%; }
.t.cream + .t.cream { margin-left: 8px; }
.t.cream.gone { background: transparent; border: 2px dashed #cdbb93; filter: none; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; }
.item-pic { position: relative; width: 64px; height: 64px; flex-shrink: 0; display: grid; place-items: center; }
.tips-list { display: grid; gap: 8px; max-width: 920px; margin: 0; padding: 0; list-style: none; }
.tips-list li { position: relative; padding: 11px 14px 11px 36px; font-size: 14.5px; line-height: 1.65; }
.tips-list li::before { content: ""; position: absolute; left: 15px; top: 18px; width: 8px; height: 8px; background: var(--red); }
.faq { display: grid; gap: 8px; }
.faq summary { position: relative; padding: 13px 44px 13px 16px; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--red); font-size: 22px; font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0; padding: 0 16px 14px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* 特殊方块预览：和游戏里同一套方块 + 特效画布（assets/fx.js，规则抄自游戏的 style.css） */
.fx-pv { --tile-img: url(/assets/img/tile-wood.webp); position: relative; display: inline-block; flex: none; }
.fx-pv .pv-tiles { position: absolute; inset: 0; }
.fx-pv .fx-canvas { position: absolute; pointer-events: none; }
.fx-pv .pv-over { z-index: 5; }
.fx-pv .tile { position: absolute; left: 0; top: 0; width: var(--cell); height: var(--cell); z-index: 1; }
.fx-pv .face { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--tile-img) center / 100% 100% no-repeat; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); }
.fx-pv .face img { width: 76%; height: 76%; margin-top: -4%; object-fit: contain; pointer-events: none; }
.fx-pv .tile[data-fx] .face { background: none; filter: none; }
.fx-pv .tile.fx-fire .face img { filter: brightness(.55) saturate(1.3) sepia(.5) contrast(1.15); animation: pv-heat .12s steps(2) infinite; }
@keyframes pv-heat { 50% { transform: translate(.5px, -.5px); } }
.fx-pv .tile.fx-portal .face img { animation: pv-vortex 3s linear infinite; filter: drop-shadow(0 0 4px rgba(120, 220, 255, .9)); }
@keyframes pv-vortex { 0% { transform: rotate(0) scale(.86); } 50% { transform: rotate(180deg) scale(.74); } 100% { transform: rotate(360deg) scale(.86); } }
.fx-pv .tile.fx-cham .face img { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px rgba(255, 255, 255, .8)); }
.fx-pv .tile.fx-split .face img { animation: pv-crackle 1.6s ease-in-out infinite; }
@keyframes pv-crackle { 0%, 80%, 100% { transform: none; } 84% { transform: translate(-1px, 0) rotate(-2deg); } 88% { transform: translate(1px, 0) rotate(2deg); } 92% { transform: translate(-1px, 0); } }
.fx-pv .tile.fixture .face { background: none; filter: none; }
.fx-pv .tile.fixture .face img { width: 100%; height: 100%; margin-top: 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.fx-pv .pad-count { position: absolute; right: -2px; bottom: -2px; z-index: 2; padding: 0 4px; border-radius: 8px; font-size: 12px; font-weight: 900; line-height: 1.4; background: #2f2f46; color: #fff; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .fx-pv .face img, .t.push { animation: none !important; } }

/* ---------- 首页介绍区（给搜索引擎和新玩家看的正文：H1 / 简介 / 游戏介绍 / 特点 / 常见问题） ---------- */
.home-info { max-width: 1100px; margin-top: 8px; padding-top: 30px; border-top: 2px solid var(--ink); }
.hi-h1 { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 900; letter-spacing: -.02em; line-height: 1.2; }
.hi-sub { margin: 6px 0 0; color: var(--muted); }
.home-info h2 { margin: 32px 0 12px; font-family: var(--display); font-size: 22px; font-weight: 900; letter-spacing: -.01em; line-height: 1.3; }
.hi-lead { margin: 0 0 10px; color: var(--muted); font-size: 15.5px; line-height: 1.75; }
.hi-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.hi-game { display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.hi-game > div { min-width: 0; }
.hi-ic { flex: none; width: 60px; height: 60px; border: 1.5px solid var(--ink); }
.hi-game h3 a { text-decoration: none; }
.hi-game h3 a:hover { color: var(--red); }
.hi-game p { margin-bottom: 10px; }
.hi-play { font-size: 16px; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.home-info .faq { max-width: 920px; }

/* ---------- 排行榜 ---------- */
.lb { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.lb-games { display: flex; flex-direction: column; gap: 6px; }
.lb-game { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; }
.lb-game { border: 2px solid transparent; }
.lb-game:hover { background: var(--surface-2); }
.lb-game.on { border-color: var(--ink); background: var(--yellow); }
.lb-game img, .lb-emoji { width: 40px; height: 40px; flex: none; border: 1.5px solid var(--ink); object-fit: cover; display: grid; place-items: center; font-size: 26px; }
.lb-game span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-main { min-width: 0; max-width: 860px; }
.lb-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-bottom: 10px; }
.lb-desc { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.lb-box { padding: 4px 14px 8px; border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--off); }
.lb-cols, .lb-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.lb-cols { padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; }
.lb-cols span:last-child { text-align: right; }
.lb-list { list-style: none; margin: 0; padding: 0; }
.lb-row { padding: 9px 4px; border-bottom: 1px solid var(--line); }
.lb-list > .lb-row:last-child { border-bottom: 0; }
.lb-no { display: inline-grid; place-items: center; width: 32px; height: 28px; border-radius: 8px; color: var(--muted); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-row.t1 .lb-no, .lb-row.t2 .lb-no, .lb-row.t3 .lb-no { color: #111; }
.lb-row.t1 .lb-no { background: #e8b84a; }
.lb-row.t2 .lb-no { background: #b9c0c9; }
.lb-row.t3 .lb-no { background: #c98a57; }
.lb-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-who .ava { width: 32px; height: 32px; font-size: 20px; }
.lb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-score { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-row.me { background: var(--yellow); }
.lb-note { padding: 30px 10px; color: var(--muted); text-align: center; line-height: 2.4; }
.lb-me { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 18px; padding: 10px 14px; border: 2px solid var(--ink); background: var(--surface); }
.lb-me p { flex: 1 1 220px; margin: 0; }
.lb-me-t { flex: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.lb-me .lb-list { flex: 1 1 320px; min-width: 0; }
.lb-me .lb-row.me { background: none; padding: 4px 0; }

/* ---------- 账号 ---------- */
.account-page { max-width: 620px; margin: 0 auto; padding: 16px 0 40px; }
.account-page h1 { font-family: var(--display); font-size: 34px; font-weight: 900; letter-spacing: -.02em; }
.account-box { padding: 22px; border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--off); }
.acct-who { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
.ava { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: inline-grid; place-items: center; font-size: 18px; line-height: 1; background: var(--surface-2); object-fit: cover; vertical-align: middle; }
.ava.big { width: 56px; height: 56px; font-size: 36px; }
.flag { font-size: 18px; line-height: 1; }
.acct-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(16, 16, 16, .45); }
.acct-card { position: relative; width: 100%; max-width: 420px; max-height: 90dvh; overflow: auto; padding: 24px 22px 20px; border: 2px solid var(--ink); background: var(--surface); color: var(--text); box-shadow: 8px 8px 0 var(--blue); }
.acct-card.wide { max-width: 560px; }
.acct-card h2 { margin: 0 0 6px; font-family: var(--display); font-size: 24px; font-weight: 900; letter-spacing: -.01em; }
.acct-x { position: absolute; right: 10px; top: 8px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 24px; cursor: pointer; }
.acct-x:hover { background: var(--surface-2); color: var(--text); }
.acct-x .i { width: 18px; height: 18px; }
.acct-muted, .acct-label small { color: var(--muted); font-weight: 400; }
.acct-google { display: flex; justify-content: center; min-height: 44px; margin: 14px 0; }
.acct-dev { padding: 10px; border: 1.5px dashed var(--ink); }
.acct-row { display: flex; gap: 8px; margin-top: 6px; }
.acct-row input { flex: 1; }
.acct-card input, .acct-card select { width: 100%; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--surface); color: var(--text); font: inherit; }
.acct-card input:focus { box-shadow: 4px 4px 0 var(--blue); outline: none; }
.acct-label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 700; }
.acct-preview { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; font-size: 16px; font-weight: 600; }
.acct-hint { min-height: 1.2em; margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.acct-hint.ok { color: var(--ok); }
.acct-hint.bad, .acct-err { color: var(--bad); }
.acct-err { margin: 10px 0 0; font-size: 14px; }
.acct-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.acct-actions.left { justify-content: flex-start; }
.acct-legal { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; text-align: center; }
.acct-legal a, .acct-link { color: var(--link); }
.acct-or { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; color: var(--muted); font-size: 12.5px; }
.acct-or::before, .acct-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.acct-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.acct-tabs button { padding: 8px 0; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.acct-tabs button.on { background: var(--yellow); }
.acct-pw { position: relative; }
.acct-card .acct-pw input { padding-right: 44px; }
.acct-eye { position: absolute; right: 4px; top: 50%; width: 36px; height: 36px; transform: translateY(-50%); display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.acct-eye:hover { color: var(--text); }
.acct-eye .i { width: 18px; height: 18px; }
.acct-link { display: block; margin: 8px 0 0 auto; padding: 2px 0; border: 0; background: none; font: inherit; font-size: 13px; cursor: pointer; }
.acct-card [hidden] { display: none !important; }
.acct-submit { display: block; width: 100%; margin: 14px 0 12px; }
.acct-card .btn:disabled { opacity: .6; cursor: progress; }
.acct-ok { margin: 10px 0 0; padding: 10px 12px; border: 1.5px solid var(--ok); background: #eaf7ef; color: var(--ok); line-height: 1.5; }
.acct-ok a { color: inherit; font-weight: 700; }
.ava-pick { position: relative; max-height: min(264px, 36dvh); overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 8px; border: 1.5px solid var(--ink); background: var(--surface-2); }
.ava-pick h3 { margin: 0; padding: 10px 2px 6px; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.3; }
.ava-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.ava-opt { display: block; width: 100%; aspect-ratio: 1; padding: 3px; border: 0; border-radius: 50%; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ava-opt img { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--surface-2); }
.ava-opt:hover img { filter: brightness(1.08); transform: scale(1.06); }
.ava-opt:focus-visible { outline: 2px solid var(--red); outline-offset: 0; }
.ava-opt.on { background: var(--red); box-shadow: 0 0 0 2px var(--red); }
@media (prefers-reduced-motion: no-preference) { .ava-opt img { transition: transform .12s; } }

/* ---------- 隐私 / 条款 / 关于 ---------- */
.legal-wrap { display: grid; grid-template-columns: 200px minmax(0, 720px); justify-content: center; gap: 44px; padding: 8px 0 40px; }
.legal { min-width: 0; }
.legal-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; padding: 6px 14px 6px 10px; border: 1.5px solid var(--ink); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; }
.legal-back:hover { background: var(--yellow); }
.legal-back .i { width: 15px; height: 15px; }
.legal h1 { margin: 0; font-family: var(--display); font-size: clamp(32px, 4.4vw, 50px); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }
.legal-updated { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.legal-updated:empty { display: none; }
.legal-note { margin: 16px 0 0; padding: 12px 16px; border: 1.5px solid var(--ink); background: var(--yellow); font-size: 14px; line-height: 1.55; }
.legal-note a { color: var(--link); }
.legal-body { margin-top: 22px; font-size: 15.5px; line-height: 1.8; }
.legal-body .lead { margin: 0 0 8px; padding: 16px 18px; border: 2px solid var(--ink); background: var(--yellow); box-shadow: var(--off); font-size: 16px; line-height: 1.7; }
.legal-body h2 { margin: 36px 0 8px; font-family: var(--display); font-size: 23px; font-weight: 900; line-height: 1.35; scroll-margin-top: calc(var(--top-h) + 16px); }
.legal-body h3 { margin: 20px 0 4px; font-size: 16px; font-weight: 700; }
.legal-body p { margin: 0 0 12px; }
.legal-body ul { margin: 0 0 12px; padding-left: 22px; }
.legal-body li { margin: 6px 0; }
.legal-body li::marker { color: var(--red); }
.legal-body a { color: var(--link); text-underline-offset: 3px; }
.legal-body code { padding: 1px 6px; background: var(--surface-2); font-size: .88em; }
.legal-toc { position: sticky; top: calc(var(--top-h) + 16px); align-self: start; display: grid; gap: 2px; padding-top: 60px; }
.legal-toc small { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.legal-toc a { padding: 6px 12px; border-left: 2px solid var(--line); color: var(--muted); font-size: 13.5px; line-height: 1.35; text-decoration: none; }
.legal-toc a:hover { color: var(--ink); }
.legal-toc a.on { border-left-color: var(--red); color: var(--ink); font-weight: 700; }


/* ---------- 提示条 ---------- */
.toast { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 8px 8px 8px 18px; border: 2px solid var(--ink); background: var(--ink); color: #fff; box-shadow: var(--off); font-size: 15px; font-weight: 600; }
.toast i { display: none; }
.toast-undo { padding: 4px 8px; border: 0; background: none; color: var(--yellow); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.toast-x { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; background: none; color: #cfcac0; cursor: pointer; }
.toast-x:hover { color: #fff; }
.toast-x .i { width: 16px; height: 16px; }

/* ---------- 响应式 ---------- */
@media (min-width: 820px) and (max-width: 1519px) { .ad-lead { display: flex; } }
@media (max-width: 1280px) {
  /* 窄一些的电脑：游戏页右栏收成 180 宽（一列游戏 + 160×600），把宽度让给游戏框 */
  .play-grid { grid-template-columns: minmax(0, 1fr) 180px; }
  .play-side .side-grid { grid-template-columns: 1fr; }
  .ad-top { display: none !important; }
  .ad-rail { min-height: 600px; padding-left: 10px; padding-right: 10px; }
  .stage-hint { display: none; }
  .toolbar { flex-wrap: wrap; }
  .tb-search { flex-basis: 240px; width: 240px; min-width: 160px; }
  .toolbar > .tb-rule { display: none; }
  .home-cols { grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; }
  .me-card { gap: 12px; padding: 20px; }
  .me-pic { width: 124px; }
  .me-info { gap: 10px; }
  .me-name { font-size: 44px; }
  .me-bio { font-size: 15px; }
  .me-links { gap: 8px; }
  .me-links a { min-height: 36px; padding: 0 11px; font-size: 14px; }
  .me-links .me-soc { width: 36px; padding: 0; }
}
@media (max-width: 1100px) {
  .topbar { gap: 18px; }
  .top-nav a { padding: 6px 10px; font-size: 19px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 22px; }
  /* 窄屏：不分两列，人物卡排在简介下面、游戏上面，改回横向的小卡 */
  .home-cols { display: flex; flex-direction: column; gap: 0; }
  .home-main { display: contents; }
  .home-main > * { order: 2; width: 100%; min-width: 0; }
  .home-main > .hero { order: 0; }
  .me-col { order: 1; position: static; margin: 0 0 34px; padding: 0 8px 8px 0; }
  .me-card { width: 100%; max-width: 560px; aspect-ratio: auto; gap: 10px; padding: 16px 22px; }
  .me-head { flex-direction: row; align-items: center; gap: 14px; }
  .me-pic { width: 88px; }
  .play-grid { grid-template-columns: minmax(0, 1fr); }
  .play-side .side-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .play-side { margin-top: 24px; }
  .ad-rail { display: none; }
  .ad-inline { display: flex; }
  .modes, .steps { grid-template-columns: 1fr; }
  .lb { grid-template-columns: 1fr; gap: 12px; }
  .lb-games { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .lb-game { width: auto; flex: none; padding: 6px 14px 6px 6px; }
  .lb-game img, .lb-emoji { width: 34px; height: 34px; }
}
@media (max-width: 980px) {
  .legal-wrap { display: block; padding-top: 0; }
  .legal-toc { position: static; display: flex; gap: 6px; margin: 0 0 16px; padding: 0 0 8px; overflow-x: auto; scrollbar-width: none; }
  .legal-toc small { display: none; }
  .legal-toc a { flex: none; padding: 6px 14px; border: 1.5px solid var(--ink); border-radius: 6px; white-space: nowrap; }
  .legal-toc a.on { background: var(--yellow); }
  .maker { grid-template-columns: auto minmax(0, 1fr); }
  .maker > .link-red { grid-column: 2; }
}
@media (max-width: 900px) and (min-width: 761px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 手机：顶栏只留标识 + 登录 + 汉堡菜单；卡片两列；标签最多两行 */
@media (max-width: 760px) {
  :root { --top-h: 64px; --off: 4px 4px 0 var(--blue); }
  .m-only { display: revert !important; }
  .d-only { display: none !important; }
  .topbar { gap: 12px; padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); }
  .topbar::after { left: 14px; right: 14px; }
  .brand img { height: 40px; }
  .top-nav, .topbar > .tb-rule:first-of-type, .lang-slot, .tb-lib { display: none; }
  .topbar > .tb-rule { margin-left: auto; height: 30px; }
  .tb-menu { display: grid; border: 0; }
  .tb-menu:hover { background: none; border-color: transparent; }
  .acct-chip.login { height: 40px; padding: 0 14px; border: 0; background: var(--red); color: #fff; font-size: 17px; }
  .acct-chip.login .i { display: none; }
  .acct-chip { height: 40px; padding: 0; }
  .acct-chip .ava { width: 36px; height: 36px; font-size: 21px; }
  .acct-name, .acct-caret { display: none; }
  .main { padding: var(--top-h) 14px 0; padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .panel { padding: 12px 0 32px; }
  .foot-row { gap: 10px 14px; justify-content: space-between; }
  .foot-brand, .foot-row > .tb-rule { display: none; }
  .foot-slogan { order: -1; flex: 1 1 100%; width: fit-content; max-width: 100%; font-size: 22px; }
  .footer-links { margin-left: 0; font-size: 15px; }
  .foot-copy { margin-left: 0; }
  .page-head { padding-left: 26px; margin-bottom: 20px; }
  .page-sub { font-size: 16px; }
  .shelf { margin-bottom: 32px; }
  .sec-h { gap: 10px; margin-bottom: 16px; }
  .sec-h .sec-rule, .sec-h .px-blue { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .gc-link { padding: 4px 4px 9px; }
  .gc-title { margin-top: 6px; font-size: 18px; }
  .gc-tags { gap: 5px; margin-top: 7px; max-height: calc(2 * 26px + 5px); overflow: hidden; }
  .tag { height: 26px; padding: 0 8px; font-size: 12.5px; }
  .gc-fav { right: 12px; top: 4px; width: 24px; height: 32px; }
  .hero { margin-bottom: 22px; }
  .me-col { margin-bottom: 26px; }
  .hero-l { padding-left: 26px; }
  .hero-h { font-size: clamp(28px, 8.4vw, 40px); }
  .hero-sub { font-size: 16px; margin-top: 10px; }
  .me-card { gap: 6px; max-width: none; padding: 14px 16px 18px; box-shadow: 6px 6px 0 var(--red); }
  .me-pic { width: 72px; }
  .me-info { gap: 8px; }
  .me-label { font-size: 13px; }
  .me-name { font-size: 34px; gap: 10px; }
  .me-name .by-me { font-size: 20px; }
  .me-bio { font-size: 14.5px; line-height: 1.5; }
  .me-links a { min-height: 36px; padding: 0 12px; font-size: 14px; }
  .me-links .me-soc { width: 36px; padding: 0; }
  .me-links { gap: 8px; }
  .me-links .me-mail { padding: 0 10px; }
  .toolbar { gap: 12px; margin-bottom: 24px; }
  .toolbar .tb-rule, .tagbar-l { display: none; }
  .tb-right { display: contents; }
  .tb-search { flex: 1 1 100%; width: auto; order: -1; } /* 手机上搜索框仍在最上面一整行 */
  .tagbar { flex: 1 1 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 4px 4px 2px; }
  .tagbar::-webkit-scrollbar { display: none; }
  .chip { height: 36px; padding: 0 14px; }
  .sort select { min-width: 0; height: 40px; font-size: 15px; padding-right: 36px; }
  .lib-bar .lib-tabs { flex: 1 1 100%; gap: 10px; }
  .chip.big { flex: 1; padding: 0 10px; font-size: 16px; }
  .lib-bar > .px { display: none; }
  .maker { grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; padding: 14px 16px; box-shadow: 6px 6px 0 var(--blue); }
  .maker-me { width: 76px; grid-row: span 2; }
  .maker-h { font-size: 24px; }
  .maker p { margin-top: 4px; font-size: 14.5px; }
  .maker .by-me { display: none; }
  .maker > .link-red { grid-column: 2; font-size: 17px; }
  .link-red { font-size: 18px; }
  .home-info { padding-top: 22px; }
  .hi-h1 { font-size: 22px; }
  .home-info h2 { margin: 24px 0 10px; font-size: 18px; }
  .hi-games { grid-template-columns: 1fr; }
  .hi-game { padding: 14px; gap: 12px; }
  .hi-ic { width: 52px; height: 52px; }
  .items { grid-template-columns: 1fr; }
  .lb-head { flex-direction: column-reverse; align-items: stretch; }
  .lb-play { justify-content: center; }
  .lb-box { padding: 4px 10px 8px; }
  .lb-cols, .lb-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 6px; }

  /* 游戏页（横屏游戏；竖屏游戏见下面整屏锁定） */
  .play-grid { padding-top: 4px; }
  .now-bar { flex-wrap: wrap; }
  .ctrl-btns { margin-left: auto; }
  .m-hint { display: block; }
  .o-landscape .land-cta { display: block; margin-top: 12px; }
  .o-landscape .m-hint { display: none; }
  .about { padding: 16px 14px 20px; }
  .about-head h2 { font-size: 22px; }
  .about-tabs { margin-left: 0; }
  .side-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-inline { min-height: 120px; }
}
/* 横着拿手机（很矮）：横屏游戏占满高度 */
@media (max-height: 520px) and (orientation: landscape) {
  .stage.landscape { width: auto; height: calc(100svh - 24px); margin: 0 auto; }
}

/* ---------- 手机上的竖屏游戏页：进来就是整屏游戏 ----------
   整屏固定、不能滚动：游戏（顶到屏幕最上面）+ 底部一条（图标、名字、简介、收藏）；返回浮窗浮在游戏上面。
   顶栏、侧栏、游戏下面那条、游戏介绍、更多游戏、页脚、底部导航在手机上都不显示（电脑上照常）。 */
@media (max-width: 760px) {
  .play-page.o-portrait .m-back {
    position: fixed; left: 0; top: 84px; z-index: 30; display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px 0 8px;
    border-radius: 0 21px 21px 0; background: rgba(26, 29, 38, .94); color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, .45); text-decoration: none;
    touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  }
  .play-page.o-portrait .m-back.right { left: auto; right: 0; flex-direction: row-reverse; padding: 0 8px 0 12px; border-radius: 21px 0 0 21px; }
  .play-page.o-portrait .m-back.right .i { transform: scaleX(-1); }
  .play-page.o-portrait .m-back.drag { border-radius: 21px; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); transition: none; }
  .play-page.o-portrait .m-back:not(.drag) { transition: left .18s, right .18s, top .18s; }
  .play-page.o-portrait .m-back img { display: block; border-radius: 50%; background: #fff; pointer-events: none; }
  .play-page.o-portrait .m-back .i { width: 20px; height: 20px; }
  /* 游戏要顶到屏幕四边：外面几层容器都不能当定位的参照物 */
  .play-page.o-portrait .main, .play-page.o-portrait .panel, .play-page.o-portrait .play-grid, .play-page.o-portrait .play-main, .play-page.o-portrait .stage-box { position: static; }
  .play-page.o-portrait .stage.portrait {
    position: fixed; left: 0; top: 0; z-index: 20; width: 100% !important; height: calc(100% - 64px) !important; aspect-ratio: auto; border-radius: 0; background: #090b10;
  }
  .play-page.o-portrait .m-gamebar {
    position: fixed; left: 0; bottom: 0; z-index: 20; width: 100%; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 12px;
    background: var(--surface); border-top: 2px solid var(--ink);
  }
  .play-page.o-portrait .m-gamebar .game-ic { width: 42px; height: 42px; flex: none; border: 1.5px solid var(--ink); }
  .play-page.o-portrait .m-gamebar p { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; line-height: 1.3; }
  .play-page.o-portrait .m-gamebar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-family: var(--display); font-size: 17px; font-weight: 900; }
  .play-page.o-portrait .m-gamebar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
  html:has(body.play-page.o-portrait), html.play-lock, body.play-page.o-portrait { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body.play-page.o-portrait > *:not(.main):not(.toast),
  .play-page.o-portrait .main > *:not(.panel),
  .play-page.o-portrait .panel > *:not(.play-grid):not(.m-back),
  .play-page.o-portrait .play-grid > *:not(.play-main),
  .play-page.o-portrait .play-main > *:not(.stage-box):not(.m-gamebar),
  .play-page.o-portrait .stage-box > *:not(.stage) { display: none !important; }
  .play-page.o-portrait .main, .play-page.o-portrait .panel { margin: 0; padding: 0; }
  .play-page.o-portrait .stage-box { padding: 0; border-radius: 0; }
  .play-page.o-portrait .stage.pseudo-fs, .play-page.o-portrait .stage:fullscreen { position: fixed; height: 100% !important; }
}

