@font-face {
	font-family: 'Zpix';
	src: url('/holdem/fonts/zpix.woff2') format('woff2'),
	     url('/holdem/fonts/zpix.ttf') format('truetype');
	font-display: swap;
}

* {
	box-sizing: border-box;
	font-family: 'Zpix', monospace, sans-serif;
	-webkit-font-smoothing: none;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: pixelated;
}

html, body {
	margin: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #000000;
}

/* ================= 舞台外壳 (登录后由 vDOM 生成) ================= */

.viewport {
	width: 100vw;
	height: 100vh;
	display: grid;
	place-items: center;
}

.stage {
	position: relative;
	aspect-ratio: 9 / 16;
	width: min(100vw, calc(100vh * 9 / 16));
	height: min(100vh, calc(100vw * 16 / 9));
	/* 抽屉收起时滑出舞台，需要裁剪（否则会在舞台外露出） */
	overflow: hidden;
	/*
	 * 舞台边界虚线框：方便开发时看清 9:16 舞台的实际范围。
	 * 必须用 outline 而非 border —— border 会占位，压缩内容区并把所有
	 * 绝对定位子元素（卡片/按钮）向内挤 1px；outline 不参与布局。
	 * 上线前若不想要这条辅助线，删掉本行即可。
	 */
	outline: 1px dashed rgba(255, 255, 255, 0.6);
	/* 1 个 --uu = 舞台短边的 1%，用于让卡片等控件随布局等比缩放 */
	--uu: min(1vw, 0.5625vh);
	/* 顶部信息条卡片高度 (昵称卡 / 在线人数卡 / 改名按钮共用) */
	--top-card-h: calc(var(--uu) * 8.4 + 4px);
	/* 地平线：以上是木饰墙面、以下是地毯地面（贴图见下节） */
	--bg-horizon: 28%;
}

/* ============ 大厅背景：墙面 + 地面 + 镜前灯光 (vDOM 实体 `lobby_bg_wall` / `lobby_bg_floor` / `lobby_glow`) ============ */
/*
 * 三个节点由服务端在 FULL_SYNC 里下发（`buildLobbyBackgroundVNodes()`，parent = stage），
 * 自身都是 `z-index: 0`，靠**数组顺序**叠放：墙 → 地面 → 灯光。
 * 所以灯光盖在两张贴图之上，又在小人（`.guides` z-index: 1）/ 顶部信息条（z-index: 2）之下。
 * - 墙面 `casinowall.jpg`：铺满「顶部 ~ 地平线」这条带子，`cover` + 底部对齐
 *   （保留贴图下沿的墙裙，正好落在地平线上）；
 * - 地面 `casinofloor2.jpg`（1024×1024 木板纹理，上下/左右接缝都近乎连续）：从地平线铺到底部，
 *   **横向铺 2 张**（`background-size: 50% auto` → 每块 = 半个舞台宽，图案缩小一半），
 *   左右/上下都 `repeat`（贴图本身四边无缝）；左对齐保证两张刚好占满宽度；
 * - 灯光 `lobby_glow`：镜子处的淡黄色径向渐变 + 烛光闪烁，详见 `.lobby-glow`。
 * 舞台尺寸变化时全部按百分比自适应。
 */
.lobby-bg-wall,
.lobby-bg-floor {
	position: absolute;
	left: 0;
	width: 100%;
	z-index: 0;
	pointer-events: none;
}

.lobby-bg-wall {
	top: 0;
	height: var(--bg-horizon);
	/* 兜底底色是深木色：贴图加载失败时也不会露出纯黑 */
	background: #2a1d14 url("/holdem/etc/casinowall.jpg") center bottom / cover no-repeat;
}

.lobby-bg-floor {
	top: var(--bg-horizon);
	bottom: 0;
	/* 横向铺 2 张（50% 宽）+ 双向平铺：图案缩到一半，木板比例更接近真人尺寸 */
	background: #241610 url("/holdem/etc/casinofloor2.jpg") left top / 50% auto repeat;
}

