/* ============================================================
   华栋字能 App 壳样式 V1.2（2026-11-04，r313）
   作用：配合 app-shell.js 在「App 模式」下给功能页换上 App 化的顶栏
   （卡通 IP 头像占位）+ 底部五 tab，隐藏官网页头/页脚/浮标/安装条。
   全部规则挂在 body.pwa-app 下，该类名只在手机 / 平板进 App 模式时
   由 app-shell.js / app.html 打上；PC 端永不带该类名，样式零生效。
   ============================================================ */
body.pwa-app #siteHeader,
body.pwa-app #siteFooter,
body.pwa-app #hdFab,
body.pwa-app #hdAiFab,
body.pwa-app #hdzInstall { display: none !important; }

body.pwa-app:not([data-ap]) { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }

/* 顶栏 */
.pw-top {
  position: sticky; top: 0; z-index: 9990;
  background: rgba(251, 248, 241, .96);
  border-bottom: 1px solid var(--line, #D8D3C8);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
}
.pw-top .pw-back {
  border: 0; background: transparent; cursor: pointer; flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink, #201E1A);
}
.pw-top .pw-back svg { width: 20px; height: 20px; }
.pw-top .pw-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none; overflow: hidden;
  background: #0E7A43; color: #fbf8f1;
  display: flex; align-items: center; justify-content: center;
}
.pw-top .pw-mark img { width: 100%; height: 100%; display: block; }
.pw-top .pw-tt { min-width: 0; }
.pw-top .pw-tt b {
  display: block; font-size: 15px; font-weight: 700; letter-spacing: .4px;
  color: var(--ink, #201E1A);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pw-top .pw-tt span {
  display: block; font-size: 11px; color: var(--ink-3, #6E6A62); margin-top: 1px;
}
.pw-top .pw-home {
  margin-left: auto; flex: none; text-decoration: none;
  font-size: 12px; font-weight: 600; color: #0E7A43;
  border: 1px solid rgba(14, 122, 67, .25); background: rgba(14, 122, 67, .08);
  padding: 5px 12px; border-radius: 999px;
}

/* 底部 tab（与 app.html 同款口径） */
.pw-tab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9991;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line, #D8D3C8);
  display: flex; justify-content: center; backdrop-filter: blur(8px);
}
.pw-tab .in { display: flex; width: 100%; max-width: 560px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); }
.pw-tab button {
  flex: 1; border: 0; background: transparent; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 0 2px; color: var(--ink-3, #6E6A62); border-radius: 12px;
}
.pw-tab button .ic { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.pw-tab button .ic svg { width: 22px; height: 22px; }
.pw-tab button span { font-size: 10.5px; font-weight: 600; letter-spacing: .3px; }
.pw-tab button.on { color: #0E7A43; }

/* 平板：tab 与内容放宽 */
@media (min-width: 600px) {
  .pw-top { padding: 12px 22px; }
  .pw-top .pw-mark { width: 38px; height: 38px; border-radius: 11px; }
  .pw-top .pw-tt b { font-size: 17.5px; }
  .pw-top .pw-tt span { font-size: 12px; }
  .pw-tab .in { max-width: 840px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .pw-tab button .ic svg { width: 26px; height: 26px; }
  .pw-tab button span { font-size: 12px; }
}
/* PC 预览（鼠标设备）：r313 起 App 壳不再上 PC，该媒体查询已废弃并移除
   —— PC 端恒为官网布局，手机 / 平板才进 App 模式 */
