/* ===== small-window.css — 全站小窗口页壳（2026-08-13 建） =====
 * 用途：独立业务页（fxzb/dining/filmvip/jd/wash/terms/privacy 等）统一为
 *   "桌面 = 灰色背景 + 居中白色卡片小窗；移动 = 满屏单栏"。
 * 用法：<body class="sw"><div class="sw-win">
 *         <div class="sw-header"><div class="t">标题</div><button class="sw-close" id="closeBtn">✕</button></div>
 *         <div class="sw-body">…业务内容…</div>
 *       </div></body>
 * 关闭按钮逻辑（页面内联）：
 *   closeBtn.onclick = function(){ var ref=document.referrer||''; if(ref&&ref.indexOf(location.host)>-1&&history.length>1){history.back();return;} location.href='/'; };
 * 前缀 sw-* 避免与页面业务 class 冲突；字号走全局 --fs-* Token（shared.css 提供）。
 */
html, body { margin: 0; padding: 0; }
body.sw {
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif);
  background: #f5f6f8; color: #222; line-height: 1.6; -webkit-font-smoothing: antialiased;
  display: flex; justify-content: center; min-height: 100vh;
}
.sw-win { width: 100%; max-width: 480px; min-height: 100vh; background: #fff; display: flex; flex-direction: column; overflow: hidden; }
.sw-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: #fff; color: #1a1a1a; border-bottom: 1px solid #eee;
}
.sw-header .t { font-size: var(--fs-md, 17px); font-weight: 700; }
.sw-header .sub { font-size: var(--fs-2xs, 12px); color: #888; margin-top: 1px; font-weight: 400; }
.sw-header .close {
  width: 36px; height: 36px; border: none; background: #f5f5f5; color: #666; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-secondary, 15px); margin-left: auto; flex-shrink: 0;
}
.sw-header .close:active { background: #e9eaee; color: #333; }
.sw-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.sw-body::-webkit-scrollbar { width: 3px; }
.sw-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
/* 桌面 ≥768px：居中手机窗（对齐 sd-app 式样：390px + 黑色 bezel + 56px 圆角） */
@media (min-width: 768px) {
  body.sw { background: #dfe2e6; align-items: center; padding: 0; }
  .sw-win { width: 390px; max-width: none; min-height: 0; height: min(844px, 92vh); border: 12px solid #0b0b0d; border-radius: 56px; box-shadow: 0 30px 70px rgba(0,0,0,.28); }
}
