/* =========================================================================
   摸鱼司 · SDK Pods 护眼小游戏
   一份样式表，没有外部字体和图片。
   设计取向：窗边歇一会儿——柔和的鼠尾草绿与暖色天光；
   不用纯白纯黑，没有闪光和震屏；系统开了「减少动态效果」就全部静止。
   ========================================================================= */

/* ---------- 设计变量 ---------- */
:root {
  color-scheme: light;
  --bg: #edf0ea;
  --panel: #f8f9f5;
  --panel-2: #eff2eb;
  --hover: #e6ebe2;
  --ink: #2a3631;
  --ink-2: #4b5a53;
  --muted: #7f8c85;
  --line: #dbe2d7;
  --accent: #4f8a6f;
  --accent-2: #3d735b;
  --accent-soft: #e0ebe2;
  --amber: #c49a52;
  --danger: #c06e66;
  --shadow: 0 1px 2px rgba(40, 60, 50, .05), 0 10px 26px rgba(40, 60, 50, .07);
  --shadow-lift: 0 2px 4px rgba(40, 60, 50, .06), 0 16px 34px rgba(40, 60, 50, .10);
  --bar-bg: rgba(237, 240, 234, .92);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;

  /* 主视觉：午后 */
  --sky-1: #f4e6d4;
  --sky-2: #e4ece2;
  --sun: #f2c28e;
  --sun-core: #f7d9b4;
  --cloud: rgba(255, 255, 255, .6);
  --hill-3: #c9d9c9;
  --hill-2: #aac5b1;
  --hill-1: #8fb39b;
  --desk: #c8b49a;
  --cup: #f3efe7;
  --steam: rgba(255, 255, 255, .8);
  --pot: #c98b6b;
  --leaf: #5f9474;
  --hill-4: #dfe6da;
  --tree: #6f9c7e;
  --tree-2: #9dbca6;
  --house: #f3ebdc;
  --roof: #b9806a;
  --window: #e9dcc4;
  --field: rgba(255, 255, 255, .22);
  --fence: rgba(120, 96, 72, .45);
  --bird: rgba(70, 80, 75, .45);
  --star: transparent;
  --cup-band: #d9b48c;

  /* 封面小画 */
  --cv-bg: #f1f4ee;
  --cv-dot: rgba(79, 138, 111, .18);
  --cv-paper: #fbfbf8;
  --cv-ink: #2a3631;
  --cv-warm: #e1a96a;
  --cv-cool: #7d9cc4;
  --cv-rose: #d7898a;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151c19;
  --panel: #1b2420;
  --panel-2: #202a25;
  --hover: #26312c;
  --ink: #d7e1db;
  --ink-2: #b2c0b8;
  --muted: #84938b;
  --line: #2a3731;
  --accent: #7cbf9f;
  --accent-2: #66a888;
  --accent-soft: #233a30;
  --amber: #d4ad6a;
  --danger: #d08a82;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 28px rgba(0, 0, 0, .25);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 36px rgba(0, 0, 0, .32);
  --bar-bg: rgba(21, 28, 25, .92);

  /* 主视觉：月夜 */
  --sky-1: #1b2733;
  --sky-2: #1c2a26;
  --sun: #cfd9e0;
  --sun-core: #e3e9ec;
  --cloud: rgba(200, 215, 225, .08);
  --hill-3: #22332d;
  --hill-2: #1d2c27;
  --hill-1: #182520;
  --desk: #2b2622;
  --cup: #c9c4ba;
  --steam: rgba(220, 230, 235, .35);
  --pot: #8a5f4b;
  --leaf: #3f6d55;
  --hill-4: #1f2c2e;
  --tree: #1a2a23;
  --tree-2: #203229;
  --house: #3a3a35;
  --roof: #4d3a33;
  --window: #e8b86d;
  --field: rgba(255, 255, 255, .04);
  --fence: rgba(150, 140, 120, .25);
  --bird: transparent;
  --star: rgba(230, 235, 240, .7);
  --cup-band: #8e7458;

  --cv-bg: #1e2823;
  --cv-dot: rgba(124, 191, 159, .16);
  --cv-paper: #d9ddd6;
  --cv-ink: #d7e1db;
  --cv-warm: #d4a36a;
  --cv-cool: #7f9cc0;
  --cv-rose: #c98586;
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

kbd {
  font-family: inherit;
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink-2);
  white-space: nowrap;
}

.app { display: flex; flex-direction: column; min-height: 100vh; }
.spacer { flex: 1 1 auto; }
.view {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 3.5vw, 32px) 8px;
  flex: 1 0 auto;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 clamp(14px, 3.5vw, 32px);
  background: var(--bar-bg);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 650;
  letter-spacing: .04em;
  text-decoration: none;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
  font-family: var(--serif);
  color: var(--accent-2);
  background: var(--accent-soft);
  border: 1px solid var(--line);
}
[data-theme="dark"] .brand-mark { color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 6px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px;
  padding: 0 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .btn.primary { color: #12201a; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--panel); }
.btn-quiet { height: 34px; padding: 0 10px; border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--panel); border-color: var(--line); }
.btn-quiet .ico { display: inline-flex; }

.icon-btn {
  width: 34px; height: 34px;
  display: inline-grid; place-items: center;
  padding: 0;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: var(--panel); border-color: var(--line); }
.icon-btn svg, .btn .ico svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px;
  padding: 0 10px;
  margin-left: 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  text-decoration: none;
  white-space: nowrap;
}
.home-link:hover { background: var(--panel); color: var(--ink); }
.home-link img { display: block; border-radius: 4px; }

/* ---------- 大厅主视觉 ---------- */
.hub-hero {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  isolation: isolate;
}
.hub-scene { position: absolute; inset: 0; z-index: -1; }
.hub-scene .scene { width: 100%; height: 100%; display: block; }
.steam { animation: steam 6s ease-in-out infinite; }
/* 云走得很慢：一分半钟才挪一小段，几乎察觉不到，只是让画面不那么死 */
.clouds { animation: drift 90s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(60px); } }
@keyframes steam {
  0%, 100% { opacity: .25; transform: translateY(2px); }
  50% { opacity: .9; transform: translateY(-3px); }
}
.hub-copy {
  position: relative;
  max-width: 560px;
  padding: clamp(26px, 4.5vw, 48px);
}
.hub-kicker { font-size: 12px; letter-spacing: .14em; color: var(--ink-2); opacity: .85; }
.hub-hero h1 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 62px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: .02em;
}
[data-lang="en"] .hub-hero h1 { letter-spacing: -.01em; }
.hub-lede { margin-top: 14px; max-width: 30em; color: var(--ink-2); font-size: 15px; line-height: 1.75; }
.hub-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hub-actions .btn { height: 44px; padding: 0 20px; border-radius: 14px; font-size: 14.5px; }
.daily-btn { background: rgba(255, 255, 255, .6); border-color: rgba(42, 54, 49, .14); }
[data-theme="dark"] .daily-btn { background: rgba(27, 36, 32, .7); border-color: var(--line); }
.hub-meta { margin-top: 12px; font-size: 12.5px; color: var(--ink-2); opacity: .85; }
.hub-hint {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .55);
}
[data-theme="dark"] .hub-hint { background: rgba(27, 36, 32, .7); }

/* ---------- 游戏书架 ---------- */
.shelf, .badges { margin-top: 34px; }
.shelf-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.shelf-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .02em; }
[data-lang="en"] .shelf-head h2 { letter-spacing: 0; }
.shelf-head span { font-size: 12px; color: var(--muted); }
.shelf-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }

.gcard {
  display: flex; flex-direction: column;
  padding: 0;
  text-align: left;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  animation: cardIn .5s cubic-bezier(.2, .7, .3, 1) both;
  transition: box-shadow .25s ease, transform .25s ease;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }
.gcard:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.gcard-cover {
  aspect-ratio: 16 / 9;
  background: radial-gradient(120% 90% at 30% 0%, var(--ga-soft), transparent 70%), var(--cv-bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.gcard-cover svg { width: 100%; height: 100%; display: block; transition: transform .5s cubic-bezier(.2, .7, .3, 1); }
.gcard:hover .gcard-cover svg { transform: scale(1.03); }
.gcard-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1 1 auto; }
.gcard-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gcard h3 { font-size: 16px; font-weight: 650; }
.gcard-time { flex: none; font-size: 11px; color: var(--muted); }
.gcard p { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.gcard-best { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--muted); }
.gcard-best.has { color: var(--ga); font-weight: 600; }
.gcard-soon { cursor: default; background: transparent; box-shadow: none; border-style: dashed; animation: none; }
.gcard-soon:hover { transform: none; box-shadow: none; }
.gcard-soon .gcard-cover { background: repeating-linear-gradient(135deg, transparent 0 12px, var(--panel-2) 12px 24px); }

/* ---------- 成就 ---------- */
.badge-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.badge {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  opacity: .55;
}
.badge.on { opacity: 1; box-shadow: var(--shadow); }
.badge-icon {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--panel-2);
  font-size: 17px;
  filter: grayscale(1);
}
.badge.on .badge-icon { filter: none; background: var(--accent-soft); }
.badge-text { display: flex; flex-direction: column; min-width: 0; }
.badge-text b { font-size: 13px; font-weight: 600; }
.badge-text span { font-size: 11.5px; color: var(--muted); }
.hub-note { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.7; max-width: 46em; }

/* ---------- 对局页 ---------- */
.play { display: flex; flex-direction: column; gap: 12px; }
.play-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.play-head > .icon-btn { border-color: var(--line); background: var(--panel); font-size: 16px; }
.play-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.play-title .card-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  font-size: 18px;
  background: var(--ga-soft, var(--panel-2));
}
.play-title h2 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.play-score {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto;
  padding: 7px 14px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.play-score .k { font-size: 11px; color: var(--muted); }
.play-score b { font-size: 20px; line-height: 1; }
.play-score .sep { width: 1px; height: 16px; background: var(--line); }
.play-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#meta { display: flex; flex-wrap: wrap; gap: 6px; }
#meta .chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
#meta .chip-k { color: var(--muted); font-size: 11px; }

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 72vh;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: radial-gradient(90% 70% at 50% 0%, var(--ga-soft, transparent), transparent 70%), var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  touch-action: manipulation;
}
.stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage[data-game="golf"] > canvas,
.stage[data-game="snake"] > canvas { touch-action: none; }

.play-hint {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}
.play-hint span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 遮罩与面板 ---------- */
.overlay {
  position: absolute; inset: 0;
  z-index: 6;
  display: grid; place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(30, 40, 35, .26);
  animation: fade .2s ease both;
}
[data-theme="dark"] .overlay { background: rgba(5, 10, 8, .45); }
@keyframes fade { from { opacity: 0; } }
.panel {
  position: relative;
  width: min(380px, 100%);
  padding: 22px 22px 20px;
  text-align: center;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 50px rgba(20, 30, 25, .2);
  animation: rise .25s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.panel-head {
  width: 54px; height: 54px;
  margin: 0 auto;
  display: grid; place-items: center;
  border-radius: 16px;
  font-size: 26px;
  background: var(--ga-soft, var(--accent-soft));
}
.panel h3 { margin: 12px 0 6px; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.panel p { color: var(--ink-2); font-size: 13.5px; line-height: 1.75; }
.panel .keys {
  display: grid; gap: 6px;
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 14px;
  background: var(--panel-2);
  font-size: 12.5px;
  color: var(--ink-2);
}
.panel .keys span { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.panel .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.panel .big-label { margin-top: 12px; font-size: 11.5px; letter-spacing: .1em; color: var(--muted); }
.panel .big {
  margin: 2px 0;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--ga, var(--accent));
  font-variant-numeric: tabular-nums;
}
.panel .sub { font-size: 12.5px; color: var(--muted); }
.panel .over-note { margin-top: 12px; padding: 9px 12px; border-radius: 12px; background: var(--panel-2); font-size: 12.5px; }
.record-ribbon {
  position: absolute;
  top: 14px; right: 14px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
}
[data-theme="dark"] .record-ribbon { color: var(--accent); }

/* 破纪录纸屑：一次性的，颜色柔和 */
.confetti {
  position: absolute;
  top: -12px;
  z-index: 8;
  border-radius: 2px;
  opacity: .8;
  pointer-events: none;
  animation: confettiFall 1.6s cubic-bezier(.2, .6, .4, 1) forwards;
}
@keyframes confettiFall { to { transform: translate(var(--dx, 0), 360px) rotate(var(--rot, 360deg)); opacity: 0; } }

/* ---------- 触屏方向键 ---------- */
.dpad {
  position: absolute;
  right: 12px; bottom: 12px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 42px);
  grid-template-rows: repeat(3, 42px);
  gap: 5px;
}
.dpad button {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
  opacity: .9;
}
.dpad button:active { background: var(--accent-soft); }
@media (hover: hover) and (pointer: fine) { .dpad { display: none; } }

/* ---------- 工位配对 ---------- */
.mem-board { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; }
.mem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: clamp(6px, 1vw, 11px);
}
.mem-card {
  position: relative;
  padding: 0; border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 760px;
  -webkit-tap-highlight-color: transparent;
}
.mem-card .inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.2, .7, .3, 1);
}
.mem-card.flipped .inner,
.mem-card.matched .inner { transform: rotateY(180deg); }
.mem-card .face {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 13px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-size: clamp(18px, 3.2vw, 30px);
}
.mem-card .back {
  color: transparent;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .22) 0 16%, transparent 17%),
    var(--ga, var(--accent));
  opacity: .72;
}
.mem-card .front { background: var(--panel-2); border: 1px solid var(--line); transform: rotateY(180deg); }
.mem-card.matched .front { background: var(--ga-soft, var(--accent-soft)); border-color: transparent; }

