/* mg3.css — cbge /mobile-games 手游发现 v3（2026-11-24，基于 ds3 v8 骨架手游化）
   本版两块重点（均有根因与实测证据）：
   ① 实体游戏盒 = **竖版**四立面（书脊/顶厚/页缘/正面），结构照参考站 nexyouxi.com「新游速递」实测移植；
      横版封面在竖盒内**零裁切零拉伸**（完整整幅 + 同源模糊延伸），不再把盒体改横。
   ② 密排书架已整体替换为**立体卡带架**（方向 A「立式插槽墙」，由设计模型看图选定）。
   仍保留：分类卡按真实分类封面呈现；浅深主题、无图降级、减少动效全覆盖。 */

.mg3 {
  /* V8 排版基线：三区共用同一套字号/行高，不依赖主题默认 h1/h2。 */
  --mg3-fs-h1: 30px;
  --mg3-fs-h2: 20px;
  --mg3-fs-meta: 12.5px;
  --mg3-fs-body: 14px;
  --mg3-lh-tight: 1.18;
  --mg3-lh-body: 1.62;
  --mg3-bg: transparent;
  --mg3-ink: #14161a;
  --mg3-ink-2: #4c5460;
  --mg3-ink-3: #737b88;
  --mg3-line: rgba(20, 22, 26, .10);
  --mg3-line-2: rgba(20, 22, 26, .06);
  --mg3-card: #fff;
  --mg3-card-2: #f5f6f8;
  /* V8：强调色收敛为站点同族深玉绿，只用于选中/主按钮/焦点环，不再大面积铺色。 */
  --mg3-acc: #2f7d63;
  --mg3-acc-2: #1f5c48;
  --mg3-acc-soft: rgba(47, 125, 99, .10);
  /* V8 暖中性：仅用于卡带架的承托面与轨道，面积有限。 */
  --mg3-warm-1: #f7f5f1;
  --mg3-warm-2: #efece6;
  --mg3-warm-3: #e3dfd7;
  /* 卡带轨道内的文字色：随主题切换，避免深底用深字。 */
  --mg3-rail-ink: #24272d;
  --mg3-rail-ink-2: #6a7280;
  --mg3-rail-fade: rgba(247, 245, 241, .96);
  --mg3-shadow: 0 18px 48px rgba(18, 20, 24, .14);
  --mg3-r: 14px;
  color: var(--mg3-ink);
  font-variant-numeric: tabular-nums;
}

/* 主题联动（站点深色） */
.dark-theme .mg3,
[data-theme="dark"] .mg3,
body.dark .mg3 {
  --mg3-ink: #eceff4;
  --mg3-ink-2: #b6bec9;
  --mg3-ink-3: #8b95a3;
  --mg3-line: rgba(236, 239, 244, .14);
  --mg3-line-2: rgba(236, 239, 244, .08);
  --mg3-card: #191d24;
  --mg3-card-2: #21262f;
  --mg3-acc: #5fbf9c;
  --mg3-acc-2: #3f9b7a;
  --mg3-acc-soft: rgba(95, 191, 156, .14);
  --mg3-warm-1: #1e232b;
  --mg3-warm-2: #181c23;
  --mg3-warm-3: #14171d;
  --mg3-rail-ink: #dfe4ec;
  --mg3-rail-ink-2: #97a1af;
  --mg3-rail-fade: rgba(20, 23, 28, .96);
  /* 深色主题层板：原来太接近背景导致"整排像浮着"，提亮并拉开三段明度 */
  --mg3-shadow: 0 18px 48px rgba(0, 0, 0, .5);
}

@media (prefers-color-scheme: dark) {
  .mg3 { }
}

.mg3 *, .mg3 *::before, .mg3 *::after { box-sizing: border-box; }
.mg3-wrap { max-width: 1320px; margin: 0 auto; padding: 18px 18px 56px; }
.mg3-main { margin: 0; padding: 0; background:
  radial-gradient(900px 420px at 12% -6%, rgba(24,175,163,.12), transparent 62%),
  linear-gradient(180deg, #F1FAF7 0%, #F7FBFA 340px, #fff 720px); }
.dark-theme .mg3-main, body.dark .mg3-main, [data-theme="dark"] .mg3-main {
  background: radial-gradient(900px 420px at 12% -6%, rgba(24,175,163,.10), transparent 60%),
              linear-gradient(180deg, #0f1718 0%, #10161a 340px, #0c1114 720px);
}
.mg3 a { text-decoration: none; }
/* 关键：书脊/长廊卡片是 <a> 内含 <img>，浏览器默认 draggable=true，
   一旦触发原生 dragstart 就会发出 pointercancel 终止自定义指针拖动（实测事件序列
   pointerdown → dragstart → pointercancel → lostpointercapture，拖动完全失效）。
   与 V3 同源，此处双重阻断：CSS 禁拖 + JS 把 img/a 的 draggable 置 false。 */
.mg3 a, .mg3 img { -webkit-user-drag: none; user-select: none; }
.mg3-flow-card img, .mg3-box img, .mg3-cart-item img { pointer-events: none; }

/* ------------------------------------------------------------ 头部 / 搜索 */

.mg3-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin: 6px 0 14px;
}
.mg3-h1 { font-size: var(--mg3-fs-h1); line-height: var(--mg3-lh-tight); margin: 0 0 6px;
  font-weight: 700; letter-spacing: -.4px; color: var(--mg3-ink); }
.mg3-sub { margin: 0; color: var(--mg3-ink-2); font-size: var(--mg3-fs-body);
  line-height: var(--mg3-lh-body); }

.mg3-search { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; max-width: 520px; }
.mg3-search input[type="search"] {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px;
  border: 1px solid var(--mg3-line); border-radius: 12px;
  background: var(--mg3-card); color: var(--mg3-ink); font-size: 14px;
}
.mg3-search input[type="search"]:focus-visible {
  outline: 3px solid var(--mg3-acc); outline-offset: 1px; border-color: var(--mg3-acc);
}
.mg3-search button {
  height: 42px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--mg3-acc); color: #fff; font-size: 14px; font-weight: 600;
}
.mg3-search button:hover { background: var(--mg3-acc-2); }
.mg3-search-clear { font-size: 13px; color: var(--mg3-ink-2); text-decoration: underline; }

/* ------------------------------------------------------------ 状态条 / 排序 */

.mg3-status {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; padding: 12px 16px; margin-bottom: 12px;
  background: var(--mg3-card-2); border: 1px solid var(--mg3-line-2); border-radius: var(--mg3-r);
}
.mg3-status-in { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.mg3-status-k { color: var(--mg3-ink-3); font-size: 12px; letter-spacing: .04em; }
.mg3-status-cat { font-size: 16px; }
.mg3-status-s { color: var(--mg3-acc); }
.mg3-status-n, .mg3-status-p { color: var(--mg3-ink-2); }
.mg3-status-p { padding-left: 10px; border-left: 1px solid var(--mg3-line); }

.mg3-sorts { display: flex; gap: 6px; }
.mg3-sort {
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
  color: var(--mg3-ink-2); border: 1px solid transparent;
}
.mg3-sort:hover { background: var(--mg3-card); color: var(--mg3-ink); }
.mg3-sort.is-on { background: var(--mg3-ink); color: var(--mg3-card); font-weight: 600; }
.mg3-sort:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: 2px; }

/* ------------------------------------------------------------ 分类 chips */

.mg3-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.mg3-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; font-size: 13px;
  background: var(--mg3-card); border: 1px solid var(--mg3-line);
  color: var(--mg3-ink-2); white-space: nowrap;
}
.mg3-chip em { font-style: normal; font-size: 11px; color: var(--mg3-ink-3); }
.mg3-chip:hover { border-color: var(--mg3-acc); color: var(--mg3-ink); }
.mg3-chip.is-on { background: var(--mg3-acc); border-color: var(--mg3-acc); color: #fff; font-weight: 600; }
.mg3-chip.is-on em { color: rgba(255, 255, 255, .82); }
.mg3-chip:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: 2px; }

/* ------------------------------------------------------------ 区块 */

