/* ============================================================
   站点样式 —— 深色 + 掌机绿，移动端优先
   ============================================================ */
:root {
  --bg: #0b0f14;
  --bg-soft: #121821;
  --panel: #161d28;
  --panel-2: #1d2532;
  --line: #263040;
  --text: #e7edf5;
  --text-dim: #93a1b5;
  --text-mute: #64748b;
  --accent: #3ddc84;
  --accent-2: #22b8cf;
  --accent-ink: #04240f;
  --danger: #f4635f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 15% -10%, rgba(61, 220, 132, .10), transparent 60%),
    radial-gradient(50rem 35rem at 90% 0%, rgba(34, 184, 207, .09), transparent 60%);
  z-index: 0;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; color: var(--text-dim); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 20, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; color: var(--text); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
/* 站点标记：和 <link rel="icon"> 里的 favicon 用同一张图（绿色圆角方块 + 🎮） */
.brand-mark {
  width: 26px; height: 26px; flex: none;
  border-radius: 25%;                       /* 对应 SVG 里 rx=8 / 32 */
  /* 和 <link rel="icon"> 引用同一个文件：根目录的 favicon.svg */
  background-image: url("/favicon.svg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--text-dim); padding: 7px 12px; border-radius: 999px;
  font-size: .9rem; white-space: nowrap;
}
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--panel-2); color: var(--accent); }

.menu-toggle {
  display: none; margin-left: auto; background: var(--panel);
  border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 7px 11px; cursor: pointer; font-size: 1rem;
}

/* ---------- 广告位 ---------- */
.ad {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #121821, #121821 10px, #151d27 10px, #151d27 20px);
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  color: var(--text-mute); font-size: .78rem; letter-spacing: .06em;
  min-height: 90px; margin: 18px 0; overflow: hidden; text-align: center;
}
.ad[data-filled="1"] { background: none; border: 0; min-height: 0; }
.ad-slot-top { max-height: 120px; }
.ad-slot-rect { min-height: 250px; }
.ad-slot-rail { min-height: 600px; }
.ad-label { font-size: .68rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .12em; }

.layout-with-rail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
/* 侧边栏没有真实广告时（占位框也隐藏了），整列宽度收成 0，正文占满 */
.layout-with-rail.no-rail { grid-template-columns: minmax(0, 1fr); }
.layout-with-rail.no-rail .side-rail, .side-rail[hidden] { display: none; }

/* ---------- 首页 hero ---------- */
.hero { padding: 46px 0 10px; text-align: center; }
.hero p.lead { font-size: clamp(.98rem, .9rem + .3vw, 1.1rem); max-width: 62ch; margin: 0 auto 22px; }
.hero-emoji { font-size: 2.4rem; line-height: 1; margin-bottom: 6px; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 26px; }
.pill {
  font-size: .78rem; color: var(--text-dim); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 16px; transition: .15s ease;
  white-space: nowrap;
}
.btn:hover { background: #26303f; border-color: #33404f; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { background: #4ceb93; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: .82rem; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- 拖拽区 ---------- */
.dropzone {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: rgba(22, 29, 40, .5); padding: 22px; text-align: center;
  transition: .15s ease; cursor: pointer;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: rgba(61, 220, 132, .06); }
.dropzone strong { color: var(--text); }
.dropzone small { display: block; color: var(--text-mute); margin-top: 6px; font-size: .8rem; }

/* ---------- 游戏卡片 ---------- */
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 16px; }
.section-head h2 { margin: 0; }
.section-head .count { color: var(--text-mute); font-size: .85rem; }
.section-head .spacer { margin-left: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: #35425a; box-shadow: var(--shadow); }
.card-cover {
  position: relative; aspect-ratio: 3 / 2; background: #0d131b; overflow: hidden;
}
.card-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: pixelated;
}
.card-cover .placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; opacity: .35;
}
.card-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(4, 12, 20, .78); color: var(--accent);
  border: 1px solid rgba(61, 220, 132, .35);
  font-size: .68rem; padding: 2px 8px; border-radius: 999px; font-weight: 700;
  letter-spacing: .04em;
}
.card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.card-body h3 { margin: 0; font-size: .98rem; }
.card-body .desc {
  font-size: .82rem; color: var(--text-dim); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: .68rem; color: var(--text-mute); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.card-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; }
.card-foot .meta { font-size: .72rem; color: var(--text-mute); margin-left: auto; }

/* ---------- 播放页 ---------- */
.player-page { padding: 18px 0 40px; }
.breadcrumb { font-size: .84rem; color: var(--text-mute); margin-bottom: 12px; }
.breadcrumb a { color: var(--text-dim); }

