/* 沙盒模式（apply_sandbox_mode.py 生成）
   只保留学科沙盒：隐藏账号/积分/推广元素；移动端与横屏适配 */
/* 1. 顶栏账号簇：积分/通知/在线购买/卡密兑换/头像/退出登录 */
.zzz-acct{display:none!important}

/* 2. 右下角悬浮「免费资源」帮助入口 + 资源包推广弹窗 */
button[aria-label="免费资源"]{display:none!important}
[aria-labelledby="resource-pack-prompt-title"]{display:none!important}

/* 3. 沙盒列表电路卡的「免登录链接」（课堂分享，属账号权益功能） */
.sandbox-hub__classroom{display:none!important}

/* 4. 手机底栏只剩「学科沙盒」一项：收紧为居中的小家钮 */
nav.fixed.inset-x-0.bottom-0{padding-bottom:env(safe-area-inset-bottom)}
nav.fixed.inset-x-0.bottom-0>div{max-width:180px}

/* 5. 桌面端顶栏已无实际内容（品牌在侧栏、账号簇已隐藏）：隐藏这条空条，给内容让位 */
@media (min-width:768px){
  main>div>header{display:none!important}
}

/* 6. 矮窗口/横屏：沙盒列表改 3 列紧凑排布，压缩头图与文字，一屏看更多 */
@media (min-width:640px) and (max-height:620px){
  .sandbox-hub__grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media (max-height:620px){
  .sandbox-hub{padding:14px 20px 22px!important}
  .sandbox-hub h1{font-size:20px!important;margin-bottom:12px!important}
  .sandbox-hub__grid{gap:12px!important}
  .sandbox-hub__preview{aspect-ratio:2.4!important}
  .sandbox-hub__name h2{font-size:14px!important}
  .sandbox-hub__entry{padding:8px!important}
  .sandbox-hub__explore{padding:6px 12px!important;font-size:12px!important}
}

/* 7. 防止任何横向溢出 */
html,body{overflow-x:hidden}

/* 8. 微信内置浏览器引导层 */
#wx-open-guide{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;
  padding:24px;background:linear-gradient(160deg,#2b2118 0%,#4b382a 60%,#5d4634 100%);color:#f7f2ea;
  font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif}
#wx-open-guide .wxg-card{width:100%;max-width:340px;text-align:center}
#wx-open-guide .wxg-icon{width:64px;height:64px;margin:0 auto 18px;border-radius:20px;
  background:rgba(255,255,255,.12);display:flex;align-items:center;justify-content:center}
#wx-open-guide .wxg-icon svg{width:34px;height:34px;stroke:#f7f2ea;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#wx-open-guide h2{margin:0 0 10px;font-size:20px;font-weight:700;letter-spacing:.02em}
#wx-open-guide p{margin:0 0 8px;font-size:13px;line-height:1.7;color:rgba(247,242,234,.78)}
#wx-open-guide .wxg-steps{margin:14px 0 18px;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.08);
  font-size:13px;line-height:1.9;text-align:left;color:rgba(247,242,234,.9)}
#wx-open-guide .wxg-steps b{color:#ffd9a0}
#wx-open-guide .wxg-copy{display:inline-flex;align-items:center;justify-content:center;gap:6px;
  width:100%;height:46px;border:none;border-radius:23px;background:#f7f2ea;color:#4b382a;
  font-size:15px;font-weight:700;cursor:pointer;transition:transform .12s}
#wx-open-guide .wxg-copy:active{transform:scale(.97)}
#wx-open-guide .wxg-skip{margin-top:14px;font-size:12px;color:rgba(247,242,234,.55);
  background:none;border:none;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
@media (max-height:520px){ /* 横屏手机：压缩引导层 */
  #wx-open-guide .wxg-card{max-width:420px}
  #wx-open-guide .wxg-icon{width:44px;height:44px;margin-bottom:10px;border-radius:14px}
  #wx-open-guide .wxg-icon svg{width:24px;height:24px}
  #wx-open-guide h2{font-size:17px;margin-bottom:6px}
  #wx-open-guide p{font-size:12px;margin-bottom:4px}
  #wx-open-guide .wxg-steps{margin:8px 0 12px;padding:8px 12px;font-size:12px;line-height:1.6}
  #wx-open-guide .wxg-copy{height:40px;font-size:14px}
  #wx-open-guide .wxg-skip{margin-top:8px}
}