.mg3-sec { margin: 26px 0 0; }
.mg3-sec-hd {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
/* V8 区块标题统一口径：游戏盒 / 游戏卡带 / 发现更多游戏 / 全部游戏 / 按类型找游戏
   全部走 --mg3-fs-h2，不再落主题默认 h2（V7 实测卡带与长廊是 30px、游戏盒 20px）。
   原来塞在 h2 里的「全部类型」副标签已移到标题下方的独立信息栏（.mg3-zone-scope）。 */
.mg3-sec-hd h2,
.mg3-zone-hd h2 {
  margin: 0; font-size: var(--mg3-fs-h2); line-height: 1.3;
  font-weight: 700; letter-spacing: -.2px; color: var(--mg3-ink);
}
/* V8（p15 修回归）：h2 里的 small 是「操作提示」副标题（如「网格或列表查看，方便快速查找」），
   属于用户要求的操作提示，不该隐藏。D5 修完后「当前分类」已移到 .mg3-zone-scope，不再用 small。 */
.mg3-sec-hd h2 small,
.mg3-zone-hd h2 small {
  margin-left: 10px; font-size: var(--mg3-fs-meta); font-weight: 400;
  color: var(--mg3-ink-3); letter-spacing: 0;
}
@media (max-width: 760px) {
  .mg3-sec-hd h2 small,
  .mg3-zone-hd h2 small { display: block; margin: 4px 0 0; }
}

/* 区域头：左标题 / 右信息，始终上下两段（标题段 + 信息段），窄屏自动换行 */
.mg3-zone-hd {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 6px 14px; flex-wrap: wrap; margin: 0 0 12px;
}
.mg3-zone-hd-title { min-width: 0; }
.mg3-zone-scope {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 6px; font-size: var(--mg3-fs-meta); line-height: 1.5; color: var(--mg3-ink-3);
}
.mg3-zone-scope .mg3-scope-k {
  padding: 1px 8px; border-radius: 999px; font-size: 11.5px;
  background: var(--mg3-card-2); border: 1px solid var(--mg3-line-2);
  color: var(--mg3-ink-3);
}
.mg3-zone-scope b { font-weight: 700; color: var(--mg3-ink-2); }
.mg3-zone-scope .mg3-scope-n { color: var(--mg3-ink-2); font-weight: 600; }
.mg3-zone-scope .mg3-scope-sep { color: var(--mg3-line); }
.mg3-zone-hint { font-size: var(--mg3-fs-meta); color: var(--mg3-ink-3); line-height: 1.5; }

/* ------------------------------------------------------------ 实体游戏盒 */

/* ---- 竖版实体游戏盒（V6，2026-11-10 纠偏）
   参考站基准：https://nexyouxi.com/ 「新游速递」实体盒（2026-11-10 用真实浏览器实测：
   .nex74-stage perspective 760px / .nex74-box aspect-ratio 135:190、preserve-3d、
   transform: rotateY(32deg)、transform-origin 50% 50% -9px /
   .nex74-spine left:-18px width:18px rotateY(-90deg) origin right /
   .nex74-edge left:100% width:18px rotateY(90deg) + repeating-linear-gradient 纸页纹理）

   ★ 硬约束（用户 2026-11-10 原话）：所有盒体外轮廓必须竖版（height > width）。
     横版封面只允许在竖盒内解决，禁止把盒体改横。V5 的 246×156 / 236×124 横盒已废弃。
   ★ 三种情形只有"正面内容"不同，盒体外形与立体结构完全一致：
       .is-portrait 真竖版 600×900 → 满版铺
       .is-land     只有横版 460×215 → 整幅不裁置顶 + 同源模糊铺底 + 印刷带
       .is-empty    缺图 → 诚实占位
   演进记录（防重犯，全部有实测/审查证据）：
     v1 contain + 模糊同图底         → 审查 3.5/10「下 2/3 模糊像加载失败」
     v2 cover + 主体带叠加           → 自查：同图两缩放叠加，画面重复
     v3 cover 单层塞竖盒             → 几何必裁 31.2%，切标题
     v4 横版盒 246×156               → ★用户判 FAIL：横盒，即使封面清楚也不合格
     v5 上图文 + 同源底纹（竖盒 172×258）→ 印刷带仍偏黑，顶面/页缘不可见
     v6 四立面齐全 + 印刷带提亮锚底 -- 见下方实测几何

   V8（2026-11-15）修复 D6：上面这行原本以「实测几何」加上两个连续闭合符号收尾，
   多出的那一个闭合符号让 CSS 解析器认为注释提前结束，把紧随其后的 .mg3-boxstage
   整条规则当作无效块丢弃。线上实测后果：boxstage 计算值 position:static /
   overflow:visible / touchAction:auto，轨道 2630px 全量溢出 ——
   1920/1440/1024/768/390/360 六个视口全部横向超屏（1440 下 scrollWidth=2708）。
   注入 overflow:hidden 后立即回落到视口宽。证据：02-repro/repro_d6_dead_rule.py */
.mg3-boxstage {
  position: relative; overflow: hidden; padding: 30px 0 34px;
  touch-action: pan-y; cursor: grab;
  /* V9（2026-11-25）修复：原来这里还有一条 linear-gradient 画的 3px 水平灰线（78% 处）。
     实测 390x844：stageTop 618.05 / stageH 330.52 ⇒ 线落在 y 875.9–878.9，
     而 .mg3-cap 区间 856.1–904.6（.t 名称在上、.m 类型在下），线正好横穿文字。
     已确认与滚动条无关（rail scrollWidth == clientWidth 1954、overflow-x visible、
     boxfloor display:none），是纯装饰线，按用户要求移除。 */
  background:
    radial-gradient(ellipse 60% 46% at 50% 94%, rgba(16,24,40,.055), transparent 74%);
  border-radius: 12px;
}
body.dark-theme .mg3-boxstage {
  background:
    radial-gradient(ellipse 60% 46% at 50% 94%, rgba(0,0,0,.30), transparent 74%);
}
.mg3-boxstage.is-drag { cursor: grabbing; }
/* 轨道：只负责整体位移。透视必须放在每条盒的 .mg3-box3d 上——
   放在这里会被 JS 每帧写的 translate3d 冲掉（V4/V5 实测 has3d=False）。 */
.mg3-boxrail {
  touch-action: pan-y;
  display: flex; gap: 30px; align-items: flex-start; justify-content: flex-start;
  transform-style: preserve-3d; transition: transform .42s cubic-bezier(.22,.61,.36,1);
  will-change: transform; padding: 30px 34px 14px; width: max-content;
}
/* 单盒舞台：给 boxbody 提供独立的透视祖先 */
.mg3-box3d {
  position: relative; flex: none;
  width: 168px; height: 236px;              /* 2:3 竖盒，恒 height > width */
  perspective: 760px; perspective-origin: 50% 46%;
  padding-left: 18px; box-sizing: content-box;
}
.mg3-boxbody {
  position: relative; display: block; width: 100%; height: 100%;
  transform-style: preserve-3d; text-decoration: none;
  transform-origin: 50% 50% -9px;
  transform: rotateY(32deg) rotateX(-4deg);
  transition: transform .34s cubic-bezier(.3,.7,.25,1);
  -webkit-user-drag: none; user-select: none;
}
.mg3-box3d:hover .mg3-boxbody,
.mg3-boxbody:focus-visible { transform: rotateY(6deg) rotateX(-4deg) translateZ(18px); }

/* 面 1：左侧书脊 */
.mg3-sp {
  position: absolute; top: 0; bottom: 0; left: -18px; width: 18px; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 6px 0; border-radius: 3px 0 0 3px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.11) 0%, rgba(255,255,255,0) 16%,
                    rgba(255,255,255,0) 84%, rgba(0,0,0,.30) 100%),
    linear-gradient(90deg, #0d1015 0%, #191e25 46%, #2a323c 100%);
  transform-origin: right center; transform: rotateY(-90deg);
  backface-visibility: hidden;
  box-shadow: inset -1px 0 4px rgba(0,0,0,.8), inset 1px 0 2px rgba(255,255,255,.05);
}
.mg3-sp b {
  writing-mode: vertical-rl; font-size: 9px; font-weight: 700; letter-spacing: .12em;
  color: rgba(240,245,251,.94); line-height: 1; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-height: 72%;
}
.mg3-sp i { font-style: normal; font-size: 6.5px; font-weight: 800; letter-spacing: .1em;
  color: rgba(240,245,251,.5); }

/* 面 2：顶部厚度（实体感关键，静止必须可见） */
.mg3-tp {
  position: absolute; left: 0; right: 0; top: 0; height: 20px;
  transform-origin: center top; transform: rotateX(90deg);
  backface-visibility: visible; border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #5a6472 0%, #3a424e 48%, #232932 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.16), inset 0 -3px 8px rgba(0,0,0,.6);
}

