/* 互动乐园：棋盘室 */

.brd {
	max-width: 1080px;
	margin: 14px auto 40px;
	background: #fff;
	border: 1px solid #e9e6f7;
	border-radius: 18px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	overflow: hidden;
}
.brd-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 15px 20px;
	border-bottom: 1px solid #eeecfb;
	background: linear-gradient(120deg, #faf8ff, #fff);
}
.brd-h-t {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}
.brd-h-t b {
	font-size: 17px;
	color: #0f172a;
}
.brd-h-t span {
	font-size: 12.5px;
	color: #a5a1bd;
}
.brd-h-s {
	flex: 0 0 auto;
	padding: 6px 13px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 700;
	color: #64748b;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	white-space: nowrap;
}
.brd-h-s.is-me {
	color: #15803d;
	background: #ecfdf5;
	border-color: #bbf7d0;
}
.brd-h-s.is-win {
	color: #b45309;
	background: #fffbeb;
	border-color: #fde68a;
}
.brd-h-s.is-lose {
	color: #b91c1c;
	background: #fef2f2;
	border-color: #fecaca;
}

.brd-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 236px;
}
.brd-main {
	padding: 18px 20px;
	min-width: 0;
}
.brd-board {
	min-height: 240px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.brd-load {
	text-align: center;
	color: #a8a4c4;
	font-size: 13px;
	padding: 50px 0;
	margin: 0;
}
.brd-tip {
	min-height: 20px;
	margin-top: 10px;
	font-size: 12.5px;
	color: #16a34a;
	opacity: 0;
	transition: opacity .18s ease;
}
.brd-tip:not(:empty) {
	opacity: 1;
}
.brd-tip.is-bad {
	color: #b91c1c;
}
.brd-side {
	border-left: 1px solid #eeecfb;
	padding: 16px 15px;
	background: #fcfbff;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.brd-side h4 {
	margin: 8px 0 6px;
	font-size: 12px;
	color: #a5a1bd;
	font-weight: 700;
	letter-spacing: .04em;
}
.brd-side h4:first-child {
	margin-top: 0;
}
.brd-players {
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.brd-pl {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 9px;
	border-radius: 9px;
	background: #fff;
	border: 1px solid #efedfa;
	font-size: 12.5px;
	color: #44415f;
}
.brd-pl.is-me {
	border-color: #ddd6fe;
	background: #faf8ff;
	font-weight: 700;
}
.brd-pl.is-out {
	opacity: .5;
}
.brd-pl span {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.brd-pl b {
	flex: 0 0 auto;
	font-size: 11.5px;
	color: #4f46e5;
}
.brd-pl em {
	flex: 0 0 auto;
	font-style: normal;
	font-size: 10.5px;
	font-weight: 700;
	color: #16a34a;
	background: #ecfdf5;
	padding: 1px 5px;
	border-radius: 4px;
}
.brd-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #94a3b8;
	flex: 0 0 auto;
}
.brd-dot.r {
	background: #ef4444;
}
.brd-dot.b {
	background: #3b82f6;
}
.brd-log {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 210px;
	overflow-y: auto;
	font-size: 12px;
	line-height: 1.6;
	color: #64748b;
	padding-right: 2px;
}
.brd-log:empty::after {
	content: '还没开始。';
	color: #c4c0dd;
	font-size: 12px;
}
.brd-msg {
	padding: 4px 8px;
	border-radius: 7px;
	background: #f8fafc;
}
.brd-share {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 10px;
}
.brd-share span {
	font-size: 11px;
	color: #a5a1bd;
	flex: 0 0 auto;
}
.brd-share input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 6px 8px;
	border: 1px solid #e6e2f3;
	border-radius: 7px;
	font-size: 11.5px;
	color: #78716c;
	background: #fff;
	font-family: inherit;
}
.brd-btn {
	padding: 9px 16px;
	border: 1px solid #4f46e5;
	border-radius: 9px;
	background: #4f46e5;
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .12s ease, background .15s ease;
	white-space: nowrap;
}
.brd-btn:hover {
	background: #4338ca;
}
.brd-btn:active {
	transform: scale(.97);
}
.brd-btn.sm {
	padding: 7px 12px;
	font-size: 12.5px;
}
.brd-btn.ghost {
	background: #fff;
	color: #4f46e5;
	border-color: #c7d2fe;
}
.brd-btn.ghost:hover {
	background: #f5f7ff;
}
#brd-reset.is-show {
	display: block;
	margin-top: 8px;
}
#brd-reset:not(.is-show) {
	display: none;
}
.brd-legend {
	margin: 2px 0 0;
	font-size: 11.5px;
	line-height: 1.7;
	color: #a8b0bd;
}
.brd-wait {
	text-align: center;
	padding: 44px 18px;
	border-radius: 14px;
	background: #faf9ff;
	border: 1px dashed #ddd8f3;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.brd-wait-ico {
	font-size: 30px;
}
.brd-wait h3 {
	margin: 0;
	font-size: 16px;
	color: #312e5c;
}
.brd-wait p {
	margin: 0;
	font-size: 13px;
	line-height: 1.75;
	color: #7b7796;
	max-width: 420px;
}