/*
 * 墙壁镜子处的灯光遮罩（淡黄色径向渐变：中心约 50% 不透明、外侧完全透明）
 *
 * 位置对准墙面贴图里的镜子：casinowall.jpg 中镜面在 x 57.3%~79.7%、y 28%~54%，
 * 经 `background-size: cover` + `bottom` 对齐换算到舞台坐标 ≈ (65.5%, 9.3%)（已在浏览器里比对过实渲染）。
 * 叠放顺序：墙 → 地面 → 灯光（三者同为 z-index 0，靠 DOM 顺序决定），
 * 所以灯光压在两张贴图之上，又在小人（`.guides` z-index 1）与顶部信息条（z-index 2）之下。
 * 尺寸用 --uu（= 舞台短边 1%）保持圆形，换屏幕尺寸不会变形。
 * 闪烁只动 `opacity`（模拟烛光）；系统开了「减少动态效果」时停掉。
 */
.lobby-glow {
	position: absolute;
	left: 65.5%;
	top: 9.3%;
	width: calc(var(--uu) * 64);
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	z-index: 0;
	pointer-events: none;
	background: radial-gradient(
		closest-side,
		rgba(255, 236, 170, 0.5) 0%,
		rgba(255, 230, 158, 0.44) 50%,
		rgba(255, 220, 130, 0.2) 80%,
		rgba(255, 205, 90, 0) 100%
	);
	animation: lobby-glow-flicker 5.4s ease-in-out infinite;
}

@keyframes lobby-glow-flicker {
	0%, 100% { opacity: 0.82; }
	9% { opacity: 1; }
	18% { opacity: 0.72; }
	27% { opacity: 0.94; }
	38% { opacity: 0.68; }
	47% { opacity: 0.9; }
	57% { opacity: 0.76; }
	68% { opacity: 0.98; }
	78% { opacity: 0.7; }
	88% { opacity: 0.88; }
}

@media (prefers-reduced-motion: reduce) {
	.lobby-glow {
		animation: none;
	}
}


/* ================= 登录面板 (登录前；登录后整个 <body> 交由 vDOM 接管) ================= */

#divLogin {
	position: fixed;
	inset: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 16px;
	background: #000000;
	z-index: 10;
}

.login-card {
	width: min(320px, 100%);
	padding: 24px 20px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 8px;
	background: transparent;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.login-title {
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 1px;
}

#divLogin input {
	width: 100%;
	height: 40px;
	padding: 0 12px;
	font-size: 14px;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 8px;
	outline: none;
	transition: border-color 0.2s, background 0.2s;
}

#divLogin input:focus {
	background: rgba(255, 255, 255, 0.1);
	border-color: #ffffff;
}

#btnAuthSubmit {
	width: 100%;
	height: 40px;
	padding: 0 16px;
	font-size: 14px;
	font-weight: 700;
	color: #ffffff;
	background: transparent;
	border: 1px solid #ffffff;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

#btnAuthSubmit:hover {
	background: #ffffff;
	color: #000000;
}

/* 次要按钮：切换「登录 / 注册」 */
#btnAuthSwitch {
	width: 100%;
	height: 34px;
	padding: 0 16px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.85);
	background: transparent;
	border: 1px dashed rgba(255, 255, 255, 0.4);
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s;
}

#btnAuthSwitch:hover {
	border-color: #ffffff;
	color: #ffffff;
}

/* 表单提示：默认灰（状态），错误变红 */
.login-hint {
	min-height: 1.2em;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
	color: rgba(255, 255, 255, 0.6);
	word-break: break-all;
}

.login-hint.is-error {
	color: #ff8a8a;
}

/* 通用隐藏（注册 / 找回密码时才显示的输入框与按钮等） */
.is-hidden {
	display: none !important;
}

/* 文字链接式按钮（如「忘记密码？」） */
.link-button {
	padding: 2px 6px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.65);
	background: transparent;
	border: none;
	text-decoration: underline;
	cursor: pointer;
}

.link-button:hover {
	color: #ffffff;
}

#btnSendCode:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ================= 大厅「修改昵称」按钮样式见下方顶部信息条 ================= */

/* ================= 「修改昵称」对话框 (客户端自绘，不进 vDOM) ================= */
.rename-overlay {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.65);
}

.rename-dialog {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: min(300px, 88vw);
	padding: 18px;
	color: #ffffff;
	background: #12121e;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 10px;
}

