/* LYSVAL 儿童学习乐园 · 游戏化视觉 · 20261112_0828 */
:root {
  --bg: #f2f7fd;
  --bg2: #e6f1ff;
  --panel: #ffffff;
  --panel2: #f6faff;
  --text: #14243b;
  --dim: #5d7390;
  --line: #d9e6f5;
  --brand: #0ea5e9;
  --brand2: #6366f1;
  --accent: #f7c948;
  --good: #16a34a;
  --bad: #e11d48;
  --grad: linear-gradient(120deg, #0ea5e9, #6366f1);
  --shadow: 0 10px 30px rgba(20, 60, 110, .10);
  --shadow2: 0 4px 14px rgba(20, 60, 110, .08);
  --radius: 18px;
  /* 20261112_2009 · 端子与导线的极性配色：正红负蓝，公共端琥珀，a/b/c 各一色 */
  --pol-plus: #e11d48;
  --pol-minus: #2563eb;
  --pol-com: #d97706;
  --pol-a: #16a34a;
  --pol-b: #7c3aed;
  --pol-c: #0891b2;
  --grid-line: rgba(40, 100, 170, .075);
}
html[data-theme="dark"] {
  --bg: #07111e;
  --bg2: #0c1c30;
  --panel: #102237;
  --panel2: #142c45;
  --text: #eaf4ff;
  --dim: #9db4ce;
  --line: #24405d;
  --brand: #38bdf8;
  --brand2: #a78bfa;
  --accent: #fbbf24;
  --good: #4ade80;
  --bad: #fb7185;
  --grad: linear-gradient(120deg, #0284c7, #7c3aed);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow2: 0 4px 14px rgba(0, 0, 0, .28);
  --pol-plus: #fb7185;
  --pol-minus: #60a5fa;
  --pol-com: #fbbf24;
  --pol-a: #4ade80;
  --pol-b: #c084fc;
  --pol-c: #22d3ee;
  --grid-line: rgba(80, 140, 220, .055);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:root { color-scheme: light; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(1200px 600px at 85% -10%, var(--bg2), transparent 60%);
  background-size: 44px 44px, 44px 44px, auto;
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 15px; line-height: 1.6;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 999; background: var(--panel); padding: 8px 14px; border-radius: 8px; }
.svg-defs { position: absolute; width: 0; height: 0; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 11, 18, .94);
  backdrop-filter: blur(14px); border-bottom: 1px solid rgba(120, 170, 255, .18); color: #e6f0ff;
}
.topbar-inner {
  /* R29：导航多了一栏，桌面宽度放宽到 1280px，9 个栏目保持同一行 */
  max-width: 1280px; margin: 0 auto; padding: 12px 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.site-brand-row { display: flex; align-items: center; gap: 16px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #e6f0ff; flex: 0 0 auto; }
.brand:hover { color: #e6f0ff; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.brand-lockup { display: flex; flex-direction: column; gap: 4px; }
.brand-main { font-size: 18px; font-weight: 750; letter-spacing: .08em; line-height: 1; }
.brand-sub { font-size: 12px; letter-spacing: .2em; color: #9fb4cc; line-height: 1; }
.tm { font-size: .55em; color: #8fa3bd; margin-left: 1px; vertical-align: super; font-weight: 600; }
.kids-title {
  display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1;
  padding-left: 16px; border-left: 1px solid rgba(120, 170, 255, .28);
  text-decoration: none; color: #e6f0ff;
}
.kids-title strong { font-size: 16px; font-weight: 750; }
.kids-title small { font-size: 12px; color: #9fb4cc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle {
  display: none; border: 1px solid rgba(120, 170, 255, .35); background: rgba(255,255,255,.06);
  color: #e6f0ff; border-radius: 10px; min-height: 40px; padding: 0 14px; font-weight: 750;
}
.topnav {
  display: flex; gap: 6px; width: 100%; flex-wrap: wrap;
  padding: 6px; border-radius: 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(120, 170, 255, .16);
}
.nav-btn {
  border: 0; background: transparent; color: #d5e4f5; padding: 8px 11px; min-height: 36px;
  border-radius: 10px; font-size: 14px; font-weight: 700; white-space: nowrap;
}
.nav-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-btn.active { background: linear-gradient(100deg, #22d3ee, #4f8cff 70%); color: #04121e; }
.site-back {
  flex: 0 0 auto; align-self: center; text-decoration: none; font-weight: 800; font-size: 13px;
  color: #fff; background: var(--grad); border-radius: 999px; padding: 7px 12px; white-space: nowrap;
}
.ai-note { margin: 4px 0 6px; color: #b45309; font-size: 13px; font-weight: 800; }
.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: 0 0 auto; }
.profile-wrap { position: relative; }
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  width: min(300px, calc(100vw - 24px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 12px;
}
.profile-menu-title { margin: 0 0 8px; font-size: 12px; color: var(--dim); line-height: 1.5; }
.profile-item {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  border-radius: 12px; padding: 7px 8px; margin-bottom: 6px; font-weight: 800;
}
.profile-item.active { border-color: var(--brand); background: rgba(14,165,233,.12); }
.profile-item .avatar-dot { flex: 0 0 auto; }
.profile-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-del {
  flex: 0 0 auto; border: 0; background: transparent; color: var(--dim); font-size: 12px; padding: 2px 4px;
}
.profile-create { display: flex; gap: 6px; margin-top: 8px; }
.profile-create input {
  flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  border-radius: 10px; padding: 8px 10px; font-size: 14px;
}
.icon-btn {
  width: 34px; height: 34px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); border-radius: 10px; display: grid; place-items: center; font-size: 15px;
}
.icon-btn:hover { border-color: var(--brand); }
.icon-btn.off { opacity: .42; }
.theme-toggle .ico-sun { display: none; }
html[data-theme="light"] .theme-toggle .ico-sun { display: inline; }
html[data-theme="light"] .theme-toggle .ico-moon { display: none; }
.hero-more { display: none; }
.pill {
  display: flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); padding: 5px 12px 5px 5px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.avatar-dot {
  width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #4a3520; font-size: 12px; font-weight: 800;
}
.hud-bar { background: var(--panel2); border-bottom: 1px solid var(--line); }
.hud-strip {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
  max-width: 1120px; margin: 0 auto; box-sizing: border-box;
  padding: 7px 22px; font-size: 12px; color: var(--dim);
}
.hud-strip b { color: var(--text); font-size: 14px; }
.hud-profile { margin-left: auto; }

main { max-width: 1220px; margin: 0 auto; padding: 22px 20px 60px; }
.view { display: none; }
.view.active { display: block; animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 通用按钮 / 卡片 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 12px; padding: 11px 20px;
  font-weight: 800; font-size: 14px; text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(99, 102, 241, .3); }
.btn.ghost { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brand); }
.btn.small { padding: 7px 13px; font-size: 12px; border-radius: 10px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 30px 0 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 22px; letter-spacing: -.4px; }
.section-head p { margin: 4px 0 0; color: var(--dim); font-size: 13px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: center;
  padding: 34px 30px; border-radius: 26px; overflow: hidden; position: relative;
  background: linear-gradient(125deg, #0d3b66, #155e93 45%, #5b4bc4);
  color: #fff; box-shadow: var(--shadow);
}
html[data-theme="dark"] .hero { background: linear-gradient(125deg, #0a2140, #153b6b 45%, #3b2d80); }
.hero-copy { position: relative; z-index: 2; }
.eyebrow {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0;
  padding: 0; background: none; letter-spacing: 0;
}
.eyebrow span {
  display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); font-size: 11px; font-weight: 800; line-height: 1.3;
}
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.18; margin: 14px 0 12px; letter-spacing: -1.5px; }
.hero h1 span { color: #ffd86b; }
.hero-lead { max-width: 560px; opacity: .92; font-size: 14px; margin: 0 0 20px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.hero .btn.ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 12px; opacity: .9; }
.hero-art { position: relative; height: 270px; }
.hero-sun { position: absolute; width: 210px; height: 210px; border-radius: 50%; left: 50%; top: 30px; transform: translateX(-50%); background: radial-gradient(circle, rgba(255, 216, 107, .55), transparent 68%); }
.hero-m { position: absolute; width: 128px; height: 128px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .25)); }
.hero-m.monkey { left: 12%; bottom: 8px; animation: bob 3.2s ease-in-out infinite; }
.hero-m.pig { right: 10%; bottom: 0; width: 116px; height: 116px; animation: bob 3.8s ease-in-out infinite reverse; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
.hero-symbols { position: absolute; inset: 0; pointer-events: none; }
.hero-symbols span {
  position: absolute; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .18); color: #fff; font-weight: 800; font-size: 17px;
  animation: float 5s ease-in-out infinite;
}
.hero-symbols span:nth-child(1) { left: 6%; top: 12%; }
.hero-symbols span:nth-child(2) { left: 44%; top: 4%; animation-delay: .7s; }
.hero-symbols span:nth-child(3) { right: 6%; top: 22%; animation-delay: 1.4s; }
.hero-symbols span:nth-child(4) { left: 30%; top: 44%; animation-delay: 2.1s; }
.hero-symbols span:nth-child(5) { right: 30%; top: 54%; animation-delay: 2.8s; }
.hero-symbols span:nth-child(6) { left: 8%; top: 62%; animation-delay: 3.4s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(12deg); } }
.hero-plane { position: absolute; font-size: 38px; left: 46%; top: 30%; animation: fly 4.5s linear infinite; }
@keyframes fly { 0% { transform: translate(-90px, 30px) rotate(-12deg); } 50% { transform: translate(40px, -18px) rotate(6deg); } 100% { transform: translate(-90px, 30px) rotate(-12deg); } }

.flow-strip {
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  margin: 18px 0 4px; padding: 14px 18px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow2);
}
.flow-step { display: flex; align-items: center; gap: 10px; }
.flow-step b {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 14px;
}
.flow-step strong { display: block; font-size: 14px; }
.flow-step small { display: block; color: var(--dim); font-size: 11px; }
.flow-arrow { color: var(--brand); font-size: 20px; font-weight: 800; }

/* 训练房 */
.camp-group { margin-top: 18px; }
.camp-group h3 { margin: 0 0 10px; font-size: 14px; color: var(--dim); letter-spacing: 1px; }
.camp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.camp-card {
  position: relative; text-align: left; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); padding: 14px; box-shadow: var(--shadow2); transition: transform .18s, border-color .18s;
  color: var(--text); overflow: hidden;
}
.camp-card:hover { transform: translateY(-4px); border-color: var(--brand); }
.camp-card::after { content: ''; position: absolute; right: -24px; top: -24px; width: 76px; height: 76px; border-radius: 50%; background: var(--bg2); opacity: .8; }
.camp-icon {
  position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 19px; font-weight: 800; margin-bottom: 9px;
}
.camp-name { position: relative; z-index: 1; font-weight: 800; font-size: 14px; display: block; }
.camp-desc { position: relative; z-index: 1; display: block; color: var(--dim); font-size: 11.5px; min-height: 34px; margin-top: 3px; }
.camp-meta { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--dim); }
.camp-meta b { color: var(--brand); }
.camp-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--bg2); color: var(--brand); font-size: 10px; font-weight: 800; }

/* 关卡卡片 */
.filters { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow2); }
.grade-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.grade-tab { border: 1px solid var(--line); background: var(--panel2); color: var(--dim); padding: 8px 16px; border-radius: 12px; font-weight: 800; }
.grade-tab.active { background: var(--grad); color: #fff; border-color: transparent; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-row input { flex: 1; min-width: 200px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 10px; padding: 9px 12px; }
.filter-panel { margin-top: 12px; display: none; }
.filter-panel.open { display: block; }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; margin: 8px 0; }
.chip { border: 1px dashed var(--line); background: transparent; color: var(--dim); padding: 5px 11px; border-radius: 999px; font-size: 12px; }
.chip.active { background: var(--brand); color: #fff; border-style: solid; border-color: var(--brand); font-weight: 700; }
.result-count { color: var(--dim); font-size: 12px; margin-top: 8px; }
.topic-card {
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 14px;
  box-shadow: var(--shadow2); display: flex; flex-direction: column; gap: 8px; transition: transform .18s;
  color: var(--text);
}
.topic-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.tc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tc-grade { font-size: 10px; font-weight: 800; color: #fff; background: var(--grad); padding: 2px 9px; border-radius: 999px; }
.tc-stars { color: var(--accent); font-size: 12px; letter-spacing: 1px; }
.tc-title { font-weight: 800; font-size: 15px; margin: 0; color: var(--text); }
.tc-method { font-size: 11.5px; color: var(--dim); }
.tc-game { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 11px; padding: 3px 9px; border-radius: 8px; background: var(--bg2); color: var(--brand); font-weight: 700; }
.tc-best { font-size: 11px; color: var(--dim); border-top: 1px dashed var(--line); padding-top: 8px; }
.tc-best b { color: var(--good); }
.tc-btn { margin-top: auto; width: 100%; }
.empty { text-align: center; padding: 40px; color: var(--dim); }

/* 记录 */
.record-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.summary-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow2); }
.summary-box b { display: block; font-size: 22px; color: var(--brand); }
.summary-box span { font-size: 11.5px; color: var(--dim); }
.record-table { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.record-head, .record-row { display: grid; grid-template-columns: 1.25fr .9fr 1.4fr .8fr .7fr .7fr .6fr; gap: 8px; padding: 10px 14px; font-size: 12px; }
.record-head { background: var(--panel2); font-weight: 800; color: var(--dim); }
.record-row { border-top: 1px solid var(--line); align-items: center; }
.record-row b { color: var(--brand); }
.record-empty { padding: 30px; text-align: center; color: var(--dim); }

/* 家长中心 */
.parent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.p-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow2); }
.p-card h3 { margin: 0 0 8px; font-size: 16px; }
.p-card p { color: var(--dim); font-size: 12.5px; margin: 0 0 12px; }
.p-card.danger { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.p-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.file-label { cursor: pointer; }
.switch { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 6px 0; cursor: pointer; }
.switch input { width: 17px; height: 17px; accent-color: var(--brand); }

/* ---------------------------------------------------- 全屏闯关流程层 */
.flow { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; }
.flow[hidden] { display: none; }
.flow-bar {
  display: flex; align-items: center; gap: 14px; padding: 10px 18px;
  background: var(--panel); border-bottom: 1px solid var(--line); flex: 0 0 auto; flex-wrap: wrap;
}
.flow-title { font-weight: 800; font-size: 15px; min-width: 150px; }
.flow-steps { display: flex; gap: 6px; flex: 1; justify-content: center; flex-wrap: wrap; }
.flow-steps span, .flow-steps button {
  border: 0; cursor: pointer; font-family: inherit; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; color: var(--dim); background: var(--panel2);
  white-space: nowrap;
}
.flow-steps span.active, .flow-steps button.active { background: var(--grad); color: #fff; font-weight: 800; }
.flow-steps span.done, .flow-steps button.done { background: color-mix(in srgb, var(--good) 18%, var(--panel2)); color: var(--good); }
.flow-exit {
  margin-left: auto; flex: 0 0 auto; height: 36px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  font-weight: 800; font-size: 14px; white-space: nowrap;
}
.flow-exit:hover { border-color: var(--brand); }
.flow-immersive {
  flex: 0 0 auto; height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  font-weight: 800; font-size: 14px; white-space: nowrap; cursor: pointer;
}
.flow-immersive:hover { border-color: var(--brand); }
.flow-body { flex: 1; overflow-y: auto; padding: 18px; }

/* 学习卡 */
.lesson { max-width: 860px; margin: 0 auto; }
.lesson-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.lesson-head h2 { margin: 0; font-size: 21px; }
.lesson-head p { margin: 2px 0 0; color: var(--dim); font-size: 12px; }
.lesson-pips { display: flex; gap: 6px; }
.lesson-pips i { width: 24px; height: 5px; border-radius: 3px; background: var(--line); }
.lesson-pips i.on { background: var(--brand); }
.lesson-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  padding: 22px; box-shadow: var(--shadow); min-height: 330px;
}
.lesson-kicker { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--bg2); color: var(--brand); font-size: 11px; font-weight: 800; margin-bottom: 12px; }
.lesson-card h3 { margin: 0 0 14px; font-size: 21px; }
.mascot-line { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.mascot-line .face { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; }
.mascot-line .face svg { width: 38px; height: 38px; }
.mascot-line .face.spirit { font-size: 22px; }
.bubble { position: relative; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 14px; max-width: 640px; }
.bubble::before { content: ''; position: absolute; left: -7px; top: 15px; width: 12px; height: 12px; background: var(--panel2); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.bubble.monkey { background: color-mix(in srgb, #ffd166 16%, var(--panel2)); }
.bubble.pig { background: color-mix(in srgb, #f4a7b9 16%, var(--panel2)); }
.bubble.spirit { background: color-mix(in srgb, #4ade80 14%, var(--panel2)); }
.who { display: block; font-size: 10px; color: var(--dim); font-weight: 800; margin-bottom: 2px; }
.demo-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.demo-step { background: var(--grad); color: #fff; padding: 8px 14px; border-radius: 12px; font-weight: 800; font-size: 15px; }
.demo-step.mid { background: var(--panel2); color: var(--text); border: 1px dashed var(--line); }
.demo-arrow { color: var(--brand); font-weight: 800; }
.tip-key { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 18%, var(--panel2)); font-weight: 800; font-size: 14px; }
.tip-note { color: var(--dim); font-size: 12.5px; margin-top: 8px; }
.step-list { display: grid; gap: 10px; margin: 8px 0 14px; }
.step-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--panel2); border: 1px dashed var(--line); }
.step-item b { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.step-item.lit { border-style: solid; border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--panel)); }
.step-item small { display: block; color: var(--dim); }
.chant-box { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0; }
.chant-box span { padding: 6px 11px; border-radius: 10px; background: var(--bg2); font-weight: 700; font-size: 13px; }
.chant-box span.on { background: var(--grad); color: #fff; }
.warm-options { display: grid; gap: 9px; margin: 12px 0; }
.warm-opt { text-align: left; border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 12px; padding: 11px 14px; font-size: 13.5px; }
.warm-opt.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--panel)); }
.warm-opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--panel)); }
.warm-tools { display: flex; gap: 8px; margin: 8px 0 4px; }
.warm-tools .btn { font-size: 12.5px; }
.lesson-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.lesson-nav .right { display: flex; gap: 8px; }
.theater-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.symbol-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--panel2); text-align: center; cursor: pointer; transition: transform .15s; }
.symbol-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.symbol-glyph { font-size: 34px; font-weight: 800; line-height: 1.2; }
.symbol-name { font-weight: 800; font-size: 13px; margin-top: 4px; }
.symbol-say { font-size: 11.5px; color: var(--dim); margin-top: 6px; min-height: 48px; }
.symbol-demo { font-size: 12px; font-weight: 700; color: var(--brand); margin-top: 6px; }