/* 面 3：右侧页缘（纸页侧面）。rotateY(32°) 下这面朝背面，
   与参考站一致表现为"暗窄边 + 微弱纹理"，不强行亮化（参考站实测右缘亮度仅 ≈30/255）。 */
.mg3-ed {
  position: absolute; top: 2px; bottom: 2px; left: 100%; width: 20px;
  transform-origin: left center; transform: rotateY(90deg);
  backface-visibility: visible; border-radius: 0 2px 2px 0;
  background:
    repeating-linear-gradient(0deg,
      rgba(206,214,226,.50) 0 1px, rgba(150,160,174,.30) 1px 2.5px),
    linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(12,15,20,.72) 100%);
  box-shadow: inset 1px 0 3px rgba(0,0,0,.5);
}

/* 面 4：正面 */
.mg3-fc {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  border-radius: 2px 4px 4px 2px; overflow: hidden; background: #0b0e14;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.11),
              0 20px 34px -16px rgba(0,0,0,.78),
              10px 22px 30px -22px rgba(0,0,0,.9);
  backface-visibility: hidden;
}
.mg3-fc::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 7;
  background: linear-gradient(90deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,0) 11%,
              rgba(255,255,255,.085) 56%, rgba(255,255,255,0) 100%),
              linear-gradient(160deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 34%,
              rgba(0,0,0,.16) 100%);
}
/* 正面顶部印刷带（参考站同款：PC 徽标 + 品类） */
.mg3-fc .mg3-lbl {
  position: absolute; left: 0; right: 0; top: 0; z-index: 5; height: 30px;
  display: flex; align-items: center; gap: 8px; padding: 0 10px; box-sizing: border-box;
  background: linear-gradient(180deg, rgba(8,11,16,.86) 0%, rgba(8,11,16,.46) 62%, rgba(8,11,16,0) 100%);
  pointer-events: none;
}
.mg3-fc .mg3-lbl span {
  font-size: 13px; font-weight: 900; letter-spacing: .04em; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.9); line-height: 1;
}
.mg3-fc .mg3-lbl small {
  margin-left: auto; font-size: 9.5px; font-weight: 700; color: rgba(255,255,255,.86);
  max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
}

/* 情形 A：真竖版封面 → 满版 */
.mg3-boxbody.is-portrait .mg3-art { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 情形 B：只有横版封面 —— 整面同源模糊铺底 + 完整横图置顶 + 印刷带锚底 */
.mg3-boxbody.is-land .mg3-fc { background-color: var(--tint2, #10151c); }
.mg3-boxbody.is-land .mg3-fc::before {
  content: ""; position: absolute; inset: -14% -10%; z-index: 0;
  background-image: var(--art); background-size: cover; background-position: 50% 42%;
  filter: blur(17px) saturate(1.28) brightness(1.02);
  transform: scale(1.22);
}
.mg3-boxbody.is-land .mg3-artbox {
  /* ★ 横图在竖盒内的正解（V6 终版）：
     ① 不能用 flex 居中：flex 子项的 height:auto 会被压缩（实测比例 2.139→1.707，
        等于纵向拉伸 20%，用户明令禁止"拉伸图片"）—— 这一点是量出来的，不是猜的。
     ② 不能用 cover：146×131 的容器会把画面横向裁掉 47.8%，
        直接把《雪居之地》的"雪"字切掉，违反"裁切不能切掉游戏名"。
     ⇒ 用 position:relative + 绝对定位居中 + aspect-ratio 锁真实比例：
        零裁切、零拉伸；上下余量由"同一张图的模糊延伸"填充（不是纯色、不是别的图）。 */
  position: relative; z-index: 2; flex: none; width: 100%; height: 52%;
  overflow: hidden; display: block;
  background-color: #0d1218;
  box-shadow: 0 1px 0 rgba(255,255,255,.26);
}
.mg3-boxbody.is-land .mg3-artbox::before {
  content: ""; position: absolute; inset: -12% -6%; z-index: 0;
  background-image: var(--art); background-size: cover; background-position: 50% 45%;
  filter: blur(13px) saturate(1.15) brightness(.85); transform: scale(1.15);
}
.mg3-boxbody.is-land .mg3-artbox::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,11,16,.45) 0%, rgba(8,11,16,0) 26%,
              rgba(8,11,16,0) 74%, rgba(8,11,16,.5) 100%);
}
.mg3-boxbody.is-land .mg3-artbox .mg3-art {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 100%; height: auto; aspect-ratio: var(--ar, 460 / 215);  /* 真实比例，JS 按 naturalSize 写入 */
  object-fit: contain; display: block;                            /* 零裁切、零拉伸 */
  box-shadow: 0 3px 12px rgba(0,0,0,.55);
}
.mg3-boxbody.is-land .mg3-print {
  position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 4px;
  padding: 7px 8px 8px;
}
/* 印刷带顶部：完整横图缩览（不裁、不拉伸），让"被裁的部分"仍可看到 */
.mg3-boxbody.is-land .mg3-print .mg3-mini {
  display: block; width: 100%; height: auto; aspect-ratio: 460 / 215;
  object-fit: contain; border-radius: 2px; margin-top: auto;   /* 压到带底，避开标题 */
  box-shadow: 0 2px 8px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.14);
}
.mg3-boxbody.is-land .mg3-print::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(6,9,13,.30) 0%, rgba(6,9,13,.55) 46%, rgba(6,9,13,.90) 100%);
}
.mg3-boxbody.is-land .mg3-print > * { position: relative; z-index: 1; }
.mg3-boxbody.is-land .mg3-print h4 {
  margin: 0; font-size: 12px; font-weight: 700; line-height: 1.28; color: #fff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,1); flex: none;
}
.mg3-boxbody.is-land .mg3-print .pill {
  align-self: flex-start; flex: none; font-size: 9.5px; font-weight: 700; line-height: 1.6;
  padding: 2px 8px; border-radius: 999px; color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.18);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 情形 C：缺图 → 诚实占位，同一竖盒外壳 */
.mg3-boxbody.is-empty .mg3-fc {
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.055) 0 9px, rgba(0,0,0,.08) 9px 18px),
              linear-gradient(160deg, #3a434f, #1d242c);
}
.mg3-ph { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 7px; padding: 12px; text-align: center;
  color: rgba(255,255,255,.78); }