/* ---------- 关灯下班 ---------- */
.lo-board { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; }
.lo-grid { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); gap: clamp(6px, 1.2vw, 12px); }
.lo-cell {
  position: relative;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  transition: background .35s ease, border-color .35s ease;
  -webkit-tap-highlight-color: transparent;
}
/* 台灯：灯罩 + 灯柱 + 底座 */
.lo-cell::before {
  content: "";
  position: absolute;
  left: 50%; top: 24%;
  width: 40%; height: 24%;
  transform: translateX(-50%);
  border-radius: 50% 50% 6px 6px / 70% 70% 6px 6px;
  background: var(--line);
  transition: background .35s ease;
}
.lo-cell::after {
  content: "";
  position: absolute;
  left: 50%; top: 48%;
  width: 26%; height: 28%;
  transform: translateX(-50%);
  background:
    linear-gradient(var(--line), var(--line)) 50% 0 / 12% 78% no-repeat,
    linear-gradient(var(--line), var(--line)) 50% 100% / 100% 22% no-repeat;
  border-radius: 3px;
}
.lo-cell.on {
  background: radial-gradient(75% 75% at 50% 40%, rgba(241, 196, 132, .5), rgba(241, 196, 132, .1) 72%), var(--panel);
  border-color: rgba(214, 168, 100, .45);
}
.lo-cell.on::before { background: #e2ae6c; }
[data-theme="dark"] .lo-cell.on {
  background: radial-gradient(75% 75% at 50% 40%, rgba(212, 163, 106, .32), rgba(212, 163, 106, .05) 72%), var(--panel-2);
}
.lo-cell:hover { border-color: var(--ga, var(--accent)); }

/* ---------- 茶水间收杯子 ---------- */
.cup-board {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(8px, 2vw, 22px);
  padding: 22px 14px 18px;
}
.cup-col {
  position: relative;
  display: flex; flex-direction: column-reverse; align-items: center;
  gap: 6px;
  width: clamp(46px, 9vw, 84px);
  height: min(86%, 340px);
  padding: 10px 6px;
  border-radius: 16px 16px 10px 10px;
  border: 1px solid var(--line);
  border-bottom-width: 5px;
  background: var(--panel-2);
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.cup-col:hover { border-color: var(--ga, var(--accent)); }
.cup-col.sel { border-color: var(--ga, var(--accent)); transform: translateY(-4px); }
.cup-col.done { background: var(--ga-soft, var(--accent-soft)); }
.cup {
  position: relative;
  flex: none;
  height: calc((100% - 18px) / 4);
  width: 72%;
  margin-right: 10%;
  border-radius: 5px 5px 12px 12px;
  background: var(--c);
  transition: transform .25s cubic-bezier(.2, .7, .3, 1);
}
.cup::after {
  content: "";
  position: absolute;
  left: 100%; top: 20%;
  width: 24%; height: 46%;
  border: 3px solid var(--c);
  border-left: 0;
  border-radius: 0 10px 10px 0;
}
.cup-col.sel .cup:last-child { transform: translateY(-14px); }

/* ---------- 整理文件柜 ---------- */
.sl-board { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; }
.sl-grid { position: relative; border-radius: 18px; background: var(--panel-2); border: 1px solid var(--line); }
.sl-tile {
  position: absolute;
  display: grid; place-items: center;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line), 0 2px 6px rgba(40, 60, 50, .08);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  cursor: pointer;
  transition: left .18s ease, top .18s ease, background .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.sl-tile::before {
  content: "";
  position: absolute;
  left: 14%; top: 12%;
  width: 34%; height: 9%;
  border-radius: 4px;
  background: var(--tc);
  opacity: .85;
}
.sl-tile.home { background: color-mix(in srgb, var(--panel) 82%, var(--tc) 18%); }

/* ---------- 假装工作：三种伪装（刻意用普通办公软件的中性配色，不跟游戏主题走） ---------- */
.fakescreen {
  position: fixed; inset: 0; z-index: 80;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  color: #1f2328;
  background: #f6f7f9;
}
body.faking { overflow: hidden; }
.fk-app { position: absolute; inset: 0; display: flex; flex-direction: column; }
.fk-sp { flex: 1 1 auto; }
.fk-hint { position: fixed; right: 14px; bottom: 34px; z-index: 2; font-size: 11px; color: #9aa0a6; opacity: .6; }
.fk-hint span { cursor: pointer; padding: 6px 2px; }
.fk-hint span:hover { color: #5f6368; }

/* 通用：标题栏、菜单、工具栏 */
.fk-title { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; background: #fff; }
.fk-title b { font-size: 15px; font-weight: 500; color: #202124; }
.fk-logo { width: 22px; height: 26px; border-radius: 3px; flex: none; }
.fk-logo.sheet { background: linear-gradient(#2f7d55, #2f7d55) padding-box; box-shadow: inset 0 0 0 6px #2f7d55, inset 0 0 0 7px #fff; }
.fk-logo.doc { background: #4a78c2; box-shadow: inset 0 0 0 6px #4a78c2, inset 0 0 0 7px rgba(255,255,255,.8); }
.fk-star { color: #9aa0a6; }
.fk-saved { color: #80868b; font-size: 12px; }
.fk-avatars { display: flex; }
.fk-avatars i { width: 28px; height: 28px; margin-left: -6px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff; color: #fff; font-size: 12px; font-style: normal; }
.fk-share { padding: 7px 16px; border-radius: 18px; background: #d3e3fd; color: #0b3c86; font-weight: 600; font-size: 13px; }
.fk-menu { display: flex; gap: 2px; height: 26px; padding: 0 52px; background: #fff; font-size: 13px; color: #3c4043; }
.fk-menu span { padding: 3px 7px; border-radius: 4px; }
.fk-tools { display: flex; align-items: center; gap: 12px; height: 38px; margin: 4px 10px; padding: 0 14px; border-radius: 20px; background: #edf2fa; color: #444746; font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.fk-tools i { width: 1px; height: 18px; background: #c7c7c7; }
.fk-tools b, .fk-tools em, .fk-tools u { font-size: 14px; }

/* 表格 */
.fk-fx { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; border-top: 1px solid #e1e3e1; border-bottom: 1px solid #e1e3e1; background: #fff; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.fk-ref { width: 70px; padding-right: 10px; border-right: 1px solid #e1e3e1; color: #444; }
.fk-fxi { color: #9aa0a6; font-style: italic; }
.fk-gridwrap { position: relative; flex: 1 1 auto; overflow: hidden; background: #fff; }
.fk-grid { position: relative; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.fk-grid th, .fk-grid td { height: 23px; padding: 0 8px; border: 1px solid #e2e3e3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; font-weight: 400; }
.fk-grid tr:first-child th { background: #f8f9fa; color: #5f6368; font-size: 11.5px; text-align: center; }
.fk-grid tr:first-child th:first-child, .fk-grid tr th:first-child { width: 42px; background: #f8f9fa; color: #5f6368; font-size: 11.5px; text-align: center; }
.fk-grid td { width: 104px; }
.fk-grid td:nth-child(2) { width: 82px; } .fk-grid td:nth-child(3) { width: 82px; } .fk-grid td:nth-child(10) { width: 120px; }
.fk-grid .l { text-align: left; } .fk-grid .c { text-align: center; }
.fk-grid .hdr td { background: #f1f5f2; font-weight: 600; color: #2b3a33; }
.fk-grid .tot td { font-weight: 600; border-top: 2px solid #9db8a8; }
.fk-grid .good { color: #1e7a4f; } .fk-grid .warn { color: #b06a10; }
.fk-grid .up { color: #1e7a4f; } .fk-grid .down { color: #c5463b; }
.fk-grid .muted { color: #80868b; font-size: 12px; }
.fk-spark { width: 62px; height: 16px; vertical-align: middle; }
.fk-spark polyline { fill: none; stroke: #4f8a6f; stroke-width: 1.6; stroke-linejoin: round; }
.fk-sel { position: absolute; border: 2px solid #1a73e8; pointer-events: none; transition: all .25s ease; box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset; }
.fk-sel::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 6px; height: 6px; background: #1a73e8; border: 1px solid #fff; }
.fk-peer { position: absolute; border: 2px solid #d9822b; pointer-events: none; transition: all 1.2s ease; }
.fk-peer span { position: absolute; left: -2px; top: -18px; padding: 1px 5px; background: #d9822b; color: #fff; font-size: 10.5px; border-radius: 3px 3px 3px 0; white-space: nowrap; }
.fk-chart { position: absolute; right: 22px; top: 300px; width: 240px; padding: 10px 12px; background: #fff; border: 1px solid #dadce0; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.fk-chart-t { font-size: 12px; color: #3c4043; margin-bottom: 4px; }
.fk-tabs { display: flex; align-items: stretch; gap: 2px; height: 34px; padding: 0 10px; background: #f8f9fa; border-top: 1px solid #e1e3e1; font-size: 12.5px; color: #444; }
.fk-tabs span { display: flex; align-items: center; padding: 0 14px; }
.fk-tabs .on { background: #e1efe7; color: #1e6b45; font-weight: 600; border-bottom: 3px solid #2f7d55; }
.fk-status { display: flex; align-items: center; height: 24px; padding: 0 14px; background: #f8f9fa; border-top: 1px solid #e1e3e1; font-size: 11.5px; color: #5f6368; white-space: pre; }

/* 代码 */
.fk-code { background: #1f2329; color: #c9d1d9; font-size: 13px; }
.fk-cbar { display: flex; align-items: center; height: 32px; padding: 0 12px; background: #181b20; color: #8b949e; font-size: 12px; }
.fk-dots { display: flex; gap: 7px; } .fk-dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a3f47; }
.fk-cbody { flex: 1 1 auto; display: flex; min-height: 0; }
.fk-rail { width: 46px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 14px; background: #181b20; }
.fk-rail i { width: 20px; height: 20px; border-radius: 4px; background: #3a3f47; } .fk-rail i.on { background: #6f9c88; }
.fk-tree { width: 210px; flex: none; padding: 8px 0; background: #1b1f24; border-right: 1px solid #2a2f37; font-size: 12.5px; color: #aab3bd; }
.fk-tree-h { padding: 4px 12px 8px; font-size: 11px; letter-spacing: .08em; color: #7d8590; }
.fk-file { height: 24px; line-height: 24px; white-space: nowrap; }
.fk-file.on { background: #2b3440; color: #e6edf3; }
.fk-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.fk-ctabs { display: flex; height: 34px; background: #181b20; font-size: 12.5px; }
.fk-ctabs span { display: flex; align-items: center; padding: 0 16px; color: #8b949e; border-right: 1px solid #262b33; }
.fk-ctabs .on { background: #1f2329; color: #e6edf3; border-top: 2px solid #6f9c88; }
.fk-crumbs { height: 24px; line-height: 24px; padding: 0 16px; color: #7d8590; font-size: 12px; }
.fk-editor { flex: 1 1 auto; overflow: hidden; padding: 4px 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; line-height: 21px; }
.fk-ln { display: flex; white-space: pre; }
.fk-ln.cur { background: #262b33; }
.fk-no { width: 52px; flex: none; padding-right: 18px; text-align: right; color: #4f5763; }
.fk-ln.cur .fk-no { color: #c9d1d9; }
.fk-src k { color: #e39b7b; } .fk-src f { color: #d8c18a; } .fk-src t { color: #8fb6d9; } .fk-src s { color: #a5c98b; text-decoration: none; } .fk-src n { color: #c49fe0; }
.fk-src.cm { color: #6b7480; font-style: italic; }
.fk-caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: text-bottom; background: currentColor; animation: fkBlink 1.1s steps(1) infinite; }
@keyframes fkBlink { 50% { opacity: 0; } }
.fk-term { height: 34%; min-height: 150px; display: flex; flex-direction: column; border-top: 1px solid #2a2f37; background: #1a1d22; }
.fk-term-h { display: flex; gap: 18px; height: 30px; align-items: center; padding: 0 16px; font-size: 11px; letter-spacing: .06em; color: #7d8590; }
.fk-term-h .on { color: #e6edf3; border-bottom: 1px solid #6f9c88; }
.fk-term-b { flex: 1 1 auto; overflow: hidden; padding: 4px 16px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 19px; white-space: pre; color: #b8c0c9; }
.fk-term-b .p { color: #8fb6d9; } .fk-term-b .ok { color: #8fcf9f; }
.fk-cstatus { display: flex; gap: 16px; align-items: center; height: 24px; padding: 0 12px; background: #3d5f50; color: #e8f0eb; font-size: 11.5px; }

/* 会议纪要 */
.fk-desk { position: relative; flex: 1 1 auto; overflow: hidden; background: #f0f2f5; padding: 26px 0; }
.fk-page { width: min(760px, 92%); min-height: 120%; margin: 0 auto; padding: 56px 72px; background: #fff; box-shadow: 0 1px 3px rgba(60,64,67,.15), 0 1px 1px rgba(60,64,67,.08); font-family: Georgia, "Songti SC", "Noto Serif SC", serif; font-size: 15px; line-height: 1.75; color: #202124; }
.fk-page h1 { margin: 0 0 6px; font-size: 26px; font-weight: 600; }
.fk-page h2 { margin: 22px 0 6px; font-size: 17px; font-weight: 600; }
.fk-page ul { margin: 0; padding-left: 22px; }
.fk-page mark { background: #fef3c0; }
.fk-meta { margin: 0; color: #5f6368; font-size: 13px; font-family: -apple-system, "PingFang SC", sans-serif; }
.fk-todo { list-style: none; padding-left: 0 !important; }
.fk-todo li { display: flex; align-items: baseline; gap: 8px; }
.fk-todo .box { width: 13px; height: 13px; border: 1.5px solid #5f6368; border-radius: 3px; flex: none; position: relative; top: 2px; }
.fk-todo .done { color: #80868b; text-decoration: line-through; }
.fk-todo .done .box { background: #4a78c2; border-color: #4a78c2; }
.fk-todo b { color: #1a5bb5; font-weight: 500; }
.fk-typing { margin-top: 18px; min-height: 1.75em; }
.fk-comment { position: absolute; top: 210px; right: max(16px, calc(50% - 600px)); width: 220px; padding: 10px 12px; background: #fff; border-left: 3px solid #f2b13d; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.15); font-size: 12.5px; line-height: 1.6; color: #3c4043; }
.fk-comment b { display: block; font-size: 12px; margin-bottom: 2px; }

@media (max-width: 900px) {
  .fk-chart, .fk-comment, .fk-tree, .fk-rail { display: none; }
  .fk-menu { padding: 0 12px; overflow: hidden; }
  .fk-page { padding: 32px 26px; }
  .fk-saved, .fk-star { display: none; }
}

/* ---------- 提示条 / 页脚 / 帧率 ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  z-index: 120;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12.5px;
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { padding: 28px clamp(14px, 4vw, 40px) 32px; text-align: center; color: var(--muted); font-size: 11.5px; }
.fps-meter {
  position: fixed; top: 64px; right: 10px; z-index: 200;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font: 11px ui-monospace, monospace;
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .btn-quiet .btn-label, .btn-quiet kbd { display: none; }
  .home-link span { display: none; }
  .home-link { padding: 0 8px; }
  .hub-hero { min-height: 440px; }
}
@media (max-width: 620px) {
  .topbar { gap: 8px; }
  .top-actions { gap: 2px; }
  .stage { aspect-ratio: 1 / 1; max-height: none; }
  .play-score { margin-left: 0; }
  .overlay { padding: 10px; }
  .panel { padding: 16px 16px 14px; }
  .panel-start .keys { display: none; }
  .hub-actions .btn { flex: 1 1 auto; }
  .cup-col { padding: 8px 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .confetti { display: none; }
}

/* 手机上这两款需要更高的舞台：数独底下要放数字键，扫雷换成竖版 8×10 */
@media (max-width: 620px) {
  .stage[data-game="sudoku"] { aspect-ratio: 4 / 5; }
  .stage[data-game="sweep"] { aspect-ratio: 4 / 5; }
  .su-wrap { padding: 10px 8px; gap: 10px; }
  .stage .su-pad { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .stage .su-key { height: 40px; font-size: 18px; }
}

/* =========================================================================
   田园细节
   ========================================================================= */

/* 极淡的纸纹：一张 160px 的噪点小图平铺，只画一次 */
body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .35 0 0 0 0 .3 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 标题前的一片小叶子 */
.shelf-head h2 { display: inline-flex; align-items: center; gap: 10px; }
.shelf-head h2::before {
  content: "";
  width: 18px; height: 18px;
  background: var(--accent);
  opacity: .8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4C10 4 4 9 4 17c0 1 .1 2 .3 3C6 13 10 9 16 7c-5 3-8 7-9.6 13H8c7 0 12-6 12-16z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4C10 4 4 9 4 17c0 1 .1 2 .3 3C6 13 10 9 16 7c-5 3-8 7-9.6 13H8c7 0 12-6 12-16z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 主视觉：文字下面垫一层很淡的光，压在山上也读得清 */
.hub-copy::before {
  content: "";
  position: absolute;
  inset: -10% 10% 0 -20%;
  z-index: -1;
  background: radial-gradient(60% 60% at 30% 40%, var(--sky-1), transparent 70%);
  opacity: .75;
  pointer-events: none;
}
.hub-kicker { display: inline-flex; align-items: center; gap: 8px; }
.hub-kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }

/* 卡片：衬线标题、封面底部一条柔光、最高分前一个小点 */
.gcard h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: .02em; }
[data-lang="en"] .gcard h3 { letter-spacing: 0; }
.gcard-cover { position: relative; }
.gcard-cover::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background: linear-gradient(transparent, rgba(255, 255, 255, .25));
  pointer-events: none;
}
[data-theme="dark"] .gcard-cover::after { background: linear-gradient(transparent, rgba(0, 0, 0, .12)); }
.gcard-best::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
  vertical-align: 1px;
}
.gcard-time {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--panel-2);
}

/* 成就徽章：解锁的左侧一条主题色 */
.badge.on { border-left: 3px solid var(--accent); }

/* 对局页：舞台内侧一圈细线，像装裱的画 */
.stage::after {
  content: "";
  position: absolute; inset: 6px;
  border-radius: 17px;
  border: 1px solid var(--line);
  opacity: .6;
  pointer-events: none;
  z-index: 5;
}

/* 页脚：一道远山 */
.foot {
  position: relative;
  margin-top: 30px;
  padding-top: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 40 C150 18 280 26 420 36 S700 14 860 28 S1100 40 1200 30 V60 H0Z' fill='%234f8a6f' fill-opacity='.10'/%3E%3Cpath d='M0 50 C200 34 360 42 520 48 S860 34 1020 44 S1160 50 1200 46 V60 H0Z' fill='%234f8a6f' fill-opacity='.12'/%3E%3C/svg%3E") top / 100% 60px no-repeat;
}

/* ---------- 午后数独 ---------- */
.su-wrap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  padding: 14px;
}
.su-wrap.wide { flex-direction: row; gap: 28px; }
.su-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  border-radius: 14px;
  border: 2px solid color-mix(in srgb, var(--ink) 35%, transparent);
  background: var(--panel);
  overflow: hidden;
  font-family: var(--serif);
}
.su-cell {
  position: relative;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: #4f7a5c;
  font-size: 1em;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.su-cell:nth-child(9n) { border-right: 0; }
.su-cell:nth-child(n+73) { border-bottom: 0; }
.su-cell.br { border-right: 2px solid color-mix(in srgb, var(--ink) 30%, transparent); }
.su-cell.bb { border-bottom: 2px solid color-mix(in srgb, var(--ink) 30%, transparent); }
.su-cell.given { color: var(--ink); font-weight: 650; }
.su-cell.peer { background: color-mix(in srgb, var(--accent) 11%, transparent); }
.su-cell.same { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.su-cell.sel { background: color-mix(in srgb, var(--accent) 34%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent); }
[data-theme="dark"] .su-cell { color: #9fd0b4; }
[data-theme="dark"] .su-cell.given { color: var(--ink); }
.su-cell.wrong { color: var(--danger); text-decoration: underline wavy color-mix(in srgb, var(--danger) 50%, transparent); text-underline-offset: 4px; }
.su-notes {
  position: absolute; inset: 2px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  font-family: -apple-system, system-ui, sans-serif;
  font-size: .32em;
  color: var(--muted);
}
.su-notes i { font-style: normal; display: grid; place-items: center; }
.su-pad { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; width: min(100%, 520px); }
.su-wrap.wide .su-pad { grid-template-columns: repeat(3, 52px); width: auto; }
.su-key {
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  cursor: pointer;
  transition: background .15s ease, opacity .2s ease;
}
.su-wrap.wide .su-key { height: 52px; }
.su-key:hover { background: var(--hover); }
.su-key.used { opacity: .3; }
.su-tool { font-family: inherit; font-size: 17px; color: var(--ink-2); }
.su-tool.on { background: var(--accent-soft); border-color: var(--ga, var(--accent)); color: var(--ga, var(--accent)); }
@media (max-width: 620px) { .su-key { height: 36px; font-size: 16px; border-radius: 9px; } .su-pad { gap: 4px; } }

/* ---------- 菜园扫雷 ---------- */
.ms-board { position: absolute; inset: 0; display: grid; place-items: center; padding: 50px 14px 14px; }
.ms-grid {
  display: grid;
  gap: 3px;
  padding: 6px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--ga, var(--accent)) 18%, var(--panel-2));
}
.ms-cell {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 7px;
  /* 没翻开的：一块草皮，顶上一道亮边 */
  background: linear-gradient(180deg, #a9c59a, #8fb183);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .28), inset 0 -2px 0 rgba(0, 0, 0, .06);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1em;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.ms-cell:hover:not(.open) { transform: translateY(-1px); }
[data-theme="dark"] .ms-cell { background: linear-gradient(180deg, #3f5a45, #34503c); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .06); }
.ms-cell.open {
  background: #eadfcb;
  box-shadow: inset 0 1px 2px rgba(90, 70, 40, .12);
  cursor: default;
}
[data-theme="dark"] .ms-cell.open { background: #3a342b; }
.ms-cell.flagged::after {
  /* 小旗：一根杆 + 一面三角旗 */
  content: "";
  position: absolute;
  left: 38%; top: 22%;
  width: 34%; height: 56%;
  background: linear-gradient(#7b5b45, #7b5b45) 0 0 / 2px 100% no-repeat;
}
.ms-cell.flagged::before {
  content: "";
  position: absolute;
  left: calc(38% + 2px); top: 22%;
  border-left: 0.5em solid #d7807a;
  border-top: 0.26em solid transparent;
  border-bottom: 0.26em solid transparent;
}
.ms-cell.wrongflag { opacity: .5; }
.ms-cell.bee { font-size: .8em; background: #f1dfb8; }
.ms-cell.bee.hit { background: #e9b9a7; }
[data-theme="dark"] .ms-cell.bee { background: #4a4030; }
.ms-cell.n1 { color: #5b84b8; }
.ms-cell.n2 { color: #5f9474; }
.ms-cell.n3 { color: #c0715f; }
.ms-cell.n4 { color: #8c6fb0; }
.ms-cell.n5 { color: #a8784a; }
.ms-cell.n6, .ms-cell.n7, .ms-cell.n8 { color: #6f7b74; }
[data-theme="dark"] .ms-cell.n1 { color: #8fb0d8; }
[data-theme="dark"] .ms-cell.n2 { color: #8cc3a3; }
[data-theme="dark"] .ms-cell.n3 { color: #e0a090; }
[data-theme="dark"] .ms-cell.n4 { color: #b8a0d6; }
.ms-flagmode {
  position: absolute; left: 14px; top: 12px; z-index: 3;
  height: 32px; padding: 0 12px;
  font-size: 12.5px;
}
.ms-flagmode.on { background: var(--accent-soft); border-color: var(--ga, var(--accent)); color: var(--ink); }

/* ---------- 插画尺寸 ---------- */
.card-icon svg { width: 26px; height: 26px; display: block; }
.panel-head svg { width: 36px; height: 36px; display: block; }
.badge-icon svg { width: 24px; height: 24px; display: block; }
.mem-card .front svg { width: 62%; height: 62%; display: block; }
.ms-cell svg { width: 78%; height: 78%; display: block; margin: auto; }
.ms-cell.bee { display: grid; place-items: center; }

/* =========================================================================
   窗外的天气与季节（大厅主视觉）
   ========================================================================= */
.hub-hero {
  --cloud-2: rgba(255, 255, 255, .72);
  --veil: rgba(150, 160, 165, .0);
  --cap: rgba(255, 255, 255, .9);
  --fog: rgba(255, 255, 255, .55);
  --rain: rgba(110, 135, 160, .45);
  --snow: rgba(255, 255, 255, .95);
}
[data-theme="dark"] .hub-hero {
  --cloud-2: rgba(160, 175, 185, .12);
  --cap: rgba(220, 228, 235, .5);
  --fog: rgba(190, 205, 215, .1);
  --rain: rgba(170, 195, 215, .32);
  --snow: rgba(230, 236, 240, .75);
}

/* 图层默认都关着，由 data-weather / data-season 打开 */
.wx-clouds, .wx-veil, .wx-fog, .wx-rain, .wx-snow, .wx-caps { display: none; }
.hub-hero[data-weather="cloudy"] .wx-clouds { display: inline; opacity: .7; }
.hub-hero[data-weather="overcast"] .wx-clouds,
.hub-hero[data-weather="rain"] .wx-clouds,
.hub-hero[data-weather="storm"] .wx-clouds,
.hub-hero[data-weather="snow"] .wx-clouds { display: inline; }
.hub-hero[data-weather="overcast"] .wx-veil,
.hub-hero[data-weather="fog"] .wx-veil,
.hub-hero[data-weather="rain"] .wx-veil,
.hub-hero[data-weather="storm"] .wx-veil,
.hub-hero[data-weather="snow"] .wx-veil { display: inline; }
.hub-hero[data-weather="overcast"] { --veil: rgba(170, 178, 180, .28); }
.hub-hero[data-weather="fog"] { --veil: rgba(225, 228, 226, .45); }
.hub-hero[data-weather="rain"] { --veil: rgba(150, 162, 170, .32); --cloud-2: rgba(225, 230, 232, .85); }
.hub-hero[data-weather="storm"] { --veil: rgba(110, 120, 130, .42); --cloud-2: rgba(170, 178, 185, .9); }
.hub-hero[data-weather="snow"] { --veil: rgba(230, 235, 238, .3); }
[data-theme="dark"] .hub-hero[data-weather] { --veil: rgba(10, 14, 18, .25); }
.hub-hero[data-weather="fog"] .wx-fog { display: inline; }
.hub-hero[data-weather="rain"] .wx-rain,
.hub-hero[data-weather="storm"] .wx-rain { display: inline; }
.hub-hero[data-weather="snow"] .wx-snow,
.hub-hero[data-weather="snow"] .wx-caps,
.hub-hero[data-season="winter"] .wx-caps { display: inline; }
.hub-hero[data-weather="overcast"] .sun-hit,
.hub-hero[data-weather="fog"] .sun-hit { opacity: .45; }
.hub-hero[data-weather="rain"] .sun-hit,
.hub-hero[data-weather="storm"] .sun-hit,
.hub-hero[data-weather="snow"] .sun-hit { opacity: .2; }
.hub-hero[data-weather="rain"] .steam,
.hub-hero[data-weather="snow"] .steam { stroke-width: 3.6; }

/* 雨丝很慢、很淡；雪花慢慢飘。没有闪电，没有闪光 */
.wx-rain line { animation: rainfall 1.6s linear infinite; }
@keyframes rainfall {
  0% { transform: translate(0, -20px); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(-14px, 90px); opacity: 0; }
}
.hub-hero[data-weather="storm"] .wx-rain line { animation-duration: 1.2s; }
.wx-snow circle { animation: snowfall 10s linear infinite; }
@keyframes snowfall {
  0% { transform: translate(0, -20px); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translate(18px, 150px); }
  100% { transform: translate(-6px, 330px); opacity: 0; }
}
.wx-fog { animation: fogdrift 40s ease-in-out infinite alternate; }
@keyframes fogdrift { to { transform: translateX(-50px); } }

/* 季节：只换树和近处的山色 */
.hub-hero[data-season="spring"] { --tree: #86b98c; --tree-2: #e8b9c2; }
.hub-hero[data-season="autumn"] { --tree: #c99258; --tree-2: #dcb57e; --hill-1: #9fb38c; }
.hub-hero[data-season="winter"] { --tree: #8e9f97; --tree-2: #b9c6c0; --hill-1: #a3b5a8; --hill-2: #bccbc0; }
[data-theme="dark"] .hub-hero[data-season="spring"] { --tree: #24382c; --tree-2: #4a3640; }
[data-theme="dark"] .hub-hero[data-season="autumn"] { --tree: #4a3a26; --tree-2: #3d3324; --hill-1: #1b2620; }
[data-theme="dark"] .hub-hero[data-season="winter"] { --tree: #26302c; --tree-2: #2c3632; }

/* 可以点的太阳和茶杯 */
.sun-hit, .cup-hit { cursor: pointer; pointer-events: auto; }
.sun-hit { transition: opacity .6s ease; }
.cup-hit.refill .steam { animation: refill 1.8s ease-out; }
@keyframes refill {
  0% { opacity: 0; transform: translateY(6px); }
  30% { opacity: 1; transform: translateY(-2px); }
  100% { opacity: .5; transform: translateY(-8px); }
}

/* 文案区的新元素 */
.hub-kicker { flex-wrap: wrap; }
.wx-chip {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  color: var(--ink-2);
  letter-spacing: .04em;
}
[data-theme="dark"] .wx-chip { background: rgba(27, 36, 32, .7); }
.wx-locate {
  width: 24px; height: 24px;
  display: inline-grid; place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.wx-locate:hover { background: rgba(255, 255, 255, .55); }
.wx-locate svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hub-poem {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  margin-top: 18px;
  font-family: var(--serif);
  color: var(--ink-2);
}
.poem-line { font-size: 15px; letter-spacing: .12em; }
[data-lang="en"] .poem-line { letter-spacing: .08em; }
.poem-src { font-size: 12px; opacity: .75; letter-spacing: .02em; }
.hub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.amb-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(42, 54, 49, .14);
  background: rgba(255, 255, 255, .45);
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
}
.amb-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
[data-theme="dark"] .amb-btn { background: rgba(27, 36, 32, .6); border-color: var(--line); }

.foot { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* 真实的夜晚：浅色主题下主视觉也换成月夜，文字随之变浅 */
.hub-hero[data-night="1"] {
  --sky-1: #1d2a36; --sky-2: #223129;
  --sun: #cfd9e0; --sun-core: #e3e9ec;
  --cloud: rgba(200, 215, 225, .1); --cloud-2: rgba(170, 185, 195, .16);
  --hill-4: #24332f; --hill-3: #22332d; --hill-2: #1e2d27; --hill-1: #1a2822;
  --tree: #1b2b24; --tree-2: #22342b;
  --house: #3a3a35; --roof: #4d3a33; --window: #f0c27a;
  --field: rgba(255, 255, 255, .04); --fence: rgba(160, 150, 130, .3);
  --bird: transparent; --star: rgba(235, 240, 245, .8);
  --desk: #2e2924; --cup: #d8d2c6; --cup-band: #8e7458; --pot: #8a5f4b; --leaf: #46775c;
  --steam: rgba(220, 230, 235, .4);
  --fog: rgba(190, 205, 215, .12); --cap: rgba(220, 228, 235, .5);
  --rain: rgba(170, 195, 215, .35); --snow: rgba(235, 240, 244, .8);
  --veil: rgba(10, 14, 18, .2);
  --ink: #e4ebe6; --ink-2: #c3cec7;
  color: var(--ink);
}
.hub-hero[data-night="1"][data-season="autumn"] { --tree: #4a3a26; --tree-2: #3d3324; }
.hub-hero[data-night="1"][data-season="spring"] { --tree-2: #4a3640; }
.hub-hero[data-night="1"] .hub-copy::before { opacity: .5; }
.hub-hero[data-night="1"] .daily-btn,
.hub-hero[data-night="1"] .wx-chip,
.hub-hero[data-night="1"] .amb-btn,
.hub-hero[data-night="1"] .hub-hint { background: rgba(20, 28, 25, .55); border-color: rgba(255, 255, 255, .12); color: var(--ink); }
.hub-hero[data-night="1"] .btn.primary { color: #fff; }

/* 手机上主视觉变高：文字下面留出桌沿，茶杯和盆栽不压字 */
@media (max-width: 720px) {
  .hub-copy { padding-bottom: 150px; }
}

/* ---------- 对局中的玩法 ---------- */
.rules-btn { gap: 6px; }
.rules-btn > span:first-child {
  width: 18px; height: 18px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
}
[data-theme="dark"] .rules-btn > span:first-child { color: var(--accent); }
.play-howto {
  max-width: 60em;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.75;
}
@media (max-width: 620px) {
  .rules-label { display: none; }
  .rules-btn { width: 38px; padding: 0; }
}

/* =========================================================================
   小惊喜
   ========================================================================= */

/* 节气 */
.term-chip {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #b9806a 45%, transparent);
  color: #9a5f48;
  font-family: var(--serif);
  letter-spacing: .08em;
  cursor: help;
}
[data-theme="dark"] .term-chip,
.hub-hero[data-night="1"] .term-chip { color: #e3b29a; border-color: rgba(227, 178, 154, .4); }

/* 诗：点一下换一句 */
.hub-poem { cursor: pointer; width: fit-content; border-radius: 8px; }
.hub-poem:hover .poem-line { text-decoration: underline dotted; text-underline-offset: 5px; text-decoration-color: currentColor; }
.hub-poem.turn { animation: poemTurn .6s ease; }
@keyframes poemTurn { from { opacity: 0; transform: translateY(4px); } }

/* 季节飘落物：落叶、花瓣、萤火虫 */
.drift { display: none; }
.hub-hero[data-season="autumn"] .drift-leaves,
.hub-hero[data-season="spring"] .drift-petals { display: inline; }
.hub-hero[data-season="summer"][data-night="1"] .drift-flies { display: inline; }
.hub-hero[data-weather="rain"] .drift,
.hub-hero[data-weather="storm"] .drift,
.hub-hero[data-weather="snow"] .drift { display: none; }
.drift-leaves > g, .drift-petals > g { animation: leafFall 18s linear infinite; }
@keyframes leafFall {
  0% { transform: translate(0, -40px) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  30% { transform: translate(-30px, 40px) rotate(60deg); }
  55% { transform: translate(10px, 110px) rotate(140deg); }
  80% { transform: translate(-25px, 180px) rotate(220deg); opacity: .9; }
  100% { transform: translate(-5px, 240px) rotate(300deg); opacity: 0; }
}
.drift-flies circle { animation: glow 5s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { opacity: .15; transform: translate(0, 0); }
  50% { opacity: .9; transform: translate(6px, -8px); }
}

/* 鸟会飞走，农舍会熄灯 */
.birds, .house-hit { cursor: pointer; pointer-events: auto; }
.birds { transition: transform 4s cubic-bezier(.4, 0, .6, 1), opacity 3s ease; }
.birds.away { transform: translate(260px, -140px); opacity: 0; }
.house-window { transition: fill .6s ease; }
.house-hit.lights-off .house-window { fill: #6b6a62; }

/* 破纪录：一枚朱砂印 */
.seal {
  position: absolute;
  top: 16px; right: 18px;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: 2.5px solid #b8463a;
  border-radius: 6px;
  color: #b8463a;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .1em;
  writing-mode: vertical-rl;
  transform: rotate(-8deg);
  opacity: .88;
  background: rgba(184, 70, 58, .06);
  animation: stamp .5s cubic-bezier(.2, .9, .3, 1.2) .25s both;
}
[data-lang="en"] .seal { writing-mode: horizontal-tb; font-size: 13px; letter-spacing: .06em; }
@keyframes stamp {
  from { transform: rotate(-8deg) scale(1.6); opacity: 0; }
  to { transform: rotate(-8deg) scale(1); opacity: .88; }
}

/* 护眼提醒 */
.eye-count {
  margin: 12px 0 2px;
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .drift { display: none !important; }
}
.drift-leaves > g, .drift-petals > g, .drift-flies circle { transform-box: fill-box; transform-origin: center; }

/* ---------- 音乐 ---------- */
.music { display: flex; align-items: center; gap: 2px; }
.music-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px;
  max-width: 230px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
}
.music-btn:hover { background: var(--panel); border-color: var(--line); }
.music.playing .music-btn { background: var(--accent-soft); color: var(--ink); }
.music-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* 三根小竖条：停着是音符的样子，播放时慢慢起伏 */
.music-ico { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.music-ico i { width: 3px; height: 6px; border-radius: 2px; background: currentColor; opacity: .75; }
.music-ico i:nth-child(2) { height: 11px; }
.music-ico i:nth-child(3) { height: 8px; }
.music.playing .music-ico i { background: var(--accent); animation: eq 1.6s ease-in-out infinite; }
.music.playing .music-ico i:nth-child(2) { animation-delay: -.5s; }
.music.playing .music-ico i:nth-child(3) { animation-delay: -1s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 13px; } }
.music.loading .music-ico { opacity: .4; }
.music-next svg { fill: currentColor; stroke: currentColor; stroke-width: 1.4; }

/* ---------- 广告位：像一张安静的卡片，标明「广告」 ---------- */
.ad-box {
  position: relative;
  margin-top: 30px;
  padding: 26px 16px 14px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  min-height: 120px;
}
.ad-label {
  position: absolute;
  top: 8px; left: 14px;
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--muted);
}
.play .ad-box { margin-top: 18px; }

@media (max-width: 860px) {
  .music-btn { max-width: 150px; }
}
@media (max-width: 620px) {
  .music-label { display: none; }
  .music-btn { padding: 0 9px; }
  .music-next { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .music.playing .music-ico i { animation: none; height: 10px; }
}

/* =========================================================================
   菜园守卫
   ========================================================================= */
.stage[data-game="garden"] { --gd-bar: 60px; }
.stage[data-game="garden"] .gd-field { position: absolute; inset: 0 0 var(--gd-bar) 0; }
.gd-field canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.gd-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--gd-bar);
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  z-index: 6;
}
.gd-picking .gd-bar { opacity: .5; pointer-events: none; }
.gd-tools { display: flex; gap: 6px; min-width: 0; align-items: center; }
.gd-tools[hidden] { display: none; }
.gd-acts { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.gd-tool {
  position: relative;
  display: inline-flex; align-items: center; gap: 4px;
  height: 44px; padding: 0 9px 0 5px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--ink);
  font: inherit; font-size: 13px; line-height: 1.1;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, opacity .2s, transform .15s;
}
.gd-tool:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); }
.gd-tool:active:not(:disabled) { transform: translateY(1px) scale(.97); }
.gd-tool.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--ga-soft, rgba(127,174,115,.3)); }
.gd-tool:disabled { opacity: .42; cursor: not-allowed; }
.gd-ico { display: inline-flex; width: 34px; height: 34px; }
.gd-ico svg { width: 100%; height: 100%; }
.gd-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.gd-name { font-weight: 600; white-space: nowrap; display: none; }
.gd-act .gd-name { display: inline; }
.gd-cost { font-size: 12px; color: var(--ink-2, var(--muted)); font-variant-numeric: tabular-nums; font-weight: 600; }
.gd-cost::first-letter { color: #b8894f; }
.gd-key {
  position: absolute; top: 3px; right: 4px;
  font: 600 9px/1 ui-monospace, monospace; color: var(--muted); opacity: .7;
  background: none; border: 0; padding: 0;
}
.gd-selname { font-weight: 650; font-size: 13px; padding: 0 6px; white-space: nowrap; }
.gd-act { padding: 0 12px; }
.gd-close { width: 44px; justify-content: center; padding: 0; font-size: 20px; color: var(--muted); }
.gd-music { width: 40px; padding: 0; color: var(--muted); }
.gd-music svg { width: 18px; height: 18px; }
.gd-music.on { color: var(--accent); border-color: var(--accent); }
.gd-speed { min-width: 44px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.gd-speed.on { border-color: var(--accent); color: var(--accent); }
.gd-wave { white-space: nowrap; }

@media (min-width: 1180px) {
  .gd-tools .gd-name { display: inline; }
}

/* 选地图 */
.gd-pick {
  position: absolute; inset: 0 0 var(--gd-bar) 0; z-index: 7;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  background: color-mix(in srgb, var(--bg, #f4f1ea) 35%, transparent);
  backdrop-filter: blur(2px);
  animation: gdIn .35s ease both;
}
.gd-pick[hidden] { display: none; }
@keyframes gdIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.gd-pick-panel {
  width: min(820px, 100%); max-height: 100%; overflow: hidden;
  padding: 14px 16px 14px;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--panel); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
}
.gd-pick-panel h3 { margin: 0; font-size: 17px; text-align: center; }
.gd-maps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; min-height: 0; overflow-y: auto; padding: 2px; margin: -2px; }
.gd-stars { font-style: normal; font-size: 10px; letter-spacing: 1px; color: #d9a441; margin-left: 6px; font-weight: 400; }
.gd-map {
  display: flex; flex-direction: column; gap: 5px; padding: 6px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.gd-map:hover { transform: translateY(-2px); border-color: var(--accent); }
.gd-map.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--ga-soft, rgba(127,174,115,.3)); }
.gd-map canvas { width: 100%; aspect-ratio: 16 / 10; border-radius: 9px; display: block; }
.gd-map-txt { display: flex; flex-direction: column; gap: 3px; }
.gd-map-txt b { font-size: 14px; }
.gd-map-txt span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.gd-map-txt em { font-style: normal; font-size: 11px; color: var(--accent); font-weight: 600; }
.gd-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gd-mode {
  display: flex; flex-direction: column; gap: 1px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.gd-mode b { font-size: 14px; }
.gd-mode span { font-size: 12px; color: var(--muted); }
.gd-mode.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--ga-soft, rgba(127,174,115,.3)); }
.gd-go { align-self: center; min-width: 180px; height: 38px; font-size: 15px; }

@media (max-width: 900px) {
  .gd-maps { grid-template-columns: repeat(3, 1fr); }
  .gd-map-txt span { display: none; }
}
@media (max-width: 720px) {
  .gd-maps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .stage[data-game="garden"] { aspect-ratio: 3 / 5; --gd-bar: 112px; }
  .gd-bar { flex-wrap: wrap; align-content: center; gap: 6px; padding: 6px 8px; }
  .gd-tools { width: 100%; justify-content: space-between; gap: 4px; }
  .gd-tools .gd-tool { flex: 1 1 0; flex-direction: column; justify-content: center; height: 50px; padding: 2px 0; gap: 0; }
  .gd-tools .gd-txt { align-items: center; }
  .gd-ico { width: 28px; height: 28px; }
  .gd-key { display: none; }
  .gd-selbox { justify-content: flex-start; }
  .gd-selbox .gd-tool { flex: 0 0 auto; flex-direction: row; }
  .gd-acts { width: 100%; }
  .gd-acts .gd-wave { flex: 1; }
  .gd-pick { padding: 6px; align-items: flex-start; }
  .gd-pick-panel { padding: 10px; gap: 8px; border-radius: 16px; }
  .gd-pick-panel h3 { font-size: 15px; }
  .gd-maps { gap: 6px; }
  .gd-map { padding: 5px; gap: 4px; border-radius: 11px; }
  .gd-map canvas { border-radius: 7px; }
  .gd-map-txt b { font-size: 13px; }
  .gd-map-txt span { display: none; }
  .gd-map-txt em { font-size: 10px; line-height: 1.3; }
  .gd-modes { gap: 6px; }
  .gd-mode { padding: 7px 10px; }
  .gd-mode span { font-size: 11px; line-height: 1.3; }
  .gd-go { height: 38px; width: 100%; }
}
.gd-pick-panel > h3, .gd-modes, .gd-go, .gd-mapdesc { flex-shrink: 0; }
.gd-map-txt span { display: none; }
.gd-mapdesc { margin: -4px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }
@media (min-width: 721px) {
  .gd-map canvas { width: auto; height: 64px; max-width: 100%; align-self: center; }
}

/* 菜园守卫：9 个帮手，按钮改成上图下价 */
.stage[data-game="garden"] { --gd-bar: 64px; }
.gd-tools .gd-tool { flex-direction: column; justify-content: center; gap: 1px; width: 52px; height: 50px; padding: 2px 0 0; }
.gd-tools .gd-txt { align-items: center; }
.gd-tools .gd-name { display: none; }
.gd-tools .gd-ico { width: 30px; height: 30px; }
.gd-tools .gd-cost { font-size: 11px; }
.gd-auto { min-width: 52px; padding: 0 10px; color: var(--muted); }
.gd-auto.on { color: var(--accent); border-color: var(--accent); background: var(--ga-soft, transparent); }
@media (max-width: 620px) {
  .stage[data-game="garden"] { aspect-ratio: 3 / 5.4; --gd-bar: 112px; }
  .gd-tools .gd-tool { width: auto; flex: 1 1 0; height: 50px; min-width: 0; }
  .gd-tools .gd-ico { width: 24px; height: 24px; }
  .gd-tools .gd-cost { font-size: 10px; }
  .gd-auto { min-width: 0; padding: 0 8px; }
}
.gd-selbox .gd-tool { width: auto; padding: 2px 10px 0; }
.gd-selbox .gd-name { display: inline; font-size: 12px; }
.gd-selbox .gd-close { width: 44px; padding: 0; }
@media (max-width: 620px) {
  .gd-selbox { gap: 4px; }
  .gd-selbox .gd-selname { font-size: 12px; padding: 0 2px; white-space: normal; line-height: 1.25; flex: 1 1 auto; min-width: 0; }
  .gd-selbox .gd-tool { flex: 0 0 auto; padding: 2px 7px 0; }
  .gd-selbox .gd-close { width: 36px; }
}

/* 游戏列表里的信息流广告：跟游戏卡片同样的外框，加载到广告才淡入 */
.gcard-ad { position: relative; cursor: default; padding: 28px 12px 12px; min-height: 0; opacity: 0; transition: opacity .4s ease; animation: none; }
.gcard-ad:hover { transform: none; }
.gcard-ad.ad-ready { opacity: 1; }
.gcard-ad .ad-label { top: 9px; left: 14px; }

/* 展示广告也是加载到了才淡入；没投放就整块撤掉 */
.ad-box { opacity: 0; transition: opacity .4s ease; }
.ad-box.ad-ready { opacity: 1; }

/* ---------- 站点顶部细条：跟 SDK Pods 主站同一种仪表风格 ---------- */
.sdk-strip {
  display: flex; align-items: center; justify-content: space-between;
  height: 30px; padding: 0 clamp(14px, 3.5vw, 32px);
  background: #05080a; color: #7f9089;
  font: 500 11px/1 ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em; white-space: nowrap; overflow: hidden;
}
.sdk-strip a { color: #b8c6bf; text-decoration: none; }
.sdk-strip a:hover { color: #4fe3a8; }
.sdk-strip span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 1px; background: #4fe3a8; box-shadow: 0 0 8px #4fe3a8; vertical-align: 1px; }
body.faking .sdk-strip { visibility: hidden; }
.sdk-strip + .app { min-height: calc(100vh - 30px); }