.player-shell {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.player-titlebar {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.player-titlebar h1 { font-size: 1rem; margin: 0; }
.player-titlebar .meta { font-size: .75rem; color: var(--text-mute); margin-left: auto; }

/* screen-box 是尺寸的唯一控制点（EJS 不会碰它） */
#screen-box { width: 100%; margin: 0 auto; }
#game {
  width: 100%; aspect-ratio: 3 / 2; background: #000;
  outline: none;                  /* 焦点在游戏画面上时不显示外框 */
}
#game:focus, #game:focus-visible { outline: none; }
#game.ejs_fullscreen_container { aspect-ratio: auto; }
/* 整数倍放大时保持像素锐利 */
#screen-box[data-scale="1"] canvas,
#screen-box[data-scale="2"] canvas,
#screen-box[data-scale="3"] canvas,
#screen-box[data-scale="4"] canvas,
#screen-box[data-scale="5"] canvas { image-rendering: pixelated; }

/* 模拟器自带控制条：从画面里搬出来，收进画面下方的抽屉 */
#ejs-dock { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 4px 10px; }
#ejs-dock[hidden] { display: none; }
#ejs-dock .ejs_menu_bar {
  position: static !important; opacity: 1 !important; transform: none !important;
  pointer-events: auto !important; left: auto !important; bottom: auto !important;
  width: 100% !important; max-width: 100% !important; height: auto !important;
  max-height: none !important; z-index: 1 !important; margin: 0 !important;
  padding: 6px 0 !important; background: transparent !important;
  flex-wrap: wrap !important; align-items: center !important; gap: 4px 2px !important;
}
#ejs-dock .ejs_menu_bar_spacer { display: none !important; }
#ejs-dock .ejs_menu_bar, #ejs-dock .ejs_menu_button { font-family: var(--font) !important; }
#ejs-dock .ejs_menu_button {
  width: auto !important; margin: 0 !important; padding: 6px 10px !important;
  display: inline-flex !important; align-items: center !important;
  border-radius: 8px !important; color: var(--text-dim) !important;
  line-height: 1 !important; font-size: .78rem !important;
}
#ejs-dock .ejs_menu_button:hover { background: var(--panel-2) !important; color: var(--text) !important; }
#ejs-dock .ejs_menu_button svg { float: none !important; height: 15px !important; width: 15px !important; }
#ejs-dock .ejs_menu_text {
  position: static !important; opacity: 1 !important; transform: none !important;
  background: none !important; color: inherit !important; padding: 0 0 0 5px !important;
  font-size: .78rem !important; white-space: nowrap;
}
#ejs-dock .ejs_volume_parent { padding-right: 4px !important; }
#ejs-dock .ejs_volume_parent input[type=range] { max-width: 90px; }
#ejs-dock .ejs_settings_parent, #ejs-dock .ejs_disks_parent { position: relative; }

/* ---------- 手机竖屏：虚拟手柄搬到画面下方，不挡画面 ----------
   EJS 把手柄绝对定位在游戏容器里（十字键一整簇 125px、AB 130px、
   按钮 50px，全是写死的像素），竖屏时画面本身才 230 多像素高，
   手柄必然糊满整个画面，什么都看不清。
   这里让 #game 不再当定位容器（它的 .ejs_parent{position:relative} 由下面
   那条更具体的选择器盖掉），改由 #screen-box 承担，并给它留出底部空间，
   手柄就整簇落到画面下方那块留白里 —— 位置沿用 EJS 自己的排布，不用重算。
   body.has-vpad 由 player.js 确认「确实有手柄」后才加，
   桌面端、以及模拟器没给手柄的情况都不会凭空多出空白。 */
@media (max-width: 700px) and (orientation: portrait) {
  /* height 必须是 auto：player.js 会给 #screen-box 写死一个高度（内联样式），
     全站又是 border-box，写死的高度会把 225px 留白算进去、画面被压扁 */
  body.has-vpad #screen-box { position: relative; padding-bottom: 225px; height: auto !important; }
  body.has-vpad #screen-box #game:not(:fullscreen) { position: static; }
  /* 手柄那一簇本来贴在容器底边 -50px，往下挪一点，尽量省空间 */
  body.has-vpad #screen-box .ejs_virtualGamepad_parent { bottom: 46px; }
  /* L / R 两个键默认悬在画面里（离十字键 -90px，正好压在画面上），
     把它们挪到十字键 / AB 下面那一排的两侧空位：位置由 EJS 写在内联样式里，
     所以这里必须 !important 才盖得住。 */
  body.has-vpad #screen-box .ejs_virtualGamepad_button.b_l,
  body.has-vpad #screen-box .ejs_virtualGamepad_button.b_r { top: 130px !important; }

  /* 手机屏幕竖向就那么高，标题栏占的一行留给游戏：名字上面面包屑里已经有了 */
  body.has-vpad .player-titlebar { display: none; }
}

/* 手机上的工具栏再紧一点：默认每一档都占满一行太占地方，
   小屏手机上会把画面和手柄挤到屏幕外面去 */