.mg3-ph i { font-style: normal; font-size: 19px; opacity: .45; }
.mg3-ph b { font-size: 11px; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* 盒下真实标题 */
.mg3-cap { margin-top: 11px; width: 168px; padding-left: 18px; box-sizing: border-box; }
.mg3-cap .t { font-size: 12.5px; font-weight: 700; line-height: 1.34;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mg3-cap .m { margin-top: 2px; font-size: 11px; color: var(--mg3-ink-3); font-weight: 600; }
.mg3-boxitem { flex: none; }
.mg3-boxfloor { display: none; }
/* 加载态 / 末尾提示：真实反馈，不伪装 */
.mg3-boxstat { padding: 10px 30px 0; font-size: 12px; color: var(--mg3-ink-3); font-weight: 600;
  display: flex; align-items: center; gap: 10px; min-height: 22px; }
.mg3-boxstat.is-end { color: var(--mg3-ink-2); }
.mg3-boxmore { margin-left: auto; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--mg3-line-2); background: var(--mg3-card); color: var(--mg3-ink);
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.mg3-boxmore:hover { border-color: var(--mg3-acc); color: var(--mg3-acc); }
.mg3-boxmore[disabled] { opacity: .45; cursor: default; }
/* 手机：等比缩小，仍是竖盒（禁止变成横卡） */
@media (max-width: 760px) {
  .mg3-boxrail { gap: 22px; padding: 20px 16px 10px; }
  .mg3-box3d { width: 126px; height: 177px; padding-left: 14px; }
  .mg3-sp { left: -14px; width: 14px; }
  .mg3-tp { height: 14px; }
  .mg3-ed { width: 14px; }
  .mg3-boxbody.is-land .mg3-print { padding: 8px 8px 9px; gap: 4px; }
  .mg3-boxbody.is-land .mg3-print h4 { font-size: 11px; -webkit-line-clamp: 2; }
  .mg3-boxbody.is-land .mg3-print .pill { font-size: 9px; }
  .mg3-cap { width: 126px; padding-left: 14px; }
  .mg3-cap .t { font-size: 11.5px; }
  .mg3-boxstat { padding: 8px 16px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mg3-boxrail, .mg3-boxbody { transition: none !important; }
}

.mg3-boxnav { display: flex; align-items: center; gap: 8px; }
.mg3-boxnav-n { font-size: 12px; color: var(--mg3-ink-3); }
.mg3-boxnav-btn {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--mg3-line);
  background: var(--mg3-card); color: var(--mg3-ink); font-size: 16px; line-height: 1;
}
.mg3-boxnav-btn:hover { border-color: var(--mg3-acc); color: var(--mg3-acc); }
.mg3-boxnav-btn.is-off { opacity: .34; pointer-events: none; }

.mg3-iconbtn {
  min-width: 32px; height: 32px; padding: 0 10px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--mg3-line);
  background: var(--mg3-card); color: var(--mg3-ink); font-size: 15px; line-height: 1; cursor: pointer;
}
.mg3-iconbtn:hover { border-color: var(--mg3-acc); color: var(--mg3-acc); }
.mg3-iconbtn.is-off { opacity: .34; pointer-events: none; }
.mg3-iconbtn:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: 2px; }
.mg3-pull-btn { font-size: 12px; padding: 0 12px; }
.mg3-pull-btn[aria-pressed="true"] { background: var(--mg3-acc); border-color: var(--mg3-acc); color: #fff; }

/* ------------------------------------------------------------ 封面长廊 */

.mg3-flow {
  position: relative; height: 236px; overflow: hidden;
  border-radius: var(--mg3-r);
  background: radial-gradient(120% 90% at 50% 40%, var(--mg3-card-2), var(--mg3-card));
  border: 1px solid var(--mg3-line-2);
  perspective: 1200px; cursor: grab;
  touch-action: pan-y;
}
.mg3-flow.is-drag { cursor: grabbing; }
.mg3-flow:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: -3px; }
.mg3-flow-stage {
  position: absolute; inset: 0; transform-style: preserve-3d;
  /* V7：手势必须由本层接管；缺这条时浏览器把 touchmove 全部吞掉，
     实测 flow 只收到 1 次 pointermove、box 直接 pointercancel ⇒ 触屏拖不动。 */
  touch-action: pan-y;
}
.mg3-flow-card {
  position: absolute; left: 50%; top: 50%; width: 132px; height: 176px;
  margin: -88px 0 0 -66px; border-radius: 8px; overflow: hidden;
  background: var(--mg3-card-2);
  /* V8（p14 配套）：paint 只处理中心 ±BAND 张，带外卡片不再被写内联样式。
     没有这两条默认值，远端卡会全部堆在 left:50% 中心并盖住中间那张。 */
  opacity: 0; pointer-events: none;
  box-shadow: 0 16px 34px rgba(10, 12, 16, .26);
  transform-style: preserve-3d; will-change: transform, opacity;
  display: block;
  /* V7：touch-action 不继承。手指落在卡片上时按卡片自身的值判定，
     缺这条 ⇒ 浏览器直接接管横向手势，flow 收不到 pointermove（实测 29 次 touchmove
     只换来 1 次 pointermove，拖动完全失效）。 */
  touch-action: pan-y;
}
/* V7（Kimi 第三轮指出，实测确认）：长廊卡片 132×176 对 400×187 横图用 cover
   会裁掉约 65% 宽度，「11月3日 登陆Steam!」只剩「3日…登陆Stea」。
   改为整幅 contain + 同源模糊铺底（与卡带同一套策略），横幅文字不再被切断；
   同时卡片本身加宽（132→150），让整幅横图在卡片里占得更大、上下留边更窄。 */
.mg3-flow-card { background: #0b0f14; width: 150px; height: 176px; margin-left: -75px; }
.mg3-flow-card img {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
  display: block;
}
.mg3-flow-card::before {
  content: ""; position: absolute; inset: -8% -6%; z-index: 0;
  background-image: var(--art, none); background-size: cover; background-position: 50% 45%;
  filter: blur(12px) brightness(.5) saturate(1.12);
  transform: scale(1.12);
}
.mg3-flow-card .mg3-flow-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 14px 6px 6px; font-size: 10px; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(4,6,9,.88));
  text-align: center; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mg3-flow-none {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: rgba(255,255,255,.55); font-size: 30px;
  background: linear-gradient(135deg, #1b242d, #0e141a);
}
.mg3-flow-ph {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(110deg, var(--mg3-card-2) 8%, var(--mg3-card) 18%, var(--mg3-card-2) 33%);
  background-size: 220% 100%; animation: mg3-shimmer 1.5s linear infinite;
}
.mg3-flow-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 6px;
  font-size: 11px; line-height: 1.25; color: #fff; text-align: center;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .82));
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mg3-flow-edge { position: absolute; top: 0; bottom: 0; width: 68px; pointer-events: none; z-index: 60; }
.mg3-flow-edge.l { left: 0; background: linear-gradient(90deg, var(--mg3-card), transparent); }
.mg3-flow-edge.r { right: 0; background: linear-gradient(270deg, var(--mg3-card), transparent); }
.mg3-flow-ctrls { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 0 0; }
.mg3-flow-progress {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px;
  max-width: 100%; font-size: var(--mg3-fs-meta); line-height: 1.5; color: var(--mg3-ink-3);
  font-variant-numeric: tabular-nums;
}
.mg3-flow-progress b { color: var(--mg3-ink); font-weight: 700; }
.mg3-fp-sep { color: var(--mg3-line); }
.mg3-fp-more { color: var(--mg3-acc); font-weight: 600; }

/* ------------------------------------------------------------ 网格 / 列表 */

.mg3-viewtabs { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--mg3-card-2); }
.mg3-vtab {
  padding: 6px 14px; border: 0; border-radius: 8px; background: transparent;
  color: var(--mg3-ink-2); font-size: 13px; cursor: pointer;
}
.mg3-vtab.is-on { background: var(--mg3-card); color: var(--mg3-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .10); }
.mg3-vtab:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: 2px; }

.mg3-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px;
}
@media (max-width: 1200px) { .mg3-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 980px)  { .mg3-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .mg3-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 420px)  { .mg3-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.mg3-card {
  display: flex; flex-direction: column;
  background: var(--mg3-card); border: 1px solid var(--mg3-line-2);
  border-radius: 12px; overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.mg3-card:hover { transform: translateY(-3px); box-shadow: var(--mg3-shadow); border-color: var(--mg3-line); }
.mg3-card:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: 2px; }
.mg3-card-media { position: relative; aspect-ratio: 400 / 187; background: var(--mg3-card-2); overflow: hidden; }
.mg3-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg3-card-badge {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  padding: 3px 8px; border-radius: 999px; font-size: 11px;
  background: rgba(10, 12, 16, .62); color: #fff; backdrop-filter: blur(4px);
}
/* 关键修复：去掉标题与信息之间的大块空洞（V3 因 min-height+space-between 造成） */
.mg3-card-b { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 4px; }
.mg3-card-t {
  font-size: 13px; font-weight: 600; line-height: 1.35; margin: 0;
  min-height: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mg3-card-m {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11px; color: var(--mg3-ink-3); margin: 0;
}
.mg3-card-m span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 列表模式：同一 DOM，切列 */
.mg3-grid.is-list { grid-template-columns: 1fr; gap: 8px; }
.mg3-grid.is-list .mg3-card { flex-direction: row; align-items: center; }
.mg3-grid.is-list .mg3-card-media { width: 132px; flex: 0 0 132px; aspect-ratio: 400 / 187; }
.mg3-grid.is-list .mg3-card-b { flex: 1; padding: 10px 14px; }
.mg3-grid.is-list .mg3-card-t { -webkit-line-clamp: 1; font-size: 14px; }

/* ------------------------------------------------------------ 分页 */

.mg3-pager {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex-wrap: wrap; padding: 18px 0 4px;
}
.mg3-pg {
  min-width: 34px; height: 34px; padding: 0 10px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--mg3-line);
  background: var(--mg3-card); color: var(--mg3-ink); font-size: 13px;
}
.mg3-pg:hover { border-color: var(--mg3-acc); color: var(--mg3-acc); }
.mg3-pg.is-on { background: var(--mg3-acc); border-color: var(--mg3-acc); color: #fff; font-weight: 700; }
.mg3-pg.is-off { opacity: .34; pointer-events: none; }
.mg3-pg:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: 2px; }
.mg3-pg-gap { color: var(--mg3-ink-3); padding: 0 2px; }
.mg3-pg-info { font-size: 12px; color: var(--mg3-ink-3); margin-left: 8px; }

/* ------------------------------------------------------------ 分类卡 */

.mg3-cats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px;
  /* 站点右下浮层（看板娘+签到气泡+在线人数，实测 z=100000、≈192×208）
     会盖住最后一列卡片中部，这里给整块网格留出底部安全区，
     让最后一行卡片不被压住文字。 */
  padding-bottom: var(--mg3-safe-b, 0px);
}
@media (max-width: 1100px) { .mg3-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .mg3-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .mg3-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.mg3-cat {
  position: relative; display: block; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--mg3-line-2);
  background: var(--mg3-card); min-height: 96px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mg3-cat:hover { transform: translateY(-2px); box-shadow: var(--mg3-shadow); }
.mg3-cat:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: 2px; }
.mg3-cat.is-on { border-color: var(--mg3-acc); box-shadow: 0 0 0 1px var(--mg3-acc) inset; }
.mg3-cat-art {
  display: block; aspect-ratio: 16 / 7; overflow: hidden;
  /* 图片未就绪时也是"有设计的底"，不是白板 */
  background: linear-gradient(110deg, var(--mg3-card-2) 8%, var(--mg3-card) 18%, var(--mg3-card-2) 33%);
  background-size: 220% 100%;
  animation: mg3-shimmer 1.5s linear infinite;
}
@keyframes mg3-shimmer { to { background-position: -220% 0; } }
.mg3-cat-imgfail {
  background: repeating-linear-gradient(135deg, var(--mg3-card-2) 0 14px, var(--mg3-card) 14px 28px);
  animation: none;
}
/* 分类卡不裁切：横版 400x187 原图完整呈现，避免把游戏标题裁掉一半 */
.mg3-cat-art img { width: 100%; height: 100%; object-fit: contain; display: block;
  background: var(--mg3-card-2); }