.rename-title {
	font-size: 14px;
	font-weight: 700;
	text-align: center;
}

.rename-dialog input {
	height: 36px;
	padding: 0 10px;
	font-size: 14px;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 8px;
	outline: none;
}

.rename-dialog input:focus {
	border-color: #ffffff;
}

.rename-hint {
	min-height: 1em;
	font-size: 12px;
	color: #ff8a8a;
}

.rename-actions {
	display: flex;
	gap: 8px;
}

.rename-actions button {
	flex: 1;
	height: 34px;
	font-size: 13px;
	color: #ffffff;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 8px;
	cursor: pointer;
}

.rename-actions button:hover {
	background: #ffffff;
	color: #000000;
}

#renameConfirm {
	border-color: #ffffff;
	font-weight: 700;
}

/* ================= 顶部信息条 (昵称卡 / 在线人数卡 / 修改昵称按钮) (vDOM 实体) ================= */

.top-bar {
	position: absolute;
	top: 14px;
	left: 14px;
	display: flex;
	align-items: stretch;
	gap: 6px;
	max-width: calc(100% - 28px);
	z-index: 2;
}

/* ================= 信息卡 (昵称卡 / 在线人数卡) (vDOM 实体) ================= */

.info-card {
	padding: 6px 10px;
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 10px;
	background: rgba(18, 18, 30, 0.92);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.5;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
	user-select: none;
}

/*
 * 顶部两件套（昵称卡 / 在线人数卡）：
 * 字号与内边距随舞台短边 (--uu) 缩放，两件统一高度。
 */
.player-info-card {
	font-size: calc(var(--uu, 2.86px) * 3);
	padding: calc(var(--uu, 2.86px) * 1.4) calc(var(--uu, 2.86px) * 2.4);
	border-radius: calc(var(--uu, 2.86px) * 2.6);
	line-height: 1.4;
	height: var(--top-card-h, 30px);
}

/*
 * 玩家信息卡：**只显示昵称**（不含邮箱），内部还放了「修改昵称」按钮。
 * 卡片本身不裁剪（否则会切掉按钮），昵称文本单独省略。
 */
.player-info-card {
	flex: 0 1 auto;
	min-width: 0;
	max-width: 100%;
	display: flex;
	align-items: center;
	gap: calc(var(--uu, 2.86px) * 1.6);
	white-space: nowrap;
}

