/* 物理场 · 全屏物理游乐场：Matter.js 刚体 + 空气曲棍球，雾青玻璃配色 */
html, body { height: 100%; }
body.page-physics {
  margin: 0; overflow: hidden; color: #e8f1fa;
  background:
    radial-gradient(1100px 620px at 18% -8%, rgba(45, 212, 191, .13), transparent 60%),
    radial-gradient(1000px 700px at 88% 108%, rgba(108, 180, 238, .14), transparent 60%),
    linear-gradient(180deg, #081120 0%, #060d18 55%, #050a13 100%);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#ph-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }

/* P3-12 返工（2026-11-29 fixE）：1440 下方块约 1 秒沉底、堆叠仅一块高，中部复空；
   中段加淡点阵常驻填充（只改视觉，不改玩法、不加中层搁板）；方块分批落下见 JS。 */
body.page-physics::before {
  content: "";
  position: fixed; left: 0; right: 0; top: 24%; height: 52%; z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(closest-side, rgba(108, 180, 238, 0.07), transparent),
    radial-gradient(rgba(140, 190, 245, 0.22) 1.6px, transparent 2.2px);
  background-size: 100% 100%, 42px 42px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
#ph-canvas:active { cursor: grabbing; }

/* 与 /time/ 同例：本页只加载 vision-glass，导航胶囊补 box-sizing；自动页脚隐藏 */
.wb-nav, .wb-nav *, .wb-mobile-panel, .wb-mobile-panel *, .wb-mobile-scrim { box-sizing: border-box; }
.vision-footer { display: none; }

.ph-hud { position: fixed; top: 96px; left: 20px; z-index: 5; pointer-events: none; }
.ph-title { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: .12em; color: #f2f8ff; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.ph-hint { margin: 6px 0 0; font-size: 12.5px; letter-spacing: .06em; color: rgba(201, 220, 242, .78); transition: opacity .8s; }
.ph-hint.is-dim { opacity: .38; }

.ph-score {
  position: fixed; top: 96px; right: 20px; z-index: 5; pointer-events: none;
  display: flex; gap: 8px; align-items: baseline;
  padding: 8px 16px; border-radius: 999px; font-size: 14px; letter-spacing: .05em;
  background: rgba(10, 20, 38, .48); border: 1px solid rgba(140, 180, 230, .26);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.ph-score[hidden] { display: none; }
.ph-score i { font-style: normal; opacity: .5; }
.ph-score b { font-size: 17px; color: #ffe9b0; font-variant-numeric: tabular-nums; }

.ph-banner {
  position: fixed; left: 50%; top: 44%; transform: translate(-50%, -50%); z-index: 6; pointer-events: none;
  font-size: clamp(30px, 7vw, 52px); font-weight: 900; letter-spacing: .14em; color: #fff;
  text-shadow: 0 0 34px rgba(108, 180, 238, .65), 0 4px 26px rgba(0, 0, 0, .5);
  transition: opacity .3s;
}
.ph-banner[hidden] { display: none; }

.ph-controls {
  position: fixed; left: 0; right: 0; z-index: 7;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 14px;
}
.ph-seg {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(10, 20, 38, .55); border: 1px solid rgba(140, 180, 230, .28);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.ph-seg button {
  appearance: none; border: 0; background: transparent; color: #c9dcf2; cursor: pointer;
  font-size: 13.5px; letter-spacing: .08em; padding: 8px 16px; border-radius: 999px;
  transition: background .18s, color .18s;
}
.ph-seg button.is-on { background: rgba(108, 180, 238, .28); color: #fff; }
.ph-btn {
  appearance: none; cursor: pointer; color: #e6f1fd; font-size: 13.5px; letter-spacing: .1em;
  border: 1px solid rgba(140, 180, 230, .30); background: rgba(10, 20, 38, .48);
  border-radius: 999px; padding: 10px 18px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .18s, background .18s;
}
.ph-btn:hover { border-color: rgba(140, 190, 245, .65); }
.ph-btn:active { transform: scale(.96); }

.ph-settings {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 7;
  bottom: calc(76px + env(safe-area-inset-bottom));
  width: min(430px, calc(100vw - 28px));
  padding: 16px 18px 12px; border-radius: 18px;
  background: rgba(9, 18, 33, .78); border: 1px solid rgba(140, 180, 230, .30);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .4);
}
.ph-settings[hidden] { display: none; }
.ph-set-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ph-set-label { flex: 0 0 64px; font-size: 13px; letter-spacing: .06em; color: #c9dcf2; }
.ph-seg-sm button { padding: 6px 13px; font-size: 13px; }
.ph-set-row input[type="range"] { flex: 1; accent-color: #6cb4ee; height: 28px; }
.ph-fric-val { flex: 0 0 44px; text-align: right; font-size: 13px; color: #ffe9b0; font-variant-numeric: tabular-nums; }
.ph-set-note { margin: 2px 0 4px; font-size: 12px; color: rgba(201, 220, 242, .6); letter-spacing: .04em; }

@media (max-width: 640px) {
  .ph-hud { top: 86px; left: 14px; }
  .ph-score { top: 86px; right: 14px; }
  .ph-title { font-size: 18px; }
}