.mg3-cat-in {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 18px 11px 9px;
  background: linear-gradient(180deg, transparent, rgba(8, 10, 14, .82));
}
.mg3-cat-in b { color: #fff; font-size: 14px; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.mg3-cat-in em { font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .84); }
/* 无真实封面时的类型图形兜底（明确不是某款游戏封面） */
.mg3-cat.is-art .mg3-cat-art {
  display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, var(--mg3-card-2) 0 14px, var(--mg3-card) 14px 28px);
}
.mg3-cat-glyph {
  font-size: 30px; font-weight: 700; color: var(--mg3-ink-3); opacity: .5;
}

/* ------------------------------------------------------------ 空态 / 无图 */

.mg3-empty {
  padding: 44px 20px; text-align: center; border-radius: var(--mg3-r);
  background: var(--mg3-card-2); border: 1px dashed var(--mg3-line);
}
.mg3-empty b { display: block; font-size: 17px; margin-bottom: 6px; }
.mg3-empty p { margin: 0; color: var(--mg3-ink-2); font-size: 14px; }
.mg3-empty a { color: var(--mg3-acc); text-decoration: underline; }

.mg3-imgfall {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 60px;
  background: repeating-linear-gradient(135deg, var(--mg3-card-2) 0 10px, var(--mg3-card) 10px 20px);
  color: var(--mg3-ink-3); font-size: 12px;
}
.mg3-noimg::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, var(--mg3-card-2) 0 10px, var(--mg3-card) 10px 20px);
}

/* ------------------------------------------------------------ 响应式 */

/* 站点看板娘与在线面板固定在右下（实测 z=100000、约 192×208、left≈1224@1440）。
   桌面端给书架轨道末尾预留等宽空白，使最后一本书能滚到浮层左侧。 */
@media (min-width: 1100px) {
  .mg3 { --mg3-safe-r: 210px; --mg3-safe-b: 96px; }
}

@media (max-width: 760px) {
  .mg3-h1 { font-size: 24px; --mg3-fs-h2: 18px; }
  .mg3-wrap { padding: 14px 12px 44px; }
  .mg3-flow { height: 208px; }
  .mg3-flow-card { width: 112px; height: 150px; margin: -75px 0 0 -56px; }
  .mg3-status { padding: 10px 12px; }
  .mg3-status-p { border-left: 0; padding-left: 0; }
}

/* ------------------------------------------------------------ 减少动效 */

@media (prefers-reduced-motion: reduce) {
  .mg3 *, .mg3 *::before, .mg3 *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }
}
.mg3.is-rm .mg3-box, .mg3.is-rm .mg3-cart-item, .mg3.is-rm .mg3-flow-card { transition: none !important; }
/* ===================================================================
   立体游戏卡带架（V6，方向 A「立式插槽墙」—— 由设计主导模型看图自主选定）
   选型依据（kimi-k3-1 逐图评审）：A 是唯一在默认状态同时呈现
   「外壳轮廓 + 槽位夹持 + 承托沿」三要素的方案；C 因平铺俯视无厚度/无槽位被否；
   B 卡带本体偏薄且手机端整屏仅 1 枚、密排感最差。
   按评审补三处：
     ① 手机端一屏至少露出 3 枚（含两侧半枚暗示可滑）
     ② 选中信息面板（大封面 + 名称/分类/进入详情）
     ③ 卡带外壳细节：顶部卡扣凹槽 / 侧边厚度高光 / 底部金手指遮罩暗纹
   合规：借用卡带收纳形态，不使用任何 Nintendo/Switch 官方标识与表述。
   =================================================================== */
.mg3-cart {
  position: relative; border-radius: 16px; overflow: hidden;
  /* V8 材质统一（用户判定 V7 红黑为禁项）：外壳改为与浅色页面同族的暖中性展架，
   深色主题单独设计（石墨外壳），不做简单反色。强调色只在选中态与主按钮点缀。 */
  background:
    linear-gradient(180deg, var(--mg3-warm-1) 0%, var(--mg3-warm-2) 100%);
  border: 1px solid var(--mg3-warm-3);
  box-shadow: 0 1px 2px rgba(18, 20, 24, .04), 0 14px 34px rgba(18, 20, 24, .07),
              inset 0 1px 0 rgba(255, 255, 255, .9);
}
body.dark-theme .mg3-cart {
  background: linear-gradient(180deg, #1b2027 0%, #151920 100%);
  border-color: rgba(255, 255, 255, .07);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px rgba(0, 0, 0, .34),
              inset 0 1px 0 rgba(255, 255, 255, .05);
}
/* V8（D4）：平台说明从一行常驻正文改为可点击的信息图标 + 按需展开的说明面板。
   图标可 Tab 聚焦、Enter/Space 展开、Escape 收起；展开层不覆盖拖动区域（在轨道之上独立一行）。 */
.mg3-cart-info { padding: 10px 18px 0; display: flex; align-items: flex-start; gap: 10px; }
.mg3-info-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--mg3-line); background: var(--mg3-card);
  color: var(--mg3-ink-2); font: inherit; font-size: 12px; line-height: 1.5;
}
.mg3-info-btn:hover { border-color: var(--mg3-acc); color: var(--mg3-ink); }
.mg3-info-btn:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: 2px; }
.mg3-info-btn .mg3-info-i {
  display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid currentColor; font-size: 10px; font-weight: 800; font-style: normal;
  line-height: 1; letter-spacing: 0;
}
.mg3-info-btn[aria-expanded="true"] { border-color: var(--mg3-acc); color: var(--mg3-ink); }
.mg3-info-panel {
  display: none; max-width: 620px; padding: 9px 12px; border-radius: 10px;
  background: var(--mg3-card); border: 1px solid var(--mg3-line-2);
  font-size: 12.5px; line-height: 1.65; color: var(--mg3-ink-2);
}
.mg3-info-panel.is-open { display: block; }
.mg3-info-panel b { color: var(--mg3-ink); font-weight: 700; }
.mg3-cart-fallback {
  padding: 10px 18px 0; margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--mg3-ink-3);
}