/* ---------------------------------------------------- 游戏舞台 */
.g-wrap { max-width: 880px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); position: relative; }
.g-hud { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--panel2); border-bottom: 1px solid var(--line); }
.g-hud-item { display: flex; flex-direction: column; line-height: 1.2; min-width: 62px; }
.g-hud-item span { font-size: 10px; color: var(--dim); }
.g-hud-item b { font-size: 16px; font-variant-numeric: tabular-nums; }
.g-hud-item b.urgent { color: var(--bad); animation: blink .6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.g-combo[data-hot="1"] b { color: #f97316; text-shadow: 0 0 12px rgba(249, 115, 22, .55); }
.g-energy { flex: 1; min-width: 90px; height: 9px; border-radius: 999px; background: var(--line); overflow: hidden; }
.g-energy i { display: block; height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(90deg, #4ade80, #facc15); transition: width .25s; }
.g-energy[data-level="low"] i { background: linear-gradient(90deg, #fb7185, #f97316); }
.g-hud-btns { display: flex; gap: 6px; }
.g-hud-btns button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.g-scene { position: relative; height: clamp(190px, 33vh, 290px); background: #0d3b66; overflow: hidden; }
.g-family {
  position: absolute; top: 8px; left: 10px; z-index: 5;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 20px);
  background: rgba(10, 25, 45, .55); color: #fff;
  border-radius: 999px; padding: 5px 12px; font-size: 12px; line-height: 1.3;
  backdrop-filter: blur(4px); pointer-events: none;
}
.g-family-ico { font-size: 16px; }
.g-family-name { font-weight: 800; white-space: nowrap; }
.g-family-key { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
@media (max-width: 720px) {
  .g-family-key { display: none; }
}
.g-canvas { display: block; width: 100%; height: 100%; }
.g-arcade { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 62%); }
.g-orbit { position: absolute; width: 220px; height: 220px; border: 2px dashed color-mix(in srgb, var(--brand) 40%, transparent); border-radius: 50%; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.g-orb { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); }
.g-orb.a { top: -11px; left: 99px; }
.g-orb.b { bottom: -11px; left: 20px; background: var(--brand); }
.g-orb.c { top: 90px; right: -11px; background: var(--brand2); }
.g-badge { position: relative; font-size: 54px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .25)); }
.g-arcade.pulse .g-badge { animation: pop .42s ease; }
@keyframes pop { 0% { transform: scale(.6) rotate(-12deg); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.g-spark { position: absolute; color: var(--accent); font-size: 18px; animation: sparkUp .9s ease forwards; pointer-events: none; }
@keyframes sparkUp { to { transform: translateY(-70px) rotate(120deg); opacity: 0; } }
.g-grid { position: absolute; inset: 8px; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(2, 1fr); gap: 6px; }
.g-cell { border-radius: 12px; background: color-mix(in srgb, var(--brand) 22%, var(--panel)); display: grid; place-items: center; font-size: 22px; color: #fff; opacity: 0; transform: scale(.5); transition: .25s; background-color: hsl(var(--hue, 200) 70% 52%); }
.g-cell.in { opacity: 1; transform: scale(1); }
.g-cell.pop { animation: cellPop .32s ease forwards; }
@keyframes cellPop { to { transform: scale(0) rotate(90deg); opacity: 0; } }
.g-grid.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
.g-question { padding: 12px 16px 6px; text-align: center; position: relative; }
.g-tag { display: inline-block; font-size: 10px; font-weight: 800; color: var(--brand); background: var(--bg2); padding: 2px 10px; border-radius: 999px; }
.g-stem { font-size: clamp(17px, 2.6vw, 25px); font-weight: 800; margin: 7px 0 9px; line-height: 1.35; }
.g-beat { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; max-width: 420px; margin: 0 auto; }
.g-beat i { display: block; height: 100%; width: 100%; background: var(--grad); }
.g-answers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px 16px; }
.g-fingerboard { grid-column: 1 / -1; display: grid; gap: 6px; }
.g-finger-legend { text-align: center; font-size: 14px; color: var(--dim); }
.g-finger-legend b { color: var(--brand); }
.g-finger-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.g-keycap {
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); color: var(--text);
  text-align: center; padding: 6px 0 3px; min-width: 0;
}
.g-keycap b { display: block; font-size: clamp(12px, 2.4vw, 16px); line-height: 1.1; }
.g-keycap small { display: block; font-size: 9px; color: var(--dim); font-weight: 700; white-space: nowrap; overflow: hidden; }
.g-keycap.on { background: var(--grad); color: #fff; border-color: transparent; }
.g-keycap.on small { color: #fff; }
.g-skin-typing .g-beat { max-width: none; height: 8px; }
.g-skin-typing .g-keycap { padding: 8px 2px 5px; }
.g-skin-typing .g-keycap small { font-size: 10px; }
.g-type-mins { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.g-type-mins .btn.on { background: var(--grad); color: #04121e; border-color: transparent; }
.puzzle-groups { display: grid; gap: 22px; }
.pz-group h3 { margin: 0 0 10px; font-size: 16px; }
.pz-drawer {
  margin: 8px auto 0; max-width: 720px; background: var(--panel); border: 1px solid var(--brand);
  border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow);
}
.pz-frozen { position: relative; max-width: 520px; margin: 0 auto 12px; pointer-events: none; }
.pz-endbanner { text-align: center; font-weight: 800; color: var(--brand); margin: 8px 0 0; }
/* LYSVAL注释：终局遮罩（R10）——结束先盖「游戏结束」+结果+原因，点「看结果」才进复盘。 */
.pz-endmask { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 18px; background: color-mix(in srgb, var(--panel) 72%, transparent); border-radius: 16px; }
.pz-endcard { width: min(320px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 22px 18px; text-align: center; }
.pz-endemoji { font-size: 44px; line-height: 1; }
.pz-endtitle { font-size: 22px; font-weight: 900; color: var(--text); margin: 10px 0 4px; }
.pz-endresult { font-size: 17px; font-weight: 800; color: var(--brand); }
.pz-endwhy { font-size: 13px; color: var(--dim); margin: 8px 0 16px; line-height: 1.5; }
.pz-endactions { display: flex; justify-content: center; }
.pz-endactions .btn { min-width: 140px; }
.pz-bars { display: flex; align-items: flex-end; justify-content: center; gap: 8px; min-height: 130px; margin: 10px 0; }
.pz-bar { width: 42px; border-radius: 8px 8px 4px 4px; background: var(--grad); color: #fff; display: flex; align-items: flex-end; justify-content: center; font-weight: 900; transition: height .35s ease; }
.pz-bar b { margin-bottom: 4px; }
.pz-bar.pair { outline: 3px solid var(--accent); animation: pzpop .45s ease; }
.pz-bar.lock { opacity: .45; }
@keyframes pzpop { 50% { transform: translateY(-8px); } }
.hands { display: flex; justify-content: center; gap: 28px; margin-bottom: 8px; }
.hand { display: flex; gap: 6px; align-items: flex-end; }
.hand i { width: 18px; height: 46px; border-radius: 10px 10px 6px 6px; background: #f2c9a8; display: block; transform-origin: bottom center; }
.hand i.hot { background: #f59e0b; animation: pzpop .35s ease infinite; }
.hand b { font-size: 11px; align-self: center; color: var(--dim); }
.pz-bench, .pz-tray, .pz-maze, .pz-code { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 8px 0; }
.gap, .tray-wire { min-height: 46px; border-radius: 10px; border: 1px dashed var(--brand); background: var(--panel); color: var(--text); padding: 6px 8px; font-weight: 800; }
.gap.on { background: #16a34a; color: #fff; border-style: solid; }
.gap.flow { background-image: linear-gradient(90deg, transparent, #fde047, transparent); background-size: 40% 100%; animation: flowx .6s linear infinite; }
@keyframes flowx { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.pz-maze.big { display: grid; grid-template-columns: repeat(3, 76px); gap: 6px; margin: 12px auto; }
.pz-maze button.cell { border: 0; font: inherit; font-weight: 800; width: 76px; height: 76px; }
.pz-maze .cell.next { background: #fde047; color: #3b2a08; }
.pz-maze .cell { width: 42px; height: 42px; border-radius: 8px; background: #d1fae5; display: grid; place-items: center; font-weight: 800; }
.pz-maze .wall { background: #64748b; }
.pz-maze .me { outline: 3px solid #f59e0b; }
.pz-maze .end { box-shadow: inset 0 0 0 3px #16a34a; }
.pz-stage-shadow { position: relative; height: 160px; background: #0f2744; border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.lamp2, .blocker, .shadow2, .target-box { position: absolute; }
.lamp2 { top: 16px; background: #fde047; color: #3b2a08; border-radius: 8px; padding: 4px 6px; font-weight: 800; }
.blocker { left: 46%; top: 58px; width: 28px; height: 48px; background: #f4a7b9; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.shadow2 { bottom: 18px; width: 36px; height: 18px; background: rgba(0,0,0,.55); border-radius: 50%; }
.target-box { right: 14%; bottom: 12px; width: 54px; height: 28px; border: 2px dashed #fde047; border-radius: 8px; }
.pz-slide { display: grid; gap: 4px; font-size: 13px; margin: 6px 0; }
.floater { position: absolute; left: 18%; font-size: 12px; font-weight: 800; background: #fff; border-radius: 8px; padding: 2px 6px; }
.floater.up { bottom: 48px; animation: rise .6s ease; }
.floater.down { bottom: 6px; animation: drop .6s ease; }
.floater:nth-child(3) { left: 38%; }
.floater:nth-child(4) { left: 58%; }
.floater:nth-child(5) { left: 74%; }
@keyframes rise { from { bottom: 4px; } to { bottom: 48px; } }
@keyframes drop { from { bottom: 70px; } to { bottom: 6px; } }
.beam { display: flex; justify-content: space-between; align-items: center; min-height: 54px; transform-origin: center center; transition: transform .35s ease; }
.beam i { flex: 1; height: 8px; margin: 0 8px; background: #8d6230; border-radius: 4px; }
.q-figure, .fig { max-width: 280px; margin: 8px auto; display: block; text-align: center; }
.ruler-toy { margin-top: 8px; }
.ruler-track { position: relative; height: 28px; border-bottom: 4px solid var(--brand); background: repeating-linear-gradient(90deg, var(--text) 0 2px, transparent 2px 10%); }
.ruler-track i { position: absolute; top: -6px; width: 14px; height: 14px; border-radius: 50%; background: #f59e0b; left: 30%; }
.pz-choice-btn.fly { animation: rise .35s ease; }
.pz-choice-btn.shake { animation: shake .35s ease; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.pz-code pre { margin: 0; font-family: ui-monospace, monospace; font-size: 12px; text-align: left; white-space: pre-wrap; }
.pz-drawer p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }

/* 逻辑实验 / 排序 */
.pz-logic { max-width: 640px; margin: 0 auto; }
.pz-rule { background: var(--panel2); border-left: 4px solid var(--brand); border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.pz-circuit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: center; }
.pz-circuit .cell, .pz-circuit .wire, .pz-circuit .knife, .pz-circuit .bulb {
  min-height: 74px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
  display: grid; place-items: center; text-align: center; font-size: 13px; font-weight: 800; padding: 8px;
}
.pz-circuit .bat { background: #f7c948; color: #3b2a08; }
.pz-circuit .wire.on { background: #16a34a; color: #fff; border-color: transparent; }
.knife i { width: 36px; height: 4px; background: #64748b; display: block; transform-origin: left center; transform: rotate(-40deg); border-radius: 2px; }
.knife.closed i { transform: none; background: #16a34a; }
.bulb b { width: 28px; height: 28px; border-radius: 50%; background: #cbd5e1; display: block; margin: 0 auto 4px; }
.bulb.on b { background: #fde047; box-shadow: 0 0 16px #facc15; }
.pz-magnet { text-align: center; font-weight: 800; margin-bottom: 10px; }
.pz-choice { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pz-choice-btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 12px; padding: 10px 12px; font-weight: 800; }
.pz-choice-btn.stuck { background: var(--grad); color: #fff; border-color: transparent; }
.pz-choice-btn:disabled { opacity: .55; }
.pz-tank { position: relative; height: 90px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 10px; background: #e0f2fe; }
.pz-tank .water { position: absolute; left: 0; right: 0; bottom: 0; height: 54px; background: #38bdf8; }
.pz-tank .clay { position: absolute; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 800; background: #f4a7b9; color: #4a2030; border-radius: 999px; padding: 6px 10px; }
.pz-tank .ball { bottom: 8px; }
.pz-tank .boat { bottom: 40px; border-radius: 12px 12px 4px 4px; }
.pz-float-list { display: grid; gap: 8px; margin-top: 8px; }
.pz-float-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.pz-float-row button { margin-left: 6px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 8px; padding: 4px 10px; font-weight: 800; }
.pz-float-row .ok { color: var(--good); font-weight: 800; }
.pz-shadow { display: flex; justify-content: space-between; align-items: center; background: #0f2744; color: #fff; border-radius: 12px; padding: 16px; margin-bottom: 10px; }
.pz-shadow .obj { width: 36px; height: 36px; background: #f7c948; border-radius: 6px; color: #3b2a08; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.pz-lever .arm { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 800; }
.pz-lever .arm i { flex: 1; height: 6px; background: #8d6230; border-radius: 4px; position: relative; }
.pz-lever .arm i::after { content: ''; position: absolute; left: 50%; top: -8px; width: 4px; height: 22px; background: #334155; transform: translateX(-50%); }
.pz-bits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pz-bits .bit { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 12px; padding: 10px 0; font-weight: 800; }
.pz-bits .bit b { display: block; font-size: 22px; }
.pz-bits .bit.on { background: #fde047; color: #3b2a08; border-color: transparent; }
.pz-sort { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.pz-sort-card { min-width: 42px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: var(--panel); border: 2px solid var(--line); font-weight: 900; font-size: 18px; color: var(--text); }
.pz-sort-card.pair { border-color: var(--accent); background: rgba(247,201,72,.25); }
.pz-sort-card.lock { opacity: .55; }
.pz-sort-card:disabled { opacity: .4; }
.pz-gap { width: 28px; height: 48px; border: 1px dashed var(--brand); background: transparent; color: var(--brand); border-radius: 8px; font-weight: 900; }
.pz-merge { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pz-merge small { display: block; text-align: center; color: var(--dim); margin-bottom: 4px; }
@media (max-width: 640px) {
  .pz-circuit { grid-template-columns: 1fr 1fr; }
  .pz-merge { grid-template-columns: 1fr; }
}
.g-answer { position: relative; border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 14px; padding: 14px 8px; font-size: clamp(16px, 2.2vw, 22px); font-weight: 800; transition: transform .12s, border-color .12s; }
.g-answer:hover { transform: translateY(-2px); border-color: var(--brand); }
.g-answer .g-key { position: absolute; top: 4px; left: 7px; font-size: 10px; color: var(--dim); font-weight: 700; }
.g-answer.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 16%, var(--panel)); }
.g-answer.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, var(--panel)); }
.g-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.g-float { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); font-weight: 900; font-size: 24px; animation: floatUp .9s ease forwards; text-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.g-float.good { color: #ffd166; }
.g-float.bad { color: #fb7185; font-size: 18px; }
@keyframes floatUp { to { transform: translate(-50%, -80px); opacity: 0; } }
.g-tip { text-align: center; font-size: 11px; color: var(--dim); padding: 0 14px 12px; }
.g-wrap.g-wrong { animation: shake .26s; }
.spd-pick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 14px 0; font-size: 12px; font-weight: 800; color: var(--dim); }
.spd-pick .spd, .spd-pick button { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 3px 10px; font-weight: 800; }
.spd-pick .on { background: var(--grad); color: #fff; border-color: transparent; }
.g-resume {
  position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; align-content: center; gap: 6px;
  border: 0; background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--text); cursor: pointer;
}
.g-resume strong { font-size: 32px; }
.g-resume small { font-size: 14px; color: var(--dim); }
.pz-resume[hidden] { display: none !important; }
.pz-resume {
  display: block; width: min(100%, 420px); margin: 10px auto; padding: 14px 18px;
  border: 0; border-radius: 14px; background: var(--grad); color: #fff; font-weight: 800; font-size: 18px;
}

/* ---------------------------------------------------- 复盘 */
.review { max-width: 900px; margin: 0 auto; }
.review-hero { text-align: center; padding: 18px; border-radius: 20px; background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.review-hero h2 { margin: 0 0 4px; font-size: 24px; }
.review-hero p { margin: 0; opacity: .9; font-size: 13px; }
.review-stars { font-size: 26px; letter-spacing: 5px; margin-top: 8px; color: #ffe08a; }
.review-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.stat-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.stat-box b { display: block; font-size: 20px; color: var(--brand); font-variant-numeric: tabular-nums; }
.stat-box span { font-size: 11px; color: var(--dim); }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rv-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow2); }
.rv-card h3 { margin: 0 0 10px; font-size: 15px; }
.history-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.history-table th, .history-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.history-table th { color: var(--dim); font-size: 11px; }
.history-table tr.me { background: color-mix(in srgb, var(--brand) 10%, transparent); font-weight: 800; }
.trend-svg { width: 100%; height: 86px; margin-top: 8px; }
.wrong-list { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; }
.wrong-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel2); }
.wrong-item strong { display: block; font-size: 13px; }
.wrong-item .ans { font-size: 12px; margin-top: 3px; }
.wrong-item .ans em { color: var(--bad); font-style: normal; }
.wrong-item .ans b { color: var(--good); }
.wrong-item details { margin-top: 6px; font-size: 12px; color: var(--dim); }
.wrong-item summary { cursor: pointer; color: var(--brand); font-weight: 700; }
.reward-line { text-align: center; font-size: 13px; margin: 12px 0; color: var(--dim); }
.reward-line b { color: var(--accent); font-size: 16px; }
.review-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; margin: 16px 0 30px; }

/* 弹窗 / toast / 页脚 */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(5, 18, 34, .6); display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--panel); border-radius: 18px; padding: 22px; width: min(360px, 100%); box-shadow: var(--shadow); }
.modal-box h3 { margin: 0 0 6px; }
.modal-box p { color: var(--dim); font-size: 13px; margin: 0 0 12px; }
.modal-box input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 120; background: #14243b; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; transition: .25s; box-shadow: var(--shadow); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.site-foot {
  background: #070b12; color: #8fa3bd; border-top: 1px solid rgba(120, 170, 255, .14);
  margin-top: 40px; padding: 34px 22px 28px; font-size: 13.5px; line-height: 1.7;
}
.site-foot a { color: #8fa3bd; font-weight: 500; text-decoration: none; }
.site-foot a:hover { color: #22d3ee; }
.foot-stats { display: flex; justify-content: center; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid rgba(120, 170, 255, .14); }
.foot-stats strong { color: #22d3ee; font-size: 1.15rem; }
.foot-mid { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; margin-bottom: 18px; }
.foot-links, .foot-contact { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; justify-content: center; }
.site-foot .sep { color: #6c7f99; margin: 0 4px; }
.foot-beian { text-align: center; line-height: 2.2; font-size: 13px; color: #6c7f99; }
.beian-ico { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }
.wx { position: relative; cursor: pointer; color: #e6f0ff; }
.wx-pop { display: none; position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); background: #fff; padding: 10px; border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.35); text-align: center; z-index: 30; }
.wx:hover .wx-pop, .wx:focus .wx-pop { display: block; }
.wx-pop img { display: block; border-radius: 4px; }
.wx-pop em { display: block; margin-top: 7px; color: #123; font-style: normal; font-size: 12px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 26px 22px; }
  .hero-art { height: 170px; }
  .hero-m { width: 96px; height: 96px; }
  .hero-points { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .review-stats { grid-template-columns: repeat(2, 1fr); }
  .record-head, .record-row { grid-template-columns: 1.1fr .9fr 1.25fr .8fr .7fr; }
  .record-head span:nth-child(6), .record-row span:nth-child(6), .record-head span:nth-child(7), .record-row span:nth-child(7) { display: none; }
}
@media (max-width: 760px) {
  .topbar-inner { padding: 8px 10px; padding-right: max(10px, env(safe-area-inset-right)); gap: 0; }
  .site-brand-row { flex-wrap: nowrap; gap: 6px; min-height: 0; align-items: center; min-width: 0; padding-right: 52px; }
  .brand { flex: 0 0 auto; min-width: 0; }
  .brand-logo { width: 32px; height: 32px; }
  .brand-main { font-size: 14px; letter-spacing: .04em; }
  .brand-sub { display: none; }
  .kids-title {
    order: 0; flex: 1 1 0; flex-direction: row; align-items: baseline; gap: 6px;
    min-width: 0; overflow: hidden; padding-left: 8px; border-left: 1px solid rgba(120, 170, 255, .28);
  }
  .kids-title strong { font-size: 14px; white-space: nowrap; flex: 0 0 auto; }
  .kids-title small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .topbar { position: sticky; }
  #navToggle {
    display: flex !important;
    position: fixed !important;
    top: 8px !important;
    right: max(6px, env(safe-area-inset-right)) !important;
    z-index: 200 !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(8, 20, 36, .94) !important;
    color: #f4f8ff !important;
    border: 1px solid rgba(186, 214, 255, .55) !important;
    border-radius: 10px !important;
    font-size: 22px !important;
    line-height: 1 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
  }
  .topbar.nav-open .site-brand-row { flex-wrap: wrap; }
  .top-actions { display: none; flex: 1 1 100%; margin-left: 0; padding-top: 8px; flex-wrap: wrap; }
  .topbar.nav-open .top-actions { display: flex; }
  .topnav { display: none; }
  .topbar.nav-open .topnav { display: flex; }
  .nav-btn { flex: 1 1 calc(50% - 6px); min-height: 44px; text-align: center; }
  .site-foot { padding: 24px 14px 20px; font-size: 12.5px; }
  .wx-pop { left: auto; right: 0; transform: none; }
  .hud-strip { flex-wrap: nowrap; gap: 8px; padding: 6px 12px; overflow-x: auto; }
  .hud-strip > span { white-space: nowrap; }
  #kidsNav .profile-wrap { flex: 1 1 100%; margin: 6px 0 0; }
  #kidsNav .profile-wrap .pill { width: 100%; min-height: 40px; justify-content: flex-start; }
  #kidsNav .profile-menu { left: 0; right: auto; }
  main { padding: 14px 12px 44px; }
  .hero h1 { font-size: 29px; }
  .flow-strip { gap: 8px; }
  .flow-arrow { display: none; }
  .g-answers { grid-template-columns: repeat(2, 1fr); }
  .g-hud { gap: 8px; padding: 8px; }
  .g-hud-item { min-width: 54px; }
  .g-hud-item b { font-size: 14px; }
  .g-energy { min-width: 60px; }
  .g-scene { height: 190px; }
  .lesson-card { padding: 16px; min-height: 0; }
  .record-head, .record-row { grid-template-columns: 1fr .9fr 1.1fr .8fr; }
  .record-head span:nth-child(5), .record-row span:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
html[data-reduced-motion="1"] * { animation-duration: .01ms !important; }

/* ============================================================
   书中思维 v3 · 20261112_0859
   探究单元 / 交互演示 / 做题层 / 四段流程
   ============================================================ */
.flow-steps { flex-wrap: wrap; gap: 4px; }
.flow-steps span, .flow-steps button { font-size: 12px; white-space: nowrap; }

.coverage-box {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 4px 0 22px;
}
.coverage-box .cov-item {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow2);
}
.coverage-box .cov-item b { display: block; font-size: 24px; line-height: 1.2; color: var(--brand); }
.coverage-box .cov-item span { font-size: 12px; color: var(--dim); }
.coverage-box .cov-note { grid-column: 1 / -1; font-size: 12px; color: var(--dim); padding: 0 4px; }

.explore-card {
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow2); cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  color: var(--text); width: 100%;
}
.explore-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand); }
.explore-card .ec-top { display: flex; align-items: center; gap: 8px; }
.explore-card .ec-sprite {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: var(--bg2); font-size: 19px; flex: none;
}
.explore-card h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.explore-card .ec-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.explore-card .ec-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--panel2); border: 1px solid var(--line); color: var(--dim);
}
.explore-card .ec-tag.fam { color: var(--brand); border-color: var(--brand); }
.explore-card .ec-tag.book { border-style: dashed; }
.explore-card .ec-key { font-size: 12px; color: var(--dim); margin: 0; }
.explore-card .ec-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  border-top: 1px dashed var(--line); padding-top: 8px; margin-top: auto;
  font-size: 12px; color: var(--dim);
}
.explore-card .ec-foot b { color: var(--good); }
.explore-card .ec-go { color: var(--brand); font-weight: 700; }

/* 讲解页：五步探究链 */
.explore-chain .chain-item { cursor: pointer; }
.explore-chain .chain-item .chain-say {
  margin: 6px 0 0; font-size: 12px; color: var(--dim);
  max-height: 0; overflow: hidden; transition: max-height .22s ease;
}
.explore-chain .chain-item.lit .chain-say { max-height: 120px; }
.explore-chain .chain-item.lit { border-color: var(--brand); background: var(--panel2); }

/* 交互演示通用容器 */
.demo-box {
  background: var(--panel2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin: 6px 0 4px;
}
.demo-title { font-weight: 700; margin-bottom: 12px; color: var(--brand); font-size: 14px; }
.demo-body { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.demo-note {
  margin-top: 12px; font-size: 12px; color: var(--dim);
  background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px;
}
.demo-result {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px;
  background: rgba(22,163,74,.12); color: var(--good); border: 1px solid var(--good);
}
.demo-result.bad { background: rgba(225,29,72,.10); color: var(--bad); border-color: var(--bad); }
.demo-steps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.demo-step {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 10px; padding: 7px 11px; font-size: 12px; cursor: pointer;
}
.demo-step.on { border-color: var(--brand); color: var(--brand); background: rgba(14,165,233,.10); }
.demo-arrow { color: var(--dim); }
.demo-chain-note { font-size: 12px; color: var(--dim); text-align: center; min-height: 34px; }
.demo-body .bal-actions, .demo-body .venn-pick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.eq-num {
  min-width: 44px; padding: 7px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 700;
}
.eq-num:hover { border-color: var(--brand); color: var(--brand); }

/* 幻方九宫格 */
.g9-layout { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; align-items: flex-start; }
.g9-grid { display: grid; grid-template-columns: repeat(3, 62px); gap: 5px; }
.g9-cell {
  width: 62px; height: 62px; border-radius: 10px; font-size: 20px; font-weight: 800;
  border: 2px solid var(--line); background: var(--panel); color: var(--dim); cursor: pointer;
}
.g9-cell.center { border-color: var(--accent); color: var(--accent); }
.g9-cell.filled { color: var(--text); border-color: var(--brand); background: rgba(14,165,233,.08); }
.g9-cell.chosen { outline: 3px solid var(--accent); }
.g9-side { display: flex; flex-direction: column; gap: 10px; min-width: 210px; }
.g9-pool { display: flex; flex-wrap: wrap; gap: 5px; }
.g9-num {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-weight: 700; cursor: pointer;
}
.g9-num.used { opacity: .35; }
.g9-num.pick { border-color: var(--accent); background: rgba(247,201,72,.18); transform: scale(1.08); }
.g9-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font-size: 12px; }
.g9-line { color: var(--dim); }
.g9-line.ok { color: var(--good); font-weight: 700; }
.g9-line.no { color: var(--bad); }
.g9-buttons { display: flex; flex-wrap: wrap; gap: 6px; }

/* 竖式谜：符号、百位、十位、个位各一列 */
.eq-box {
  display: inline-grid;
  grid-template-columns: 1.7em 1.45em 1.45em 1.45em;
  justify-items: center;
  align-items: center;
  width: auto;
  padding: 4px 8px 6px;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  line-height: 1.2;
  text-align: center;
}
.eq-row { display: contents; }
.eq-cell {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 1.35em;
}
.eq-sign { font-weight: 700; }
.eq-line {
  grid-column: 2 / span 3;
  align-self: stretch; justify-self: stretch;
  height: 0; margin: 4px 0;
  border-top: 2px solid var(--text);
}
.eq-sum { color: var(--good); font-weight: 800; }
.eq-blank {
  box-sizing: border-box;
  width: 1.2em; min-width: 1.2em; height: 1.35em;
  border: 2px dashed var(--accent); border-radius: 8px; color: var(--accent);
}
.op-line {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.op-blank {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; min-width: 1.4em; min-height: 1.3em; padding: 0 4px;
  border: 2px dashed var(--accent); border-radius: 8px; color: var(--accent);
}
.eq-pick { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; max-width: 300px; }

/* 天平 / 数轴 / 鸡兔笼 */
.bal-scale { width: 240px; height: 120px; position: relative; }
.bal-beam {
  position: absolute; top: 24px; left: 10px; right: 10px; height: 8px;
  background: var(--brand); border-radius: 6px; display: flex; justify-content: space-between;
  transition: transform .3s ease;
}
.bal-pan {
  width: 70px; height: 42px; margin-top: 8px; border-radius: 0 0 40px 40px;
  background: var(--panel); border: 2px solid var(--brand); border-top: 0;
  display: grid; place-items: center; font-weight: 800; font-size: 19px; color: var(--text);
}
.bal-stand { position: absolute; left: 50%; top: 32px; width: 8px; height: 76px; background: var(--dim); transform: translateX(-50%); }
.bal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nl-wrap { width: 100%; max-width: 440px; }
.nl-svg { width: 100%; height: auto; }
.nl-svg text { fill: var(--dim); }
.nl-pick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cups-stage { width: 100%; text-align: center; }
.cups-total { font-weight: 700; color: var(--brand); }
.cups-row { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 10px 0; }
.cup { font-size: 22px; filter: grayscale(.2); }
.cups-readout { font-size: 14px; }
.cups-readout b { color: var(--good); }

/* 表格 / 韦恩 / 路线 / 分层 / 条形 / 点阵 / 铺砖 */
.demo-table { border-collapse: collapse; font-size: 13px; }
.demo-table th, .demo-table td { border: 1px solid var(--line); padding: 6px 12px; text-align: center; }
.tb-cell { width: 38px; height: 32px; border: 0; background: transparent; color: var(--dim); cursor: pointer; font-size: 17px; }
.tb-cell.yes { color: var(--good); font-weight: 800; }
.venn-svg { width: 100%; max-width: 340px; height: auto; }
.venn-svg text { fill: var(--text); }
.venn-pick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.path-svg { width: 100%; max-width: 300px; height: auto; }
.path-svg text { fill: var(--text); }
.tower-stage, .arr-stage { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.tower-layer, .arr-row { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--dim); }
.tower-layer i, .arr-row i {
  width: 20px; height: 20px; border-radius: 5px; display: block;
  background: linear-gradient(140deg, var(--brand), var(--brand2));
}
.tower-total { font-size: 14px; margin-top: 6px; }
.tower-total b { color: var(--good); font-size: 18px; }
.bars-stage { display: flex; gap: 22px; align-items: flex-end; height: 130px; }
.bar-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; font-size: 11px; color: var(--dim); }
.bar-fill { width: 42px; border-radius: 8px 8px 0 0; background: var(--brand); }
.bar-fill.alt { background: var(--brand2); }
.bar-fill.avg { background: var(--accent); }
.tiles-stage { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.tile { width: 42px; height: 42px; border: 2px solid var(--line); border-radius: 9px; color: var(--text); font-weight: 700; cursor: pointer; }

/* 图形割补 */
.shapes-svg { width: 100%; max-width: 340px; height: auto; display: block; margin: 0 auto; }
.shapes-tri { transform-origin: center; }
/* 圆 */
.circle-stage { width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.circle-svg { width: 100%; max-width: 320px; height: auto; display: block; margin: 0 auto; }
.circle-info { min-height: 24px; text-align: center; font-size: 14px; color: var(--text); padding: 6px 12px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 8%, var(--panel)); max-width: 100%; }
/* 比长短 / 比轻重 / 比快慢 */
.len-svg, .weight-svg, .speed-svg { width: 100%; max-width: 320px; height: auto; display: block; margin: 0 auto; }
.weight-stage, .speed-stage { width: 100%; display: flex; justify-content: center; }
/* R22 新增 9 个专属 demo 通用样式 */
.solid-line, .strat-line, .rem-line, .gc-line, .te-line, .seq-row { text-align: center; font-size: 14px; color: var(--text); padding: 4px 0; }
.solid-line b, .strat-line b, .rem-line b, .gc-line b, .te-line b, .seq-row b { color: var(--brand); font-size: 16px; }
.solid-svg, .te-svg, .gc-svg, .coord-svg, .draw-svg { width: 100%; max-width: 320px; height: auto; display: block; margin: 0 auto; }
.seq-num { display: inline-block; min-width: 28px; padding: 4px 8px; margin: 0 2px; border-radius: 8px; background: color-mix(in srgb, var(--brand) 10%, var(--panel)); font-weight: 700; }
.challenge-map { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center; padding: 8px 0; }
.ch-node { padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--brand) 12%, var(--panel)); font-weight: 700; color: var(--brand); }
.ch-arrow { color: var(--dim); }
.coord-stage { width: 100%; display: flex; justify-content: center; }
/* 生活买卖 */
.shop-line { text-align: center; font-size: 15px; margin-bottom: 8px; }
.shop-line b { color: var(--brand); font-size: 18px; }
/* 分数切比萨 */
.frac-stage { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: center; }
.frac-svg { width: 180px; height: 180px; }
.frac-readout { font-size: 15px; text-align: center; }
.frac-readout b { color: var(--accent); font-size: 18px; }
.ok-txt { color: var(--good); font-weight: 700; }
/* 工程合作 */
.work-stage { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.work-track { height: 18px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; }
.work-track i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .3s ease; }
.work-teams { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.work-readout { text-align: center; font-size: 14px; }
.work-readout b { color: var(--good); }
/* 位值拨珠 */
.place-stage { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.place-slots { display: flex; gap: 10px; }
.place-slot { width: 74px; height: 74px; border: 2px dashed var(--line); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; background: var(--panel2); }
.place-slot b { font-size: 26px; color: var(--brand); line-height: 1.1; }
.place-label { font-size: 11px; color: var(--dim); }
.place-pool { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.place-pool .eq-num.used { opacity: .3; pointer-events: none; }
.place-pool .eq-num.pick { border-color: var(--accent); background: rgba(247,201,72,.18); }
.place-readout { font-size: 14px; text-align: center; }
/* 奇偶抽屉 */
.odd-nums { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 16px; margin-bottom: 8px; }
.odd-num { padding: 6px 10px; border-radius: 10px; font-weight: 700; }
.odd-num.oddn { background: rgba(239,71,111,.14); color: #ef476f; }
.odd-num.evenn { background: rgba(16,185,129,.14); color: #10b981; }
/* 奇偶染色（动手） */
.odd-dye {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 56px; padding: 8px 10px; border-radius: 12px; cursor: pointer;
  border: 2px dashed var(--line); background: var(--panel2); color: var(--text);
  font-size: 20px; font-weight: 800; line-height: 1;
}
.odd-dye small { font-size: 11px; font-weight: 400; color: var(--dim); min-height: 13px; }
.odd-dye.oddn { border-style: solid; border-color: #ef476f; background: rgba(239,71,111,.14); color: #ef476f; }
.odd-dye.oddn small { color: #ef476f; }
.odd-dye.evenn { border-style: solid; border-color: #10b981; background: rgba(16,185,129,.14); color: #10b981; }
.odd-dye.evenn small { color: #10b981; }
.odd-plus { align-self: center; font-size: 18px; font-weight: 700; color: var(--dim); }
/* 抽屉摸球 */
.drawer-bag { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; min-height: 40px; align-items: center; }
.drawer-ball { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #2f241d; border: 2px solid var(--line); }
/* 凑零钱 */
.shop-tray { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; align-items: center; min-height: 44px; margin-bottom: 10px; padding: 8px; border: 1px dashed var(--line); border-radius: 12px; background: var(--panel); }
.shop-empty { font-size: 12px; color: var(--dim); }
.shop-coins { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 6px; }
.coin-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--accent);
  background: radial-gradient(circle at 35% 35%, #ffe08a, #f7c948); color: #8a5a00;
  font-size: 17px; font-weight: 800; cursor: pointer; transition: transform .12s;
}
.coin-btn:hover { transform: scale(1.08); }
.coin { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 35%, #ffe08a, #f7c948); color: #8a5a00; font-size: 14px; font-weight: 800; border: 2px solid var(--accent); }
.shop-sum { font-size: 15px; font-weight: 700; color: var(--good); }
/* 倒推 / 凑整 */
.rev-flow { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; margin-bottom: 10px; }
.rev-node {
  min-width: 46px; padding: 8px 12px; border-radius: 10px; text-align: center;
  border: 2px dashed var(--line); background: var(--panel2); color: var(--text); font-size: 16px; font-weight: 700;
}
.rev-node.done { border-style: solid; border-color: var(--good); background: rgba(22,163,74,.12); color: var(--good); }
.rev-op { font-size: 14px; font-weight: 700; color: var(--accent); }
.rev-out { text-align: center; font-size: 14px; margin-bottom: 8px; min-height: 20px; }
.quick-line { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.quick-line b { color: var(--brand); font-size: 22px; }
/* 排列组合 */
.arr-people { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 26px; margin-bottom: 6px; }
.arr-p { transition: transform .2s; }
.arr-readout { text-align: center; font-size: 15px; }
.arr-readout b { color: var(--brand); font-size: 18px; }
/* 行程 */
.travel-stage { width: 100%; }
.travel-track { position: relative; height: 52px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; }
.travel-track::before { content: ''; position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: var(--dim); opacity: .5; }
.travel-p { position: absolute; top: 6px; font-size: 24px; transition: left .4s ease; font-style: normal; }
.travel-p.a { left: 8%; }
.travel-p.b { left: 88%; }
.travel-readout { text-align: center; font-size: 14px; margin-top: 6px; }
/* 比较单位 */
.cmp-line { display: flex; gap: 14px; align-items: center; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
.cmp-box { padding: 10px 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--panel2); text-align: center; display: flex; flex-direction: column; gap: 3px; }
.cmp-box b { font-size: 18px; color: var(--brand); }
.cmp-box small { font-size: 11px; color: var(--dim); }
.cmp-op { font-size: 24px; font-weight: 800; color: var(--accent); }
/* 等量代换 */
.swap-line { text-align: center; font-size: 17px; margin-bottom: 8px; }
.swap-line b { color: var(--brand); font-size: 20px; }
.swap-out { text-align: center; font-size: 13px; color: var(--dim); margin-bottom: 8px; min-height: 20px; }
/* 找次品三分法 */
.weigh-stage { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.wg-range { font-size: 13px; font-weight: 700; color: var(--brand); }
.wg-balls { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.wg-ball {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel2); border: 2px solid var(--line); font-size: 13px; font-weight: 700; color: var(--text);
}
.wg-ball.light { border-color: var(--accent); background: rgba(247,201,72,.2); }
.wg-msg { font-size: 12px; color: var(--dim); text-align: center; }
/* 实验挑战 */
.experiment { display: flex; flex-direction: column; gap: 12px; }
.exp-hud {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 13px;
}
.exp-title { font-weight: 700; color: var(--brand); }
.exp-item b { color: var(--brand); font-size: 15px; }
.exp-task {
  background: var(--panel2); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px;
  font-size: 14px; line-height: 1.5;
}
.exp-task b { color: var(--accent); }
.exp-hint { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }
.exp-host { display: flex; flex-direction: column; gap: 10px; }
.exp-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.exp-foot .tip-note { font-size: 12px; }


.practice { display: flex; flex-direction: column; gap: 12px; }
.practice-hud {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px;
  font-size: 13px;
}
.practice-hud b { color: var(--brand); font-size: 15px; }
.practice-bar { height: 7px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; }
.practice-bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .3s ease; }
.practice-stage { display: flex; flex-direction: column; gap: 12px; }
.practice-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow2);
}
.practice-card h3 { margin: 8px 0 16px; font-size: 19px; line-height: 1.5; }
.practice-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.practice-opt {
  padding: 13px 16px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--panel2); color: var(--text); font-size: 17px; font-weight: 700; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.practice-opt:hover { border-color: var(--brand); transform: translateY(-2px); }
.practice-opt.right { border-color: var(--good); background: rgba(22,163,74,.12); color: var(--good); }
.practice-opt.wrong { border-color: var(--bad); background: rgba(225,29,72,.10); color: var(--bad); }
.practice-tools { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.practice-explain {
  margin-top: 12px; background: var(--panel2); border: 1px dashed var(--line);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--dim);
}
.practice-explain summary { cursor: pointer; color: var(--brand); }
.practice-next { align-self: flex-start; }
.practice-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.practice-foot .tip-note { font-size: 12px; }

@media (max-width: 720px) {
  .coverage-box { grid-template-columns: repeat(2, 1fr); }
  .practice-options { grid-template-columns: 1fr; }
  .g9-grid { grid-template-columns: repeat(3, 52px); }
  .g9-cell { width: 52px; height: 52px; font-size: 17px; }
  .flow-steps span, .flow-steps button { font-size: 11px; padding: 6px 8px; }
  .flow-exit { height: 34px; padding: 0 12px; }
}

/* ==================================================================
   益智乐园 / 学习进度 · 20261112_1035
   ================================================================== */
.puzzle-layer { z-index: 62; }
.pz-card, .pg-row { color: var(--text); }

/* 益智游戏卡片 */
.puzzle-card {
  display: flex; flex-direction: column; gap: 7px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  /* R30：卡片瘦身——长篇「怎么玩」搬进游戏内「更多」，这里只留一句话 */
  padding: 13px; box-shadow: var(--shadow2); transition: transform .16s ease, border-color .16s ease;
}
.puzzle-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.pc-top { display: flex; align-items: center; gap: 10px; }
.pc-icon { font-size: 26px; line-height: 1; }
.pc-top h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.pc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--panel2); border: 1px dashed var(--line); color: var(--dim); }
.pc-tag.cat { border-style: solid; background: rgba(14,165,233,.10); color: var(--brand); border-color: transparent; }
.pc-tag.level { background: rgba(247,201,72,.18); color: var(--text); border-color: transparent; }
.pc-desc { margin: 0; font-size: 13px; color: var(--dim); line-height: 1.55;
  /* R30：一句话介绍最多两行，卡片高度统一，不再被长文案撑大 */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 0; }
.pc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); border-top: 1px dashed var(--line); padding-top: 9px; }
.pc-foot b { color: var(--brand); }
.pc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-actions .btn { flex: 1 1 auto; }
.pc-diff { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }

/* 益智挑战 HUD */
.pz-shell { max-width: 1180px; margin: 0 auto; padding: 12px 14px 14px; }
/* 节奏游戏（#flow 内的 #gameHost）：弹层撑满，场景画面跟着变高 */
.flow-body-game { display: flex; flex-direction: column; overflow: hidden;
  padding: 10px 12px 12px; }
.flow-body-game > #gameHost { flex: 1 1 auto; min-height: 0; width: 100%;
  max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; }
.flow-body-game .g-wrap { flex: 1 1 auto; min-height: 0; max-width: 1100px;
  display: flex; flex-direction: column; }
.flow-body-game .g-scene { flex: 1 1 auto; height: auto; min-height: 220px; }
.flow-body.flow-body-game:has(.g-skin-typing) {
  overflow: hidden; display: flex; flex-direction: column; min-height: 0;
  padding: 8px 12px 8px;
}
.flow-body-game > #gameHost:has(.g-skin-typing),
.flow-body-game .g-wrap.g-skin-typing {
  max-width: 1220px; width: 100%; flex: 1 1 auto; min-height: 0;
}
.flow-body-game .g-wrap.g-skin-typing {
  display: flex; flex-direction: column; overflow: hidden;
}
.flow-body-game .g-wrap.g-skin-typing > .g-scene {
  flex: 1 1 auto; min-height: 120px; height: auto; max-height: none; aspect-ratio: auto;
}
.flow-body-game .g-wrap.g-skin-typing > .g-hud,
.flow-body-game .g-wrap.g-skin-typing > .spd-pick,
.flow-body-game .g-wrap.g-skin-typing > .g-question,
.flow-body-game .g-wrap.g-skin-typing > .g-answers,
.flow-body-game .g-wrap.g-skin-typing > .g-tip,
.flow-body-game .g-wrap.g-skin-typing > .ps-learn-wrap { flex: 0 0 auto; }
.g-skin-typing .g-question { padding: 6px 16px 2px; }
.g-skin-typing .g-stem { margin: 2px 0 4px; }
.g-skin-typing .g-answers { padding: 4px 12px 6px; }
.g-skin-typing .hands { margin-bottom: 4px; gap: 20px; }
.g-skin-typing .hand i { height: 34px; }
.g-skin-typing .g-tip { padding-bottom: 6px; }
@media (max-width: 760px) {
  .g-skin-typing .g-hud { flex-wrap: nowrap; gap: 6px; padding: 6px 8px; }
  .g-skin-typing .g-hud-item { min-width: 0; }
  .g-skin-typing .g-hud-item span { font-size: 9px; }
  .g-skin-typing .g-hud-item b { font-size: 13px; }
  .g-skin-typing .g-energy { min-width: 28px; }
  .g-wrap.g-skin-typing .spd-pick { gap: 4px; padding-top: 4px; flex-wrap: nowrap; }
  .g-skin-typing .spd-pick button { padding: 2px 6px; }
  .g-skin-typing .hand i { height: 28px; width: 14px; }
}
@media (max-width: 700px) {
  .flow-body-game { padding: 6px; }
  .flow-body-game .g-scene { min-height: 170px; }
}
/* 20261112_2222：游戏弹层撑满视口，别在下面留一大片空白 */
.puzzle-layer .flow-body { display: flex; flex-direction: column; padding: 10px 12px 12px; }
.puzzle-layer #puzzleHost { flex: 1 1 auto; min-height: 0; width: 100%;
  display: flex; flex-direction: column; }
.puzzle-layer .pz-shell { width: 100%; flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; }
/* 20261113：舞台吃剩余高度，禁止内滚裁切棋盘下半盘 */
.puzzle-layer .pz-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.puzzle-layer .pz-stage .g-wrap { flex: 1 1 auto; min-height: 0; height: auto;
  display: flex; flex-direction: column; }
.puzzle-layer .pz-stage .g-scene { flex: 1 1 auto; height: auto; min-height: 220px; }
@media (max-width: 700px) {
  .puzzle-layer .pz-stage .g-scene { min-height: 180px; }
}
/* 20261112_2238：.pz-stage 变 flex 后，只写 max-width + margin:auto 的容器会收缩成内容宽度，
   汉诺塔三根柱子因此被压窄。统一补 width:100%，再由各自 max-width 收住。 */
.puzzle-layer .pz-stage > .pz-hanoi,
.puzzle-layer .pz-stage > .pz-guess,
.puzzle-layer .pz-stage > .pz-24,
.puzzle-layer .pz-stage > .pz-path,
.puzzle-layer .pz-stage > .pz-mines,
.puzzle-layer .pz-stage > .pz-logic { width: 100%; }
/* 汉诺塔：宽度铺开、高度收在中档，盘子贴着塔基往上堆 */
.puzzle-layer .pz-stage > .pz-hanoi .pz-tower { min-height: 260px; max-height: 320px; }
.pz-hud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pz-hud-item {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 8px; text-align: center; box-shadow: var(--shadow2);
}
.pz-hud-item b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; color: var(--brand); }
.pz-hud-item span { font-size: 11px; color: var(--dim); }
.pz-statline { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 6px; }
.pz-statname { font-weight: 800; }
.pz-mode { font-size: 12px; color: var(--brand); background: var(--panel2); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.pz-info { background: var(--panel2); border-left: 4px solid var(--brand); border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--dim); min-height: 38px; }
.pz-stage { margin: 14px 0; min-height: 180px; position: relative; }
.pz-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding-bottom: 20px; }
.pz-tip { font-size: 13px; color: var(--dim); margin-top: 12px; line-height: 1.6; }
.pz-tip b { color: var(--brand); }
.pz-tip .over { color: var(--bad); }

/* 通用格子 */
.pz-cell {
  display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel2);
  color: var(--text); font-weight: 700; border-radius: 6px; padding: 0; aspect-ratio: 1 / 1;
  font-size: clamp(13px, 3.4vw, 20px); min-width: 0; transition: background .12s ease, border-color .12s ease;
}
.pz-cell:hover:not(:disabled) { border-color: var(--brand); }
.pz-cell:disabled { cursor: default; }
.pz-cell.fixed { background: var(--panel); color: var(--text); font-weight: 900; }
.pz-cell.selected { border: 2px solid var(--brand); background: rgba(14,165,233,.14); }
.pz-cell.bad { color: var(--bad); border-color: var(--bad); background: rgba(225,29,72,.10); }
.pz-cell.can { border-color: var(--brand); }
.pz-cell.ok { background: rgba(22,163,74,.12); color: var(--good); }
.pz-cell.blank { background: transparent; border-color: transparent; }
.pz-cell.blank:hover { border-color: transparent; }
.pz-num.box-left { border-left: 2px solid var(--brand2); }
.pz-num.box-top { border-top: 2px solid var(--brand2); }

/* 20261113：棋盘 = 放得进剩余高度的最大正方形；禁止被 .pz-stage flex 压扁裁切 */
.pz-sudoku, .pz-path-grid, .pz-slide, .pz-mine-grid {
  display: grid;
  grid-template-columns: repeat(var(--pz-n), minmax(0, 1fr));
  grid-template-rows: repeat(var(--pz-n), minmax(0, 1fr));
  gap: 3px;
  margin: 0 auto;
  flex: 0 0 auto;
  align-self: center;
  width: min(100%, 640px, calc(100dvh - 250px));
  max-height: 100%;
  aspect-ratio: 1 / 1;
}
.puzzle-layer .pz-stage > .pz-slide .pz-cell,
.puzzle-layer .pz-stage > .pz-sudoku .pz-cell,
.puzzle-layer .pz-stage > .pz-path-grid .pz-cell,
.puzzle-layer .pz-stage > .pz-mine-grid .pz-cell {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  min-height: 0;
}
/* 20261114_091136：数字软键盘按钮做小、整体降低高度，把纵向空间让给盘面/画布 */
.pz-keypad { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-top: 8px; }
.pz-key {
  min-width: 34px; height: 32px; padding: 0 6px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--text); font-weight: 800; font-size: 15px;
}
.pz-key:hover { border-color: var(--brand); }
.pz-key.selected { background: var(--grad); color: #fff; border-color: transparent; }
.pz-key-clear, .pz-key-fn { min-width: 54px; font-size: 12px; color: var(--dim); }
/* 20261114_100023：敲物理键盘时同步点亮屏上对应键帽，两条输入路径视觉一致 */
.pz-key.key-active { background: var(--grad); color: #fff; border-color: transparent; transform: translateY(1px); }

/* 凑十 / 记忆翻牌 */
.pz-pair-grid, .pz-memory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; width: min(100%, 420px); margin: 0 auto; }
.pz-pair, .pz-card {
  aspect-ratio: 1 / 1; border-radius: 12px; border: 2px solid var(--line);
  background: var(--panel2); color: var(--text); font-size: clamp(18px, 5vw, 26px); font-weight: 900;
}
.pz-pair.selected { border-color: var(--brand); background: rgba(14,165,233,.16); }
.pz-pair:disabled { opacity: .32; }
.pz-card { font-size: clamp(12px, 3.6vw, 17px); background: var(--grad); color: #fff; border-color: transparent; }
.pz-card.flipped { background: var(--panel); color: var(--text); border-color: var(--brand); }
.pz-card.gone { opacity: .2; }

/* 猜数字 */
.pz-guess { max-width: 420px; margin: 0 auto; text-align: center; }
.pz-guess-range { font-size: 20px; margin-bottom: 12px; }
.pz-guess-range b { color: var(--brand); font-size: 26px; }
.pz-guess-row { display: flex; gap: 8px; justify-content: center; }
.pz-guess-row input {
  width: 150px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-size: 18px; text-align: center;
}
.pz-log { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.pz-log span { font-size: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--dim); }

/* 汉诺塔 */
.pz-hanoi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 520px; margin: 0 auto; }
.pz-tower {
  border: 1px dashed var(--line); background: var(--panel2); border-radius: 12px; padding: 6px 4px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-height: 180px; gap: 2px;
}
.pz-tower.selected { border-color: var(--brand); background: rgba(14,165,233,.10); }
.pz-tower-stack { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; width: 100%; flex: 1; justify-content: flex-start; }
.pz-disc { height: 20px; border-radius: 6px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.pz-disc.ghost { background: transparent; }
.pz-tower-base { width: 92%; height: 8px; border-radius: 4px; background: var(--brand2); opacity: .7; }
.pz-tower small { color: var(--dim); font-size: 11px; margin-top: 5px; }

/* 幻方 */
.pz-magic { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; justify-content: center; }
.pz-magic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: min(100%, 230px); }
.pz-magic-sums { flex: 1 1 220px; font-size: 12px; color: var(--dim); }
.pz-magic-sums > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-top: 8px; }
.pz-magic-sums span { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }
.pz-magic-sums span.ok { color: var(--good); border-color: var(--good); }

/* 24 点 / 数字迷宫 / 扫雷 */
.pz-24 { max-width: 620px; margin: 0 auto; }
.pz-24-goal { text-align: center; font-size: 18px; margin-bottom: 12px; }
.pz-24-goal b { color: var(--brand); font-size: 30px; }
.pz-24-nums { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pz-chip {
  min-width: 72px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--text); display: grid; gap: 2px;
}
.pz-chip b { font-size: 22px; }
.pz-chip small { font-size: 10px; color: var(--dim); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-chip.selected { border-color: var(--brand); }
.pz-chip.selected-b { border-color: var(--accent); }
.pz-24-ops { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.pz-path { max-width: 520px; margin: 0 auto; }
.pz-path-head { text-align: center; font-size: 15px; margin-bottom: 10px; }
.pz-path-head b { color: var(--brand); font-size: 20px; }
.pz-path-rules {
  background: var(--panel2); border: 1px dashed var(--line); border-radius: 12px;
  padding: 8px 12px; font-size: 13px; line-height: 1.55; margin-bottom: 10px;
}
.pz-path-rules b { color: var(--brand); }
.pz-path-cell { position: relative; }
.pz-path-cell small { position: absolute; top: 1px; left: 2px; font-size: 9px; font-weight: 800; color: var(--brand); line-height: 1; }
.pz-path-cell.on { background: rgba(14,165,233,.22); border-color: var(--brand); }
.pz-path-cell.here { background: var(--brand); color: #fff; }
.pz-path-cell.here small { color: #fff; }
.pz-path-cell.can { box-shadow: inset 0 0 0 3px var(--accent); }
.pz-path-cell.end { outline: 2px dashed var(--good); outline-offset: -3px; }
.pz-mines { max-width: 460px; margin: 0 auto; }
.pz-mine-cell.opened { background: var(--panel); color: var(--text); }
.pz-mine-cell.flagged { background: rgba(247,201,72,.20); }
.pz-mine-cell.boom { background: rgba(225,29,72,.24); color: var(--bad); }

/* 棋盘通用 */
.pz-board {
  display: grid; grid-template-columns: repeat(var(--pz-cols), minmax(0, 1fr));
  gap: 1px; width: min(100%, 520px); margin: 12px auto 0;
  background: var(--line); border: 2px solid var(--line); border-radius: 8px; overflow: hidden;
}
.pz-bcell {
  aspect-ratio: 1 / 1; min-width: 0; border: 0; border-radius: 0; background: var(--panel2);
  color: var(--text); font-size: clamp(11px, 3vw, 22px); font-weight: 900; padding: 0;
  display: grid; place-items: center; line-height: 1;
}
.pz-bcell:hover { background: rgba(14,165,233,.14); }
.pz-bcell.p1 { color: #1b2838; }
.pz-bcell.p2 { color: #e8f2ff; }
html[data-theme="dark"] .pz-bcell.p1 { color: #dbeafe; }
html[data-theme="dark"] .pz-bcell.p2 { color: #1b2838; }
.pz-bcell.p1::before { content: ''; }
.pz-board-ttt .pz-bcell { font-size: clamp(26px, 9vw, 48px); }
.pz-board-go, .pz-board-gomoku {
  gap: 0; background: #e4c27a; border: 10px solid #a87432; border-radius: 4px;
}
html[data-theme="dark"] .pz-board-go, html[data-theme="dark"] .pz-board-gomoku {
  background: #c9a15a; border-color: #8a5e28;
}
.pz-board-go .pz-bcell, .pz-board-gomoku .pz-bcell {
  position: relative; background-color: transparent; color: transparent;
  background-image: linear-gradient(#5c3b16, #5c3b16), linear-gradient(#5c3b16, #5c3b16);
  background-repeat: no-repeat;
  background-size: 1.5px 100%, 100% 1.5px;
  background-position: center, center;
}
.pz-board-go .edge-t, .pz-board-gomoku .edge-t { background-size: 1.5px 50%, 100% 1.5px; background-position: center bottom, center; }
.pz-board-go .edge-b, .pz-board-gomoku .edge-b { background-size: 1.5px 50%, 100% 1.5px; background-position: center top, center; }
.pz-board-go .edge-l, .pz-board-gomoku .edge-l { background-size: 1.5px 100%, 50% 1.5px; background-position: center, left center; }
.pz-board-go .edge-r, .pz-board-gomoku .edge-r { background-size: 1.5px 100%, 50% 1.5px; background-position: center, right center; }
.pz-board-go .edge-t.edge-l, .pz-board-gomoku .edge-t.edge-l { background-size: 1.5px 50%, 50% 1.5px; background-position: center bottom, left center; }
.pz-board-go .edge-t.edge-r, .pz-board-gomoku .edge-t.edge-r { background-size: 1.5px 50%, 50% 1.5px; background-position: center bottom, right center; }
.pz-board-go .edge-b.edge-l, .pz-board-gomoku .edge-b.edge-l { background-size: 1.5px 50%, 50% 1.5px; background-position: center top, left center; }
.pz-board-go .edge-b.edge-r, .pz-board-gomoku .edge-b.edge-r { background-size: 1.5px 50%, 50% 1.5px; background-position: center top, right center; }
.pz-board-go .pz-bcell.p1, .pz-board-gomoku .pz-bcell.p1,
.pz-board-go .pz-bcell.p2, .pz-board-gomoku .pz-bcell.p2 { color: transparent; }
.pz-board-go .p1::after, .pz-board-gomoku .p1::after,
.pz-board-go .p2::after, .pz-board-gomoku .p2::after {
  content: ''; position: absolute; z-index: 1; width: 74%; height: 74%; border-radius: 50%;
}
.pz-board-go .p1::after, .pz-board-gomoku .p1::after {
  background: radial-gradient(circle at 35% 32%, #6b7280, #111827 68%);
  box-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.pz-board-go .p2::after, .pz-board-gomoku .p2::after {
  background: radial-gradient(circle at 35% 32%, #ffffff, #d5dbe3 72%);
  box-shadow: 0 0 0 2px #1f2937, 0 1px 2px rgba(0,0,0,.35);
}
.pz-board-go .pz-bcell:hover, .pz-board-gomoku .pz-bcell:hover { background-color: rgba(255,255,255,.22); }
.pz-go-cell.star::before {
  content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #5c3b16; z-index: 0;
}
.pz-go-cell.last, .pz-gomoku-cell.last { outline: 2px solid #e11d48; outline-offset: -3px; }
.pz-board-reversi .pz-bcell { background: #16834a; }
html[data-theme="dark"] .pz-board-reversi .pz-bcell { background: #0f6b3b; }
.pz-board-reversi .pz-bcell.can { box-shadow: inset 0 0 0 3px rgba(247,201,72,.65); }
.pz-reversi-cell.p1, .pz-reversi-cell.p2 { text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.pz-board-c4 .pz-bcell { background: var(--panel); border-radius: 50%; box-shadow: inset 0 0 0 6px var(--panel2); }
.pz-c4-cell.p1 { box-shadow: inset 0 0 0 6px #e11d48; }
.pz-c4-cell.p2 { box-shadow: inset 0 0 0 6px #f7c948; }
.pz-c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; width: min(100%, 490px); margin: 0 auto; }
/* LYSVAL注释（R10）：井字棋包装层补 width:100%。父级 .puzzle-layer .pz-stage 是 flex，
   缺这条会让 .pz-ttt 收缩成内容宽度、里面 .pz-board 的 min(100%,520px) 跟着塌成几十像素。 */
.pz-ttt { width: 100%; }
.pz-c4-drop { border: 1px solid var(--line); background: var(--panel2); color: var(--dim); border-radius: 6px; font-size: 12px; padding: 3px 0; }
.pz-c4-drop:hover { color: var(--brand); border-color: var(--brand); }
.pz-gomoku-cell.last { outline: 2px solid var(--accent); outline-offset: -2px; }
.pz-gomoku-cell { font-size: clamp(10px, 2.6vw, 20px); }
.pz-score { text-align: center; font-size: 14px; color: var(--dim); }
.pz-score b { color: var(--brand); font-size: 18px; }
/* LYSVAL注释：围棋实时「围空+子」目数条，和上一行提子数区分开，让孩子随时看懂怎么算分 */
.pz-go-livescore { margin-top: 4px; font-size: 13px; color: var(--text); background: var(--panel2); border-radius: 8px; padding: 5px 8px; line-height: 1.5; }
.pz-go-livescore b { font-size: 16px; }

/* 益智复盘 */
.pz-review { max-width: 900px; margin: 0 auto; }
.pz-review-hero { text-align: center; padding: 12px 0 4px; }
.pz-review-hero h2 { margin: 0 0 6px; font-size: 26px; }
.pz-review-hero p { color: var(--dim); margin: 0; font-size: 13px; }
.pz-review-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.pz-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pz-review-grid .rv-card { min-width: 0; }

/* 年级进度 */
.pg-list { display: grid; gap: 8px; }
.pg-row {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center;
}
.pg-main { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.pg-no { font-size: 11px; color: var(--dim); white-space: nowrap; }
.pg-title { font-weight: 800; font-size: 14px; }
.pg-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.pg-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); color: var(--dim); }
.pg-badge.yes { color: var(--good); border-color: var(--good); background: rgba(22,163,74,.10); }
.pg-badge.no { color: var(--dim); }
.pg-badge.warn { color: var(--bad); border-color: var(--bad); background: rgba(225,29,72,.09); }
.pg-best { font-size: 11px; color: var(--dim); white-space: nowrap; }
.pg-best b { color: var(--brand); }
.pg-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.pg-actions .btn { padding: 4px 9px; font-size: 12px; }
.pg-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--panel2); overflow: hidden; }
.pg-bar > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }

@media (max-width: 900px) {
  .pz-review-grid { grid-template-columns: 1fr; }
  .pz-review-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pz-shell { padding: 10px 6px; }
  .pz-hud { gap: 5px; }
  .pz-hud-item b { font-size: 16px; }
  .pz-hud-item span { font-size: 10px; }
  .pz-tower { min-height: 140px; }
  .pz-disc { height: 16px; font-size: 10px; }
  .pg-row { grid-template-columns: 1fr; }
  .pg-actions { justify-content: flex-start; }
  .pz-pair-grid, .pz-memory { gap: 5px; }
  .pz-key { min-width: 30px; height: 28px; font-size: 13px; padding: 0 4px; }
  .pz-board { width: 100%; }
}

/* ==================== 🔬 科学实验 · 通用 5 屏 ==================== */
.sl-wrap { max-width: 860px; margin: 0 auto; }
.sl-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.sl-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; background: var(--panel2); border: 1px solid var(--line); color: var(--dim); }
.sl-dot.past { background: var(--panel2); border-color: var(--brand); color: var(--brand); }
.sl-dot.now { background: var(--grad); color: var(--on-grad); border-color: transparent; box-shadow: var(--shadow2); }
.sl-progress-label { font-size: 12px; color: var(--brand); font-weight: 800; }
.sl-h { font-size: 17px; margin: 4px 0 10px; }
.sl-lead, .sl-hint { font-size: 13px; color: var(--dim); line-height: 1.7; margin: 4px 0 12px; }
.sl-question { font-size: 19px; font-weight: 800; line-height: 1.5; padding: 14px 16px;
  background: var(--panel2); border-left: 4px solid var(--brand); border-radius: 10px; margin-bottom: 14px; }
.sl-block { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.sl-block h4, .sl-ctrl h4 { font-size: 13px; margin: 0 0 10px; color: var(--text); }
.sl-predict { display: grid; gap: 8px; }
.sl-pred { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); color: var(--text);
  font-size: 15px; cursor: pointer; min-height: 50px; }
.sl-pred b { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--brand); color: var(--on-grad); font-size: 13px; }
.sl-pred:hover:not(:disabled) { border-color: var(--brand); }
.sl-pred.picked { border-color: var(--brand); background: var(--panel); box-shadow: var(--shadow2); }
.sl-pred:disabled { opacity: .72; cursor: default; }
.sl-locked { font-size: 12px; color: var(--brand); margin: 10px 0 0; }
.sl-parts { display: flex; flex-wrap: wrap; gap: 8px; }
.sl-part { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  background: var(--panel2); border: 1px solid var(--line); font-size: 12px; }
.sl-part b { font-size: 16px; }
.sl-var { font-size: 13px; background: var(--panel2); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.sl-var b { color: var(--brand); }
.sl-safety { font-size: 12px; color: var(--bad); background: rgba(225,29,72,.08);
  border: 1px dashed var(--bad); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.sl-demo { font-size: 12px; color: var(--dim); background: var(--panel2); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.sl-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }
.sl-steps { display: grid; gap: 8px; }
.sl-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.sl-step.done { border-color: var(--brand); background: var(--panel2); }
.sl-step-n { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel2); border: 1px solid var(--line); font-size: 12px; font-weight: 800; }
.sl-step.done .sl-step-n { background: var(--brand); color: var(--on-grad); border-color: transparent; }
.sl-step-c { flex: 1; min-width: 0; }
.sl-step-c b { display: block; font-size: 14px; }
.sl-step-c small { display: block; font-size: 11px; color: var(--dim); margin-top: 2px; }
.sl-ctrlbox { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 12px 0; }
.sl-ctrl { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.sl-wires, .sl-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.sl-btn, .sl-wire { border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  border-radius: 9px; padding: 8px 10px; font-size: 12px; cursor: pointer; text-align: left; }
.sl-btn.on, .sl-wire.on { border-color: var(--brand); background: var(--brand); color: var(--on-grad); }
.sl-ctrl input[type="range"] { width: 100%; accent-color: var(--brand); }
.sl-status { font-size: 13px; font-weight: 700; color: var(--brand); background: var(--panel2);
  border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.sl-scene { cursor: pointer; border-radius: 12px; overflow: hidden; }
.sl-svg { display: block; width: 100%; height: auto; max-height: 260px; }
.sl-phenomenon { font-size: 15px; font-weight: 800; text-align: center; padding: 10px; color: var(--brand); }
.sl-sim-actions { justify-content: flex-start; }
.sl-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sl-table th, .sl-table td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; }
.sl-table th { color: var(--dim); font-weight: 700; }
.sl-empty { font-size: 12px; color: var(--dim); }
.sl-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.sl-card h4 { font-size: 13px; margin: 0 0 6px; color: var(--brand); }
.sl-card p { font-size: 13px; line-height: 1.7; margin: 0 0 10px; }
.sl-verdict { font-weight: 800; color: var(--brand); }
.sl-demonote { font-size: 11px; color: var(--dim); }
.sl-flow { animation: slDash 1s linear infinite; }
@keyframes slDash { to { stroke-dashoffset: -24; } }
.sl-pulse { animation: slPulse 1.4s ease-in-out infinite; }
@keyframes slPulse { 0%,100% { opacity: .18; } 50% { opacity: .38; } }
.sl-wave { animation: slWave 1.6s ease-in-out infinite; }
@keyframes slWave { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.sl-bob { animation: slBob 2s ease-in-out infinite; }
@keyframes slBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.sl-rise { transition: y .3s ease, height .3s ease; }
.sl-car { animation: slCar 2.4s ease-in-out infinite; }
@keyframes slCar { 0%,100% { transform: translateX(0); } 50% { transform: translateX(18px); } }
@media (max-width: 640px) {
  .sl-ctrlbox, .sl-review-grid { grid-template-columns: 1fr; }
  .sl-question { font-size: 16px; }
  .sl-step { flex-wrap: wrap; }
  .sl-step .btn { width: 100%; }
  .sl-actions .btn { flex: 1 1 auto; }
  .sl-svg { max-height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .sl-flow, .sl-pulse, .sl-wave, .sl-bob, .sl-car { animation: none; }
}

/* ==========================================================================
   20261112_1909 · 可拖舞台（6V 电路实验台 + 全站可拖实物场景）
   沿用参考 wirelab 的画布结构，Pointer Events 支持鼠标 / 手指 / 触控笔。
   ========================================================================== */
/* 20261112_2009 · 实验台在弹层里贯穿到底：三栏等高、画布占满剩余高度。
   与 app.js 给 .flow 加的 flow-playstage 类配合，.flow-body 不再整体滚动。 */
.ps-host { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ps-host-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel2); margin-bottom: 8px; }
.ps-host-hint { font-weight: 700; font-size: 14px; }
.ps-host-tag { font-size: 12px; color: var(--dim); white-space: nowrap; }
.ps-host-stage { flex: 1; min-height: 0; display: flex; }
.ps-host-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.ps-host-obs { font-size: 12px; color: var(--dim); }
.ps-host-foot [data-ps-done].ready { animation: psReady 1.2s ease-in-out infinite; }
@keyframes psReady { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.4); } 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }

.ps-bench, .ps-scene { flex: 1; min-height: 0; height: 100%; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  box-shadow: var(--shadow2); overflow: hidden; }
.ps-top, .ps-scene-top { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel2); }
.ps-chips, .ps-actions, .ps-scene-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ps-chip { border: 1px solid var(--line); background: var(--panel); color: var(--dim); cursor: pointer;
  border-radius: 999px; padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.ps-chip:hover { border-color: var(--brand); }
.ps-chip.active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 700; }
.ps-btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer;
  border-radius: 10px; padding: 6px 11px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ps-btn:hover { border-color: var(--brand); }
.ps-btn.primary { background: var(--grad); color: #fff; border-color: transparent; }
.ps-btn.primary.on { background: linear-gradient(120deg,#e11d48,#f97316); }
.ps-btn.big { font-size: 15px; padding: 10px 14px; width: 100%; }
.ps-import { position: relative; overflow: hidden; display: inline-flex; align-items: center; }
.ps-import input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; opacity: 0.02; cursor: pointer; font-size: 16px; }
.ps-hint { padding: 8px 12px; font-size: 13px; color: var(--dim); border-bottom: 1px solid var(--line); }
.ps-scene-hint { font-size: 13px; font-weight: 700; }

.ps-body { flex: 1; min-height: 0; height: auto; display: grid;
  grid-template-columns: 168px minmax(0,1fr) 216px; grid-template-rows: minmax(0,1fr); gap: 0; }
.ps-toolbox, .ps-side { padding: 10px; background: var(--panel2); overflow-y: auto; min-height: 0; }
.ps-toolbox { border-right: 1px solid var(--line); }
.ps-side { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.ps-box-title { font-size: 12px; font-weight: 800; color: var(--dim); margin-bottom: 8px; }
.ps-tools { display: grid; grid-template-columns: 1fr; gap: 6px; }
.ps-tool { position: relative; display: flex; align-items: center; gap: 6px; text-align: left;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 10px;
  padding: 6px 7px; cursor: grab; touch-action: none; user-select: none; }
.ps-tool:hover { border-color: var(--brand); transform: translateY(-1px); }
.ps-no { font-size: 9px; color: var(--dim); font-weight: 800; min-width: 30px; }
.ps-ico { font-size: 19px; line-height: 1; }
.ps-nm { font-size: 11px; font-weight: 700; }
.ps-ghost { position: fixed; z-index: 9999; pointer-events: none; background: var(--panel);
  border: 1px solid var(--brand); border-radius: 10px; padding: 5px 9px; font-size: 12px;
  font-weight: 700; box-shadow: var(--shadow); }

.ps-canvas-view { position: relative; min-width: 0; min-height: 0; height: 100%;
  overflow-x: hidden; overflow-y: scroll; scrollbar-gutter: stable; align-self: stretch; }
.ps-bench .ps-canvas-view > .ps-canvas { width: 100%; height: auto; min-height: 200%; }
.ps-canvas-view.is-locked > .ps-canvas { touch-action: pan-y; }
.ps-canvas-view.is-unlocked > .ps-canvas { cursor: grab; touch-action: none; }
.ps-canvas-view.is-panning > .ps-canvas { cursor: grabbing; }
.ps-btn.is-pan { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(14,165,233,.28); }
.ps-canvas, .ps-scene-canvas { position: relative; width: 100%; height: 100%; min-height: 0;
  overflow: hidden; background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px, var(--panel);
  touch-action: none; user-select: none; }
/* 导线在元件之上、端子在最上层；导线走正交折线落在卡片下方，不再被卡片盖住 */
.ps-wires, .ps-scene-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ps-wires { z-index: 3; pointer-events: none; }
.ps-scene-svg { z-index: 0; pointer-events: none; }
.ps-comps, .ps-objs { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.ps-comp, .ps-obj { pointer-events: auto; }
.ps-term-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.ps-empty { position: absolute; left: 50%; top: 120px; transform: translateX(-50%);
  font-size: 14px; color: var(--dim); pointer-events: none; z-index: 1; }
.ps-wire { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: .95; }
.ps-wire.p-plus { stroke: var(--pol-plus); }
.ps-wire.p-minus { stroke: var(--pol-minus); }
.ps-wire.p-com { stroke: var(--pol-com); }
.ps-wire.p-a { stroke: var(--pol-a); }
.ps-wire.p-b { stroke: var(--pol-b); }
.ps-wire.p-c { stroke: var(--pol-c); }
/* LYSVAL注释：psFlow 的 stroke-dashoffset 0 → -22，虚线沿导线 path 起点→终点移动；
   .rev 用 psFlowRev（+22）表示电流与 path 绘制方向相反，用在回流到负极的导线上。
   禁止对调这两个符号，否则正极会变成向内、负极向外。方向只能由 res.wireDir 决定。 */
.ps-wire.live { stroke-width: 6; stroke-dasharray: 12 10;
  animation: psFlow .7s linear infinite; filter: brightness(1.15) drop-shadow(0 0 4px currentColor); }
/* LYSVAL注释：.rev 只翻转动画方向，不改导线 d / 命中区 / 接线表 / 导出图片。 */
.ps-wire.live.rev { animation-name: psFlowRev; }
.ps-wire.focus { stroke-width: 8; filter: brightness(1.35); }
@keyframes psFlow { to { stroke-dashoffset: -22; } }
@keyframes psFlowRev { to { stroke-dashoffset: 22; } }
/* LYSVAL注释：静态方向箭头，与导出图片里的箭头共用 wireArrowGeom 的坐标。
   没有它，导出的 PNG 和关闭动画时都看不出 + 出 − 入；箭头不带 .ps-wire 类，
   否则会被 posterBox / exportPoster 当成导线重复绘制。 */
.ps-flow-arrow { fill: none; stroke-width: 2.6; stroke-linecap: round;
  stroke-linejoin: round; opacity: .95; pointer-events: none; }
.ps-flow-arrow.p-plus { stroke: var(--pol-plus); }
.ps-flow-arrow.p-minus { stroke: var(--pol-minus); }
.ps-flow-arrow.p-com { stroke: var(--pol-com); }
.ps-flow-arrow.p-a { stroke: var(--pol-a); }
.ps-flow-arrow.p-b { stroke: var(--pol-b); }
.ps-flow-arrow.p-c { stroke: var(--pol-c); }
.ps-wire.temp { stroke: var(--brand); stroke-width: 3; stroke-dasharray: 6 5; }
.ps-wire-hit { fill: none; stroke: transparent; stroke-width: 18; cursor: pointer; pointer-events: stroke; }

.ps-comp { position: absolute; width: 112px; height: 76px; padding: 4px 6px 3px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  box-shadow: var(--shadow2); cursor: grab; touch-action: none; user-select: none; text-align: center; }
.ps-comp.dragging { cursor: grabbing; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,165,233,.2); }
.ps-comp-id { position: absolute; top: -8px; left: 5px; font-size: 9px; font-weight: 800;
  color: var(--dim); background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; }
.ps-comp-ico { display: block; font-size: 22px; line-height: 1.1; }
.ps-comp-nm { display: block; font-size: 10px; font-weight: 700; color: var(--dim); }
/* 端子：卡片下沿之外的圆形接线柱，按极性分色，带端口名与短接线柱 */
.ps-term { position: absolute; width: 24px; height: 24px; padding: 0; border-radius: 50%;
  border: 2px solid currentColor; background: var(--panel); cursor: crosshair;
  touch-action: none; pointer-events: auto; display: grid; place-items: center;
  box-shadow: 0 2px 6px var(--shadow2); }
.ps-term::before { content: ''; position: absolute; left: 9px; top: -9px; width: 3px; height: 9px;
  border-radius: 2px; background: currentColor; }
.ps-term-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ps-term-tx { position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 800; white-space: nowrap; }
.ps-term.p-plus { color: var(--pol-plus); }
.ps-term.p-minus { color: var(--pol-minus); }
.ps-term.p-com { color: var(--pol-com); }
.ps-term.p-a { color: var(--pol-a); }
.ps-term.p-b { color: var(--pol-b); }
.ps-term.p-c { color: var(--pol-c); }
.ps-term:hover, .ps-term.focus { background: currentColor; box-shadow: 0 0 0 4px rgba(14,165,233,.18); }
.ps-term:hover .ps-term-dot, .ps-term.focus .ps-term-dot { background: var(--panel); }
.ps-term:hover .ps-term-tx, .ps-term.focus .ps-term-tx { color: var(--text); }
/* 接线表 */
.ps-wire-title { margin-top: 10px; }
.ps-wire-list { display: flex; flex-direction: column; gap: 4px; max-height: 210px; overflow-y: auto; }
.ps-wire-empty { font-size: 11px; color: var(--dim); line-height: 1.5; }
.ps-wire-row { display: flex; align-items: center; gap: 4px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 8px; padding: 4px 5px; font-size: 10px; cursor: pointer; }
.ps-wire-row:hover { border-color: var(--brand); }
.ps-wire-row b { font-size: 10px; min-width: 22px; color: var(--brand); }
.ps-wire-end { font-weight: 800; white-space: nowrap; }
.ps-wire-end.p-plus { color: var(--pol-plus); }
.ps-wire-end.p-minus { color: var(--pol-minus); }
.ps-wire-end.p-com { color: var(--pol-com); }
.ps-wire-end.p-a { color: var(--pol-a); }
.ps-wire-end.p-b { color: var(--pol-b); }
.ps-wire-end.p-c { color: var(--pol-c); }
.ps-wire-arrow { color: var(--dim); }
.ps-wire-row i { margin-left: auto; font-style: normal; color: var(--bad); font-weight: 900; }
.ps-act { display: inline-block; margin-top: 3px; padding: 1px 5px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  font-size: 9px; font-weight: 800; cursor: pointer; }
.ps-act.warn { border-color: var(--bad); color: var(--bad); }
.ps-x { position: absolute; right: -6px; top: -8px; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--dim); font-size: 11px;
  line-height: 14px; cursor: pointer; padding: 0; }
.ps-glow { position: absolute; inset: -14px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(251,191,36,.75), transparent 68%); transition: opacity .2s; }
.ps-comp.is-lit .ps-glow { opacity: var(--ps-bright, .85); animation: psGlow 1.4s ease-in-out infinite; }
@keyframes psGlow { 0%,100% { opacity: calc(var(--ps-bright, .85) * .55); } 50% { opacity: var(--ps-bright, 1); } }
.ps-comp.is-lit .ps-comp-ico { filter: drop-shadow(0 0 8px #fbbf24); }
.ps-led.is-lit .ps-glow { background: radial-gradient(circle, rgba(74,222,128,.92), transparent 68%); }
.ps-led.is-lit .ps-comp-ico { filter: drop-shadow(0 0 14px #4ade80); }
.ps-comp.is-live { box-shadow: 0 0 0 2px #34d399; }
.ps-blades { position: absolute; right: 6px; top: 4px; font-size: 16px; color: var(--brand); }
.ps-comp.is-spin .ps-blades { animation: psSpin .45s linear infinite; }
@keyframes psSpin { to { transform: rotate(360deg); } }
.ps-screen { position: absolute; right: 7px; top: 8px; width: 22px; height: 16px; border-radius: 3px;
  background: var(--line); }
.ps-comp.is-tv .ps-screen { background: linear-gradient(120deg,#38bdf8,#a78bfa); box-shadow: 0 0 8px #38bdf8; }
.ps-comp.is-hot .ps-comp-ico { filter: drop-shadow(0 0 8px #ef4444); }
.ps-fuse-tube { display: block; position: relative; width: 64px; height: 12px; margin: 2px auto 0;
  border: 1px solid var(--line); border-radius: 6px; background: rgba(148,163,184,.18); }
.ps-filament { position: absolute; left: 5px; right: 5px; top: 4px; height: 3px; border-radius: 2px;
  background: #94a3b8; transition: background .2s; }
.ps-smoke { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); font-size: 16px;
  opacity: 0; pointer-events: none; }
.ps-comp.is-burning .ps-filament { background: #ef4444; box-shadow: 0 0 10px #ef4444;
  animation: psBurn .22s ease-in-out infinite; }
.ps-comp.is-burning .ps-smoke { opacity: 1; animation: psSmoke .9s ease-out infinite; }
@keyframes psBurn { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes psSmoke { 0% { transform: translate(-50%,4px) scale(.6); opacity: 0; }
  40% { opacity: 1; } 100% { transform: translate(-50%,-16px) scale(1.3); opacity: 0; } }
.ps-relay, .ps-delay { width: 176px; height: 108px; }
.ps-delay-read { display: block; font-size: 10px; font-weight: 800; color: var(--brand); }
.ps-buzzer.is-buzz { z-index: 4; outline: 3px solid #facc15;
  background: color-mix(in srgb, #fde047 30%, var(--panel));
  box-shadow: 0 0 0 8px rgba(250,204,21,.5), 0 0 36px 10px #facc15; }
.ps-buzzer.is-buzz .ps-comp-ico { font-size: 36px; filter: drop-shadow(0 0 12px #fde047);
  animation: psBuzz .1s linear infinite; }
@keyframes psBuzz {
  0% { transform: translate(0,0) scale(1); }
  25% { transform: translate(-5px,2px) scale(1.18); }
  50% { transform: translate(5px,-2px) scale(1.06); }
  75% { transform: translate(-3px,-3px) scale(1.22); }
}
.ps-waves { position: absolute; left: 50%; top: 22px; width: 0; height: 0; pointer-events: none; }
.ps-waves i { position: absolute; left: 0; top: 0; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border: 3px solid #facc15; border-radius: 50%; opacity: 0; }
.ps-buzzer.is-buzz .ps-waves i { animation: psWave 1s ease-out infinite; }
.ps-buzzer.is-buzz .ps-waves i:nth-child(2) { animation-delay: .28s; }
.ps-buzzer.is-buzz .ps-waves i:nth-child(3) { animation-delay: .56s; }
@keyframes psWave { 0% { transform: scale(.35); opacity: .95; } 100% { transform: scale(4.8); opacity: 0; } }
.ps-buzzer.is-buzz .ps-buzz-glow { opacity: 1;
  background: radial-gradient(circle, rgba(253,224,71,.95), transparent 62%);
  animation: psGlow .35s ease-in-out infinite; }
.ps-buzz-tag { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px;
  background: #fde047; color: #713f12; font-size: 12px; font-weight: 900; box-shadow: 0 0 12px #facc15; }
.ps-comp.is-pulled, .ps-comp.is-fired { box-shadow: 0 0 0 2px #e879f9; }
.ps-comp.is-burning { animation: psShake .18s linear infinite; }
@keyframes psShake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.ps-crack { position: absolute; left: 18px; right: 18px; top: 28px; height: 2px; background: #ef4444;
  transform: rotate(-18deg); box-shadow: 0 0 8px #ef4444; }
.ps-comp.is-blown { outline: 2px solid var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel)); }
.ps-comp.is-blown .ps-filament { background: transparent; box-shadow: none; }
.ps-comp.is-blown .ps-filament::before,
.ps-comp.is-blown .ps-filament::after { content: ''; position: absolute; top: 0; width: 22px; height: 3px;
  border-radius: 2px; background: #1e293b; }
.ps-comp.is-blown .ps-filament::before { left: 0; transform: rotate(16deg); transform-origin: left center; }
.ps-comp.is-blown .ps-filament::after { right: 0; transform: rotate(-16deg); transform-origin: right center; }
.ps-blown-tag { display: block; font-size: 9px; font-weight: 800; color: var(--bad); }

.ps-status, .ps-readout { font-size: 12px; line-height: 1.6; padding: 8px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); margin-bottom: 8px; }
.ps-status b, .ps-readout b { display: block; color: var(--text); }
.ps-status span, .ps-readout span { display: block; color: var(--dim); font-size: 11px; margin-top: 4px; }
.ps-meter { position: relative; font-size: 11px; color: var(--dim); padding: 6px 8px 14px;
  border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.ps-meter b { color: var(--brand); }
.ps-meter i { position: absolute; left: 8px; bottom: 6px; height: 5px; width: 0; max-width: calc(100% - 16px);
  border-radius: 3px; background: var(--grad); transition: width .18s ease; }
.ps-log { margin-top: 8px; font-size: 10px; color: var(--dim); }
.ps-log-line { padding: 3px 6px; border-bottom: 1px dashed var(--line); }

.ps-scene-body { flex: 1; min-height: 0; height: auto; display: grid;
  grid-template-columns: minmax(0,1fr) 200px; grid-template-rows: minmax(0,1fr); }
.ps-scene-side { padding: 10px; border-left: 1px solid var(--line);
  background: var(--panel2); overflow-y: auto; min-height: 0; }
.ps-target { font-size: 11px; color: var(--dim); margin: 8px 0; }
.ps-samples { font-size: 10px; color: var(--dim); margin-top: 8px; }
.ps-obj { position: absolute; transform: translate(-50%,-50%); display: flex; flex-direction: column;
  align-items: center; gap: 1px; min-width: 62px; padding: 5px 7px; border-radius: 12px;
  border: 2px solid var(--brand); background: var(--panel); box-shadow: var(--shadow2);
  cursor: grab; touch-action: none; user-select: none; text-align: center; z-index: 2; }
.ps-obj.dragging { cursor: grabbing; border-color: var(--bad); box-shadow: 0 0 0 4px rgba(225,29,72,.18); z-index: 6; }
.ps-obj-ico { font-size: 22px; line-height: 1.1; font-weight: 800; }
.ps-obj-nm { font-size: 10px; font-weight: 700; color: var(--dim); white-space: nowrap; }

.tc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tc-actions .btn { flex: 1 1 auto; }
.play-card { border-color: rgba(14,165,233,.35); }

@media (max-width: 900px) {
  .ps-body { grid-template-columns: 150px minmax(0,1fr); grid-template-rows: minmax(0,1fr) auto; }
  .ps-side { grid-column: 1 / -1; grid-row: 2; max-height: 200px;
    border-left: 0; border-top: 1px solid var(--line); }
  .ps-scene-body { grid-template-columns: minmax(0,1fr) 170px; }
}
@media (max-width: 640px) {
  /* 20261112_2009：窄屏也保持「画布贯穿到底」，不再用 max-height 把主区压成小面板。
     三栏改成上工具箱 / 中画布(1fr) / 下现象与接线表，画布吃掉全部剩余高度。 */
  .ps-body { display: grid; grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto; }
  .ps-scene-body { display: grid; grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto; }
  .ps-toolbox { border-right: 0; border-bottom: 1px solid var(--line); }
  .ps-tools { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .ps-tool { flex: 0 0 auto; width: 104px; }
  .ps-side, .ps-scene-side { border-left: 0; border-top: 1px solid var(--line); }
  .ps-side { max-height: 190px; }
  .ps-wire-list { max-height: 90px; }
  .ps-canvas-view { min-height: 220px; height: 100%; }
  .ps-scene-canvas { min-height: 220px; height: 100%; }
  .ps-bench .ps-canvas-view > .ps-canvas { min-height: 200%; height: auto; }
  .ps-top, .ps-scene-top { flex-wrap: wrap; }
  .ps-actions, .ps-scene-actions { flex-wrap: wrap; }
  .ps-chips { flex: 1 1 100%; }
  .ps-comp { width: 96px; }
  .ps-term { width: 21px; height: 21px; }
  .ps-obj { min-width: 52px; padding: 4px 5px; }
  .ps-obj-ico { font-size: 18px; }
  .ps-story-row { gap: 3px; }
  .ps-story-cell { min-width: 0; padding: 3px 4px; }
  .ps-story-tx { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-wire.live, .ps-glow, .ps-comp.is-spin .ps-blades, .ps-comp.is-burning .ps-filament,
  .ps-comp.is-burning .ps-smoke, .ps-host-foot [data-ps-done].ready,
  .ps-buzzer.is-buzz .ps-comp-ico, .ps-buzzer.is-buzz .ps-waves i, .ps-buzzer.is-buzz .ps-buzz-glow { animation: none; }
  .ps-buzzer.is-buzz { box-shadow: 0 0 0 8px rgba(250,204,21,.65), 0 0 28px #facc15; }
  .ps-buzzer.is-buzz .ps-waves i { opacity: .8; transform: scale(2.2); }
}

/* ==========================================================================
   20261112_2009 · P1/P2 修订：弹层贯穿到底 / 4 格故事板 / 全屏实验台 / 下架标记
   ========================================================================== */
/* 动手玩弹层：整页不整体滚动，画布吃掉剩余全部高度，三栏底边齐平 */
.flow.flow-playstage .flow-body { display: flex; flex-direction: column;
  overflow: hidden; padding: 10px 12px; min-height: 0; }
.flow.flow-playstage .flow-body > #puzzleHost { flex: 1; min-height: 0; height: 100%;
  display: flex; flex-direction: column; }
.pz-shell.pz-shell-playstage { display: flex; flex-direction: column;
  width: 100%; max-width: none; height: 100%; min-height: 0; margin: 0; padding: 5px 10px; }
/* 动手玩把计时 HUD 压成一条，隐藏次要信息行，把高度全部让给实验台画布 */
.pz-shell-playstage .pz-hud { display: flex; gap: 6px; flex: 0 0 auto; }
.pz-shell-playstage .pz-hud-item { flex: 1 1 0; display: flex; align-items: baseline;
  justify-content: center; gap: 5px; padding: 3px 5px; border-radius: 9px; }
.pz-shell-playstage .pz-hud-item b { font-size: 14px; }
.pz-shell-playstage .pz-hud-item span { font-size: 10px; }
.pz-shell-playstage .pz-statline,
.pz-shell-playstage .spd-pick,
.pz-shell-playstage .pz-info { display: none; }
.pz-shell-playstage .pz-stage { flex: 1; min-height: 0; height: auto; margin: 6px 0;
  display: flex; flex-direction: column; }
.pz-shell-playstage .pz-stage > .ps-host { flex: 1; min-height: 0; }
.pz-shell-playstage .pz-tools { flex: 0 0 auto; padding: 0; margin-top: 2px; }
.pz-shell-playstage .pz-tools .btn { padding: 3px 9px; font-size: 11px; }
/* 实验台内部：切换条 / 提示 / 安全条都压成一行，避免吃掉画布高度 */
.ps-host-top { padding: 4px 9px; margin-bottom: 6px; flex-wrap: nowrap; gap: 8px; }
.ps-host-hint { font-size: 12px; flex: 1 1 auto; min-width: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ps-host-tag { font-size: 11px; flex: 0 0 auto; }
.ps-host-foot { margin-top: 6px; padding: 4px 9px; }
.ps-host-obs { font-size: 11px; }
.ps-top, .ps-scene-top { padding: 4px 8px; flex-wrap: nowrap; }
.ps-chips { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto;
  scrollbar-width: thin; }
.ps-chips::-webkit-scrollbar { height: 4px; }
.ps-chips::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.ps-actions, .ps-scene-actions { flex: 0 0 auto; }
.ps-chip { padding: 2px 8px; font-size: 11px; }
.ps-btn { padding: 3px 8px; font-size: 11px; }
/* LYSVAL注释：提示行常驻且必须完整可读，不允许被画布高度链压扁或单行截断。
   这一行是关卡任务说明，收进「更多」里孩子就看不到任务了，不要改成默认隐藏。 */
.ps-hint { flex: 0 0 auto; min-height: 24px; padding: 4px 10px;
  font-size: 13px; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; }

/* 4 格小故事：默认折叠只占一行，展开后是一条横排小图，不覆盖画布主区 */
/* 默认折叠：与提示同一行只占一小段，完全不挤占画布主区；展开时才换到第二行 */
.ps-story { flex: 0 1 250px; min-width: 0; max-width: 250px; font-size: 11px; }
.ps-story[open] { flex: 1 1 100%; max-width: none; }
.ps-story > summary { cursor: pointer; list-style: none; color: var(--brand);
  font-weight: 700; padding: 1px 4px; border-radius: 8px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ps-story > summary::-webkit-details-marker { display: none; }
.ps-story > summary::before { content: '▸ '; }
.ps-story[open] > summary::before { content: '▾ '; }
.ps-story > summary:hover { background: var(--panel2); }
.ps-story-row { display: flex; align-items: stretch; gap: 6px; padding: 5px 0 1px; }
.ps-story-cell { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); padding: 4px 7px; }
.ps-story-n { font-size: 9px; font-weight: 900; color: var(--dim); }
.ps-story-ico { font-size: 17px; line-height: 1; }
.ps-story-tx { font-size: 11px; font-weight: 700; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; }
.ps-story-arrow { align-self: center; color: var(--dim); font-size: 12px; }

/* 全屏实验台：不依赖 Fullscreen API，只放大本卡，避免权限 / iframe 限制 */
.pz-shell.ps-fullscreen { position: fixed; inset: 0; z-index: 95; max-width: none;
  width: 100vw; height: 100vh; padding: 10px 14px; background: var(--bg);
  border-radius: 0; box-shadow: none; }
.pz-shell.ps-fullscreen .pz-hud, .pz-shell.ps-fullscreen .pz-statline,
.pz-shell.ps-fullscreen .spd-pick, .pz-shell.ps-fullscreen .pz-info,
.pz-shell.ps-fullscreen .pz-tools { display: none; }
.pz-shell.ps-fullscreen .pz-stage { margin: 0; }

/* 下架专题的「后面补」标记：不伪装成可点按钮 */
.tc-soon, .pg-soon { display: inline-flex; align-items: center; font-size: 11px;
  color: var(--dim); border: 1px dashed var(--line); border-radius: 999px;
  padding: 3px 9px; white-space: nowrap; }
.pg-soon { margin: 0 2px; }

/* ============================================================
   20261114 · 全局「沉浸」模式：进入后只留游戏 / 实验本身，隐藏站点 chrome 与
   游戏内装饰条，给低分辨率设备最大空间。由 app.js 切换 body.immersive，所有游戏通用。
   ============================================================ */
/* 选中导线：加粗 + 发光，和悬停高亮区分开（selection 不会被鼠标移出清除） */
.ps-wire.selected { stroke-width: 8; filter: drop-shadow(0 0 5px currentColor) brightness(1.22); }
/* 「删除导线」模式激活：按钮变红，提醒孩子现在点导线会删 */
.ps-btn.ps-wmode.on { background: color-mix(in srgb, var(--bad) 20%, var(--panel2));
  color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); font-weight: 800; }

/* 站点级 chrome：沉浸时整页不再显示（游戏弹层本就覆盖它们，这里确保低端机/穿透也干净） */
body.immersive .topbar,
body.immersive .hud-bar,
body.immersive .site-foot { display: none !important; }

/* 游戏弹层顶栏：只留「退出 / 沉浸」按钮，标题与步骤条收起，不占高度 */
body.immersive .flow .flow-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  background: transparent; border: 0; padding: 6px 8px;
  justify-content: flex-end; gap: 6px; pointer-events: none;
}
body.immersive .flow .flow-bar > * { pointer-events: auto; }
body.immersive .flow .flow-title,
body.immersive .flow .flow-steps,
body.immersive .flow .pz-more { display: none !important; }

/* 电路实验台：隐藏装饰条（提示+故事、右侧“看到的现象”），画布撑满宽度与更多高度 */
body.immersive .flow.flow-playstage .ps-host-top { display: none !important; }
body.immersive .flow.flow-playstage .ps-side { display: none !important; }
/* LYSVAL注释（R11）：沉浸时 .flow-bar 变 absolute 浮在右上角（「退出沉浸/退出」），
   会盖住实验台工具栏 .ps-top 最右的按钮。给 flow-body 顶部让出浮层高度，避免撞字。 */
body.immersive .flow.flow-playstage .flow-body { padding-top: 48px; }
body.immersive .flow.flow-playstage .pz-shell-playstage { padding-top: 0; }

@media (max-width: 640px) {
  .flow.flow-playstage .flow-body { padding: 6px; }
  .pz-shell.pz-shell-playstage { padding: 4px 6px; }
  .ps-story-row { flex-wrap: wrap; }
  .ps-story-cell { flex: 1 1 40%; }
  .ps-story-arrow { display: none; }
}

/* 20261113：窄屏压顶栏，把高度还给华容道/数独/路径/扫雷棋盘 */
@media (max-width: 700px) {
  .puzzle-layer .flow-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    padding: 8px 10px;
    align-items: center;
  }
  .puzzle-layer .flow-title { min-width: 0; font-size: 14px; }
  .puzzle-layer .flow-steps {
    grid-column: 1 / -1;
    flex: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .puzzle-layer .flow-exit { margin-left: 0; height: 32px; }
  .puzzle-layer .pz-statline { display: none; }
  .puzzle-layer .pz-info { min-height: 0; margin: 0; }
  .puzzle-layer .pz-hud-item { padding: 6px 4px; }
  .puzzle-layer .pz-hud-item b { font-size: 16px; }
  .puzzle-layer .pz-tools { padding-bottom: 4px; }
  .puzzle-layer .pz-stage > .pz-slide,
  .puzzle-layer .pz-stage > .pz-sudoku,
  .puzzle-layer .pz-stage > .pz-path-grid,
  .puzzle-layer .pz-stage > .pz-mine-grid {
    width: min(100%, calc(100dvh - 220px));
  }
}

/* 20261113_0840：手机顶栏收进菜单；游戏盘面等比完整，计时收进「更多」 */
.pz-mini { display: none; }
.pz-more {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 999px; min-height: 32px; padding: 0 12px; font-weight: 800; font-size: 13px;
}
.flow { overflow-y: auto; }
.flow.flow-playstage { overflow: auto; }
.flow.flow-playstage .flow-body {
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
  height: auto; overflow: visible;
}
.ps-scene .ps-scene-body {
  display: flex; flex-direction: row; align-items: flex-start; justify-content: center;
  width: 100%; height: auto; min-height: 0; min-width: 0;
}
.ps-scene .ps-scene-canvas {
  aspect-ratio: 900 / 480;
  width: min(calc(100% - 252px), calc((100dvh - 210px) * 900 / 480));
  height: auto;
  min-width: 280px;
  max-width: calc(100% - 252px);
  max-height: none;
  flex: 0 0 auto;
  overflow: hidden;
}
.ps-scene .ps-scene-svg { width: 100%; height: 100%; }
.pz-sudoku, .pz-path-grid, .pz-slide, .pz-mine-grid,
.puzzle-layer .pz-stage > .pz-slide,
.puzzle-layer .pz-stage > .pz-sudoku,
.puzzle-layer .pz-stage > .pz-path-grid,
.puzzle-layer .pz-stage > .pz-mine-grid {
  width: min(100%, 640px);
  max-height: none;
  height: auto;
}
.puzzle-layer { overflow-y: auto; }
.puzzle-layer .flow-body,
.puzzle-layer #puzzleHost,
.puzzle-layer .pz-shell {
  height: auto;
  overflow: visible;
  flex: 0 0 auto;
}
.puzzle-layer .pz-stage {
  overflow: visible;
  height: auto;
  min-height: 0;
  flex: none;
  display: flex;
  justify-content: flex-start;
}
.chant-dock {
  position: fixed; left: 10px; bottom: 12px; z-index: 90;
  display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 8px;
}
.chant-toggle {
  border: 0; border-radius: 999px; min-height: 44px; padding: 0 16px;
  background: var(--grad); color: #fff; font-weight: 800; box-shadow: var(--shadow);
}
.chant-panel {
  width: min(92vw, 560px); max-height: min(62vh, 520px); overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 10px 12px;
}
.chant-switch { display: flex; gap: 6px; }
.chant-switch button {
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  border-radius: 999px; min-height: 36px; padding: 0 14px; font-weight: 800;
}
.chant-switch button.on { background: var(--grad); color: #fff; border-color: transparent; }
.chant-tip { margin: 8px 0; font-size: 12px; color: var(--dim); }
.chant-grid { display: flex; gap: 8px; }
.chant-grid.vert { align-items: flex-start; width: max-content; }
.chant-grid.vert .chant-line { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.chant-grid.vert .chant-line span { white-space: nowrap; }
.chant-grid.horiz { flex-direction: column; }
.chant-grid.horiz .chant-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chant-line b { color: var(--brand); font-size: 12px; }
.chant-line span {
  font-size: 15px; font-weight: 700; background: var(--panel2);
  border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; white-space: nowrap;
}
@media (max-width: 760px), (max-height: 520px) and (orientation: landscape) {
  .hero-more { display: inline-flex; margin: 8px 0; }
  .hero-lead, .hero-points, .hero-art { display: none; }
  .hero.hero-open .hero-lead, .hero.hero-open .hero-points { display: block; }
  .hero.hero-open .hero-art { display: block; height: 120px; }
  .flow-bar { flex-wrap: nowrap; gap: 6px; padding: 6px 8px; }
  .flow-title { min-width: 0; flex: 0 1 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .flow-steps { flex: 1 1 auto; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; min-width: 0; }
  .flow-steps button, .flow-steps span { flex: 0 0 auto; }
  .flow-exit { margin-left: 0; }
  .g-scene, .flow-body-game .g-scene {
    height: auto; aspect-ratio: 16 / 10; min-height: 220px; flex: none;
  }
  .flow-body-game { overflow: visible; height: auto; }
  .pz-mini {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-bottom: 6px; font-variant-numeric: tabular-nums;
  }
  .pz-mini b { color: var(--brand); font-size: 16px; }
  .puzzle-layer .pz-shell .pz-hud,
  .puzzle-layer .pz-shell .pz-statline,
  .puzzle-layer .pz-shell .pz-info { display: none; }
  .puzzle-layer .pz-shell.hud-open .pz-hud { display: grid; }
  .puzzle-layer .pz-shell.hud-open .pz-statline { display: flex; }
  .puzzle-layer .pz-shell.hud-open .pz-info { display: block; }
  .pz-sudoku, .pz-path-grid, .pz-slide, .pz-mine-grid, .pz-board,
  .puzzle-layer .pz-stage > .pz-slide,
  .puzzle-layer .pz-stage > .pz-sudoku,
  .puzzle-layer .pz-stage > .pz-path-grid,
  .puzzle-layer .pz-stage > .pz-mine-grid {
    width: min(100%, 96vw);
    max-height: none;
  }
  .ps-scene .ps-scene-side { width: 100%; flex: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .ps-scene .ps-scene-body { flex-direction: row; }
  .ps-scene .ps-scene-canvas {
    width: auto;
    height: calc(100dvh - 96px);
    max-width: calc(100% - 188px);
    min-width: 0;
    aspect-ratio: 900 / 480;
  }
  .ps-scene .ps-scene-side { width: 176px; flex: 0 0 176px; max-width: 176px; }
  .pz-sudoku, .pz-path-grid, .pz-slide, .pz-mine-grid, .pz-board,
  .puzzle-layer .pz-stage > .pz-sudoku,
  .puzzle-layer .pz-stage > .pz-slide,
  .puzzle-layer .pz-stage > .pz-path-grid,
  .puzzle-layer .pz-stage > .pz-mine-grid {
    width: min(96vw, calc(100dvh - 108px));
  }
}
/* 手机菜单按钮：固定在顶栏最右侧，避免被标题挤出屏幕 */
@media (max-width: 760px) {
  #navToggle {
    display: flex !important;
    position: fixed !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 200 !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(8, 20, 36, .94) !important;
    color: #f4f8ff !important;
    border: 1px solid rgba(186, 214, 255, .55) !important;
    border-radius: 10px !important;
    font-size: 22px !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .site-brand-row { padding-right: 52px !important; }
}

/* 20261113_1006：实验画面按剩余视口取最大 900:480。
   父级保持确定的 100% 宽度；fit-content 再套百分比会把画布收成中间一小块。 */
.flow.flow-playstage .flow-body > #puzzleHost,
.flow.flow-playstage .pz-shell.pz-shell-playstage,
.flow.flow-playstage .pz-shell-playstage .pz-stage,
.flow.flow-playstage .ps-host,
.flow.flow-playstage .ps-host-stage,
.flow.flow-playstage .ps-scene,
.flow.flow-playstage .ps-bench {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: none;
  align-self: stretch;
}
.flow.flow-playstage .pz-shell-playstage .pz-stage {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: visible;
}
.ps-host { width: 100%; max-width: none; min-width: 0; box-sizing: border-box; }
.ps-scene, .ps-bench, .ps-scene-body { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.ps-scene-top, .ps-host-top { flex-wrap: wrap; min-width: 0; }
.ps-scene-hint, .ps-host-hint { min-width: 0; flex: 1 1 140px; white-space: normal; }
.ps-scene .ps-scene-side { width: 240px; flex: 0 0 240px; max-width: 240px; }
.flow.flow-playstage .ps-bench .ps-body {
  flex: 1 1 auto;
  min-height: min(640px, calc(100dvh - 200px));
}
.flow.flow-playstage .ps-canvas-view {
  width: 100%;
  height: 100%;
  min-height: min(520px, calc(100dvh - 240px));
}
.flow.flow-playstage .ps-bench .ps-canvas-view > .ps-canvas {
  width: 100%;
  height: auto;
  min-height: 200%;
}
@media (max-width: 899px) {
  .flow.flow-playstage { overflow: auto; }
  .flow.flow-playstage .flow-body { overflow: auto; }
  .ps-scene .ps-scene-body { flex-direction: column; }
  .ps-scene .ps-scene-canvas {
    width: min(100%, calc((100dvh - 160px) * 900 / 480));
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
  }
  .ps-scene .ps-scene-side { width: 100%; flex: 1 1 auto; max-width: none; }
  .flow.flow-playstage .ps-bench .ps-body { min-height: 0; }
  .flow.flow-playstage .ps-canvas-view { min-height: 240px; }
  .flow.flow-playstage .ps-bench .ps-canvas-view > .ps-canvas { min-height: 200%; height: auto; }
}
.puzzle-layer .flow-steps button { padding: 3px 8px; font-size: 12px; }
.pz-mini-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
@media (max-width: 760px) {
  .puzzle-layer .flow-exit { display: none; }
  .puzzle-layer .flow-bar { padding: 4px 8px; gap: 4px; }
}
.g-wrap .spd-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chant-link {
  margin-left: 4px; border: 0; background: transparent; color: var(--brand);
  font: inherit; font-weight: 800; cursor: pointer; padding: 0;
}
#chantPanel.chant-panel { position: static; width: 100%; max-width: none; max-height: 70vh; margin-top: 10px; }
.chant-grid.pairs { display: flex; gap: 10px; align-items: flex-start; width: max-content; min-width: 100%; }
.chant-col { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.chant-factor { color: var(--brand); font-size: 13px; }
.chant-pair {
  display: flex; flex-direction: column; gap: 2px; min-width: 7.2em;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px;
}
.chant-eq { font-weight: 800; color: var(--text); font-size: 14px; white-space: nowrap; }
.chant-word { color: var(--brand); font-size: 13px; white-space: nowrap; }
.chant-pair-inline { display: inline-flex; flex-direction: column; margin: 4px; padding: 6px 8px; border-radius: 8px; background: var(--panel2); }
.chant-pair-inline b { color: var(--text); }
.chant-pair-inline i { color: var(--brand); font-style: normal; }

/* 20261113_1010：计时挑战抬头只留一行。用时在「更多」里，外面不再放时钟。 */
.puzzle-layer .flow-bar {
  flex-wrap: nowrap;
  gap: 8px;
  padding: 6px 12px;
}
.puzzle-layer .flow-title {
  flex: 0 1 28%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.puzzle-layer .flow-steps {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
}
.pz-bar-tail { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; margin-left: auto; flex-wrap: nowrap; }
.puzzle-layer #pzBarMore { flex: 0 0 auto; height: 32px; }
.puzzle-layer .flow-exit { display: inline-flex; align-items: center; height: 32px; margin-left: 0; }
.puzzle-layer .pz-mini { display: none; }
.puzzle-layer .pz-shell .pz-hud,
.puzzle-layer .pz-shell .pz-statline,
.puzzle-layer .pz-shell .pz-info,
.puzzle-layer .pz-shell .pz-howto { display: none; }
.puzzle-layer .pz-shell.hud-open .pz-hud { display: grid; }
.puzzle-layer .pz-shell-playstage.hud-open .pz-hud { display: flex; }
.puzzle-layer .pz-shell.hud-open .pz-statline { display: flex; }
.puzzle-layer .pz-shell.hud-open .pz-info { display: block; }
.puzzle-layer .pz-shell.hud-open .pz-howto { display: block; }
.puzzle-layer .pz-shell-playstage.hud-open .pz-statline,
.puzzle-layer .pz-shell-playstage.hud-open .pz-info,
.puzzle-layer .pz-shell-playstage.hud-open .pz-howto { display: none; }
@media (max-width: 760px) {
  .puzzle-layer .flow-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
  }
  .puzzle-layer .flow-title { flex: 1 1 100%; max-width: none; }
  .puzzle-layer .flow-steps { flex: 1 1 0; min-width: 0; overflow-x: auto; grid-column: auto; }
  .puzzle-layer .pz-bar-tail { flex: 0 0 auto; margin-left: 0; }
  .puzzle-layer #pzBarMore,
  .puzzle-layer .flow-exit { flex: 0 0 auto; width: auto; margin-left: 0; }
}
.chant-page { padding: 20px 16px 48px; overflow-x: auto; }
.chant-page h1 { margin: 0 0 6px; font-size: 28px; }
.chant-page .chant-back { display: inline-block; margin-bottom: 10px; color: var(--brand); font-weight: 800; }
.chant-grid.pairs.chant-bottom { align-items: flex-end; }

/* 20261113_1032：点开小故事后是目的、原理、要记住。文字换行，区域自己滚动。 */
.ps-host-top:has(.ps-story[open]) { flex-wrap: wrap; }
.ps-story[open] { flex: 1 1 100%; max-width: none; width: 100%; }
.ps-learn {
  max-height: min(220px, 32dvh);
  overflow: auto;
  padding: 4px 2px 2px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  white-space: normal;
}
.ps-learn p, .ps-learn li {
  margin: 0 0 4px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.ps-learn-h { color: var(--brand); font-weight: 800; margin-top: 6px !important; }
.ps-learn ul { margin: 0 0 4px 1.2em; padding: 0; }
.ps-learn-card {
  display: block; width: 100%; text-align: left; margin-top: 4px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  color: var(--text); cursor: pointer; white-space: normal; font-weight: 700;
}
.ps-learn-card[aria-expanded="true"] { border-color: var(--brand); }
.ps-learn-card-body { padding: 2px 8px 6px; white-space: normal; }
.pz-learn, .g-learn { flex: 0 0 auto; max-width: none; width: 100%; }
@media (max-width: 640px) {
  .ps-learn { max-height: min(180px, 28dvh); font-size: 12px; }
}

/* 20261113_1026：更多展开后，用时/得分/步数/最佳用时同一行，数字和名称并排。
   不再把标题和说明铺在下面，避免把棋盘或实验往下挤。 */
.puzzle-layer .pz-shell.hud-open .pz-hud,
.puzzle-layer .pz-shell-playstage.hud-open .pz-hud {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 2px;
}
.puzzle-layer .pz-shell.hud-open .pz-hud-item,
.puzzle-layer .pz-shell-playstage.hud-open .pz-hud-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 8px;
  box-shadow: none;
}
.puzzle-layer .pz-shell.hud-open .pz-hud-item b,
.puzzle-layer .pz-shell-playstage.hud-open .pz-hud-item b {
  display: inline;
  font-size: 14px;
  line-height: 1.2;
}
.puzzle-layer .pz-shell.hud-open .pz-hud-item span,
.puzzle-layer .pz-shell-playstage.hud-open .pz-hud-item span {
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}
.puzzle-layer .pz-shell.hud-open .pz-statline,
.puzzle-layer .pz-shell.hud-open .pz-info,
.puzzle-layer .pz-shell-playstage.hud-open .pz-statline,
.puzzle-layer .pz-shell-playstage.hud-open .pz-info {
  display: none;
}
@media (max-width: 640px) {
  .puzzle-layer .pz-shell.hud-open .pz-hud,
  .puzzle-layer .pz-shell-playstage.hud-open .pz-hud { gap: 4px; margin: 2px 0; }
  .puzzle-layer .pz-shell.hud-open .pz-hud-item,
  .puzzle-layer .pz-shell-playstage.hud-open .pz-hud-item { padding: 1px 3px; gap: 3px; }
  .puzzle-layer .pz-shell.hud-open .pz-hud-item b,
  .puzzle-layer .pz-shell-playstage.hud-open .pz-hud-item b { font-size: 13px; }
  .puzzle-layer .pz-shell.hud-open .pz-hud-item span,
  .puzzle-layer .pz-shell-playstage.hud-open .pz-hud-item span { font-size: 10px; }
}

/* ==========================================================================
   20261114_091136 · R1 低分辨率 / 平板收口
   目标：顶部减少、底部减少、给画布让出最大空间；横屏大屏保持原样。
   本块放在文件末尾，用于覆盖前面同优先级的 hud-open / pz-tools 规则。
   ========================================================================== */
.ver-line { display: block; margin-top: 4px; font-size: 11px; line-height: 1.5;
  color: var(--dim); opacity: .78; letter-spacing: .2px; }

/* A1 顶部说明 + 4 格小故事：默认整行不显示，点顶部「更多」才完整展开 */
.puzzle-layer .pz-shell-playstage .ps-host-top { display: none; }
.puzzle-layer .pz-shell-playstage.hud-open .ps-host-top { display: flex; flex-wrap: wrap; }
.puzzle-layer .pz-shell-playstage.hud-open .pz-info { display: block; }

/* A2 / A3 底部合成一排：状态文案 + 全部按钮（含「完成实验」）同一排 */
.pz-obs-inline { flex: 0 1 auto; align-self: center; order: -1; max-width: 220px;
  font-size: 11px; color: var(--dim); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.puzzle-layer .pz-shell-playstage .pz-tools { flex-wrap: nowrap; gap: 6px;
  justify-content: flex-start; overflow-x: auto; }
.puzzle-layer .pz-shell-playstage .pz-tools .btn { flex: 0 0 auto; }

/* A4 低分辨率：弹层用动态视口高度，避免 1366x768 被浏览器工具栏裁切 */
.flow { height: 100vh; height: 100dvh; }
.flow-body { min-height: 0; }

/* A5 平板竖屏 / 窄屏：单列「顶部标题 → 游戏 → 说明」，画布吃满剩余高度 */
@media (orientation: portrait) and (max-width: 1024px) {
  .ps-scene-body { grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto; }
  .ps-body { grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto; }
  .ps-toolbox { border-right: 0; border-bottom: 1px solid var(--line); }
  .ps-side, .ps-scene-side { border-left: 0; border-top: 1px solid var(--line);
    max-height: 160px; }
  .ps-scene-canvas, .ps-canvas-view { min-height: 240px; }
}
@media (max-width: 760px) {
  .puzzle-layer .pz-shell-playstage .pz-tools { justify-content: center; }
  .pz-obs-inline { max-width: 150px; font-size: 10px; }
  .puzzle-layer .pz-shell-playstage .pz-tools .btn { padding: 3px 7px; font-size: 10px; }
}

/* ==========================================================================
   20261114 · R3 修订（放在文件末尾覆盖前面同优先级规则）
   1) 版本号与「总访问量」分行、居中、弱化，不再重叠；
   2) 实验台右侧恢复「做对啦」状态按钮与实时达成状态；
   3) 收口高度链 + 底部按钮条 sticky，低分辨率首屏不再被裁掉。
   ========================================================================== */

/* --- 1) 页脚版本号 --- */
.foot-stats { flex-direction: column; align-items: center; gap: 3px; }
.ver-line { display: block; margin-top: 0; font-size: 11px; line-height: 1.6;
  color: var(--dim); opacity: .62; letter-spacing: .3px;
  text-align: center; font-variant-numeric: tabular-nums; }

/* --- 2) 右侧「做对啦」状态：实时反馈 + 达成后才出现的大按钮 --- */
.ps-target { font-size: 11px; line-height: 1.55; margin: 8px 0;
  padding: 6px 8px; border-radius: 9px; background: var(--panel);
  border: 1px solid var(--line); color: var(--dim); }
.ps-target.is-solved { color: var(--good); font-weight: 700;
  border-color: color-mix(in srgb, var(--good) 45%, var(--line));
  background: color-mix(in srgb, var(--good) 10%, var(--panel)); }
.ps-praise { font-size: 11px; line-height: 1.55; color: var(--good);
  margin-top: 8px; padding: 6px 8px; border-radius: 9px;
  background: color-mix(in srgb, var(--good) 10%, var(--panel)); }
.ps-praise[hidden] { display: none; }
.ps-solved-badge { font-size: 11px; line-height: 1.55; color: var(--good);
  margin-bottom: 8px; padding: 6px 8px; border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--good) 45%, var(--line));
  background: color-mix(in srgb, var(--good) 10%, var(--panel)); }
/* R1 删掉了 .ps-host-foot，原 .ready 选择器失效；改指向底部按钮 */
#pzDone.ready { animation: psReady 1.2s ease-in-out infinite; }

/* --- 3) 高度链：让弹层只占视口、底栏始终在首屏内 --- */
.flow { height: auto; }                       /* inset:0 已确定高度，dvh 反而不稳 */
.flow.flow-playstage { overflow: hidden; }
.flow.flow-playstage .flow-body {
  flex: 1 1 0; min-height: 0; height: auto; overflow: hidden;
}
.ps-scene .ps-scene-body { overflow: hidden; }
/* 原 210px 预算低估了顶栏/HUD/按钮条，1366x768 时把底栏挤出首屏；
   用变量按断点调，画布按剩余高度反算，不再写死一个估出来的常数。 */
.ps-scene .ps-scene-canvas {
  --lab-chrome: 246px;
  width: min(calc(100% - 252px), calc((100dvh - var(--lab-chrome)) * 900 / 480));
}
.puzzle-layer .pz-shell-playstage .pz-tools {
  position: sticky; bottom: 0; z-index: 3; flex: 0 0 auto;
  background: var(--panel); padding: 4px 0 max(4px, env(safe-area-inset-bottom));
  overflow-x: clip;                          /* clip 不产生横向滚动条占位 */
}
@media (max-height: 800px) {
  .ps-scene .ps-scene-canvas { --lab-chrome: 262px; }
}
/* R3 自修复：窄屏 / 平板竖屏时侧栏已挪到画布下方，
   ① 画布不能再扣掉 252px 的侧栏宽度（否则只占 2/3 屏、右侧一大片空白）；
   ② 列布局下 justify-content:center 会变成垂直居中，把画布上下都留出大块空白；
   ③ 竖屏允许整层滚动，但底部按钮条靠 sticky 继续贴住。 */
@media (max-width: 899px), (orientation: portrait) and (max-width: 1024px) {
  .flow.flow-playstage { overflow: auto; }
  .flow.flow-playstage .flow-body { height: auto; overflow: visible; }
  .ps-scene .ps-scene-body {
    flex-direction: column; justify-content: flex-start; align-items: stretch;
  }
  .ps-scene .ps-scene-canvas {
    width: 100%; max-width: 100%; min-width: 0; min-height: 0;
    --lab-chrome: 300px;
  }
  /* 画面固定 900:480，竖屏下画布高度受宽度上限约束（722px 宽 → 385px 高），
     剩余空间交给说明面板铺满，避免下半屏一大片纯白；成功后出现的状态按钮、
     小结也都有位置，不需要内部滚动。 */
  .ps-scene .ps-scene-side {
    width: 100%; max-width: none; flex: 1 1 auto;
    max-height: none; overflow-y: auto;
  }
  .ps-side { max-height: none; }
}

/* ============ R25 益智乐园新游戏（arcade 引擎）· 站点风格 ============
   画布统一放大到 min(100%, 520px, 54vh)：大屏给足空间，矮窗口又不会被
   .pz-stage 的 overflow:hidden 裁掉下半盘。 */
.arc-frame { width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; overflow-y: auto; }
.arc-goal { width: min(100%, 660px); display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  background: color-mix(in srgb, var(--brand) 10%, var(--panel2));
  border: 2px solid color-mix(in srgb, var(--brand) 32%, var(--line)); border-radius: 14px; padding: 8px 12px; }
.arc-goal-ico { font-size: 24px; flex: 0 0 auto; }
.arc-goal-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.arc-goal-txt b { font-size: 15px; line-height: 1.35; color: var(--text); }
.arc-goal-txt span { font-size: 12px; line-height: 1.4; color: var(--dim); }
.arc-goal-prog { flex: 0 0 auto; font-size: 13px; font-weight: 800; color: var(--brand);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px;
  /* R27：接水管关卡进度比其它游戏长，允许折行，别把任务卡撑破 */
  white-space: normal; max-width: 46%; text-align: center; line-height: 1.3; }
.arc-play { width: 100%; display: flex; flex-direction: column; align-items: center; }
.arc-foot { width: 100%; text-align: center; }
.arc-foot .pz-tip { margin-top: 6px; max-width: 660px; margin-left: auto; margin-right: auto; }
.arc-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
/* R26：打砖块屏上「按住左右」按钮；按住时不能让页面跟着滚 */
.arc-hold { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.arc-hold .btn { touch-action: none; user-select: none; -webkit-user-select: none; min-width: 108px; }
.arc-hold .btn:active { background: var(--brand); color: #fff; }
.pz-hud-notimer { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* R28：统一「过关卡」。单关完成不直接结算，孩子自己点「➡ 下一关」或「🏁 收工」；
   卡片挂在 .pz-stage 外面，引擎重绘画面不会把它冲掉。 */
.pz-stageclear { max-width: 660px; margin: 10px auto 14px; padding: 14px 16px; text-align: center;
  background: color-mix(in srgb, var(--good) 10%, var(--panel));
  border: 2px solid color-mix(in srgb, var(--good) 45%, var(--line));
  border-radius: 16px; box-shadow: 0 6px 18px color-mix(in srgb, var(--text) 8%, transparent); }
.pz-stageclear-in { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.pz-stageclear-ico { font-size: 26px; line-height: 1; }
.pz-stageclear-in b { font-size: 17px; color: var(--text); }
.pz-stageclear-in > span { font-size: 13px; color: var(--dim); line-height: 1.4; }
.pz-stageclear-note { color: var(--text) !important; }
.pz-stageclear-hint { font-size: 12px !important; }
.pz-stageclear-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.arc-2048 { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; width: min(100%, 480px, 54vh); margin: 0 auto;
  background: color-mix(in srgb, var(--line) 35%, var(--panel)); padding: 10px; border-radius: 16px; }
.arc-tile { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: clamp(18px, 3.4vw, 30px); font-weight: 800; border-radius: 10px; background: var(--panel); color: var(--text); }
.arc-tile.t4 { background: #ffe8b0; } .arc-tile.t8 { background: #ffd166; } .arc-tile.t16 { background: #ffb347; color: #fff; }
.arc-tile.t32 { background: #fb8500; color: #fff; } .arc-tile.t64 { background: #ef476f; color: #fff; } .arc-tile.t128 { background: #9b5de5; color: #fff; }
.arc-tile.t256 { background: #7b2ff7; color: #fff; } .arc-tile.t512 { background: #0284c7; color: #fff; } .arc-tile.t1024 { background: #0a5c8a; color: #fff; } .arc-tile.t2048 { background: #06d6a0; color: #fff; }

/* .arc-play 是 align-items:center 的 flex，多包一层 .arc-nono 时必须自己给宽度，
   否则 grid 的 100% 会相对收缩后的父级，棋盘塌成 259px。 */
.arc-nono { width: min(100%, 420px, 48vh); margin: 0 auto; }
.arc-nono-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0,1fr)); width: 100%; margin: 0 auto; }
.arc-nono-cell { aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.arc-nono-cell.nn-clue { border: none; color: var(--dim); font-size: 12px; font-weight: 700; line-height: 1.2; }
.arc-nono-cell.nn-corner { border: none; }
.arc-nono-cell[data-r] { cursor: pointer; font-size: 18px; }
.arc-nono-cell.filled { background: var(--brand); }
.arc-nono-cell.crossed { color: var(--bad); background: color-mix(in srgb, var(--line) 14%, var(--panel)); }

.arc-soko { display: grid; grid-template-columns: repeat(var(--w), minmax(0,1fr)); width: min(100%, 460px, 50vh); margin: 0 auto; }
.arc-soko-cell { aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--line) 50%, transparent); display: flex; align-items: center; justify-content: center; font-size: clamp(18px, 3vw, 28px); cursor: pointer; }
.arc-soko-cell.w { background: color-mix(in srgb, var(--text) 20%, var(--panel)); }
.arc-soko-cell.g { background: color-mix(in srgb, var(--good) 12%, var(--panel)); }
.arc-soko-cell.b { background: color-mix(in srgb, var(--brand) 14%, var(--panel)); }
.arc-soko-cell.p { background: color-mix(in srgb, var(--good) 24%, var(--panel)); border-radius: 50%; }

.arc-pipe-labels { width: min(100%, 500px, 54vh); display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-bottom: 4px; }
.arc-pipe-svg { width: min(100%, 500px, 54vh); height: auto; display: block; margin: 0 auto;
  background: color-mix(in srgb, var(--line) 16%, var(--panel2)); border: 2px solid var(--line); border-radius: 16px; }
.arc-pipe-tile { cursor: pointer; }
.arc-pipe-bg { fill: var(--panel); stroke: var(--line); stroke-width: 1.5; }
.arc-pipe-arm { stroke: #94a3b8; stroke-width: 15; stroke-linecap: round; }
.arc-pipe-hub { fill: #94a3b8; }
.arc-pipe-tile:hover .arc-pipe-bg { stroke: var(--brand); stroke-width: 2.5; }
.arc-pipe-tile.wet .arc-pipe-bg { fill: color-mix(in srgb, #38bdf8 16%, var(--panel)); }
.arc-pipe-tile.wet .arc-pipe-arm { stroke: #38bdf8; stroke-width: 17; stroke-dasharray: 14 8; animation: arcFlow .9s linear infinite; }
.arc-pipe-tile.wet .arc-pipe-hub { fill: #0ea5e9; }
.arc-pipe-tile.route .arc-pipe-bg { stroke: #f59e0b; stroke-width: 4; }
.arc-pipe-emoji { font-size: 28px; pointer-events: none; }
/* R26：路线提示 —— 金色短线画出这一节「该有的开口」，孩子照着转即可 */
.arc-pipe-solarm { stroke: #f59e0b; stroke-width: 6; stroke-linecap: round; opacity: .92; pointer-events: none; }
@keyframes arcFlow { to { stroke-dashoffset: -22; } }

.arc-snake { display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(100%, 480px, 52vh); margin: 0 auto; background: color-mix(in srgb, var(--line) 30%, var(--panel)); gap: 1px; border-radius: 10px; overflow: hidden; }
.arc-snake-cell { aspect-ratio: 1; background: var(--panel); display: flex; align-items: center; justify-content: center; font-size: clamp(12px, 2vw, 20px); }
.arc-snake-cell.head { background: color-mix(in srgb, var(--good) 25%, var(--panel)); }
.arc-snake-cell.body { background: var(--brand); }
.arc-snake-cell.food { background: color-mix(in srgb, var(--bad) 16%, var(--panel)); }

.arc-brick-svg { width: min(100%, 560px, 54vh); height: auto; display: block; margin: 0 auto;
  background: color-mix(in srgb, var(--brand) 8%, var(--panel2)); border: 2px solid var(--line); border-radius: 14px; }
.arc-brick-block { fill: #fb923c; }
.arc-brick-ball { fill: #ef476f; }
.arc-brick-pad { fill: #0284c7; }

.arc-maze { display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(100%, 480px, 52vh); margin: 0 auto; }
.arc-maze-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: clamp(12px, 2vw, 20px); cursor: pointer; }
.arc-maze-cell.wall { background: color-mix(in srgb, var(--text) 28%, var(--panel)); }
.arc-maze-cell.goal { background: color-mix(in srgb, var(--good) 26%, var(--panel)); }
.arc-maze-cell.hint { background: #fde68a; }
.arc-maze-cell.player { background: var(--brand); border-radius: 50%; }

/* 三消 · 消消乐（R30 重做特效：渐变宝石 + 发光 + 提示 + 消除/下落/抖动/连击动画） */
.arc-match3-wrap { position: relative; width: min(100%, 460px, 50vh); margin: 0 auto; }
.arc-m3-bar { height: 9px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 16%, var(--panel)); overflow: hidden; margin-bottom: 10px; }
.arc-m3-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ffcf5a, #ff5fa2); transition: width .35s ease; }
.arc-match3 { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; width: 100%; }
.arc-gem { aspect-ratio: 1; border-radius: 30%; position: relative; cursor: pointer;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.28), 0 2px 4px rgba(0,0,0,.22); transition: transform .12s ease; }
.arc-gem.empty { background: transparent !important; box-shadow: none; cursor: default; }
.arc-gem:hover { transform: scale(1.06); }
.arc-gem.sel { transform: scale(1.12); box-shadow: 0 0 0 3px #fff, 0 0 14px 4px rgba(255,255,255,.85); z-index: 2; }
.arc-gem.hintcell { animation: m3hint 1s ease-in-out infinite; z-index: 2; }
.arc-gem.pop { animation: m3pop .26s ease forwards; z-index: 3; }
.arc-gem.drop { animation: m3drop .22s ease; }
.arc-gem.shake { animation: m3shake .36s ease; z-index: 2; }
.arc-m3-combo { position: absolute; top: 40%; left: 0; right: 0; text-align: center; pointer-events: none;
  font-size: clamp(22px, 6vw, 40px); font-weight: 900; color: #fff;
  text-shadow: 0 2px 0 #ff3d7f, 0 0 18px rgba(255,93,150,.9); animation: m3combo .55s ease; }
@keyframes m3hint { 0%,100% { box-shadow: 0 0 0 3px rgba(255,255,255,.25); } 50% { box-shadow: 0 0 0 4px #fff, 0 0 16px 5px rgba(255,255,255,.9); transform: scale(1.1); } }
@keyframes m3pop { 0% { transform: scale(1); } 40% { transform: scale(1.4); filter: brightness(1.7); } 100% { transform: scale(.1); opacity: 0; } }
@keyframes m3drop { 0% { transform: translateY(-46%); opacity: .3; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes m3shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes m3combo { 0% { transform: scale(.4); opacity: 0; } 40% { transform: scale(1.22); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* R32：提示高亮（在所有 arc 游戏里真实照亮「该走的一步」）+ 特效（合并 / 命中） */
@keyframes arcHint { 0%,100% { box-shadow: 0 0 0 2px rgba(255,193,7,.35); } 50% { box-shadow: 0 0 0 4px #ffc107, 0 0 14px 5px rgba(255,193,7,.85); transform: scale(1.08); } }
.arc-nono-cell.hintcell, .arc-soko-cell.hintcell, .arc-bs-cell.hintcell, .arc-tile.hintcell { animation: arcHint 1s ease-in-out infinite; z-index: 2; }
.arc-edge.hintcell { stroke: #ffc107 !important; stroke-dasharray: 7 5 !important; animation: arcEdgePulse 1s ease-in-out infinite; }
@keyframes arcEdgePulse { 0%,100% { stroke-width: 11; } 50% { stroke-width: 17; } }
.arc-tile.pop { animation: arcTilePop .28s ease; z-index: 3; }
@keyframes arcTilePop { 0% { transform: scale(1); } 45% { transform: scale(1.32); box-shadow: 0 0 16px 4px rgba(255,209,102,.9); } 100% { transform: scale(1); } }
.arc-bs-cell.boom { animation: arcBoom .5s ease forwards; z-index: 3; }
@keyframes arcBoom { 0% { transform: scale(1); } 30% { transform: scale(1.35); box-shadow: 0 0 0 0 rgba(239,71,111,.7); } 100% { transform: scale(1); box-shadow: 0 0 0 16px rgba(239,71,111,0); } }
.arc-bs-cell.splash { animation: arcSplash .4s ease; }
@keyframes arcSplash { 0% { transform: scale(.7); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }


@media (max-width: 640px) {
  .arc-match3-wrap { width: min(100%, 94vw, 46vh); }
}

.arc-dots-wrap { width: min(100%, 480px, 50vh); margin: 0 auto; }
.arc-dots-svg { width: 100%; height: auto; display: block; }
.arc-edge { cursor: pointer; }
.arc-edge:hover { stroke: color-mix(in srgb, var(--brand) 30%, transparent); }

.arc-bs { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; width: min(100%, 620px); margin: 0 auto; }
.arc-bs-col { flex: 0 0 auto; }
.arc-bs-toggle-row { width: 100%; display: flex; justify-content: center; margin-top: 6px; }
.arc-bs-label { text-align: center; font-size: 13px; font-weight: 700; color: var(--dim); margin-bottom: 6px; }
.arc-bs-board { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; width: min(44%, 250px, 28vh); }
.arc-bs-cell { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: clamp(14px, 2.4vw, 22px); background: var(--panel); cursor: pointer; }
.arc-bs-cell.ship { background: color-mix(in srgb, var(--brand) 18%, var(--panel)); }
.arc-bs-cell.hit { background: color-mix(in srgb, var(--bad) 28%, var(--panel)); }
.arc-bs-cell.miss { background: color-mix(in srgb, var(--line) 30%, var(--panel)); }

.arc-ult { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 480px, 50vh); margin: 0 auto; }
.arc-ult-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: var(--panel); border: 2px solid var(--line); border-radius: 10px; padding: 5px; }
.arc-ult-big.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--panel)); }
.arc-ult-big.won { background: color-mix(in srgb, var(--good) 14%, var(--panel)); }
.arc-ult-small { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: clamp(16px, 2.6vw, 24px); cursor: pointer; border: 1px solid color-mix(in srgb, var(--line) 40%, transparent); border-radius: 5px; }
.arc-ult-win { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 36px; }

.arc-mem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: min(100%, 460px, 48vh); margin: 0 auto; }
.arc-mem-card { aspect-ratio: 1; border: 2px solid var(--line); border-radius: 12px; font-size: clamp(20px, 3.2vw, 32px); background: var(--panel); cursor: pointer; }
.arc-mem-card.flip { background: color-mix(in srgb, var(--brand) 14%, var(--panel)); border-color: var(--brand); }
.arc-mem-card.gone { opacity: 0.25; }

.arc-idiom { width: min(100%, 520px); margin: 0 auto; }
.arc-idiom-pic { text-align: center; font-size: clamp(48px, 8vw, 76px); line-height: 1.3; letter-spacing: 6px; }
.arc-idiom-hint { text-align: center; font-size: 16px; margin: 10px 0 14px; color: var(--text); line-height: 1.6; }
.arc-idiom-opt { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.arc-idiom-btn { padding: 10px 18px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 17px; cursor: pointer; }
.arc-idiom-btn.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 16%, var(--panel)); }

.arc-find { width: min(100%, 400px, 46vh); margin: 0 auto; text-align: center; }
.arc-find-target { font-size: 20px; margin-bottom: 10px; }
.arc-find-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; }
.arc-find-cell { aspect-ratio: 1; font-size: clamp(22px, 4vw, 34px); border: 2px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; }
.arc-find-cell.done { background: color-mix(in srgb, var(--good) 28%, var(--panel)); }
.arc-find-cell.bad { background: color-mix(in srgb, var(--bad) 20%, var(--panel)); }

.arc-dpad { display: grid; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(2, 48px); gap: 5px; justify-content: center; margin-top: 10px; }
.arc-dkey { border: 2px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 22px; cursor: pointer; }
.arc-dkey:active { background: color-mix(in srgb, var(--brand) 20%, var(--panel)); }
.arc-dkey[data-dir="left"] { grid-area: 2 / 1; }
.arc-dkey[data-dir="up"] { grid-area: 1 / 2; }
.arc-dkey[data-dir="down"] { grid-area: 2 / 2; }
.arc-dkey[data-dir="right"] { grid-area: 2 / 3; }
@media (max-width: 640px) {
  .arc-goal { gap: 6px; padding: 6px 8px; }
  .arc-goal-txt b { font-size: 13px; } .arc-goal-txt span { font-size: 11px; }
  .arc-goal-prog { font-size: 11px; padding: 4px 8px; }
  .arc-dpad { grid-template-columns: repeat(3, 42px); grid-template-rows: repeat(2, 42px); }
}

/* ============ R29 · 🎮 休闲乐园 + 拾光自有游戏库（站点风格，大画布大按钮） ============
   卡片与益智乐园同一套令牌，但更宽松：常驻「怎么玩」中文说明、大按钮，
   画布沿用 min(100%, 420~520px, 50~54vh)，小屏也不挤。 */

/* R29：休闲乐园 5 个统计卡桌面一行铺满；窄屏由 auto-fit 自动折成 2 列。
   只作用于休闲乐园，益智乐园原有 4 列统计布局保持不变。 */
#casualSummary.coverage-box { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.pc-tag.notimer { border-style: solid; background: color-mix(in srgb, var(--good) 14%, var(--panel)); color: var(--text); border-color: transparent; }

/* R30：休闲乐园卡片瘦身。原来常驻「📖 怎么玩」+「🏁 怎样算赢」两大块，
   卡片被撑得又高又满；现在卡片只留名字 / 标签 / 一句话 / 大按钮，
   长篇介绍进游戏后点「更多」看。大画布、大按钮的约定不变。 */
.casual-card { display: flex; flex-direction: column; gap: 8px; text-align: left;
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  border-radius: 14px; padding: 14px; box-shadow: var(--shadow2); transition: transform .16s ease, border-color .16s ease; }
.casual-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.cc-top { display: flex; align-items: center; gap: 10px; }
.cc-icon { font-size: 28px; line-height: 1; }
.cc-top h3 { margin: 0; font-size: 17px; line-height: 1.35; color: var(--text); }
.cc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--panel2);
  border: 1px dashed var(--line); color: var(--dim); }
.cc-tag.kind { border-style: solid; background: color-mix(in srgb, var(--brand) 14%, var(--panel)); color: var(--brand); border-color: transparent; font-weight: 700; }
.cc-tag.calm { border-style: solid; background: color-mix(in srgb, var(--good) 14%, var(--panel)); color: var(--text); border-color: transparent; }
.cc-desc { margin: 0; font-size: 13px; line-height: 1.6; color: var(--dim);
  /* R30：一句话最多两行，卡片不再被长说明撑高 */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--dim);
  border-top: 1px dashed var(--line); padding-top: 8px; }
.cc-actions .btn { width: 100%; padding: 11px 14px; font-size: 15px; border-radius: 12px; }

/* 游戏内通用控件 */
.ly-ctl { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.ly-ctl .btn { min-width: 104px; }
.ly-bigbtn { display: block; margin: 12px auto 0; min-width: 210px; padding: 13px 18px; font-size: 17px; }
.ly-cell.f1, .ly-bf-cell.f1, .ly-bf-px.f1, .ly-tr-cell.f1, .ly-chain-cell.f1 { background: #f87171; }
.ly-cell.f2, .ly-bf-cell.f2, .ly-bf-px.f2, .ly-tr-cell.f2, .ly-chain-cell.f2 { background: #fbbf24; }
.ly-cell.f3, .ly-bf-cell.f3, .ly-bf-px.f3, .ly-tr-cell.f3, .ly-chain-cell.f3 { background: #34d399; }
.ly-cell.f4, .ly-bf-cell.f4, .ly-bf-px.f4, .ly-tr-cell.f4, .ly-chain-cell.f4 { background: #60a5fa; }
.ly-cell.f5, .ly-bf-cell.f5, .ly-bf-px.f5, .ly-tr-cell.f5, .ly-chain-cell.f5 { background: #c084fc; }
.ly-cell.f6 { background: #fb923c; } .ly-cell.f7 { background: #2dd4bf; }

/* 🧱 俄罗斯方块 */
.ly-tetris { display: grid; grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(16, 1fr); gap: 1px;
  width: min(100%, 420px, 54vh); height: min(54vh, 470px); margin: 0 auto; padding: 6px;
  background: color-mix(in srgb, var(--line) 40%, var(--panel)); border: 2px solid var(--line); border-radius: 14px; }
.ly-cell { background: var(--panel); border-radius: 2px; }

/* 🧩 方块拼拼看 */
.ly-bf-board { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 3px;
  width: min(100%, 420px, 50vh); margin: 0 auto; padding: 6px; border: 2px solid var(--line);
  border-radius: 14px; background: color-mix(in srgb, var(--line) 26%, var(--panel2)); }
.ly-bf-cell { aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
  border-radius: 5px; background: var(--panel); cursor: pointer; padding: 0; }
.ly-bf-cell.hint { outline: 3px solid #f59e0b; }
.ly-bf-tray { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.ly-bf-slot { background: var(--panel); border: 2px solid var(--line); border-radius: 12px;
  padding: 6px; cursor: pointer; text-align: center; min-width: 92px; }
.ly-bf-slot.sel { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.ly-bf-slot.used { opacity: .35; }
.ly-bf-slot small { display: block; font-size: 11px; color: var(--dim); margin-top: 3px; }
.ly-bf-piece { display: grid; grid-template-columns: repeat(4, 18px); grid-template-rows: repeat(4, 18px); gap: 2px; margin: 0 auto; }
.ly-bf-px { border-radius: 3px; background: transparent; }

/* 🏗 叠叠高 */
.ly-tower { position: relative; width: min(100%, 420px, 50vh); height: 260px; margin: 0 auto;
  background: color-mix(in srgb, var(--brand) 7%, var(--panel2)); border: 2px solid var(--line);
  border-radius: 14px; overflow: hidden; cursor: pointer; }
.ly-tower-row { position: absolute; height: 22px; background: var(--brand); border: 1px solid var(--panel); border-radius: 3px; }
.ly-tower-row:nth-child(even) { background: #38bdf8; }
.ly-tower-move { position: absolute; bottom: 0; height: 22px; background: var(--good);
  border: 2px solid #fff; border-radius: 4px; box-shadow: 0 2px 8px color-mix(in srgb, var(--text) 18%, transparent); }
.ly-tower-base { position: absolute; bottom: 0; left: 0; right: 0; height: 5px; background: var(--line); }

/* 🐹 打地鼠 */
.ly-whack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  width: min(100%, 400px, 48vh); margin: 0 auto; }
.ly-whack-hole { aspect-ratio: 1; font-size: clamp(30px, 6vw, 46px); border: 2px solid var(--line);
  border-radius: 18px; background: color-mix(in srgb, var(--line) 20%, var(--panel)); cursor: pointer; }
.ly-whack-hole.up { background: color-mix(in srgb, var(--good) 22%, var(--panel)); border-color: var(--good); }
.ly-whack-hole.decoy { background: color-mix(in srgb, var(--brand) 14%, var(--panel)); border-color: var(--brand); }
.ly-whack-hole.miss { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel)); }
.ly-whack-hole:active { transform: scale(.94); }

/* 🫧 泡泡龙 */
.ly-bub-svg { width: min(100%, 420px, 54vh); height: auto; display: block; margin: 0 auto;
  background: color-mix(in srgb, var(--brand) 6%, var(--panel2)); border: 2px solid var(--line); border-radius: 16px; cursor: crosshair; }
.ly-bub-red { stroke: #ef476f; stroke-width: 2; stroke-dasharray: 8 6; }
.ly-bub-guide { fill: none; stroke: var(--brand); stroke-width: 2; stroke-dasharray: 6 7; opacity: .8; }
.ly-bub { stroke: color-mix(in srgb, var(--text) 20%, transparent); stroke-width: 1.5; }
.ly-bub.hl { stroke: #f59e0b; stroke-width: 4; }
.ly-bub-now { stroke: #fff; stroke-width: 3; }
.ly-bub-next { opacity: .85; }

/* ⚡ 点点快 */
.ly-tr-stack { width: min(100%, 420px, 50vh); margin: 0 auto; }
.ly-tr-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.ly-tr-row.cur { outline: 2px dashed var(--brand); outline-offset: 5px; border-radius: 12px; }
.ly-tr-cell { aspect-ratio: 1; font-size: clamp(20px, 4vw, 30px); border: 2px solid var(--line);
  border-radius: 12px; background: var(--panel); color: var(--dim); cursor: pointer; }
.ly-tr-cell.dim { opacity: .4; }
.ly-tr-cell[disabled] { cursor: default; }
.ly-tr-bar { width: min(100%, 420px, 50vh); height: 10px; margin: 12px auto 0; border-radius: 999px;
  background: color-mix(in srgb, var(--line) 40%, var(--panel)); overflow: hidden; }
.ly-tr-bar i { display: block; height: 100%; background: var(--good); transition: width .05s linear; }
.ly-tr-pads { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.ly-tr-pad { min-width: 64px; padding: 10px 0; font-size: 17px; }

/* 🍬 同色连消 */
.ly-chain { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 4px;
  width: min(100%, 420px, 50vh); margin: 0 auto; padding: 6px; border: 2px solid var(--line);
  border-radius: 14px; background: color-mix(in srgb, var(--line) 22%, var(--panel2)); }
.ly-chain-cell { aspect-ratio: 1; border: none; border-radius: 8px; cursor: pointer; padding: 0; }
.ly-chain-cell.empty { background: transparent; }
.ly-chain-cell.hl { outline: 3px solid #f59e0b; }

/* 🚗 移车出库 */
.ly-rh-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; width: min(100%, 540px); margin: 0 auto; }
.ly-rh { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 3px; flex: 1 1 auto;
  max-width: 420px; padding: 6px; border: 2px solid var(--line); border-radius: 14px;
  background: color-mix(in srgb, var(--line) 20%, var(--panel2)); }
.ly-rh-cell { aspect-ratio: 1; font-size: clamp(16px, 3vw, 24px); border: 1px solid color-mix(in srgb, var(--line) 40%, transparent);
  border-radius: 6px; background: var(--panel); cursor: pointer; padding: 0; }
.ly-rh-cell.red { background: #fca5a5; }
.ly-rh-cell.car1 { background: #93c5fd; } .ly-rh-cell.car2 { background: #86efac; }
.ly-rh-cell.car3 { background: #fcd34d; } .ly-rh-cell.car4 { background: #d8b4fe; } .ly-rh-cell.car0 { background: #fdba74; }
.ly-rh-cell.sel { outline: 3px solid var(--brand); }
.ly-rh-exit { display: flex; flex-direction: column; align-items: center; font-size: 26px; color: var(--good); }
.ly-rh-exit small { font-size: 11px; color: var(--dim); }

/* ⚫ 西洋跳棋 */
.ly-ck { display: grid; grid-template-columns: repeat(var(--cols), 1fr);
  width: min(100%, 420px, 50vh); margin: 0 auto; padding: 6px; border: 2px solid var(--line);
  border-radius: 14px; background: var(--panel2); }
.ly-ck-cell { aspect-ratio: 1; font-size: clamp(16px, 3vw, 26px); border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; }
.ly-ck-cell.light { background: color-mix(in srgb, var(--line) 18%, var(--panel)); }
.ly-ck-cell.dark { background: color-mix(in srgb, var(--text) 24%, var(--panel)); }
.ly-ck-cell.sel { outline: 3px solid var(--brand); }
.ly-ck-cell.hl { box-shadow: inset 0 0 0 4px #f59e0b; }
.ly-ck-cell.king { background: color-mix(in srgb, #f59e0b 26%, var(--panel)); }

@media (max-width: 640px) {
  .casual-card { padding: 14px; }
  .cc-top h3 { font-size: 17px; }
  .cc-icon { font-size: 28px; }
  .ly-ctl .btn { min-width: 88px; }
  .ly-rh-wrap { gap: 5px; }
}

/* ============ R30 · 「更多」里的怎么玩 / 海战棋放大 / 贪吃蛇起步 ============ */

/* 游戏内「更多」展开区：卡片上的长篇说明搬到这里，全中文，一次看全 */
.pz-howto {
  margin: 10px auto 0; max-width: 720px;
  background: color-mix(in srgb, var(--brand) 8%, var(--panel2));
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-left: 4px solid var(--brand);
  border-radius: 12px; padding: 12px 16px;
  color: var(--text); font-size: 13.5px; line-height: 1.75;
}
.pz-howto h4 { margin: 0 0 8px; font-size: 15px; color: var(--brand); }
.pz-howto p { margin: 0 0 7px; }
.pz-howto p:last-child { margin-bottom: 0; }
.pz-howto b { color: var(--brand); }

/* 贪吃蛇：开局醒目的「点一下 / 按方向键才开始」条 */
.arc-start-tip {
  display: block; width: min(100%, 480px, 52vh); margin: 0 auto 10px;
  padding: 12px 14px; border: 2px dashed var(--brand); border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 12%, var(--panel));
  color: var(--text); font-size: 15px; font-weight: 800; line-height: 1.6;
  cursor: pointer; text-align: center;
}
.arc-start-tip span { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--dim); }
.arc-start-tip:hover { background: color-mix(in srgb, var(--brand) 20%, var(--panel)); }

/* 海战棋 · 不限时：原来两块棋盘各只有 250px，格子太小、看不清命中标记。
   放大到每块 340px（容器 780px 仍并排），字号与格子同步加大。
   注意：宽度不能用百分比——.arc-bs-col 是 shrink-to-fit，百分比会循环依赖把棋盘
   压成几十像素；改用 vw / vh 这类与视口挂钩的确定值。 */
.arc-bs { width: min(100%, 780px); gap: 20px; }
.arc-bs-col { flex: 0 1 auto; min-width: 0; }
.arc-bs-board { width: min(340px, 40vh, 30vw); gap: 4px; }
.arc-bs-cell { font-size: clamp(18px, 3vw, 30px); border-radius: 7px; }
.arc-bs-label { font-size: 15px; margin-bottom: 8px; }

@media (max-width: 640px) {
  .arc-bs { gap: 8px; }
  .arc-bs-board { width: min(190px, 44vw, 34vh); gap: 2px; }
  .arc-bs-cell { font-size: clamp(11px, 3.2vw, 16px); border-radius: 4px; }
  .arc-bs-label { font-size: 12px; margin-bottom: 4px; }
  .arc-start-tip { font-size: 13px; padding: 10px; }
  .pz-howto { padding: 10px 12px; font-size: 13px; }
}

/* R30：点「更多」展开后 .pz-hud-item 被设成 display:flex，会盖掉 HTML 的 hidden
   属性，让「不限时」游戏又冒出「用时 / 最佳用时」两格，把手机上一行挤得重叠。
   这里保证 hidden 一定生效，展开区只留真正用得上的几项。 */
.puzzle-layer .pz-hud-item[hidden] { display: none !important; }

/* ============================================================
   R34 · 紧凑外壳（compact）：一屏只留「顶栏图标 + 画面 + 底条」，
   统计/说明/复盘全部收进「更多」抽屉。仅 def.compact 的游戏启用。
   ============================================================ */
.pz-shell.pz-compact { display: flex; flex-direction: column; padding: 6px 8px 8px; gap: 6px; position: relative; }
.pz-compact .pz-hud,
.pz-compact .pz-statline,
.pz-compact .pz-info,
.pz-compact .pz-howto,
.pz-compact .pz-learn,
.pz-compact .pz-tools { display: none !important; }

/* 顶栏：只放图标 */
.pz-cbar { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.pz-cico { width: 38px; height: 38px; border: none; border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--text);
  font-size: 18px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pz-cico:hover { background: color-mix(in srgb, var(--brand) 18%, var(--panel)); }
.pz-cico:active { transform: scale(.94); }
.pz-ctitle { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 800; font-size: 15px; padding-left: 4px; }

/* 等比缩放容器 */
.pz-fitbox { position: relative; flex: 1 1 auto; min-height: 0; display: flex;
  align-items: center; justify-content: center; overflow: hidden; }
.pz-compact .pz-stage { flex: 0 0 auto; margin: 0; padding: 0; position: relative; }

/* 角标 / 提示 */
.pz-badge { position: absolute; top: 6px; right: 8px; z-index: 5; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 82%, transparent); color: var(--brand);
  font-size: 12px; font-weight: 800; pointer-events: none; }
.pz-toast { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 6; max-width: 92%;
  padding: 8px 14px; border-radius: 12px; background: color-mix(in srgb, var(--panel) 94%, transparent);
  color: var(--text); font-size: 13px; line-height: 1.5; box-shadow: 0 6px 18px rgba(0,0,0,.18); pointer-events: none; }

/* 底条结果 / 过关 */
.pz-rbar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 12%, var(--panel)); }
.pz-rb-ico { font-size: 20px; flex: 0 0 auto; }
.pz-rb-txt { flex: 1 1 auto; min-width: 0; font-size: 13px; }
.pz-rb-txt b { font-size: 15px; }
.pz-rb-act { display: flex; gap: 6px; flex: 0 0 auto; }

/* 更多抽屉 */
.pz-drawer2 { position: absolute; inset: 0; z-index: 30; overflow: auto; padding: 14px;
  background: color-mix(in srgb, var(--panel) 97%, transparent); border-radius: 16px; }
.pz-d2-in { max-width: 560px; margin: 0 auto; }
.pz-drawer2 h3 { margin: 14px 0 6px; font-size: 15px; color: var(--brand); }
.pz-drawer2 h3:first-of-type { margin-top: 4px; }
.pz-drawer2 p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; }
.pz-d2-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: none;
  border-radius: 10px; background: var(--panel); color: var(--text); font-size: 16px; cursor: pointer; }

/* 连连看（chain）特效 */
.ly-chain-cell { transition: background .12s ease; }
.ly-chain-cell.pop { animation: chainPop .2s ease forwards; }
@keyframes chainPop { 0% { transform: scale(1); } 45% { transform: scale(1.18); filter: brightness(1.28); } 100% { transform: scale(.6); opacity: .22; } }
.ly-chain-cell.drop { animation: chainDrop .26s ease; }
@keyframes chainDrop { 0% { transform: translateY(-28%); opacity: .35; } 100% { transform: translateY(0); opacity: 1; } }
.ly-chain-cell.hl { outline: 3px solid #f59e0b; animation: chainHl .6s ease-in-out infinite alternate; }
@keyframes chainHl { from { box-shadow: 0 0 0 rgba(245,158,11,0); } to { box-shadow: 0 0 12px rgba(245,158,11,.9); } }
.chain-float { position: absolute; left: 50%; top: 40%; transform: translate(-50%, 0); z-index: 8;
  font-weight: 800; font-size: 16px; color: var(--brand); pointer-events: none; white-space: nowrap;
  animation: chainFloat .72s ease forwards; }
@keyframes chainFloat { 0% { opacity: 0; transform: translate(-50%,8px) scale(.9); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-36px) scale(1.08); } }
.pz-compact .arc-compact { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.pz-compact .ly-chain { width: 100%; }

/* R34：紧凑外壳启用时，收掉站点自带的游戏层顶栏（动手玩/完成目标/历史成绩/更多/沉浸/退出）——
   这些功能已经并进「紧凑顶栏图标 + 更多抽屉」，避免一屏出现两条顶栏、把画面挤小。 */
#puzzle:has(.pz-compact) .flow-bar { display: none !important; }
#puzzle:has(.pz-compact) .flow-body { flex: 1 1 auto; min-height: 0; height: 100%; }
#puzzle:has(.pz-compact) #puzzleBody,
#puzzle:has(.pz-compact) #puzzleHost { height: 100%; }
#puzzle:has(.pz-compact) .pz-shell.pz-compact { height: 100%; }

/* 这些元素用 display:flex 会被作者样式盖掉 hidden 属性，这里强制 hidden 生效 */
.pz-rbar[hidden], .pz-badge[hidden], .pz-toast[hidden], .pz-drawer2[hidden] { display: none !important; }

@media (max-width: 560px) {
  .pz-cico { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
  .pz-ctitle { font-size: 14px; }
  .pz-rb-txt { font-size: 12px; }
}

/* ============================================================
   R35 · 紧凑外壳增强：右上 5 按钮、最佳/当前时间条、
   帮助/复盘居中弹窗、连连看鼠标悬停高亮整片
   ============================================================ */
.pz-cbar { flex-wrap: nowrap; }
.pz-cico[data-c="quit"] { margin-right: 2px; }

.pz-times { position: absolute; top: 6px; left: 8px; z-index: 6; display: flex; align-items: center; gap: 10px;
  padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--panel) 82%, transparent);
  font-size: 12px; font-weight: 800; color: var(--text); pointer-events: none; }
.pz-times .pz-t-best { color: #b8860b; }
.pz-times .pz-t-cur { color: var(--brand); }

/* 居中弹窗（帮助 / 复盘） */
.pz-modal { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(15, 23, 42, .42); }
.pz-modal[hidden] { display: none !important; }
.pz-modal-card { position: relative; width: min(560px, 94%); max-height: 82%; overflow: auto;
  background: var(--panel); color: var(--text); border-radius: 16px; padding: 18px 18px 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28); }
.pz-modal-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: none; border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--text); font-size: 16px; cursor: pointer; }
.pz-modal-body h2 { margin: 0 24px 10px 0; font-size: 17px; color: var(--brand); }
.pz-modal-body p { margin: 0 0 8px; font-size: 13px; line-height: 1.65; }
.pz-modal-body table.history-table { width: 100%; border-collapse: collapse; }
.pz-modal-body table.history-table th,
.pz-modal-body table.history-table td { padding: 5px 8px; font-size: 12px; border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent); }

/* 连连看：鼠标悬停可消除的整片时高亮 + 手型 */
.ly-chain-cell:not(.empty) { cursor: pointer; }
.ly-chain-cell.hov { outline: 3px solid #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.22), 0 4px 10px rgba(0,0,0,.12);
  transform: scale(1.06); transition: transform .08s ease, box-shadow .08s ease; z-index: 1; }

/* R36：帮助弹窗分区排版（玩法步骤用有序列表，一段一块） */
.pz-modal-body .pz-help-sec { margin: 0 0 12px; }
.pz-modal-body .pz-help-sec:last-child { margin-bottom: 0; }
.pz-modal-body .pz-help-sec h3 { margin: 0 0 6px; font-size: 14px; color: var(--brand); }
.pz-modal-body ol { margin: 0; padding-left: 20px; }
.pz-modal-body ol li { margin: 4px 0; font-size: 13px; line-height: 1.65; }
.pz-modal-body ol li::marker { color: var(--brand); font-weight: 800; }

/* 全屏按钮激活态 */
.pz-cico.on { background: color-mix(in srgb, var(--brand) 26%, var(--panel)); color: var(--brand); }

/* R37 · 通关/失败半透明横幅（一直显示到点「下一关」或关闭游戏；不挡操作） */
.pz-banner { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); z-index: 9; max-width: 92%;
  padding: 14px 22px; border-radius: 14px; background: rgba(15, 23, 42, .62); color: #fff;
  font-size: 16px; font-weight: 800; text-align: center; pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); backdrop-filter: blur(2px); line-height: 1.5; }
.pz-banner.win { border: 2px solid rgba(250, 204, 21, .85); }
.pz-banner.lose { border: 2px solid rgba(248, 113, 113, .85); }
.pz-banner[hidden] { display: none !important; }

/* R37 · 右下角版权水印 */
.pz-watermark { position: absolute; right: 8px; bottom: 4px; z-index: 6; font-size: 11px; color: var(--dim);
  opacity: .55; pointer-events: none; user-select: none; letter-spacing: .2px; }
/* 非紧凑游戏：用 #pzStage 伪元素，引擎重绘 innerHTML 也不会冲掉 */
.puzzle-layer .pz-shell:not(.pz-compact) .pz-stage { position: relative; }
.puzzle-layer .pz-shell:not(.pz-compact) .pz-stage::after { content: '拾光儿童乐园-www.lysval.com'; position: absolute;
  right: 8px; bottom: 2px; font-size: 11px; color: var(--dim); opacity: .55; pointer-events: none; user-select: none; }

/* 复盘表 6 列，紧凑不换行 */
.pz-modal-body table.history-table th,
.pz-modal-body table.history-table td { padding: 4px 6px; font-size: 11.5px; white-space: nowrap; }

/* R39 · 紧凑外壳下的三消：铺满固定画面、收一点间距 */
.pz-compact .arc-match3-wrap { width: 100%; }
.pz-compact .arc-match3 { gap: 5px; }

/* R40 · 紧凑外壳下的泡泡龙：竖排「画布 + 控制条」 */
.pz-compact .ly-bub-compact { flex-direction: column; gap: 8px; }
.pz-compact .ly-bub-svg { width: 100%; flex: 1 1 auto; min-height: 0; max-height: none; height: auto; }
.pz-compact .ly-bub-ctl { display: flex; gap: 8px; justify-content: center; flex: 0 0 auto; flex-wrap: nowrap; }

/* R38 · 公用屏上键盘（LYSVAL_KEYPAD） */
.ly-keypad { display: grid; gap: 6px; width: 100%; max-width: 460px; margin: 8px auto 0; }
.ly-keypad-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ly-keypad-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ly-keypad-cols-6 { grid-template-columns: repeat(6, 1fr); }
.ly-key-btn { border: none; border-radius: 10px; background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--text); font-size: 18px; font-weight: 800; min-height: 44px; padding: 10px 0; cursor: pointer;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent); transition: transform .06s ease, background .1s ease; }
.ly-key-btn:active { transform: scale(.96); }
.ly-key-btn.key-active { background: var(--brand); color: #fff; transform: scale(.94); }
.ly-key-btn[data-key="C"], .ly-key-btn[data-key="⌫"] { color: var(--dim); font-size: 16px; }
@media (max-width: 560px) { .ly-key-btn { font-size: 16px; min-height: 40px; } }

/* ============================================================================
   R41 · 泡泡龙（只增不改；类名统一 bub 前缀，keyframes 统一 bub* —— 不影响其它游戏）
   参考对标：鼠标实时瞄准 / 流动虚线 / 落点环 / 球沿虚线飞行 / 消除 / 掉落 / 下压 / pips / 红线告警
   ============================================================================ */
.ly-bub { transform-box: fill-box; transform-origin: 50% 50%; }
.ly-bub-svg { touch-action: none; }
.ly-bub-in { animation: bubIn .18s ease-out; }
.ly-bub-pop { animation: bubPop .2s ease-out forwards; }
.ly-bub-fall { animation: bubFall .44s cubic-bezier(.4, 0, .75, 1) forwards; }
.ly-bub-circles.drop { animation: bubDrop .3s ease-out; }
.ly-bub-guide { animation: bubFlow 1s linear infinite; }
.ly-bub-ring { fill: none; stroke: var(--brand); stroke-width: 3; opacity: .85;
  transform-box: fill-box; transform-origin: 50% 50%; animation: bubRing 1.2s ease-out infinite; }
.ly-bub-red.warn { stroke: #ef4444; animation: bubWarn .8s ease-in-out infinite; }
.ly-bub-pip { fill: color-mix(in srgb, var(--text) 20%, transparent); }
.ly-bub-pip.on { fill: var(--brand); }
.ly-bub.hl { filter: drop-shadow(0 0 6px #f59e0b); }
.ly-bub-float { font-size: 20px; font-weight: 800; fill: #f59e0b; text-anchor: middle;
  paint-order: stroke; stroke: rgba(255, 255, 255, .92); stroke-width: 4px;
  animation: bubFloat 1.1s ease-out forwards; }
.ly-bub-fly { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25)); }

@keyframes bubIn { from { transform: scale(.4); opacity: .25; } to { transform: scale(1); opacity: 1; } }
@keyframes bubPop { 0% { transform: scale(1); } 45% { transform: scale(1.35); filter: brightness(1.6); }
  100% { transform: scale(.15); opacity: 0; } }
@keyframes bubFall { 0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(340px) rotate(150deg); opacity: 0; } }
@keyframes bubDrop { from { transform: translateY(-38px); } to { transform: translateY(0); } }
@keyframes bubFlow { to { stroke-dashoffset: -26; } }
@keyframes bubRing { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes bubWarn { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes bubFloat { 0% { opacity: 0; transform: translateY(6px); } 25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-42px); } }
@media (prefers-reduced-motion: reduce) {
  .ly-bub-guide, .ly-bub-ring, .ly-bub-float, .ly-bub-red.warn { animation: none; }
}

/* ============================================================================
   R46 · 动手实验台接入统一外壳的 exempt 模式
   （同一套顶栏/帮助/复盘/全屏；不缩放，保留实验台自带工具栏、画布与拖拽）
   ============================================================================ */
.pz-shell.pz-compact.pz-shell-playstage .pz-cbar { flex: 0 0 auto; }
.pz-fitbox.pz-exempt > .pz-stage-flow { display: flex; flex-direction: column; height: 100%; min-height: 0; }

/* ============================================================================
   R45 · 统一外壳的 fluid / exempt 模式（不缩放，流式排布；数独等表单类、实验台）
   ============================================================================ */
.pz-fitbox.pz-flow { display: block; overflow: auto; align-items: initial; justify-content: initial; }
.pz-fitbox.pz-flow > .pz-stage-flow { width: 100%; height: auto; min-height: 0; transform: none !important; }
.pz-fitbox.pz-exempt { overflow: hidden; }
.pz-fitbox.pz-exempt > .pz-stage-flow { height: 100%; }
.pz-fitbox.pz-flow > .pz-badge,
.pz-fitbox.pz-flow > .pz-times { position: absolute; }
.pz-compact .pz-stage-flow .pz-board { width: 100%; margin: 4px auto 0; }
.pz-compact .pz-stage-flow .pz-pad { width: 100%; }
/* R45 · 黑白棋接入紧凑外壳（fixed 480×560）：棋盘铺满、去掉多余外边距 */
.pz-compact .pz-board { width: 100%; margin: 4px auto 0; }
.pz-compact .pz-score { margin: 0; font-size: 14px; }
.pz-compact .pz-tip { margin: 6px 0 0; font-size: 12px; }

/* ================================================================================
   R47 · 紧凑外壳内容区改为「纵向排布」——全站街机/休闲/棋类统一
   问题：.arc-compact 原本是横排 flex，引擎内部 width:100% / min(...) 的棋盘会被
         shrink-to-fit 压成很窄一条（贪吃蛇/俄罗斯方块只有 1/4 宽，两侧大量留白）。
   做法：追加在文件末尾覆盖（不改上面的既有规则），纵向排布后棋盘吃满宽度、
         方向键/操作条自然排到下方，正好符合「画面 + 下方按键」的统一布局。
   影响面：只作用于 .pz-compact 下的 .arc-compact（紧凑壳游戏），非紧凑路径不受影响。
   ================================================================================ */
.pz-compact .arc-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
}
/* 内容比设计高度更高时允许内部滚动，而不是被裁掉 */
.pz-compact .arc-compact { overflow-y: auto; overflow-x: hidden; }
/* 纵排后文字类块（提示 / 目标）吃满宽度，避免被挤成竖条 */
.pz-compact .arc-compact > .arc-start-tip,
.pz-compact .arc-compact > .arc-tip,
.pz-compact .arc-compact > .arc-goal { width: 100%; max-width: 100%; }

/* ================================================================================
   R48 · 贪吃蛇（参考引擎对齐版）：Canvas 棋盘 + 速度槽
   类名前缀 ly-snk-*（只增不改，追加末尾）；画布按设计尺寸固定像素，外层缩放由内核负责。
   ================================================================================ */
.ly-snk-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.ly-snk-ticks { display: flex; gap: 4px; align-items: center; justify-content: center; height: 12px; }
.ly-snk-tick { display: block; width: 16px; height: 7px; border-radius: 3px; background: rgba(14,165,233,.18); transition: background .18s ease; }
.ly-snk-tick.on { background: var(--brand, #0ea5e9); box-shadow: 0 0 6px rgba(14,165,233,.55); }
.ly-snk-cv { display: block; border-radius: 12px; border: 1px solid rgba(14,165,233,.22); background: #f6fbfd; touch-action: none; }
.ly-snk-tip { width: 100%; }
.pz-compact .ly-snk-tip[hidden] { display: none; }
.ly-snk-pause { margin-top: 2px; }
/* R48：贪吃蛇开始提示改成「浮在棋盘上」的覆盖层（对齐参考 overlay），不再撑高布局 */
.ly-snk-wrap { position: relative; }
.ly-snk-tip { position: absolute; left: 8px; right: 8px; top: 50%; transform: translateY(-50%); z-index: 2; }

/* ================================================================================
   R49 · 新引入游戏：反应测试（quickdraw）/ 叠牌消消（mahjong）
   类名前缀 ly-qd-* / ly-mj-*（只增不改，追加末尾）
   ================================================================================ */
.ly-qd-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.ly-qd-dots { display: flex; gap: 8px; }
.ly-qd-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(14,165,233,.20); }
.ly-qd-dot.done { background: var(--brand, #0ea5e9); box-shadow: 0 0 8px rgba(14,165,233,.5); }
.ly-qd-pad { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 420px; height: 300px; border-radius: 20px; border: 2px solid var(--line, #dbe7ee);
  background: #f4fafd; color: var(--ink, #0f2430); cursor: pointer; transition: background .12s ease, transform .08s ease; }
.ly-qd-pad:active { transform: scale(.99); }
.ly-qd-pad b { font-size: 34px; line-height: 1.1; }
.ly-qd-pad span { font-size: 15px; color: var(--dim, #5b7385); }
.ly-qd-pad.wait { background: #fff7e6; border-color: #f7c978; }
.ly-qd-pad.go { background: #16a34a; border-color: #0f7a37; color: #fff; }
.ly-qd-pad.go span { color: rgba(255,255,255,.85); }
.ly-qd-pad.early { background: #fdecef; border-color: #f0a2b0; }
.ly-qd-list { font-size: 14px; color: var(--dim, #5b7385); min-height: 20px; }
.ly-mj-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.ly-mj-board { position: relative; margin: 0 auto; }
.ly-mj-tile { position: absolute; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; border: 1px solid rgba(0,0,0,.16); background: #fdfaf2; cursor: pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,.12); padding: 0; line-height: 1; }
.ly-mj-tile.locked { filter: grayscale(.55); opacity: .58; cursor: default; }
.ly-mj-tile.sel { outline: 3px solid var(--brand, #0ea5e9); outline-offset: -1px; }
.ly-mj-tip { font-size: 13px; color: var(--dim, #5b7385); text-align: center; }

/* R49 · 乒乓球（pong）：Canvas 球场 + 屏上 ▲▼ + 模式/难度行 */
.ly-pg-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.ly-pg-cv { display: block; border-radius: 12px; border: 1px solid rgba(15,34,51,.35); background: #0f2233; touch-action: none; }
.ly-pg-tip { position: absolute; left: 10px; right: 10px; top: 42%; transform: translateY(-50%); z-index: 2; }
.pz-compact .ly-pg-tip[hidden] { display: none; }
.ly-pg-bar { display: flex; gap: 10px; }
.ly-pg-up, .ly-pg-dn { display: flex; align-items: center; justify-content: center; width: 84px; height: 46px;
  border-radius: 12px; border: 1px solid var(--line, #dbe7ee); background: #f4fafd; font-size: 20px; cursor: pointer; user-select: none; }
.ly-pg-up:active, .ly-pg-dn:active { background: #e3f2fa; }
.ly-pg-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ly-pg-btn { font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line, #dbe7ee);
  background: #fff; color: var(--dim, #5b7385); cursor: pointer; }
.ly-pg-btn.on { background: var(--brand, #0ea5e9); border-color: var(--brand, #0ea5e9); color: #fff; }
.ly-pg-sep { width: 1px; height: 18px; background: var(--line, #dbe7ee); display: inline-block; }

/* R49b · 纸牌接龙（solitaire）/ 吃豆小幽灵（pacchase） */
.ly-sol-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.ly-sol-top { display: flex; align-items: flex-start; gap: 6px; }
.ly-sol-cell { position: relative; width: 58px; height: 82px; }
.ly-sol-gap { width: 10px; }
.ly-sol-card { width: 58px; height: 82px; border-radius: 7px; background: #fff; border: 1px solid rgba(15,36,48,.22);
  box-shadow: 0 1px 2px rgba(15,36,48,.12); box-sizing: border-box; padding: 3px 4px; display: flex;
  flex-direction: column; justify-content: space-between; color: #12232e; font-size: 13px; line-height: 1; cursor: pointer; }
.ly-sol-card b { font-weight: 800; }
.ly-sol-card i { align-self: flex-end; font-style: normal; font-size: 18px; opacity: .85; }
.ly-sol-card.red { color: #e11d48; }
.ly-sol-card.back { background: repeating-linear-gradient(45deg, #cfe6f5 0 6px, #b6d8ee 6px 12px); cursor: default; }
.ly-sol-card.sel { outline: 3px solid var(--brand, #0ea5e9); outline-offset: -1px; }
.ly-sol-slot { width: 58px; height: 82px; border-radius: 7px; border: 1px dashed rgba(15,36,48,.28);
  display: flex; align-items: center; justify-content: center; color: rgba(15,36,48,.35); font-size: 20px; box-sizing: border-box; }
.ly-sol-tab { display: flex; gap: 6px; align-items: flex-start; }
.ly-sol-pile { position: relative; width: 58px; }
.ly-sol-slotwrap { position: absolute; left: 0; width: 58px; }
.ly-sol-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ly-sol-tip { font-size: 12.5px; color: var(--dim, #5b7385); }
.ly-pc-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.ly-pc-cv { display: block; border-radius: 12px; border: 1px solid rgba(15,34,51,.35); background: #0f2233; touch-action: none; }
.ly-pc-tip { position: absolute; left: 10px; right: 10px; top: 50%; transform: translateY(-50%); z-index: 2; }
.pz-compact .ly-pc-tip[hidden] { display: none; }
.ly-pc-dpad { display: grid; grid-template-columns: repeat(4, 58px); gap: 8px; justify-content: center; }
.ly-pc-key { height: 46px; border-radius: 12px; border: 1px solid var(--line, #dbe7ee); background: #f4fafd;
  font-size: 19px; cursor: pointer; user-select: none; }
.ly-pc-key:active { background: #e3f2fa; }

/* R49c · 小鱼穿缝（flap）：Canvas 水域 + 屏上一个「往上游」按钮 */
.ly-fl-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }
.ly-fl-cv { display: block; border-radius: 12px; border: 1px solid rgba(15,34,51,.28); background: #bfeaf2; touch-action: none; }
.ly-fl-tip { position: absolute; left: 10px; right: 10px; top: 40%; transform: translateY(-50%); z-index: 2; }
.pz-compact .ly-fl-tip[hidden] { display: none; }
.ly-fl-bar { display: flex; justify-content: center; margin-top: 6px; }
.ly-fl-btn { width: 240px; height: 52px; border-radius: 14px; border: 1px solid var(--line, #dbe7ee);
  background: #f4fafd; font-size: 16px; font-weight: 700; color: #0f4a52; cursor: pointer; user-select: none; }
.ly-fl-btn:active { background: #dff1f8; }

/* R53 · 跑酷（runner）：Canvas 跑道 + 屏上「跳 / 蹲」 */
.ly-rn-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }
.ly-rn-cv { display: block; border-radius: 12px; border: 1px solid rgba(15,34,51,.28); background: #eef7fb; touch-action: none; }
.ly-rn-tip { position: absolute; left: 10px; right: 10px; top: 45%; transform: translateY(-50%); z-index: 2; }
.pz-compact .ly-rn-tip[hidden] { display: none; }
.ly-rn-bar { display: flex; gap: 12px; margin-top: 6px; }
.ly-rn-btn { width: 140px; height: 50px; border-radius: 14px; border: 1px solid var(--line, #dbe7ee);
  background: #f4fafd; font-size: 16px; font-weight: 700; color: #0b4a63; cursor: pointer; user-select: none; }
.ly-rn-btn.jump { background: #e8f7ee; border-color: #bfe7cd; color: #14603a; }
.ly-rn-btn:active { filter: brightness(.96); }

/* R54 · 跳跳天空（skyhop）/ 过马路（crossing） */
.ly-sh-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }
.ly-sh-cv { display: block; border-radius: 12px; border: 1px solid rgba(15,34,51,.22); background: #eaf4ff; touch-action: none; }
.ly-sh-tip { position: absolute; left: 10px; right: 10px; top: 45%; transform: translateY(-50%); z-index: 2; }
.pz-compact .ly-sh-tip[hidden] { display: none; }
.ly-sh-bar { display: flex; gap: 16px; margin-top: 8px; }
.ly-sh-btn { width: 120px; height: 50px; border-radius: 14px; border: 1px solid var(--line, #dbe7ee);
  background: #f4fafd; font-size: 20px; cursor: pointer; user-select: none; }
.ly-sh-btn:active { background: #e3f2fa; }
.ly-cr-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }
.ly-cr-cv { display: block; border-radius: 12px; border: 1px solid rgba(15,34,51,.22); background: #eef7fb; touch-action: none; }
.ly-cr-tip { position: absolute; left: 10px; right: 10px; top: 45%; transform: translateY(-50%); z-index: 2; }
.pz-compact .ly-cr-tip[hidden] { display: none; }
.ly-cr-pad { display: grid; grid-template-columns: repeat(4, 58px); gap: 8px; justify-content: center; margin-top: 8px; }
.ly-cr-key { height: 46px; border-radius: 12px; border: 1px solid var(--line, #dbe7ee); background: #f4fafd;
  font-size: 19px; cursor: pointer; user-select: none; }
.ly-cr-key:active { background: #e3f2fa; }

/* R55 · 星际穿越（原「过马路」）：画布改为深空底色，边框配冷色；
   仅覆盖颜色，不改尺寸与交互（尺寸由引擎按设计尺寸固定像素） */
.ly-cr-cv { background: #0c1c31; border-color: rgba(56,189,248,.28); }

/* ================================================================================
   R56 · 批 2 三款：漂移赛车（drift）/ 送货小车（parking）/ 赛道换道（racer）
   类名前缀 ly-df-* / ly-pk-* / ly-rc-*（只增不改，追加末尾）
   ================================================================================ */
.ly-df-wrap, .ly-pk-wrap, .ly-rc-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }
.ly-df-cv, .ly-pk-cv, .ly-rc-cv { display: block; border-radius: 12px; border: 1px solid rgba(15,34,51,.30); touch-action: none; }
.ly-df-cv, .ly-pk-cv { background: #121024; }
.ly-rc-cv { background: #151026; }
.ly-df-tip, .ly-pk-tip, .ly-rc-tip { position: absolute; left: 10px; right: 10px; top: 45%; transform: translateY(-50%); z-index: 2; }
.pz-compact .ly-df-tip[hidden], .pz-compact .ly-pk-tip[hidden], .pz-compact .ly-rc-tip[hidden] { display: none; }
.ly-df-pad, .ly-pk-pad { display: grid; grid-template-columns: repeat(4, 58px); gap: 8px; justify-content: center; margin-top: 8px; }
.ly-rc-pad { display: grid; grid-template-columns: repeat(3, 68px); gap: 8px; justify-content: center; margin-top: 8px; }
.ly-df-key, .ly-pk-key, .ly-rc-key { height: 46px; border-radius: 12px; border: 1px solid var(--line, #dbe7ee);
  background: #f4fafd; font-size: 19px; color: var(--ink, #0f2430); cursor: pointer; user-select: none; }
.ly-rc-key { font-size: 15px; font-weight: 700; }
.ly-df-key.on, .ly-pk-key.on, .ly-rc-key.on { background: #d8eefb; }
.ly-df-key:active, .ly-pk-key:active, .ly-rc-key:active { background: #e3f2fa; }

/* R56 修正：提示条不能盖住玩家自己的车——
   parking 的车在画面正中（50%），原提示条正好压在中心，孩子会找不到自己的车；
   drift 的车在圆环顶部（约 22%），所以提示条下移到 32%。 */
.pz-compact .ly-pk-tip { top: 24%; }
.pz-compact .ly-df-tip { top: 32%; }

/* ================================================================================
   R57 · 流星守护（missile）/ 太空小卫士（invaders）/ 跳跃大冒险（platformer）
   类名前缀 ly-ms-* / ly-iv-* / ly-pl-*（只增不改，追加末尾）
   ================================================================================ */
.ly-ms-wrap, .ly-iv-wrap, .ly-pl-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }
.ly-ms-cv, .ly-iv-cv, .ly-pl-cv { display: block; border-radius: 12px; border: 1px solid rgba(15,34,51,.30); touch-action: none; }
.ly-ms-cv, .ly-iv-cv { background: #07050f; }
.ly-pl-cv { background: #0d1420; }
.ly-ms-tip, .ly-iv-tip, .ly-pl-tip { position: absolute; left: 10px; right: 10px; top: 44%; transform: translateY(-50%); z-index: 2; }
.pz-compact .ly-ms-tip[hidden], .pz-compact .ly-iv-tip[hidden], .pz-compact .ly-pl-tip[hidden] { display: none; }
.ly-iv-pad, .ly-pl-pad { display: grid; grid-template-columns: repeat(3, 68px); gap: 8px; justify-content: center; margin-top: 8px; }
.ly-iv-key, .ly-pl-key { height: 46px; border-radius: 12px; border: 1px solid var(--line, #dbe7ee);
  background: #f4fafd; font-size: 17px; font-weight: 700; color: var(--ink, #0f2430); cursor: pointer; user-select: none; }
.ly-iv-key.fire { background: #e8f7ee; border-color: #bfe7cd; color: #14603a; }
.ly-pl-key.jump { background: #e8f1ff; border-color: #c0d8f5; color: #1b4a86; }
.ly-iv-key.on, .ly-pl-key.on { background: #d8eefb; }

/* ================================================================================
   R58 · 星际巡逻（shooter）——矢量太空射击，触屏用「左半屏移动 / 右半屏瞄准开火」
   类名前缀 **ly-st-***（shooter）。注意：`ly-sh-*` 已被 R54 的「跳跳天空 skyhop」占用，
   这里必须用 st 前缀，否则会覆盖 skyhop 的画布背景/提示位置（R58 曾因此把跳跳天空改坏）。
   ================================================================================ */
.ly-st-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }
.ly-st-cv { display: block; border-radius: 12px; border: 1px solid rgba(15,34,51,.42);
  background: #05070d; touch-action: none; }
.ly-st-tip { position: absolute; left: 10px; right: 10px; top: 42%; transform: translateY(-50%); z-index: 2; }
.pz-compact .ly-st-tip[hidden] { display: none; }

/* ================================================================================
   R59 · 球类运动三款：迷你高尔夫（minigolf）/ 桌面冰球（airhockey）/ 桌上台球（pool）
   类名前缀 ly-mg-* / ly-ah-* / ly-po-*（已 grep 确认无重复，追加末尾）
   ================================================================================ */
.ly-mg-wrap, .ly-ah-wrap, .ly-po-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }
.ly-mg-cv, .ly-ah-cv, .ly-po-cv { display: block; border-radius: 12px; border: 1px solid rgba(15,34,51,.35); touch-action: none; }
.ly-mg-cv { background: #12301f; }
.ly-ah-cv { background: #101a30; }
.ly-po-cv { background: #5a3a1c; }
.ly-mg-tip, .ly-ah-tip, .ly-po-tip { position: absolute; left: 10px; right: 10px; top: 44%; transform: translateY(-50%); z-index: 2; }
.pz-compact .ly-mg-tip[hidden], .pz-compact .ly-ah-tip[hidden], .pz-compact .ly-po-tip[hidden] { display: none; }

/* R59 修正：提示条不能压住球。
   pool 的白球与彩球都在台面中线（约 50%），原 tip 44% 正好盖住球；
   airhockey 的冰球在 50%，同理。迷你高尔夫球在 88%、洞在 17%，44% 本来就不挡，保持不变。 */
.pz-compact .ly-po-tip { top: 16%; }
.pz-compact .ly-ah-tip { top: 24%; }

/* ================================================================================
   R60 · 投篮（hoops）/ 保龄球（bowling）/ 塔防（defence）
   类名前缀 ly-hp-* / ly-bw-* / ly-de-*（已 grep 确认无重复，追加末尾）
   注意：`ly-df-*` 已被 R56 的漂移赛车占用，所以塔防用 de，不要写成 df。
   ================================================================================ */
.ly-hp-wrap, .ly-bw-wrap, .ly-de-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }
.ly-hp-cv, .ly-bw-cv, .ly-de-cv { display: block; border-radius: 12px; border: 1px solid rgba(15,34,51,.35); touch-action: none; }
.ly-hp-cv, .ly-bw-cv { background: #2a1a12; }
.ly-de-cv { background: #0c1020; }
.ly-hp-tip, .ly-bw-tip, .ly-de-tip { position: absolute; left: 10px; right: 10px; top: 44%; transform: translateY(-50%); z-index: 2; }
.pz-compact .ly-hp-tip[hidden], .pz-compact .ly-bw-tip[hidden], .pz-compact .ly-de-tip[hidden] { display: none; }

/* 塔防的两排按钮 */
.ly-de-row { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 6px; width: 100%; min-height: 48px; }
.ly-de-sub { display: flex; gap: 8px; justify-content: center; width: 100%; }
.ly-de-sub[hidden] { display: none; }
/* R60：按钮做大一点——手机 390 宽时整块会等比缩小，小字会看不清 */
.ly-de-btn { flex: 1 1 0; min-width: 0; max-width: 210px; height: 46px; padding: 0 8px; border-radius: 12px;
  border: 1px solid var(--line, #dbe7ee); background: #f4fafd; color: var(--ink, #0f2430);
  font-size: 17px; font-weight: 700; cursor: pointer; user-select: none; white-space: nowrap; }
.ly-de-btn.on { background: #d8eefb; border-color: #93cfe8; }
.ly-de-btn.wave { background: #e8f7ee; border-color: #bfe7cd; color: #14603a; }
.ly-de-btn.up { background: #e8f1ff; border-color: #c0d8f5; color: #1b4a86; }
.ly-de-btn.poor { opacity: .45; }
.ly-de-btn:disabled { opacity: .35; cursor: default; }
.ly-de-btn:not(:disabled):active { filter: brightness(.96); }
