/* 第二节课 · 巩固游戏题 Hub */
.l2gh{
  --l2-ink:#16324f; --l2-muted:#5a7a96; --l2-line:rgba(40,90,140,.16);
  --l2-acc:#2f7fd4; --l2-ok:#2d8a5a; --l2-bad:#d65a5a; --l2-warn:#e08a2c;
  width:100%; display:flex; flex-direction:column; gap:8px; min-height:0;
  font-family:"Nunito","PingFang SC","Hiragino Sans GB",sans-serif;
  color:var(--l2-ink);
}
.l2gh *{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
.l2gh-head{display:flex; flex-direction:column; gap:4px;}
.l2gh-title{font-family:"ZCOOL KuaiLe",cursive; font-size:18px; margin:0; line-height:1.2;}
.l2gh-sub{margin:0; font-size:11px; font-weight:800; color:var(--l2-muted); line-height:1.35;}
.l2gh-tabs{
  display:flex; gap:6px; overflow-x:auto; padding:2px 0 4px;
  scrollbar-width:none; -ms-overflow-style:none;
}
.l2gh-tabs::-webkit-scrollbar{display:none;}
.l2gh-tab{
  flex:0 0 auto; display:flex; align-items:center; gap:6px;
  border:1px solid var(--l2-line); background:#fff; border-radius:999px;
  padding:5px 10px 5px 5px; cursor:pointer; font-size:11px; font-weight:900;
  color:var(--l2-ink); box-shadow:0 2px 0 rgba(40,90,140,.05);
}
.l2gh-tab img{width:26px; height:26px; border-radius:50%; object-fit:cover; display:block;}
.l2gh-tab.is-on{
  background:linear-gradient(135deg,#2f7fd4,#4aa3ef); color:#fff; border-color:transparent;
}
.l2gh-q{
  font-size:13px; font-weight:900; line-height:1.4; margin:0;
  padding:8px 10px; border-radius:12px;
  background:linear-gradient(135deg,#f3f9ff,#eaf3fc); border:1px solid var(--l2-line);
}
.l2gh-stage{
  position:relative; border-radius:16px; overflow:hidden; border:1px solid var(--l2-line);
  background:linear-gradient(180deg,#9fd0ff 0%, #dff0ff 52%, #b8d9a8 52%, #9fca86 100%);
  min-height:280px; touch-action:none; user-select:none;
}
.l2gh-stage canvas{display:block; width:100%; height:100%;}
.l2gh-hud{
  position:absolute; left:8px; right:8px; top:8px; z-index:4;
  display:flex; justify-content:space-between; gap:6px; pointer-events:none;
}
.l2gh-hud b{
  pointer-events:none; background:rgba(255,255,255,.9); border:1px solid var(--l2-line);
  border-radius:999px; padding:4px 9px; font-size:11px; font-weight:900;
}
.l2gh-toast{
  position:absolute; left:50%; top:42%; transform:translate(-50%,-50%) scale(.92);
  background:rgba(22,50,79,.92); color:#fff; padding:8px 12px; border-radius:12px;
  font-weight:900; font-size:13px; opacity:0; pointer-events:none; transition:.2s; z-index:6;
  white-space:nowrap; max-width:90%; text-align:center;
}
.l2gh-toast.show{opacity:1; transform:translate(-50%,-50%) scale(1);}
.l2gh-toast.ok{background:rgba(40,130,80,.92);}
.l2gh-toast.bad{background:rgba(180,60,60,.92);}
.l2gh-actions{display:flex; gap:8px; flex-wrap:wrap;}
.l2gh-btn{
  border:none; border-radius:12px; padding:9px 12px; font-weight:900; font-size:12px;
  cursor:pointer; background:linear-gradient(135deg,#2f7fd4,#4aa3ef); color:#fff;
}
.l2gh-btn.ghost{background:#fff; color:var(--l2-ink); border:1px solid var(--l2-line);}
.l2gh-btn:disabled{opacity:.45; cursor:not-allowed;}
.l2gh-note{font-size:11px; color:var(--l2-muted); font-weight:700; line-height:1.45; margin:0;}

/* DOM games */
.l2gh-flip{display:grid; grid-template-columns:repeat(3,1fr); gap:7px; padding:12px; height:100%;}
.l2gh-flip-card{aspect-ratio:1; perspective:600px; cursor:pointer;}
.l2gh-flip-inner{position:relative; width:100%; height:100%; transform-style:preserve-3d; transition:transform .35s;}
.l2gh-flip-card.is-open .l2gh-flip-inner,
.l2gh-flip-card.is-done .l2gh-flip-inner{transform:rotateY(180deg);}
.l2gh-flip-face{
  position:absolute; inset:0; backface-visibility:hidden; border-radius:12px;
  display:flex; align-items:center; justify-content:center; text-align:center;
  padding:6px; font-size:11px; font-weight:900; border:2px solid #fff;
  box-shadow:0 6px 12px rgba(0,0,0,.08);
}
.l2gh-flip-back{background:linear-gradient(135deg,#4aa3ef,#2f7fd4); color:#fff; font-size:20px;}
.l2gh-flip-front{background:#fff; color:var(--l2-ink); transform:rotateY(180deg);}
.l2gh-flip-card.is-done .l2gh-flip-front{background:#eaf7f0; border-color:#3c9a6e;}

.l2gh-sort{display:flex; flex-direction:column; gap:8px; padding:10px; height:100%; background:linear-gradient(180deg,#eaf5ff,#f7fbff);}
.l2gh-pool{display:flex; flex-wrap:wrap; gap:6px; min-height:48px;}
.l2gh-chip{
  padding:8px 10px; border-radius:11px; background:#fff; border:2px solid #fff;
  font-weight:900; font-size:11px; cursor:grab; box-shadow:0 4px 10px rgba(0,0,0,.08);
  touch-action:none; user-select:none;
}
.l2gh-chip-ghost{box-shadow:0 10px 22px rgba(30,70,120,.28);}
.l2gh-bins{display:grid; grid-template-columns:1fr 1fr; gap:8px; flex:1; min-height:120px;}
.l2gh-bin{
  border:2px dashed rgba(47,127,212,.35); border-radius:14px; background:rgba(255,255,255,.55);
  padding:8px; display:flex; flex-direction:column; gap:5px; min-height:110px;
}
.l2gh-bin h4{margin:0; font-size:11px; font-weight:900; text-align:center;}
.l2gh-bin.over{background:rgba(47,127,212,.12); border-color:var(--l2-acc);}

.l2gh-bubble-layer{position:absolute; inset:0;}
.l2gh-bubble{
  position:absolute; border-radius:50%; display:flex; align-items:center; justify-content:center;
  text-align:center; padding:8px; font-size:11px; font-weight:900; cursor:pointer;
  background:radial-gradient(circle at 30% 28%,rgba(255,255,255,.95),rgba(180,220,255,.88));
  border:2px solid rgba(255,255,255,.9); box-shadow:0 8px 16px rgba(30,70,120,.15);
}
.l2gh-bubble.pop{animation:l2ghPop .32s ease forwards;}
@keyframes l2ghPop{to{transform:scale(1.35); opacity:0;}}

.l2gh-catch-ui{position:absolute; left:0; right:0; bottom:10px; display:flex; justify-content:space-between; padding:0 12px; z-index:3;}
.l2gh-catcher{
  width:108px; padding:9px 6px; border-radius:14px; background:rgba(255,255,255,.95);
  border:2px solid #d7e8f8; text-align:center; font-size:11px; font-weight:900; cursor:pointer;
  box-shadow:0 6px 14px rgba(0,0,0,.1);
}
.l2gh-catcher.is-on{border-color:var(--l2-acc); background:#e8f3ff; transform:translateY(-2px);}
.l2gh-faller{
  position:absolute; top:-48px; width:54px; height:54px; border-radius:14px; overflow:hidden;
  background:#fff; border:2px solid #fff; box-shadow:0 6px 12px rgba(0,0,0,.12); z-index:2;
}
.l2gh-faller img{width:100%; height:100%; object-fit:cover; display:block;}