/* 槽墙轨道：V8 改为暖中性承托面（浅）／石墨（深），只留极轻的内阴影表达凹陷。 */
.mg3-cart-track {
  position: relative; overflow: hidden; cursor: grab; touch-action: pan-y;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, var(--mg3-warm-2) 0%, var(--mg3-warm-1) 100%);
  border-top: 1px solid var(--mg3-warm-3);
  box-shadow: inset 0 2px 6px rgba(18, 20, 24, .05);
}
body.dark-theme .mg3-cart-track {
  background: linear-gradient(180deg, #12161c 0%, #0e1116 100%);
  border-top-color: rgba(255, 255, 255, .06);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .45);
}
/* V8：去掉左右红色导轨（V7 的"大面积红黑"来源之一），只留一条中性顶部发丝线。 */
.mg3-cart-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--mg3-line) 18%, var(--mg3-line) 82%, transparent);
  pointer-events: none; z-index: 3;
}
.mg3-cart-track.is-drag { cursor: grabbing; }
/* V7（独立终审指出）：1440 视口下最右一枚卡带被容器右缘生硬切断，
   看起来像渲染错误而不是"还有内容"。给右缘加渐隐遮罩，语义变成"继续滑动"。
   注意：只在可继续滑动（未到末尾）时显示。 */
.mg3-cart-track .mg3-cart-rail { -webkit-mask-image: none; mask-image: none; }
/* 右缘渐隐用独立元素，避免与导轨伪元素冲突 */
.mg3-cart-edge-fade {
  position: absolute; right: 0; top: 0; bottom: 0; width: 64px; z-index: 4;
  pointer-events: none;
  background: linear-gradient(270deg, var(--mg3-rail-fade) 0%, transparent 100%);
  opacity: 1; transition: opacity .25s;
}
.mg3-cart-track.is-at-end .mg3-cart-edge-fade { opacity: 0; }
.mg3-cart-track:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: -3px; }
/* 到达两端时给出可见提示（不是报错，是告诉访客"到头了"） */
.mg3-cart-track.is-at-start::before { opacity: .35; }
.mg3-cart-rail {
  display: flex; align-items: flex-end; gap: 22px;
  /* V7：右侧多留 56px（40→96），避开站点右下角的在线人数/看板娘常驻挂件。
     两路独立视觉审查都指出它压住最右一枚卡带的下方标签。
     站点挂件属受保护公共组件，不改它，只让本区内容避开。 */
  padding: 30px 96px 22px 40px; width: max-content;
  transform-style: preserve-3d;
  will-change: transform; transition: transform .42s cubic-bezier(.22,.61,.36,1);
}

/* 单个槽位：上下卡轨 + 内凹背板（承托关系） */
.mg3-slot { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; }
.mg3-slot-idx { position: absolute; left: 2px; top: -14px; z-index: 6;
  font-size: 9px; font-weight: 800; letter-spacing: .1em; color: var(--mg3-rail-ink-2); }
.mg3-slot-bay {
  position: relative; padding: 9px 11px; border-radius: 8px;
  background: linear-gradient(180deg, var(--mg3-warm-3), var(--mg3-warm-2));
  border-left: 1px solid rgba(18, 20, 24, .05); border-right: 1px solid rgba(18, 20, 24, .05);
  box-shadow: inset 0 3px 8px rgba(18, 20, 24, .06), inset 0 -1px 0 rgba(255, 255, 255, .8);
}
body.dark-theme .mg3-slot-bay {
  background: linear-gradient(180deg, #0d1014, #12161c);
  border-left-color: rgba(0, 0, 0, .6); border-right-color: rgba(255, 255, 255, .04);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .55), inset 0 -1px 0 rgba(255, 255, 255, .04);
}
/* 上下卡轨（夹持感）：中性金属导轨，不再用红色 */
.mg3-slot-bay::before, .mg3-slot-bay::after {
  content: ""; position: absolute; left: 6%; right: 6%; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(18,20,24,.10), rgba(18,20,24,.20), rgba(18,20,24,.10));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}
body.dark-theme .mg3-slot-bay::before, body.dark-theme .mg3-slot-bay::after {
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.16), rgba(255,255,255,.06));
  box-shadow: 0 1px 0 rgba(0, 0, 0, .5);
}
.mg3-slot-bay::before { top: 2px; }
.mg3-slot-bay::after { bottom: 2px; }

/* ---------- 卡带本体（三面立体） ---------- */
.mg3-cart-item {
  position: relative; display: block; flex: none; text-decoration: none;
  touch-action: pan-y;
  transform-style: preserve-3d;
  width: 178px; height: 210px;                 /* 竖卡：外轮廓 height>width（178<210）；加宽让横图少裁 */
  --thick: 13px;
  transform: perspective(1100px) rotateY(9deg) rotateX(1deg);
  transition: transform .3s cubic-bezier(.22,.61,.36,1), filter .3s;
}
.mg3-cart-item:hover, .mg3-cart-item:focus-visible {
  transform: perspective(1100px) rotateY(4deg) translateY(-12px) scale(1.04);
}
.mg3-cart-item.is-on {
  transform: perspective(1100px) rotateY(0deg) translateY(-26px) scale(1.10);
  /* V8：选中态用中性投影 + 一道强调色细环表达，不再用红色辉光压过封面。 */
  filter: drop-shadow(0 18px 26px rgba(18, 20, 24, .34)); z-index: 5;
}
/* 正面外壳 + 内嵌标签（真实封面）：V8 石墨外壳（中性，不与封面抢色） */
.mg3-cart-face {
  position: absolute; inset: 0; border-radius: 7px 7px 9px 9px; overflow: hidden;
  background: linear-gradient(165deg, #33383f 0%, #24282e 48%, #171a1f 100%);
  box-shadow: 0 10px 22px rgba(18, 20, 24, .28), inset 0 1px 0 rgba(255, 255, 255, .16),
              inset 0 0 0 1px rgba(255, 255, 255, .08);
  transform: translateZ(var(--thick));
}
.mg3-cart-item.is-p .mg3-cart-face {
  background: linear-gradient(160deg, #363b43, #1a1e23);
}
/* 选中态细环：只在当前卡带上出现，宽度 1px，不遮挡封面 */
.mg3-cart-item.is-on .mg3-cart-face {
  box-shadow: 0 12px 26px rgba(18, 20, 24, .30), inset 0 1px 0 rgba(255, 255, 255, .18),
              inset 0 0 0 1px var(--mg3-acc);
}
/* V7 竖版卡带（is-p）：真竖版 600×900 应该满版展示，不能套横图的矮标签。
   实测（cover_geometry.py）：套基础标签 161×170 会纵向裁掉 29.5%。
   这里给它 5%→6% 的更高标签区（约 161×190，宽高比 0.85 vs 原图 0.667），
   纵向裁切降到约 21%；同时把底部游戏名收窄，避免压住画面主体。 */
.mg3-cart-item.is-p .mg3-cart-label {
  top: 5%; bottom: 6%;
}
.mg3-cart-label {
  position: absolute; left: 5%; right: 5%; top: 7%; bottom: 14%;
  border-radius: 3px; overflow: hidden; background: #14171b;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), inset 0 0 0 1px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
}
.mg3-cart-label img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 横图（V7 纠正）：改成「不拉伸的受控裁切」填满竖版标签。
   旧版用 contain 把 400×187 横图缩成 119×57 的一小条，上下是模糊延伸，
   视觉上就是用户说的"灰蓝大面板 + 一小条横图"。现在按 cover 裁切、保留中间主画面，
   画面撑满卡带正面；游戏名始终显示在底部印刷带，识别信息不依赖图片是否被裁。 */
/* V7 横图卡带最终方案（按量化数据定，不是目测）：
 *
 * 几何事实（04-gates/cover_geometry.py + 手算表格）：
 *   卡带正面 176×213，标签宽 160。横图 400×187（2.139:1）塞进竖标签时，
 *   「封面占比」与「横向裁切」是互斥的：
 *     标签高 90  → 封面占 38.4%，裁切 16.9%
 *     标签高 150 → 封面占 64.0%，裁切 50.1%
 *     标签高 210 → 封面占 89.6%，裁切 64.4%
 *   也就是说：要「竖版满版」就得切掉一半画面（首卡只剩「3日 登陆Steam」）；
 *   要「画面完整」就只能占三分之一面积（用户抱怨的"一小条横图"）。
 *
 * 用户原话给了第三条路：「如果裁切后无法辨认，就在竖向画面内采用清楚的排版」。
 * 因此这里不再二选一：
 *   ① 横图**按卡带宽度满铺**（零裁切、零拉伸），让画面宽度吃满，
 *   ② 图片上下剩余的空间用**同一张图放大模糊**承接，形成连续的满版背景，
 *   ③ 游戏名固定印在底部印刷带，识别信息不依赖图片是否被裁。
 * 结果：观感是"满版一张画"，实际没有任何画面被切断。
 */
.mg3-cart-item.is-l .mg3-cart-label {
  top: 3%; bottom: 14%;
  border-radius: 3px;
  background-color: #14171b;
  overflow: hidden;
}
/* 同源满版铺底（同一张图放大模糊，不是纯色、不是别的图） */
.mg3-cart-item.is-l .mg3-cart-label::before {
  content: "";
  position: absolute; inset: -6% -4%; z-index: 0;
  background-image: var(--art);
  background-size: cover;
  background-position: 50% 45%;
  filter: blur(9px) saturate(1.25) brightness(.78);
  transform: scale(1.1);
}
/* 主体：按宽度满铺、垂直居中，零裁切零拉伸 */
.mg3-cart-item.is-l .mg3-cart-label img {
  position: absolute; z-index: 1;
  left: 0; right: 0; top: 50%;
  width: 100%; height: auto;
  aspect-ratio: var(--ar, 400 / 187);
  object-fit: contain;
  transform: translateY(-50%);
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.55));
}
/* 底部印刷区：真实游戏名 */
.mg3-cart-item.is-l .mg3-cart-face::after {
  height: 15%;
  background: linear-gradient(180deg, rgba(8,11,16,0) 0%, rgba(8,11,16,.9) 100%);
  border-top: none;
}
.mg3-cart-item.is-l .mg3-cart-nm {
  display: -webkit-box;
  bottom: 3.2%;
  left: 8%; right: 8%;
  font-size: 11.5px; line-height: 1.3;
  -webkit-line-clamp: 2;
  text-align: center;
  color: #f6f7f9;
  text-shadow: 0 1px 3px rgba(0,0,0,.95);
}
.mg3-cart-item.is-e .mg3-cart-label {
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 8px, rgba(0,0,0,.1) 8px 16px),
              linear-gradient(160deg, #39424f, #1d242c);
  display: grid; place-items: center;
}
.mg3-cart-item.is-e .mg3-cart-label i { font-style: normal; font-size: 17px; color: rgba(255,255,255,.4); }
/* 卡带底部印刷带：真实游戏名（卡带外形的一部分，不是副标题） */
.mg3-cart-item .mg3-cart-face::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 19%;
  background: linear-gradient(180deg, rgba(8,11,16,0) 0%, rgba(8,11,16,.85) 100%);
  pointer-events: none; z-index: 4;
}
.mg3-cart-nm {
  position: absolute; left: 9%; right: 9%; bottom: 3.6%;
  /* V7：::after（底部印刷带）是 z-index:4，原来这里没有 z-index ⇒ 游戏名被压带盖住。
     实测（Kimi 第二轮视觉审查）四张截图里印刷区完全看不到名字，就是这个原因。 */
  z-index: 6;
  font-size: 9px; font-weight: 800; line-height: 1.2; color: rgba(238,241,245,.96);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,.95); letter-spacing: .01em;
}
/* 横图情形的底带已经有真实标题，壳面内不再重复印（避免同一名字出现两次） */
/* V7：横图改成受控裁切后，画面本身可能裁掉原图的游戏名，
   因此底部印刷带必须保留真实标题（识别信息不能只靠图）。
   旧版这里 display:none，一旦裁切就会"只剩一张不认识的图"。 */