/* 昵称文本：超长省略 */
.dave-nickname {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 在线人数卡片已取消（改为右侧抽屉式战绩卡） */

/* 「修改昵称」按钮：嵌在昵称卡里，尺寸比卡片小一号 */
.lobby-rename-btn {
	flex: 0 0 auto;
	white-space: nowrap;
	cursor: pointer;
	font-family: inherit;
	font-size: calc(var(--uu, 2.86px) * 2.4);
	line-height: 1.2;
	padding: calc(var(--uu, 2.86px) * 0.5) calc(var(--uu, 2.86px) * 1.6);
	color: #ffffff;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: calc(var(--uu, 2.86px) * 2);
	transition: background 0.2s, color 0.2s;
}

.lobby-rename-btn:hover {
	background: #ffffff;
	color: #000000;
}

/* ============ 玩法入口：2 行 2 列矩形按钮 (vDOM 实体 `lobby_actions` / `lobby_btn_*`) ============ */
/*
 * 四个按钮排在**视口（舞台）正中央**，两列各占一半宽度、两行两排；
 * 尺寸全部用 --uu 跟随舞台缩放（屏幕再大也不会「内部比容器宽」）。
 * ⚠ 用户 2026-11-09 指定：**矩形按钮，不要倒角** —— 圆角一律 0（想改只动 `.lobby-action-btn`）；
 * 同日又要求「按钮大一些、移到视口中央」→ 宽度 88uu、字号 3.4uu，整块居中对齐；
 * 再后来要求「按钮加高一些、美化一下」→ 每个按钮 `min-height: 16uu`，视觉上换成
 * 「上亮下暗的金属牌面渐变 + 双层描边 + 外部投影」，hover 变暖金并上浮、按下落回。
 * 整块 z-index 3：压在背景(0)/小人(1)/顶栏(2) 之上（会盖住中央扑克桌，属预期）；
 * 右侧战绩抽屉 z-index 6 仍可滑到按钮上方。
 */
.lobby-actions {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: calc(var(--uu, 2.86px) * 3);
	/* 88uu = 舞台宽度的 88%，两侧各留 6% 边距 */
	width: calc(var(--uu, 2.86px) * 88);
	z-index: 3;
}

.lobby-action-btn {
	/* 矩形按钮：不要倒角 */
	border-radius: 0;
	/* 高度：两行按钮都加高（约 16uu ≈ 舞台高的 9%），文字上下留白更筸展 */
	min-height: calc(var(--uu, 2.86px) * 16);
	padding: calc(var(--uu, 2.86px) * 3.2) calc(var(--uu, 2.86px) * 1.4);
	font-family: inherit;
	font-size: calc(var(--uu, 2.86px) * 3.4);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	color: #ffffff;
	/* 上亮下暗的金属牌面渐变 + 内描边（方形硬边，配合像素字体） */
	background: linear-gradient(
		180deg,
		rgba(96, 106, 152, 0.96) 0%,
		rgba(34, 36, 62, 0.97) 54%,
		rgba(13, 14, 26, 0.98) 100%
	);
	border: 2px solid rgba(255, 255, 255, 0.85);
	box-shadow:
		/* 内层黑描边（双层边框感） */
		inset 0 0 0 2px rgba(0, 0, 0, 0.55),
		/* 顶部高光 */
		inset 0 calc(var(--uu, 2.86px) * 0.5) 0 rgba(255, 255, 255, 0.2),
		/* 外投影：与牌桌/卡片同一套阴影语言 */
		0 6px 18px rgba(0, 0, 0, 0.55);
	text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s,
		border-color 0.2s, color 0.2s;
}

/* hover：整块提亮成暖金（赌场灯光色），并轻微上浮 */
.lobby-action-btn:hover {
	color: #1b1206;
	background: linear-gradient(180deg, #fffdf2 0%, #ffe9ad 54%, #f3c469 100%);
	border-color: #ffffff;
	transform: translateY(calc(var(--uu, 2.86px) * -0.45));
	box-shadow:
		inset 0 0 0 2px rgba(126, 86, 12, 0.35),
		inset 0 calc(var(--uu, 2.86px) * 0.5) 0 rgba(255, 255, 255, 0.65),
		0 10px 24px rgba(0, 0, 0, 0.55),
		0 0 20px rgba(255, 214, 120, 0.45);
	text-shadow: none;
}

/* 按下：落回去、阴影收到内侧（有「按到牌面」的手感） */
.lobby-action-btn:active {
	transform: translateY(calc(var(--uu, 2.86px) * 0.35));
	box-shadow:
		inset 0 0 0 2px rgba(0, 0, 0, 0.4),
		inset 0 calc(var(--uu, 2.86px) * 1.4) calc(var(--uu, 2.86px) * 3)
			rgba(0, 0, 0, 0.45);
}

/* 键盘聚焦：金色描边（不改变布局尺寸） */
.lobby-action-btn:focus-visible {
	outline: 2px solid #ffd54f;
	outline-offset: 2px;
}

/* ================= 右侧抽屉式战绩卡 (vDOM 实体) ================= */
/*
 * 拉手常驻右边缘；面板默认整体右移出舞台（stage 已 overflow:hidden），
 * 打开时加 `.is-open` 滑入。
 * 右侧竖向空间（2026-11-10 用户要求「两个抽屉等高、紧挨在一起、垂直居中」）：
 *   上下两块**等高**面板（各 `height: 38%`），上半区 12%~50%、下半区 50%~88%，
 *   在 50% 处**紧贴**、整块 12%~88% 正好**垂直居中**；拉手各自落在本区中线（31% / 69%）。
 *   ⚠ 拉手的 `top` 必须 = 面板的 `top`（面板用 `translateY(-50%)` 以中线对齐）。
 */
.stats-drawer-handle {
	position: absolute;
	right: 0;
	top: 31%;
	transform: translateY(-50%);
	z-index: 7;
	width: calc(var(--uu, 2.86px) * 5);
	padding: calc(var(--uu, 2.86px) * 1.4) 0;
	font-family: inherit;
	font-size: calc(var(--uu, 2.86px) * 2.6);
	font-weight: 700;
	letter-spacing: 2px;
	writing-mode: vertical-rl;
	color: #ffffff;
	background: rgba(18, 18, 30, 0.92);
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-right: none;
	border-radius: 8px 0 0 8px;
	cursor: pointer;
}

.stats-drawer-handle:hover {
	background: #ffffff;
	color: #000000;
}

.stats-drawer {
	position: absolute;
	right: calc(var(--uu, 2.86px) * 5);
	/* 上半区：中心 31% + 高度 38% → 占 12%~50%（下半区从 50% 紧接） */
	top: 31%;
	z-index: 6;
	width: min(240px, 72%);
	/* 两块抽屉等高：固定高度，内容超出就在面板内滚动 */
	height: 38%;
	max-height: none;
	overflow-y: auto;
	transform: translate(100%, -50%);
	transition: transform 0.25s ease;
	padding: calc(var(--uu, 2.86px) * 3.2);
	color: #ffffff;
	background: rgba(18, 18, 30, 0.96);
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-right: none;
	border-radius: 10px 0 0 10px;
	box-shadow: -6px 8px 24px rgba(0, 0, 0, 0.6);
}

.stats-drawer.is-open {
	transform: translate(0, -50%);
}

.stats-title {
	margin-bottom: calc(var(--uu, 2.86px) * 1.6);
	padding-bottom: calc(var(--uu, 2.86px) * 1.2);
	font-size: calc(var(--uu, 2.86px) * 3);
	font-weight: 700;
	text-align: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.stats-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: calc(var(--uu, 2.86px) * 2);
	padding: calc(var(--uu, 2.86px) * 0.9) 0;
	font-size: calc(var(--uu, 2.86px) * 2.8);
	line-height: 1.4;
}

.stats-row + .stats-row {
	border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.stats-label {
	color: rgba(255, 255, 255, 0.7);
	white-space: nowrap;
}

.stats-value {
	font-weight: 700;
	text-align: right;
	white-space: nowrap;
}

/* ============ 右侧好友抽屉（与战绩抽屉等高、紧挨、整体居中） (vDOM 实体 `friends_*`) ============ */
/*
 * 节点同时带 `stats-drawer-handle` / `stats-drawer` / `stats-title` 类（复用外观），
 * 这里只覆盖「位置」与「竖向排布」：
 *  - 拉手与面板落在右侧**下半区**（中心 69%，与上半区 31% 对称）；
 *  - 面板高度同样是 `38%` → 两块抽屉**等高**，上块底边（50%）与下块顶边（50%）**紧贴**，
 *    整块 12%~88% 在舞台里**垂直居中**；
 *  - 面板改成 flex 竖排：标题固定 → 好友列表 `flex:1` 且**可滚动** → 「添加好友」按钮固定；
 *  - 列表内容超出可用高度时才出滚动条（细滚动条，配暗色主题）。
 * ⚠ `min-height: 0` 不能省：flex 子项默认 `min-height: auto`，会按内容撑高，
 *   列表就永远滚不动（内容顶破面板）。
 */
.friends-drawer-handle {
	top: 69%;
}

.friends-drawer {
	/* 下半区：中心 69% + 高度 38% → 占 50%~88%（与上半区紧挨） */
	top: 69%;
	/* 与战绩面板等高（等高 + 紧贴 + 整体居中） */
	height: 38%;
	max-height: none;
	display: flex;
	flex-direction: column;
	/* 面板本身不滚，滚动交给里面的好友列表 */
	overflow: hidden;
}

.friends-title {
	flex: 0 0 auto;
}

.friends-list {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding-right: calc(var(--uu, 2.86px) * 1);
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.45) rgba(255, 255, 255, 0.08);
}

.friends-list::-webkit-scrollbar {
	width: calc(var(--uu, 2.86px) * 1.6);
}

.friends-list::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.08);
}