/* ---------------- 中国象棋 ---------------- */
.cb-wrap {
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
}
.cb {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 10.5;
	background: linear-gradient(160deg, #f7e6c4, #efd7a8);
	border: 1px solid #d9bd8c;
	border-radius: 10px;
	box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .35);
	overflow: hidden;
}
.cb-cell {
	position: absolute;
	width: 11.1111%;
	height: 9.5238%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.cb-cell::after {
	content: '';
	position: absolute;
	inset: 8%;
	border: 1px solid rgba(146, 104, 52, .18);
	border-radius: 3px;
	pointer-events: none;
}
.cb-cell.is-sel::after {
	border-color: #4f46e5;
	background: rgba(99, 102, 241, .12);
	box-shadow: 0 0 0 2px rgba(99, 102, 241, .2);
}
.cb-cell.is-last::after {
	border-color: #f59e0b;
	background: rgba(245, 158, 11, .12);
}
.cb-p {
	position: relative;
	width: 78%;
	aspect-ratio: 1;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: clamp(13px, 3.4vw, 21px);
	font-weight: 700;
	background: linear-gradient(160deg, #fffbeb, #f3dfb8);
	border: 2px solid #b08a55;
	box-shadow: 0 2px 4px rgba(120, 80, 30, .28);
	user-select: none;
}
.cb-p.r {
	color: #b91c1c;
	border-color: #c98a6b;
}
.cb-p.b {
	color: #1e293b;
	border-color: #7f8b9c;
}
.cb-p.is-moved {
	animation: cb-pop .22s ease;
}
@keyframes cb-pop {
	from { transform: scale(.86); }
	to { transform: scale(1); }
}
.cb-river {
	position: absolute;
	left: 0;
	right: 0;
	top: 47.6%;
	transform: translateY(-50%);
	text-align: center;
	font-size: clamp(9px, 2vw, 13px);
	letter-spacing: .3em;
	color: rgba(120, 80, 30, .4);
	pointer-events: none;
	text-indent: .3em;
}

/* ---------------- 军棋 ---------------- */
.ab {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 6px;
	width: 100%;
	max-width: 460px;
	margin: 0 auto;
}
.ab-cell {
	aspect-ratio: 1;
	border-radius: 9px;
	background: #f8fafc;
	border: 1px solid #e8edf4;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all .12s ease;
	overflow: hidden;
}
.ab-cell:hover {
	border-color: #c7d2fe;
}
.ab-cell.is-sel {
	border-color: #6366f1;
	background: #eef2ff;
	box-shadow: 0 0 0 2px rgba(99, 102, 241, .18);
}
.ab-cell.is-last {
	border-color: #fbbf24;
	background: #fffbeb;
}
.ab-back {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: repeating-linear-gradient(45deg, #cbd5e1, #cbd5e1 6px, #b8c3d1 6px, #b8c3d1 12px);
	color: #475569;
	font-size: 16px;
	font-weight: 700;
}
.ab-p {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: clamp(9px, 2.2vw, 13px);
	font-weight: 700;
	border-radius: 8px;
}
.ab-p.r {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}
.ab-p.b {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

/* ---------------- 斗兽棋 ---------------- */
.bb {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	background: #f0f7ec;
	padding: 8px;
	border-radius: 12px;
	border: 1px solid #dbe9d2;
}
.bb-cell {
	aspect-ratio: 1;
	border-radius: 7px;
	background: #fff;
	border: 1px solid #e6eee1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all .12s ease;
	position: relative;
}
.bb-cell.is-water {
	background: linear-gradient(160deg, #cfe9ff, #aed7f8);
	border-color: #9cc9ef;
}
.bb-cell.is-trap {
	background: #fff7e6;
	border-color: #fcd9a0;
}
.bb-cell.is-den {
	background: #ede9fe;
	border-color: #c4b5fd;
}
.bb-cell.is-den::after {
	content: '穴';
	position: absolute;
	font-size: 9px;
	color: #8b5cf6;
	bottom: 1px;
	right: 3px;
}
.bb-cell.is-trap::after {
	content: '陷';
	position: absolute;
	font-size: 9px;
	color: #d97706;
	bottom: 1px;
	right: 3px;
}
.bb-cell.is-sel {
	border-color: #6366f1;
	box-shadow: 0 0 0 2px rgba(99, 102, 241, .25);
	background: #eef2ff;
}
.bb-cell.is-last {
	border-color: #fbbf24;
}
.bb-p {
	width: 82%;
	aspect-ratio: 1;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: clamp(10px, 2.4vw, 16px);
	font-weight: 700;
	background: #fff;
	border: 2px solid #cbd5e1;
}
.bb-p.r {
	color: #b91c1c;
	border-color: #fca5a5;
	background: #fff5f5;
}
.bb-p.b {
	color: #1d4ed8;
	border-color: #93c5fd;
	background: #f5f9ff;
}

/* ---------------- 大富翁 ---------------- */
.mb-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: center;
	gap: 14px;
}
.mb {
	position: relative;
	width: 100%;
	max-width: 472px;
	margin: 0 auto;
	flex: 1 1 360px;
}
.mb-mapbar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	margin: 0 auto 8px;
	padding: 3px 12px;
	border-radius: 999px;
	background: #f5f3ff;
	border: 1px solid #ede9fe;
	font-size: 11.5px;
	font-weight: 700;
	color: #6d28d9;
	letter-spacing: .3px;
}
.mb-grid {
	display: grid;
	grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr));
	grid-template-rows: repeat(var(--n, 8), minmax(0, 1fr));
	gap: 3px;
	aspect-ratio: 1;
}
.mb-cell {
	position: relative;
	border-radius: 8px;
	background: #fff;
	border: 1px solid #e8edf4;
	padding: 2px 2px 13px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
	overflow: hidden;
	min-width: 0;
	transition: background .2s, border-color .2s;
}
.mb-cell.t-go { background: #ecfdf5; border-color: #bbf7d0; }
.mb-cell.t-chance { background: #fffbeb; border-color: #fde68a; }
.mb-cell.t-quiz { background: #eff6ff; border-color: #bfdbfe; }
.mb-cell.t-event { background: #fef2f2; border-color: #fecaca; }
.mb-cell.t-jail { background: #f1f5f9; border-color: #cbd5e1; }
.mb-cell.t-park { background: #f0fdf4; border-color: #bbf7d0; }
.mb-cell.t-shop { background: #faf5ff; border-color: #e9d5ff; }
.mb-cell.t-warp { background: #ecfeff; border-color: #a5f3fc; }
.mb-cell.t-tax { background: #fff1f2; border-color: #fecdd3; }
.mb-cell.is-own {
	background: color-mix(in srgb, var(--c) 15%, #fff);
	border-color: var(--c);
	box-shadow: inset 0 0 0 1px var(--c);
}
.mb-ico {
	font-size: clamp(10px, 2.2vw, 15px);
	line-height: 1.1;
}
.mb-cell b,
.mb-n {
	font-size: clamp(6.5px, 1.35vw, 9.5px);
	font-weight: 700;
	color: #334155;
	line-height: 1.15;
	text-align: center;
	word-break: break-all;
	max-width: 100%;
}
.mb-cell em,
.mb-p {
	font-style: normal;
	font-size: clamp(6px, 1.2vw, 9px);
	color: #94a3b8;
	font-weight: 600;
}
.mb-cell.is-own .mb-p { color: color-mix(in srgb, var(--c) 70%, #334155); }
.mb-cell.is-own .mb-ico,
.mb-cell.is-own .mb-p { display: none; }
.mb-cell.is-own .mb-n { font-size: clamp(6px, 1.25vw, 8.5px); color: #1e293b; }
/* 等级签：贴底、只有 LV 数字，不抢名字 */
.mb-tag {
	position: absolute;
	left: 3px;
	right: 3px;
	bottom: 19px;
	font-style: normal;
	font-size: 6px;
	line-height: 1.3;
	padding: 0 2px;
	border-radius: 3px;
	background: var(--c, #818cf8);
	color: #fff;
	text-align: center;
	overflow: hidden;
	white-space: nowrap;
	z-index: 2;
}
/* 房子：按等级换形态，缩到右上角当「地标」 */
.mb-house {
	position: absolute;
	right: 1px;
	top: 1px;
	width: 15px;
	height: 18px;
	pointer-events: none;
	z-index: 2;
	filter: drop-shadow(0 1px 1px rgba(15, 23, 42, .14));
}
.mb-house[data-lv="1"] { width: 16px; height: 19px; }
.mb-house[data-lv="2"] { width: 18px; height: 21px; }
.mb-house[data-lv="3"] { width: 20px; height: 24px; right: 0; top: 0; }
.mb-house-svg {
	display: block;
	width: 100%;
	height: 100%;
}
/* 棋子＝玩家的出战宠物 */
.mb-token {
	position: absolute;
	bottom: 1px;
	left: 50%;
	z-index: 4;
	width: clamp(13px, 2.6vw, 18px);
	height: clamp(13px, 2.6vw, 18px);
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: clamp(8px, 1.7vw, 12px);
	line-height: 1;
	background: #fff;
	border: 1.5px solid var(--c, #818cf8);
	box-shadow: 0 1px 3px rgba(15, 23, 42, .18);
	transform: translateX(calc(-50% + (var(--o, 0) - (var(--m, 2) - 1) / 2) * 17px));
	animation: mbHop .45s ease;
}
@keyframes mbHop {
	0% { transform: translateX(calc(-50% + (var(--o, 0) - (var(--m, 2) - 1) / 2) * 17px)) translateY(-6px) scale(.8); }
	100% { transform: translateX(calc(-50% + (var(--o, 0) - (var(--m, 2) - 1) / 2) * 17px)) translateY(0) scale(1); }
}

.mb-mid {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(160deg, #faf8ff, #f1f5f9);
	border-radius: 12px;
	border: 1px dashed #ddd8f3;
	padding: 10px;
}
.mb-dice {
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: #fff;
	border: 2px solid #c7d2fe;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	font-weight: 800;
	color: #4338ca;
	box-shadow: 0 3px 8px rgba(79, 70, 229, .15);
}
.mb-now {
	margin: 0;
	font-size: 12.5px;
	color: #64748b;
	font-weight: 700;
}
.mb-over {
	margin: 0;
	font-size: 13px;
	color: #b45309;
	font-weight: 700;
}
.mb-btns {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
	max-width: 210px;
}
.mb-btns .brd-btn {
	width: 100%;
	display: block;
}
.mb-btns .brd-btn.is-up {
	background: linear-gradient(135deg, #f59e0b, #f97316);
	border-color: transparent;
	color: #fff;
	font-weight: 700;
}

/* 骰子滚动 / 定格特效 */
.mb-dice.is-rolling {
	animation: mbShake .16s infinite;
	background: #eef2ff;
}
.mb-dice.is-hit {
	animation: mbPop .32s ease;
}
@keyframes mbShake {
	0% { transform: rotate(-9deg) scale(1.05); }
	50% { transform: rotate(9deg) scale(1.05); }
	100% { transform: rotate(-9deg) scale(1.05); }
}
@keyframes mbPop {
	0% { transform: scale(.55); }
	60% { transform: scale(1.2); }
	100% { transform: scale(1); }
}

/* 机会卡弹出 */
.mb-card {
	position: absolute;
	left: 50%;
	top: 44%;
	transform: translate(-50%, -50%);
	z-index: 6;
	max-width: 86%;
	padding: 13px 18px;
	border-radius: 14px;
	background: #fff;
	border: 2px solid #fcd34d;
	box-shadow: 0 16px 38px rgba(15, 23, 42, .22);
	font-size: 14px;
	line-height: 1.5;
	font-weight: 700;
	color: #92400e;
	text-align: center;
	animation: mbCardIn .26s ease;
}
@keyframes mbCardIn {
	0% { opacity: 0; transform: translate(-50%, -46%) scale(.86); }
	100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 860px) {
	.brd-body {
		grid-template-columns: minmax(0, 1fr);
	}
	.brd-side {
		border-left: 0;
		border-top: 1px solid #eeecfb;
	}
	.brd-main {
		padding: 14px;
	}
	.brd-head {
		padding: 13px 15px;
	}
	.brd-log {
		max-height: 140px;
	}
	.mb-grid {
		gap: 3px;
	}
	.mb-wrap {
		flex-direction: column;
		align-items: stretch;
	}
	.mb {
		flex: 0 0 auto;
		max-width: 560px;
	}
	.mb-chat {
		max-width: 560px;
		margin: 0 auto;
		align-self: center;
	}
	.mb-cell b {
		font-size: 8.5px;
	}
}

/* 等人提示条 / 可走格高亮 */
.brd-note {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: wrap;
	padding: 10px 13px;
	margin-bottom: 10px;
	border-radius: 11px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	font-size: 12.5px;
	color: #92400e;
}
.brd-note span {
	flex: 1 1 190px;
	min-width: 0;
	line-height: 1.6;
}
.brd-note .brd-btn.sm {
	padding: 6px 12px;
	font-size: 12px;
	background: #fff;
	border-color: #fcd34d;
	color: #92400e;
}
.brd-note .brd-btn.sm:hover {
	background: #fffbeb;
	border-color: #f59e0b;
	color: #78350f;
}
.cb-cell.is-can::after {
	border-color: #22c55e;
	background: rgba(34, 197, 94, .16);
	box-shadow: 0 0 0 2px rgba(34, 197, 94, .16);
}

/* ---------------- 围观 + 表情 ---------------- */
.brd-stage {
	position: relative;
}
.brd-floats {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 6;
}
.brd-float {
	position: absolute;
	bottom: 4%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	animation: brd-rise 2.8s cubic-bezier(.22, .61, .36, 1) forwards;
	will-change: transform, opacity;
}
.brd-float b {
	font-size: 27px;
	line-height: 1;
	filter: drop-shadow(0 3px 6px rgba(15, 23, 42, .18));
}
.brd-float span {
	font-size: 10.5px;
	color: #57534e;
	background: rgba(255, 255, 255, .88);
	border-radius: 999px;
	padding: 1px 6px;
	white-space: nowrap;
	max-width: 84px;
	overflow: hidden;
	text-overflow: ellipsis;
}
.brd-float.is-r span {
	color: #b91c1c;
}
.brd-float.is-b span {
	color: #1d4ed8;
}
@keyframes brd-rise {
	0% {
		opacity: 0;
		transform: translate(0, 0) scale(.7);
	}
	12% {
		opacity: 1;
		transform: translate(0, -12px) scale(1.06);
	}
	68% {
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: translate(var(--dx, 0), -180px) scale(1);
	}
}

.brd-emo {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 12px;
	padding: 7px 9px;
	border: 1px solid #efedfa;
	border-radius: 12px;
	background: #fbfaff;
}
.brd-emo-t {
	font-size: 11px;
	color: #a5a1bd;
	margin-right: 2px;
}
.brd-emo-hint {
	font-size: 11px;
	color: #c4c0dd;
	margin-left: auto;
}
.brd-emo-b {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
	border: 1px solid #efedfa;
	border-radius: 9px;
	background: #fff;
	cursor: pointer;
	transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.brd-emo-b:hover {
	transform: translateY(-2px);
	border-color: #c7d2fe;
	box-shadow: 0 4px 10px rgba(79, 70, 229, .13);
}
.brd-emo-b:active {
	transform: scale(.9);
}

.brd-watch {
	margin-top: 10px;
	padding-top: 9px;
	border-top: 1px dashed #ece9f7;
}
.brd-watch-h {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	color: #8b87a6;
	margin-bottom: 5px;
}
.brd-watch-h em {
	font-style: normal;
	font-size: 10px;
	font-weight: 700;
	color: #7c3aed;
	background: #f3e8ff;
	border-radius: 4px;
	padding: 1px 5px;
}
.brd-watch-l {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.brd-chip {
	font-size: 11px;
	color: #57534e;
	background: #f4f2fb;
	border: 1px solid #ece9f7;
	border-radius: 999px;
	padding: 2px 7px;
	max-width: 96px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.brd-chip.is-me {
	color: #4f46e5;
	background: #eef2ff;
	border-color: #dbe3ff;
	font-weight: 700;
}
.brd-h-s.is-watch {
	color: #7c3aed;
	background: #f5f3ff;
	border-color: #ddd6fe;
}

/* ---------------- 房间条：邀请同学 / 关闭房间 ---------------- */
.rm-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
	padding: 8px 11px;
	border: 1px solid #ece9f7;
	border-radius: 12px;
	background: linear-gradient(180deg, #fbfaff, #f7f5ff);
}
.rm-code {
	font-size: 12px;
	color: #8b87a6;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.rm-code b {
	font-family: Consolas, Menlo, monospace;
	font-size: 13.5px;
	letter-spacing: 1.2px;
	color: #4f46e5;
	background: #fff;
	border: 1px solid #e4e0fb;
	border-radius: 7px;
	padding: 2px 8px;
}
.rm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 30px;
	padding: 0 12px;
	border: 1px solid #e4e0fb;
	border-radius: 9px;
	background: #fff;
	color: #5b5680;
	font-size: 12.5px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
	transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
	white-space: nowrap;
}
.rm-btn:hover {
	transform: translateY(-1px);
	border-color: #c7c0f5;
	box-shadow: 0 3px 9px rgba(79, 70, 229, .1);
}
.rm-btn.is-main {
	border-color: transparent;
	background: linear-gradient(135deg, #4f7cf7, #7c5cf7);
	color: #fff;
}
.rm-btn.is-close {
	color: #b4463a;
	border-color: #f3ddd8;
	background: #fffafa;
}
.rm-btn:disabled {
	opacity: .55;
	cursor: default;
	transform: none;
	box-shadow: none;
}
.rm-tip {
	font-size: 11.5px;
	color: #8b87a6;
	opacity: 0;
	transition: opacity .18s ease;
}
.rm-tip.is-on {
	opacity: 1;
}
.rm-tip.is-bad {
	color: #b4463a;
}

/* 邀请面板 */
.rm-mask {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background: rgba(23, 20, 48, .42);
	backdrop-filter: blur(2px);
}
.rm-mask[hidden] {
	display: none !important;
}
/* 无脚本兜底：点「邀请同学」把地址变成 #rm-mask，靠 :target 把面板弹出来。
   必须放在 [hidden] 之后，同特异性同 !important 时后者生效。 */
.rm-mask:target {
	display: flex !important;
}
/* 面板内的原生表单（搜索 GET / 发送 POST），没脚本也能用 */
.rm-search {
	margin: 0;
}
.rm-inv-form {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}
.rm-m-post {
	margin: 0 0 8px;
	padding: 7px 10px;
	border-radius: 8px;
	font-size: 12px;
	line-height: 1.5;
}
.rm-m-post.is-ok {
	background: #eefbf3;
	color: #1a7f4b;
}
.rm-m-post.is-bad {
	background: #fdf0ee;
	color: #b4463a;
}
body.rm-lock {
	overflow: hidden;
}
.rm-modal {
	width: 100%;
	max-width: 430px;
	max-height: 82vh;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 22px 55px rgba(24, 20, 60, .28);
	padding: 16px 16px 14px;
	animation: rm-pop .18s ease-out;
}
@keyframes rm-pop {
	from { opacity: 0; transform: translateY(8px) scale(.98); }
	to   { opacity: 1; transform: none; }
}
.rm-m-h {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 14.5px;
	color: #2f2a4d;
}
.rm-x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	color: #a9a4c4;
	text-decoration: none;
	cursor: pointer;
	padding: 0 2px;
}
.rm-m-sub {
	margin: 6px 0 10px;
	font-size: 11.5px;
	line-height: 1.6;
	color: #928dae;
}
.rm-q {
	width: 100%;
	box-sizing: border-box;
	height: 36px;
	padding: 0 11px;
	border: 1px solid #e7e3f7;
	border-radius: 9px;
	font-size: 13px;
	font-family: inherit;
	color: #2f2a4d;
	outline: none;
	background: #fbfaff;
}
.rm-q:focus {
	border-color: #b9b0f2;
	background: #fff;
}
.rm-list {
	flex: 1;
	min-height: 90px;
	max-height: 46vh;
	align-content: start;
	overflow-y: auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin: 10px 0 12px;
	padding-right: 2px;
}
.rm-pick {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 7px 8px;
	border: 1px solid #eeeaf9;
	border-radius: 9px;
	background: #fcfbff;
	font-size: 12.5px;
	color: #3d3860;
	cursor: pointer;
	overflow: hidden;
}
.rm-pick input {
	margin: 0;
	accent-color: #6b5cf0;
	flex: 0 0 auto;
}
.rm-pick span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.rm-pick em {
	margin-left: auto;
	font-style: normal;
	font-size: 10px;
	color: #a9a4c4;
	flex: 0 0 auto;
}
.rm-pick:has(input:checked) {
	border-color: #c3b8f7;
	background: #f4f1ff;
}
.rm-empty {
	padding: 26px 8px;
	text-align: center;
	font-size: 12.5px;
	color: #a9a4c4;
}
.rm-m-f {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	border-top: 1px solid #f1eefb;
	padding-top: 11px;
}
.rm-m-f span {
	font-size: 11.5px;
	color: #928dae;
}

@media (max-width: 520px) {
	.rm-bar {
		gap: 6px;
		padding: 8px 9px;
	}
	.rm-btn {
		height: 28px;
		padding: 0 10px;
		font-size: 12px;
	}
	.rm-tip {
		flex-basis: 100%;
	}
	.rm-list {
		grid-template-columns: 1fr;
		max-height: 42vh;
	}
}

/* ---------------- 大富翁：内圈控制台 / 图例 ---------------- */
.mb-mid {
	overflow: hidden;
	padding: 12px;
	gap: 7px;
}
.mb-legend {
	flex-wrap: wrap;
	justify-content: center;
	display: flex;
	flex-wrap: wrap;
	gap: 3px 9px;
	justify-content: center;
}
.mb-lg {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 10px;
	color: #94a3b8;
}
.mb-lg i {
	font-style: normal;
	font-size: 11px;
}
.mb-lg em {
	font-style: normal;
}
.mb-quizhint,
.mb-wait {
	font-size: 11.5px;
	color: #94a3b8;
	text-align: center;
	font-weight: 600;
}
.mb-quizhint {
	color: #6d28d9;
}

/* ---------------- 大富翁：背包条 ---------------- */
.mb-bag {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 8px;
}
.mb-bag.is-empty { display: none; }
.mb-bag-i {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	height: 24px;
	padding: 0 9px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #475569;
	font-size: 11.5px;
	font-style: normal;
	line-height: 1;
}
.mb-bag-i i { font-style: normal; font-size: 13px; }
.mb-bag-i b { font-weight: 700; font-size: 11px; }
.mb-bag-i.is-use {
	border-color: #c4b5fd;
	background: #f5f3ff;
	color: #6d28d9;
	cursor: pointer;
	box-shadow: 0 0 0 3px rgba(109, 40, 217, .07);
}
.mb-bag-i.is-use:hover { background: #ede9fe; }

/* ---------------- 大富翁：商店 ---------------- */
.mb-shop-o {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 10px 0 4px;
}
.mb-shop-b {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 9px 11px;
	border-radius: 13px;
	border: 1px solid #e5e7eb;
	background: #fff;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.mb-shop-b:hover { border-color: #c4b5fd; background: #faf5ff; }
.mb-shop-b.is-no { opacity: .5; cursor: not-allowed; background: #f8fafc; }
.mb-shop-ico {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	font-style: normal;
	font-size: 19px;
	border-radius: 11px;
	background: #f5f3ff;
}
.mb-shop-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mb-shop-tx b { font-size: 12.5px; font-weight: 700; color: #1e293b; }
.mb-shop-tx em { font-style: normal; font-size: 11px; color: #94a3b8; }
.mb-shop-f {
	display: flex;
	justify-content: center;
	margin-top: 6px;
}

/* ---------------- 大富翁：桌内聊天 ---------------- */
.mb-chat {
	flex: 1 1 240px;
	width: 100%;
	max-width: 300px;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}
.mb-chat-h {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 12px;
	background: #faf9ff;
	border-bottom: 1px solid #f1f5f9;
	font-size: 12px;
	font-weight: 700;
	color: #6d28d9;
}
.mb-chat-h em {
	font-style: normal;
	font-weight: 400;
	font-size: 10.5px;
	color: #94a3b8;
}
.mb-chat-l {
	flex: 0 0 auto;
	min-height: 208px;
	overflow-y: auto;
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	overscroll-behavior: contain;
}
.mb-chat-e {
	margin: auto;
	font-size: 12px;
	color: #94a3b8;
}
.mb-chat-m {
	display: flex;
	gap: 6px;
	font-size: 12.5px;
	line-height: 1.4;
}
.mb-chat-m b {
	flex: 0 0 auto;
	font-weight: 700;
	color: #6d28d9;
}
.mb-chat-m span {
	color: #334155;
	word-break: break-word;
}
.mb-chat-m.is-me b {
	color: #0284c7;
}
.mb-chat-f {
	display: flex;
	gap: 8px;
	padding: 8px 10px;
	border-top: 1px solid #f1f5f9;
}
.mb-chat-i {
	flex: 1 1 auto;
	min-width: 0;
	height: 32px;
	padding: 0 13px;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	font-size: 12.5px;
	color: #0f172a;
	background: #fff;
}
.mb-chat-i:focus {
	outline: none;
	border-color: #c4b5fd;
	box-shadow: 0 0 0 3px rgba(109, 40, 217, .08);
}
.mb-chat-b {
	flex: 0 0 auto;
	height: 32px;
	padding: 0 17px;
	border: none;
	border-radius: 999px;
	background: #6d28d9;
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
}
.mb-chat-b:hover { background: #5b21b6; }

/* ---------------- 大富翁：答题弹层 ---------------- */
.mb-quiz {
	position: absolute;
	inset: 0;
	z-index: 12;
	display: grid;
	place-items: center;
	padding: 12px;
	background: rgba(15, 23, 42, .42);
	border-radius: 14px;
}
.mb-quiz-c {
	width: 100%;
	max-width: 460px;
	max-height: 100%;
	overflow-y: auto;
	background: #fff;
	border-radius: 18px;
	padding: 16px;
	box-shadow: 0 22px 50px rgba(15, 23, 42, .3);
	animation: mbCardIn .24s ease;
}
.mb-quiz-h {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}
.mb-quiz-h b {
	font-size: 14px;
	color: #0f172a;
}
.mb-quiz-h em {
	font-style: normal;
	font-size: 11.5px;
	font-weight: 700;
	color: #6d28d9;
}
.mb-quiz-q {
	margin: 0 0 10px;
	font-size: 13.5px;
	line-height: 1.6;
	font-weight: 600;
	color: #1e293b;
}
.mb-quiz-o {
	display: grid;
	gap: 7px;
}
.mb-quiz-b {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	padding: 9px 11px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	font-size: 12.5px;
	line-height: 1.45;
	color: #334155;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.mb-quiz-b:hover {
	border-color: #c4b5fd;
	background: #faf9ff;
}
.mb-quiz-b b {
	flex: 0 0 20px;
	height: 20px;
	border-radius: 6px;
	background: #f5f3ff;
	color: #6d28d9;
	display: grid;
	place-items: center;
	font-size: 11px;
	font-weight: 700;
}
.mb-quiz-t {
	margin: 9px 0 0;
	font-size: 11px;
	color: #94a3b8;
	text-align: center;
}

/* ---------------- 大富翁：玩家行的宠物头像 ---------------- */
.brd-ava {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-style: normal;
	font-size: 12px;
	line-height: 1;
	background: color-mix(in srgb, var(--c, #818cf8) 20%, #fff);
	border: 1px solid var(--c, #818cf8);
}

/* 窄屏：格子文字缩一档，聊天压低一点 */
@media (max-width: 720px) {
	.mb-grid { gap: 2px; }
	.mb-cell { padding: 1px 1px 11px; border-radius: 6px; }
	.mb-ico { font-size: 9px; }
	.mb-cell b, .mb-n { font-size: 6px; line-height: 1.05; }
	.mb-cell em, .mb-p { display: none; }
	.mb-tag { font-size: 5.5px; padding: 0 2px; max-width: 80%; }
	.mb-house { width: 13px; height: 15px; bottom: 9px; }
	.mb-token { width: 12px; height: 12px; font-size: 7px; }
	.mb-chat-l { min-height: 96px; }
	.mb-chat { flex: 0 0 auto; }
	.mb-dice { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; }
	.mb-legend { display: none; }
	.mb-btns { max-width: 160px; }
}

/* 窄屏收尾：棋盘在上、聊天在下，两者同宽（这条放最后，覆盖基础 max-width） */
@media (max-width: 860px) {
	.mb-wrap { gap: 10px; }
	.mb-chat {
		flex: 0 0 auto;
		max-width: 560px;
		margin: 0 auto;
		align-self: stretch;
	}
	.mb-chat-l { min-height: 150px; }
}