.mg3-cart-item.is-l .mg3-cart-nm {
  display: -webkit-box;
  font-size: 10px; line-height: 1.25;
  -webkit-line-clamp: 2;
}
/* 顶部卡扣凹槽（卡带辨识特征，静止可见） */
.mg3-cart-notch {
  position: absolute; left: 24%; right: 24%; top: 2.2%; height: 5px; z-index: 4;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(180deg, #080b0e, #1a2028);
  box-shadow: inset 0 -1px 1px rgba(255,255,255,.12), inset 0 2px 3px rgba(0,0,0,.9);
}
/* 底部金手指遮罩暗纹 */
.mg3-cart-pins {
  position: absolute; left: 9%; right: 9%; bottom: -2px; height: 4px; z-index: 4;
  background: repeating-linear-gradient(90deg, rgba(150,128,74,.34) 0 1.5px, rgba(0,0,0,0) 1.5px 4px);
  opacity: .55; border-radius: 1px;
}
/* 壳面物理边缘 + 侧面厚度高光（静止也读得出厚度） */
.mg3-cart-face::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), inset 0 -12px 18px rgba(0,0,0,.42);
}
/* 右侧厚度条（纯 2D，任何角度都可见） */
.mg3-cart-item::after {
  content: ""; position: absolute; top: 4px; bottom: 4px; right: calc(var(--thick) * -1);
  width: var(--thick); border-radius: 0 4px 4px 0; z-index: 1;
  background: linear-gradient(90deg, #4c525b 0%, #30353c 42%, #1b1f24 100%);
  box-shadow: inset -1px 0 2px rgba(0,0,0,.55), inset 1px 0 2px rgba(255,255,255,.18);
}
/* 侧边（真 3D 面） */
.mg3-cart-side {
  position: absolute; top: 0; bottom: 0; left: 0; width: var(--thick);
  transform-origin: left center; transform: rotateY(-90deg);
  background: linear-gradient(90deg, #15181c 0%, #3b4048 44%, #5b626b 100%);
  border-radius: 3px 0 0 3px;
  box-shadow: inset -2px 0 9px rgba(0,0,0,.5), inset 2px 0 4px rgba(255,255,255,.14);
}
/* 顶部卡扣面（真 3D 面） */
.mg3-cart-cap2 {
  position: absolute; left: 0; right: 0; top: 0; height: var(--thick);
  transform-origin: center top; transform: rotateX(90deg);
  background: linear-gradient(180deg, #4a5058, #24282e);
  border-radius: 4px 4px 0 0; box-shadow: inset 0 -2px 6px rgba(0,0,0,.5);
}
/* 槽下信息（名称/分类）—— 与卡带分离，保证小尺寸下也可读。
   V7 修复（Kimi 视觉审查指出、实测确认）：这排文字位于**红黑深色轨道内部**，
   原来用 var(--mg3-ink) —— 浅色主题下该变量是 #14161a（深色字），
   压在深红黑面板上几乎不可读（桌面浅色最明显）。固定用浅色 + 阴影保证对比度。 */
.mg3-slot-meta { margin-top: 11px; width: 154px; text-align: center; }
/* V8：文字色改由 --mg3-rail-ink / -2 承载，随浅/深主题切换（承托面不再是固定深红）。 */
.mg3-slot-meta b { display: -webkit-box; font-size: 11px; font-weight: 700; line-height: 1.28;
  color: var(--mg3-rail-ink);
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mg3-slot-meta span { display: block; font-size: 10px; color: var(--mg3-rail-ink-2); margin-top: 2px; }

/* ---------- 选中信息面板（评审要求补的②） ---------- */
.mg3-cart-panel {
  display: none; gap: 16px; align-items: center;
  margin: 0 18px 14px; padding: 14px;
  border-radius: 12px; background: var(--mg3-card);
  border: 1px solid var(--mg3-line-2);
}
.mg3-cart-panel.is-on { display: flex; }
.mg3-cart-panel-art { width: 132px; flex: none; border-radius: 8px; overflow: hidden;
  background: #0b0f14; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.mg3-cart-panel-art img { width: 100%; display: block; }
.mg3-cart-panel-info { min-width: 0; flex: 1 1 auto; }
.mg3-cart-panel-info h3 { margin: 0 0 5px; font-size: 15px; font-weight: 800; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mg3-cart-panel-info p { margin: 0 0 9px; font-size: 12px; color: var(--mg3-ink-3); font-weight: 600; }
.mg3-cart-panel-go {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 15px; border-radius: 999px; text-decoration: none;
  background: var(--mg3-acc); color: #fff; font-size: 12.5px; font-weight: 800;
}
.mg3-cart-panel-go:hover { filter: brightness(1.06); }

/* 状态行 */
.mg3-cart-stat { padding: 9px 18px 13px; font-size: 12px; font-weight: 600;
  color: var(--mg3-ink-3); display: flex; align-items: center; gap: 10px; min-height: 20px; }
.mg3-cart-stat.is-end { color: var(--mg3-ink-2); }
/* V7（独立终审指出、实测确认）：站点右下角常驻挂件是 `position:fixed; z-index:100000`，
   实测占据 (1224,668)-(1416,876)，而「加载更多」按钮原本在 (1265,620)-(1343,651)，
   两者重叠 ⇒ 按钮被压住。上一版只给轨道加了右内边距，没让开这个按钮区间。
   这里给按钮留 112px 右边距，使其右边界退到约 1231，避开挂件左缘 1224。
   挂件属受保护公共组件，不改它。 */
.mg3-cart-more { margin-left: auto; margin-right: 112px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--mg3-line-2); background: var(--mg3-card); color: var(--mg3-ink);
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.mg3-cart-more:hover { border-color: var(--mg3-acc); color: var(--mg3-acc); }
.mg3-cart-more[disabled] { opacity: .45; cursor: default; }
/* 窄屏时挂件相对更宽，按钮再退一点 */
@media (max-width: 1400px) {
  .mg3-cart-more { margin-right: 132px; }
}
/* V8（实测）：手机一列只有 ~364px，132px 右边距会把按钮压成 72px 宽、文字折成三行
   （390 视口实测 w=72 h=48 lines=3；360 视口 w=64 仍三行）。挂件在窄屏不占右侧悬浮区，
   此处逐档收回右边距，并禁用折行。 */
@media (max-width: 900px) {
  .mg3-cart-more { margin-right: 48px; }
}
@media (max-width: 760px) {
  .mg3-cart-more { margin-right: 0; white-space: nowrap; }
  .mg3-cart-stat { flex-wrap: wrap; row-gap: 6px; padding: 9px 14px 12px; }
}

/* 手机：一屏至少露出 3 枚（评审要求补的①） */
@media (max-width: 760px) {
  .mg3-cart-rail { gap: 12px; padding: 24px 32px 16px 14px; }
  .mg3-cart-item { width: 96px; height: 122px; --thick: 8px; }
  .mg3-slot-bay { padding: 7px 7px; }
  .mg3-slot-meta { width: 98px; margin-top: 8px; }
  .mg3-slot-meta b { font-size: 10px; -webkit-line-clamp: 2; }
  .mg3-slot-meta span { font-size: 9px; }
  .mg3-cart-nm { font-size: 9px; }
  .mg3-slot-meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block; -webkit-line-clamp: unset; }
  .mg3-cart-panel { margin: 0 12px 10px; padding: 11px; gap: 11px; }
  .mg3-cart-panel-art { width: 92px; }
  .mg3-cart-panel-info h3 { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .mg3-cart-rail, .mg3-cart-item { transition: none !important; }
}

/* ============================================================ mg3 手游化增量（2026-11-24）
   身份色统一为青绿；方形/竖版/横版封面四支独立；投票按钮；网格方图；主题开关。
   只在本页 .mg3 作用域内，不改主题公共样式。 */

.mg3 { --mg3-acc: #18AFA3; --mg3-acc-2: #087F77; --mg3-acc-soft: rgba(24,175,163,.10); }
.mg3-sub-note { margin: 4px 0 0; color: var(--mg3-ink-3); font-size: 12px; line-height: 1.5; }

/* 头部右侧：搜索 + 主题开关 */
.mg3-head-r { display: flex; align-items: center; gap: 10px; flex: 1 1 420px; justify-content: flex-end; flex-wrap: wrap; }
.mg3-theme-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px;
  border: 1px solid var(--mg3-line); border-radius: 12px; background: var(--mg3-card);
  color: var(--mg3-ink); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.mg3-theme-toggle:hover { border-color: var(--mg3-acc); color: var(--mg3-acc); }
.mg3-theme-toggle:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: 2px; }
.mg3-theme-ic { font-size: 15px; line-height: 1; }

/* 方形盒：完整 Logo 居中，不做模糊延伸、不做裁切 */
.mg3-boxbody.is-square .mg3-fc { background: linear-gradient(165deg, var(--tint, #23303a), var(--tint2, #10151c)); }
.mg3-boxbody.is-square .mg3-artbox {
  position: absolute; left: 7%; right: 7%; top: 11%; bottom: 13%; z-index: 2;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(160deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 55%, rgba(0,0,0,.16) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 8px 18px rgba(0,0,0,.34);
}
.mg3-boxbody.is-square .mg3-artbox::before,
.mg3-boxbody.is-square .mg3-artbox::after { display: none; content: none; }
.mg3-boxbody.is-square .mg3-artbox .mg3-art {
  position: static; left: auto; right: auto; top: auto; transform: none;
  width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: contain; padding: 6%;
  box-sizing: border-box; box-shadow: none;
}
.mg3-boxbody.is-square .mg3-print { display: none; }
.mg3-boxbody.is-square > .mg3-fc > .mg3-art {
  position: absolute; inset: 12% 9%; width: 82%; height: 76%; object-fit: contain; transform: none;
}

/* 卡带方形：完整方图放进卡带标签，不裁不拉 */
.mg3-cart-item.is-s .mg3-cart-label { top: 5%; bottom: 13%; background: #0e1419; }
.mg3-cart-item.is-s .mg3-cart-label img {
  position: static; width: 100%; height: 100%; object-fit: contain; padding: 5%;
  box-sizing: border-box; transform: none; aspect-ratio: 1 / 1;
}
.mg3-cart-item.is-s .mg3-cart-face::after { height: 15%; }

/* 投票按钮：卡带下发 + 网格卡右上角（都在 <a> 外，避免 button 嵌链接） */
.mg3-vote-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--mg3-line); background: var(--mg3-card); color: var(--mg3-ink-2);
  font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.mg3-vote-btn:hover { border-color: var(--mg3-acc); color: var(--mg3-acc); }
.mg3-vote-btn:focus-visible { outline: 3px solid var(--mg3-acc); outline-offset: 2px; }
.mg3-vote-btn:disabled { cursor: default; }
.mg3-vote-btn.is-voting { opacity: .72; transform: scale(.97); }
.mg3-vote-btn.is-voted { background: var(--mg3-acc-soft); border-color: var(--mg3-acc); color: var(--mg3-acc-2); }
.mg3-vote-btn.is-fail { border-color: #c0392b; color: #c0392b; }
.mg3-vote-ic { display: inline-flex; width: 15px; height: 15px; }
.mg3-vote-ic svg { width: 15px; height: 15px; }
.mg3-vote-n { font-variant-numeric: tabular-nums; opacity: .72; }
.mg3-slot-meta { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mg3-slot-meta .mg3-vote-btn { margin-top: 6px; }

/* 网格：方图完整展示（不裁切），投票浮在右上角 */
.mg3-card-wrap { position: relative; min-width: 0; }
.mg3-card-wrap .mg3-vote-btn {
  position: absolute; right: 8px; top: 8px; z-index: 3;
  background: rgba(10,14,18,.70); border-color: rgba(255,255,255,.18); color: #fff;
  backdrop-filter: blur(6px);
}
.mg3-card-wrap .mg3-vote-btn:hover { background: rgba(10,14,18,.88); border-color: var(--mg3-acc); color: #fff; }
.mg3-card-wrap .mg3-vote-btn.is-voted { background: rgba(24,175,163,.92); border-color: rgba(255,255,255,.28); color: #fff; }
.mg3-card-media { aspect-ratio: 1 / 1; background: linear-gradient(160deg, var(--mg3-card-2), #dfe9e6); }
.mg3-card-media img { object-fit: contain; padding: 10px; box-sizing: border-box; }
.mg3-grid.is-list .mg3-card-media { aspect-ratio: 1 / 1; width: 104px; flex-basis: 104px; }
.mg3-grid.is-list .mg3-card-wrap .mg3-vote-btn { top: auto; bottom: 10px; right: 12px; }

@media (max-width: 720px) {
  .mg3-head-r { flex: 1 1 100%; justify-content: flex-start; }
  .mg3-theme-toggle { height: 38px; padding: 0 11px; font-size: 12px; }
  .mg3-card-wrap .mg3-vote-btn { height: 24px; padding: 0 8px; font-size: 10px; }
  .mg3-card-wrap .mg3-vote-btn .mg3-vote-ic { display: none; }
}

/* 方图/竖图独立分支：网格卡不再一律 400×187 横裁 */
.mg3-card-media.is-square { aspect-ratio: 1 / 1; }
.mg3-card-media.is-square img { object-fit: contain; padding: 10px; box-sizing: border-box; }
.mg3-card-media.is-portrait { aspect-ratio: 3 / 4; }
.mg3-card-media.is-portrait img { object-fit: contain; padding: 6px; box-sizing: border-box; }
.mg3-card-media.is-empty { background: linear-gradient(160deg, var(--mg3-card-2), #dfe9e6); }
