/* 站点页面切换键：固定右下角，轻量玻璃胶囊；文案工具与海边片刻共用。 */
#portal-switch{
  position:fixed;
  right:max(14px,env(safe-area-inset-right));
  bottom:max(14px,env(safe-area-inset-bottom));
  z-index:40;
  display:flex;
  align-items:center;
  gap:2px;
  padding:3px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  background:rgba(17,24,32,.72);
  color:#f3efe6;
  box-shadow:0 8px 24px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.08);
  -webkit-backdrop-filter:blur(14px) saturate(1.2);
  backdrop-filter:blur(14px) saturate(1.2);
  font-family:ui-sans-serif,system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:12px;
  line-height:1;
  letter-spacing:.02em;
  box-sizing:border-box;
  user-select:none;
  -webkit-user-select:none;
  opacity:.92;
  transition:opacity .18s ease;
}
#portal-switch:hover,#portal-switch:focus-within{opacity:1}
#portal-switch .ps-icon{
  display:flex;
  width:22px;
  height:26px;
  align-items:center;
  justify-content:center;
  opacity:.62;
  flex:none;
}
#portal-switch .ps-icon svg{width:13px;height:13px;display:block}
#portal-switch a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:26px;
  padding:0 10px;
  margin:0;
  border:0;
  border-radius:999px;
  background:transparent;
  color:rgba(243,239,230,.78);
  text-decoration:none;
  white-space:nowrap;
  font:inherit;
  font-weight:500;
  transition:background .16s ease,color .16s ease;
  -webkit-tap-highlight-color:transparent;
}
#portal-switch a:hover{background:rgba(255,255,255,.12);color:#fff}
#portal-switch a[aria-current="page"]{background:#f3efe6;color:#1a222b;font-weight:600}
#portal-switch a:focus-visible{outline:2px solid #f3efe6;outline-offset:2px}
@media (max-width:480px){
  #portal-switch{right:10px;bottom:10px}
  #portal-switch .ps-icon{display:none}
  #portal-switch a{height:24px;padding:0 9px;font-size:11.5px}
}
@media print{#portal-switch{display:none!important}}

/* 文案工具页为底部切换键预留一条窄带，避免悬浮键盖住分页和表单控件。 */
body:has(#batch-studio){padding-bottom:calc(52px + env(safe-area-inset-bottom))!important}
@media (max-width:480px){
  body:has(#batch-studio){padding-bottom:calc(46px + env(safe-area-inset-bottom))!important}
}

/* 登录/管理页：底部留出切换键的空间，避免最后一个按钮被悬浮键挡住。 */
body:has(main.admin){padding-bottom:calc(64px + env(safe-area-inset-bottom))!important}