@media (max-width: 700px) {
  .toolbar { padding: 8px 10px; gap: 6px; }
  .toolbar .tool-group { gap: 5px; }
  .seg button { padding: 5px 9px; font-size: .76rem; }
  .toolbar .btn-sm { padding: 6px 10px; font-size: .78rem; }
}

/* ---------- 全屏 / 沉浸模式 ----------
   原生 Fullscreen API 能进就进（地址栏消失，最沉浸）；
   iPhone Safari 没有这个 API，进不去就退回「网页内全屏」：
   藏起页头页脚和正文，只留画面与手柄，右上角一个退出按钮。
   两种情况的排版都由这里的 CSS 说了算 —— EJS 自己的全屏是把 #game
   直接铺满屏幕，GBA 是 3:2 的，铺满会被拉变形，所以不走它那套。 */
body.fs-mode { overflow: hidden; }
body.fs-mode .site-header,
body.fs-mode .site-footer,
body.fs-mode .breadcrumb,
body.fs-mode .btn-row,
body.fs-mode #player-error,
body.fs-mode .ad,
body.fs-mode .stat-row,
body.fs-mode main.player-page section { display: none !important; }
/* 播放器面板里只留画面和模拟器设置抽屉，工具栏/标题栏都收起来 */
body.fs-mode .player-shell > * { display: none !important; }
body.fs-mode .player-shell > #screen-box,
body.fs-mode .player-shell > .fs-exit,
body.fs-mode .player-shell > #ejs-dock:not([hidden]) { display: block !important; }
body.fs-mode .player-shell {
  position: fixed; inset: 0; z-index: 10000; margin: 0; overflow: auto;
  border: 0; border-radius: 0; background: #000; box-shadow: none;
  display: flex; flex-direction: column; justify-content: center;
}
/* 画面按 3:2 顶满高度或宽度，多出来的地方留黑边。
   150vh 让「高」成为限制条件，横屏时画面正好和屏幕一样高。
   手机浏览器地址栏会占掉一截，所以支持 dvh 的（iOS 15.4+）用能随地址栏变化的
   dvh，免得横屏时画面下沿被顶到屏幕外面去。 */
body.fs-mode #screen-box {
  width: min(100vw, 150vh) !important; height: auto !important; margin: 0 auto;
}
@supports (height: 100dvh) {
  body.fs-mode #screen-box { width: min(100vw, 150dvh) !important; }
}
.fs-exit {
  display: none; position: fixed; z-index: 10001;
  top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right));
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22); background: rgba(11, 15, 20, .86);
  color: #fff; font: inherit; font-size: .82rem; cursor: pointer;
}
body.fs-mode .fs-exit { display: block; }

/* 手机竖屏时提示一句：横过来画面能大不少（点「知道了」记在本机，不再打扰） */
.rotate-hint {
  margin: 12px 0 0; padding: 10px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--text-dim); font-size: .84rem;
}
.rotate-hint button {
  margin-left: 10px; background: none; border: 0; color: var(--text-mute);
  font: inherit; font-size: .8rem; cursor: pointer; text-decoration: underline;
}

/* 自建工具栏 */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--line); background: var(--bg-soft);
}
.tool-group { display: flex; align-items: center; gap: 6px; }
.tool-group > .label { font-size: .74rem; color: var(--text-mute); margin-right: 2px; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button {
  font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--text-dim); border: 0;
  padding: 6px 11px; border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: 0; }
.seg button:hover { background: #26303f; color: var(--text); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.toolbar .divider { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.toolbar .tip { font-size: .74rem; color: var(--text-mute); margin-left: auto; }

/* 数字兜底 */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; }
.stat b { display: block; font-size: 1.02rem; color: var(--accent); }
.stat span { font-size: .76rem; color: var(--text-mute); }