.friends-list::-webkit-scrollbar-thumb {
	/* 与「不倒角」的整体风格一致：方头滑块 */
	background: rgba(255, 255, 255, 0.45);
	border-radius: 0;
}

.friends-list::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.75);
}

/* 好友列表空态 */
.friends-empty {
	padding: calc(var(--uu, 2.86px) * 2) 0;
	font-size: calc(var(--uu, 2.86px) * 2.6);
	color: rgba(255, 255, 255, 0.6);
	text-align: center;
}

/* 「添加好友」按钮：贴在抽屉底部（不随列表滚动），配色沿用大厅入口按钮的金属牌面 */
.friends-add-btn {
	flex: 0 0 auto;
	margin-top: calc(var(--uu, 2.86px) * 2);
	padding: calc(var(--uu, 2.86px) * 1.8) 0;
	font-family: inherit;
	font-size: calc(var(--uu, 2.86px) * 2.8);
	font-weight: 700;
	letter-spacing: 0.06em;
	color: #ffffff;
	background: linear-gradient(
		180deg,
		rgba(96, 106, 152, 0.96) 0%,
		rgba(34, 36, 62, 0.97) 54%,
		rgba(13, 14, 26, 0.98) 100%
	);
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 0;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.friends-add-btn:hover {
	color: #1b1206;
	background: linear-gradient(180deg, #fffdf2 0%, #ffe9ad 54%, #f3c469 100%);
	border-color: #ffffff;
}

.friends-add-btn:focus-visible {
	outline: 2px solid #ffd54f;
	outline-offset: 2px;
}

/* ================= 大厅小人（每个在线玩家一个，vDOM 实体） ================= */
/*
 * `.guides` 是舞台中央附近的容器（flex 换行），每个在线玩家一个小人；
 * 小人 = 纯色剪影（头/身/双臂/双腿）+ 头顶昵称，体型由 `guide-v0..v3` 四套比例决定。
 * 进场/离场（is-away）与招手（随机左右手）全部由服务端动作帧驱动。
 */
.guides {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 92%;
height: 76%;
z-index: 1;
pointer-events: none;
}

/*
 * 中央扑克桌（剪贴画 `holdem/etc/pokertable2.png`，静态装饰，无动作帧）：
 * 站在第 3、4 行让出的 3 个位置里；z-index 由服务端夹在
 * 第 4 行（下标 3）与第 5 行（下标 4）小人之间 → 上面的小人被桌子挡住，
 * 桌子下方那一行小人挡住桌子（与参考图一致）。
 */
.guide-table {
	position: absolute;
	left: 50%;
	top: 51%;
	width: 66%;
	aspect-ratio: 1380 / 752;
	transform: translate(-50%, -50%);
	background: url("/holdem/etc/pokertable2.png") center / contain no-repeat;
	pointer-events: none;
}

/*
 * 桌子落地的半透明影子：椭圆软边用径向渐变画（不用 `filter: blur`，省一次合成开销）
 * 以“桌面箱底边中点”为圆心，一半叠在桌子底座上、一半铺到地板上。
 * 木地板本身偏暗，所以用“实心核心 + 薄软边”（纯软渐变在暗底上几乎看不见）。
 */
.guide-table::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 84%;
	height: 23%;
	transform: translate(-50%, 42%);
	border-radius: 50%;
	background: radial-gradient(
		closest-side,
		rgba(0, 0, 0, 0.55) 0%,
		rgba(0, 0, 0, 0.5) 72%,
		rgba(0, 0, 0, 0) 100%
	);
	pointer-events: none;
}

/*
 * 位置由服务端按「交错砖块网格」下发（内联 left/top/z-index）：
 * 偶行 4 人、奇行 3 人，行间上下叠压；z-index 随行号增大 → 下面的行盖住上面的身体。
 * 这里绝对定位 + 以「脚底中点」为锚点。
 */
.guide {
position: absolute;
width: calc(var(--uu, 2.86px) * 24);
height: calc(var(--uu, 2.86px) * 34);
transform-origin: 50% 100%;
transform: translate(-50%, -100%);
transition: transform 0.3s ease, opacity 0.3s ease;
}

/*
 * 小人脚下的半透明影子：以“脚底中点”为圆心的椭圆（实心核心 + 薄软边，
 * 保证在暗色木地板上也看得清）；进场/离场时跟根节点一起淡出。
 */
.guide::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: calc(var(--uu, 2.86px) * 18);
	height: calc(var(--uu, 2.86px) * 4.8);
	transform: translate(-50%, 50%);
	border-radius: 50%;
	background: radial-gradient(
		closest-side,
		rgba(0, 0, 0, 0.55) 0%,
		rgba(0, 0, 0, 0.5) 72%,
		rgba(0, 0, 0, 0) 100%
	);
	pointer-events: none;
}

