/* ============================================================================
   game-chrome.css — 所有游戏的「双语外壳 + 回主页」（2026-11-16 · 1119h）
   ★ 纯附加：只在页面右下角加一个浮层，游戏本体的 HTML / JS / 引擎一个字节不动。
   ★ 全部 gc- 前缀，不覆盖任何既有类名。
   ========================================================================== */

.gc-dock {
  position: fixed; right: 14px; bottom: 14px; z-index: 2147482000;
  display: flex; flex-direction: column; align-items: flex-end; gap: 7px;
  pointer-events: none; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
.gc-dock > * { pointer-events: auto; }

/* ---------- 两个常驻胶囊 ---------- */
.gc-row { display: flex; gap: 7px; align-items: center; }

.gc-home, .gc-help {
  display: inline-flex; align-items: center; gap: 7px; border: 0; cursor: pointer;
  border-radius: 999px; padding: 9px 15px; font-size: 13px; font-weight: 800;
  text-decoration: none; white-space: nowrap; line-height: 1;
  box-shadow: 0 4px 16px #0000002e; transition: transform .12s, box-shadow .12s, filter .12s;
}
.gc-home { background: #f8c45d; color: #0b3b5c; }
.gc-help { background: #0b3b5cd9; color: #fff; backdrop-filter: blur(6px); }
.gc-home:hover, .gc-help:hover { transform: translateY(-2px); box-shadow: 0 7px 22px #0000003d; }
.gc-home:active, .gc-help:active { transform: translateY(0); }
.gc-home .gc-en { font-size: 13px; }
.gc-help .gc-en { font-size: 12px; font-weight: 700; }

/* 中文小字：全站统一的 .z 观感 */
.gc-z { font-size: 10.5px; font-weight: 600; opacity: .82; margin-left: 1px; }

/* ---------- 展开卡片 ---------- */
.gc-card {
  width: min(430px, calc(100vw - 28px)); max-height: min(82vh, 640px); overflow: auto;
  overscroll-behavior: contain;
  background: #fff; border-radius: 15px; box-shadow: 0 20px 54px #00000040;
  border: 1px solid #e2e5ea; padding: 15px 16px 0; color: #1c2530;
}
.gc-card[hidden] { display: none; }
.gc-card .gc-hd { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.gc-card .gc-hd .gc-t { font-size: 16px; font-weight: 900; line-height: 1.25; color: #0b3b5c; }
.gc-card .gc-hd .gc-t .gc-z { display: block; font-size: 12px; margin-top: 2px; color: #5b6673; opacity: 1; }
.gc-card .gc-x {
  margin-left: auto; flex: 0 0 auto; border: 0; background: #eef2f7; color: #5b6673;
  width: 26px; height: 26px; border-radius: 8px; font-size: 15px; line-height: 1; cursor: pointer;
}
.gc-card .gc-x:hover { background: #e2e5ea; }

.gc-card .gc-sec { border-top: 1px dashed #e2e5ea; padding-top: 9px; margin-top: 9px; }
.gc-card .gc-sec:first-of-type { border-top: 0; padding-top: 2px; margin-top: 6px; }
.gc-card .gc-lb {
  font-size: 10.5px; font-weight: 900; letter-spacing: .9px; color: #185fa5;
  text-transform: uppercase; margin-bottom: 3px;
}
.gc-card .gc-en1 { font-size: 13px; line-height: 1.5; color: #1c2530; }
.gc-card .gc-zh1 { font-size: 11.5px; line-height: 1.6; color: #5b6673; margin-top: 1px; }

/* ---------- 常用英文按钮对照表 ---------- */
.gc-words { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.gc-words span {
  display: inline-flex; align-items: baseline; gap: 4px; background: #f2f6fa;
  border-radius: 7px; padding: 3px 8px; font-size: 11.5px; font-weight: 700; color: #22303d;
}
.gc-words span .gc-z { font-size: 10px; color: #5b6673; opacity: 1; }

/* 页脚固定在卡片底部：内容再长也一定看得见「回主页」按钮（学生最需要的那一个） */
.gc-card .gc-foot {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  margin: 12px -16px 0; padding: 10px 16px 12px;
  border-top: 1px solid #e2e5ea; background: #fff;
  box-shadow: 0 -8px 12px -8px #00000024;
}
.gc-card .gc-foot .gc-tip { font-size: 10.5px; color: #8b95a2; line-height: 1.45; }

/* ---------- 收起态：只剩一个小圆点 ---------- */
.gc-dock.gc-mini .gc-row .gc-help { display: none; }
.gc-dock.gc-mini .gc-home { padding: 9px 12px; }

/* ---------- 手机 ---------- */
@media (max-width: 520px) {
  .gc-dock { right: 9px; bottom: 9px; gap: 6px; }
  .gc-home, .gc-help { padding: 8px 12px; font-size: 12px; }
  .gc-card { width: calc(100vw - 18px); padding: 13px 13px 0; max-height: 76vh; }
  .gc-card .gc-foot { margin-left: -13px; margin-right: -13px; padding-left: 13px; padding-right: 13px; }
}

/* ---------- 打印时不要 ---------- */
@media print { .gc-dock { display: none !important; } }
