/* ==========================================================================
   H5 手机壳预览（仅桌面浏览器开启；手机 / 平板端不套壳，直接全屏铺满）
   --------------------------------------------------------------------------
   由 template.h5.html 注入 .phone-stage 外壳，应用本体通过 iframe 承载
   （拥有独立视口 393×852，100vh / 固定定位 / 触底加载均不受影响），
   外层文档只负责画机身与状态栏，故 App / 小程序端完全不受影响。
   开关判据见 template.h5.html 的 isDesktopBrowser()：UA 移动标识 /
   iPad 桌面模式 / 视口宽度 < 768 任意命中即关闭。
   桌面端想按原样铺满：地址后加 ?_h5phone=0。
   所有选择器都挂在 .phone-* / html.h5-phone-mode 下，不会污染其它端与页面。
   ========================================================================== */

html.h5-phone-mode,
html.h5-phone-mode body {
	height: 100%;
	margin: 0;
	overflow: hidden;
	background: #ffffff;
}
/* 外壳模式下外层文档不再挂载应用本体（main.js 里同步跳过挂载），这里再兜底隐藏一次 */
html.h5-phone-mode #app {
	display: none !important;
}

.phone-stage {
	position: fixed;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
	z-index: 2147483000;
}

/* ---------------- 机身 ---------------- */
.phone-device {
	position: relative;
	width: 415px;
	height: 874px;
	border-radius: 62px;
	background: linear-gradient(158deg, #43464e 0%, #1a1c21 26%, #0a0b0e 64%, #30333a 100%);
	box-shadow: 0 0 0 2px #000, 0 26px 60px rgba(0, 0, 0, .26);
	transform-origin: center center;
}

/* 侧边按键：画在机身外侧，不遮挡屏幕内容 */
.phone-btn {
	position: absolute;
	width: 4px;
	background: linear-gradient(180deg, #4a4e57 0%, #1c1e23 100%);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .75);
}
.phone-btn-mute { left: -4px; top: 148px; height: 32px; border-radius: 3px 0 0 3px; }
.phone-btn-vol-up { left: -4px; top: 208px; height: 62px; border-radius: 3px 0 0 3px; }
.phone-btn-vol-down { left: -4px; top: 284px; height: 62px; border-radius: 3px 0 0 3px; }
.phone-btn-power { right: -4px; top: 226px; height: 94px; border-radius: 0 3px 3px 0; }

/* ---------------- 屏幕：44px 状态栏区 + 应用视口 + 34px 指示条区 ---------------- */
.phone-screen {
	position: absolute;
	left: 11px;
	top: 11px;
	width: 393px;
	height: 852px;
	display: flex;
	flex-direction: column;
	border-radius: 50px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .07);
}
.phone-topbar {
	position: relative;
	flex: none;
	height: 44px;
	background: #101114;
	color: #fff;
}
.phone-time {
	position: absolute;
	left: 30px;
	top: 0;
	height: 44px;
	line-height: 44px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .2px;
}
/* 灵动岛 */
.phone-island {
	position: absolute;
	left: 50%;
	top: 5px;
	width: 118px;
	height: 34px;
	margin-left: -59px;
	border-radius: 20px;
	background: #000;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.phone-island::after {
	content: "";
	position: absolute;
	right: 14px;
	top: 12px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: radial-gradient(circle at 34% 34%, #2b4a72 0%, #0a1420 62%, #05080d 100%);
}
.phone-sysicons {
	position: absolute;
	right: 26px;
	top: 0;
	height: 44px;
	display: flex;
	align-items: center;
}
.phone-sysicons svg {
	display: block;
	fill: #fff;
}
.phone-sys-signal { width: 18px; height: 12px; margin-right: 6px; }
.phone-sys-wifi { width: 17px; height: 12px; margin-right: 6px; }
.phone-sys-battery { width: 26px; height: 13px; }

/* 应用视口 */
.phone-frame {
	flex: 1;
	width: 100%;
	border: 0;
	display: block;
	background: #fff;
}
.phone-bottombar {
	position: relative;
	flex: none;
	height: 34px;
	background: #101114;
}
.phone-home {
	position: absolute;
	left: 50%;
	top: 15px;
	width: 140px;
	height: 5px;
	margin-left: -70px;
	border-radius: 3px;
	background: rgba(255, 255, 255, .92);
}