/*
 * 配色：所有部位**纯黑填充 + 彩色描边**（描边色由根节点上的 guide-c0..7 决定，
 * 每人一色、按邮箱哈希随机且重连不变）→ 在赌场地毯/墙面上是一圈发光的黑色剪影。
 */
.guide-head,
.guide-body,
.guide-arm,
.guide-leg {
background: #000000;
border: calc(var(--uu, 2.86px) * 0.42) solid currentColor;
}

/* 行间层次：暗行把描边**颜色调暗**（绝不用 opacity —— 半透明会让黑填充透出地毯，像幽灵） */
.guide-t1.guide-c0 { color: #999999; }
.guide-t1.guide-c1 { color: #99802f; }
.guide-t1.guide-c2 { color: #4c8b51; }
.guide-t1.guide-c3 { color: #2f7594; }
.guide-t1.guide-c4 { color: #6b5299; }
.guide-t1.guide-c5 { color: #995667; }
.guide-t1.guide-c6 { color: #2e7d87; }
.guide-t1.guide-c7 { color: #996726; }

/* 描边配色表（与服务端 GUIDE.colors = 8 一致，改这里要同步数量） */
.guide-c0 { color: #ffffff; }
.guide-c1 { color: #ffd54f; }
.guide-c2 { color: #7ee787; }
.guide-c3 { color: #4fc3f7; }
.guide-c4 { color: #b388ff; }
.guide-c5 { color: #ff8fab; }
.guide-c6 { color: #4dd0e1; }
.guide-c7 { color: #ffab40; }

/* 招手时的身体轻摆（方向跟着抬起来的那只手） */
.guide.is-waving-left {
transform: translate(-50%, -100%) rotate(-3deg);
}

.guide.is-waving-right {
transform: translate(-50%, -100%) rotate(3deg);
}

/* 在场外（进场前 / 离场中）：上方、缩小、透明 */
.guide.is-away {
	transform: translate(-50%, -100%) translateY(calc(var(--uu, 2.86px) * -40)) scale(0.7);
	opacity: 0;
}

/* 头：黑底 + 描边圆，无五官 */
.guide-head {
        position: absolute;
        left: 50%;
        top: 0;
        transform: translateX(-50%);
        width: calc(var(--uu, 2.86px) * 12);
        height: calc(var(--uu, 2.86px) * 12);
        border-radius: 50%;
}

/* 身体：上圆下略窄的躯干，紧贴头部 */
.guide-body {
	position: absolute;
	left: 50%;
	top: calc(var(--uu, 2.86px) * 12.4);
	transform: translateX(-50%);
	width: calc(var(--uu, 2.86px) * 13.5);
	height: calc(var(--uu, 2.86px) * 13.6);
	border-radius: calc(var(--uu, 2.86px) * 6.2) calc(var(--uu, 2.86px) * 6.2)
		calc(var(--uu, 2.86px) * 3.2) calc(var(--uu, 2.86px) * 3.2);
}

/* 手臂：细圆角条，以肩为轴转动 */
.guide-arm {
	position: absolute;
	top: calc(var(--uu, 2.86px) * 13.8);
	width: calc(var(--uu, 2.86px) * 2.4);
	height: calc(var(--uu, 2.86px) * 7.6);
	border-radius: 999px;
	transform-origin: 50% 8%;
	transition: transform 0.18s ease;
}

.guide-arm-left {
	left: calc(50% - var(--uu, 2.86px) * 7.6);
	transform: rotate(22deg);
}

.guide-arm-right {
	left: calc(50% + var(--uu, 2.86px) * 5.2);
	transform: rotate(-22deg);
}

/* 招手：抬手（左/右对称） */
.guide-arm-left.is-waving {
	transform: rotate(130deg);
}

.guide-arm-right.is-waving {
	transform: rotate(-130deg);
}

/* 腿：两条分开的圆角条 */
.guide-leg {
	position: absolute;
	top: calc(var(--uu, 2.86px) * 26);
	width: calc(var(--uu, 2.86px) * 2.8);
	height: calc(var(--uu, 2.86px) * 7);
	border-radius: 999px;
	transform-origin: 50% 0;
}

.guide-leg-left {
	left: calc(50% - var(--uu, 2.86px) * 4.4);
	transform: rotate(-10deg);
}

.guide-leg-right {
	left: calc(50% + var(--uu, 2.86px) * 1.6);
	transform: rotate(10deg);
}

/*
 * 昵称印在**胸口**（身体上部）：黑底实心身体上的白字，最多两行。
 * 纵向基准 = 身体上沿（12.4uu）往下约 5uu；宽度 / 字号受身体最窄变体（v1 11uu）约束，
 * 取值 11uu / 1.7uu 保证 6 字昵称在胸口仍能单行，两行时也不会溢出身体。
 */
.guide-nick {
    position: absolute;
    left: 50%;
    top: calc(var(--uu, 2.86px) * 17.6);
    transform: translate(-50%, -50%);
    width: calc(var(--uu, 2.86px) * 11);
    font-size: calc(var(--uu, 2.86px) * 1.7);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
	text-align: center;
	color: #ffffff;
	white-space: normal;
	word-break: break-word;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

/* ---------- 体型变体：v0 标准（上面的默认值）/ v1 瘦高 / v2 敦实 / v3 大头 ---------- */

.guide-v1 .guide-body {
	top: calc(var(--uu, 2.86px) * 12.4);
	width: calc(var(--uu, 2.86px) * 11);
	height: calc(var(--uu, 2.86px) * 13.6);
	border-radius: calc(var(--uu, 2.86px) * 5.5) calc(var(--uu, 2.86px) * 5.5)
		calc(var(--uu, 2.86px) * 2.8) calc(var(--uu, 2.86px) * 2.8);
}

.guide-v1 .guide-arm {
	width: calc(var(--uu, 2.86px) * 2.1);
	height: calc(var(--uu, 2.86px) * 8.4);
}

.guide-v1 .guide-arm-left {
	left: calc(50% - var(--uu, 2.86px) * 6.6);
}

.guide-v1 .guide-arm-right {
	left: calc(50% + var(--uu, 2.86px) * 4.5);
}

.guide-v1 .guide-leg {
	width: calc(var(--uu, 2.86px) * 2.4);
}

.guide-v2 .guide-body {
	top: calc(var(--uu, 2.86px) * 12.4);
	width: calc(var(--uu, 2.86px) * 15.5);
	height: calc(var(--uu, 2.86px) * 13.6);
	border-radius: calc(var(--uu, 2.86px) * 6.8) calc(var(--uu, 2.86px) * 6.8)
		calc(var(--uu, 2.86px) * 3.6) calc(var(--uu, 2.86px) * 3.6);
}

.guide-v2 .guide-arm {
	width: calc(var(--uu, 2.86px) * 3);
	height: calc(var(--uu, 2.86px) * 7);
}

.guide-v2 .guide-arm-left {
	left: calc(50% - var(--uu, 2.86px) * 9);
}

.guide-v2 .guide-arm-right {
	left: calc(50% + var(--uu, 2.86px) * 6.6);
}

.guide-v2 .guide-leg {
	width: calc(var(--uu, 2.86px) * 3.2);
}

.guide-v3 .guide-body {
	top: calc(var(--uu, 2.86px) * 12.4);
	width: calc(var(--uu, 2.86px) * 12);
	height: calc(var(--uu, 2.86px) * 13.6);
}

.guide-v3 .guide-arm {
	width: calc(var(--uu, 2.86px) * 2.2);
	height: calc(var(--uu, 2.86px) * 7.4);
}

.guide-v3 .guide-arm-left {
	left: calc(50% - var(--uu, 2.86px) * 7.6);
}

.guide-v3 .guide-arm-right {
	left: calc(50% + var(--uu, 2.86px) * 5.2);
}

.guide-v3 .guide-leg {
	width: calc(var(--uu, 2.86px) * 2.6);
}