/* ---------- 弹层 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 18px;
  background: rgba(4, 8, 13, .72); backdrop-filter: blur(4px);
}
.modal.open { display: flex; }
.modal-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  width: min(560px, 100%); max-height: 84vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.modal-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 1rem; }
.modal-head .close { margin-left: auto; background: none; border: 0; color: var(--text-dim); font-size: 1.3rem; cursor: pointer; line-height: 1; padding: 0 4px; }
.modal-body { padding: 14px 16px; overflow: auto; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

.cheat-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cheat-row:last-child { border-bottom: 0; }
.cheat-row input[type=checkbox] { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.cheat-row .cname { font-size: .88rem; }
.cheat-row code {
  display: block; font-family: var(--mono); font-size: .72rem; color: var(--text-mute);
  white-space: pre-wrap; word-break: break-all; margin-top: 2px;
}
/* 站上不放预设代码，金手指面板只讲「怎么自己加」，所以这里是一段说明性的步骤 */
.cheat-steps { margin: 10px 0 0; padding-left: 20px; font-size: .87rem; line-height: 1.8; }
.cheat-steps li { margin: 6px 0; }
.cheat-steps code {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 5px; font-size: .84em; font-family: var(--mono);
}
.slot-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.slot-row:last-child { border-bottom: 0; }
.slot-row .slot-name { font-size: .88rem; min-width: 68px; }
.slot-row .slot-time { font-size: .74rem; color: var(--text-mute); margin-left: auto; }
.slot-thumb { width: 64px; height: 43px; object-fit: cover; border-radius: 5px; image-rendering: pixelated; background: #000; flex: none; }

.notice {
  border-left: 3px solid var(--accent); background: var(--panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 12px 15px; margin: 16px 0;
}
.notice p { margin: 0; font-size: .87rem; }
.notice.warn { border-left-color: #e3b341; }

/* ---------- 正文页 ---------- */
.prose { max-width: 76ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul { color: var(--text-dim); padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose ol { color: var(--text-dim); padding-left: 1.35em; }
.prose h3 { margin: 1.3em 0 .35em; font-size: 1.02rem; }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 50px; padding: 26px 0 34px;
  color: var(--text-mute); font-size: .84rem; position: relative; z-index: 1;
}
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 22px 40px; }
.site-footer a { color: var(--text-dim); }
.site-footer .legal { margin-top: 16px; font-size: .78rem; line-height: 1.7; }

.empty { text-align: center; padding: 34px 18px; color: var(--text-mute); border: 1px dashed var(--line); border-radius: var(--radius); }

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--text-dim); }
.spinner {
  width: 16px; height: 16px; border: 2px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .layout-with-rail { grid-template-columns: 1fr; }
  .layout-with-rail .side-rail { display: none; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0;
         flex-direction: column; align-items: stretch; gap: 0;
         background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 6px; }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-body .desc { display: none; }
  .toolbar .tip { display: none; }
.tool-group { flex-wrap: wrap; }          /* 窄屏时按钮组要能换行，别被挤出容器 */
  .toolbar .divider { display: none; }
  .hero { padding: 28px 0 6px; }
  .ad-slot-rail { min-height: 250px; }
}

/* 模拟器启动前 #game 是空的，这里放「下载 / 解压游戏文件」的提示 */
.rom-loading {
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 220px; padding: 24px;
  color: var(--text-dim); font-size: .95rem; text-align: center;
}

/* ---------- 游戏介绍页（games/*.html） ---------- */
main.wrap > section { margin-bottom: 30px; }
main.wrap > p.lead { font-size: 1.02rem; max-width: 70ch; }
.game-hero { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; margin: 6px 0 26px; }
.game-hero-cover { flex: 0 0 360px; max-width: 100%; }
.game-hero-cover img { width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--line); background: #000; display: block; }
.game-hero-info { flex: 1 1 320px; min-width: 0; }
.game-hero-info h1 { margin-bottom: .35em; }
.meta-line { font-size: .82rem; color: var(--text-mute); margin: 14px 0 0; }
.feat-list { margin: 0; padding-left: 1.15em; color: var(--text-dim); }
.feat-list li { margin-bottom: .45em; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.shot-grid img { width: 100%; height: auto; border-radius: var(--radius-sm);
  border: 1px solid var(--line); display: block; }
/* 首页「继续上次的游戏」入口（由 assets/app.js 渲染） */
.resume { display: flex; align-items: center; gap: 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.resume-cover { flex: none; width: 132px; display: block; border-radius: var(--radius-sm); overflow: hidden; }
.resume-cover img { width: 100%; height: auto; display: block; }
.resume-cover .placeholder { aspect-ratio: 3 / 2; display: grid; place-items: center; font-size: 1.6rem;
  background: var(--panel-2); }
.resume-body { min-width: 0; }
.resume-kicker { display: inline-block; font-size: .74rem; color: var(--accent); letter-spacing: .04em; }
.resume-body h2 { margin: 4px 0 6px; font-size: 1.12rem; }
.resume-body p { margin: 0 0 10px; color: var(--text-dim); font-size: .86rem; }
@media (max-width: 560px) {
  .resume { flex-direction: column; align-items: flex-start; gap: 12px; }
  .resume-cover { width: 100%; max-width: 240px; }
}

/* 改版推荐页的对照表 */
.table-wrap { overflow-x: auto; margin: 18px 0 6px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--text-dim); font-weight: 600; font-size: .82rem; white-space: nowrap; }
.table td:first-child { color: var(--text-dim); }
.table tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) { .table { font-size: .84rem; } .table th, .table td { padding: 8px 9px; } }

.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
  margin-bottom: 10px; background: var(--panel); }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--text); }
.faq-item p { margin: 10px 0 0; }
@media (max-width: 720px) { .game-hero-cover { flex: 1 1 100%; } }
