/*
 * violet 主题 —— 样式
 *
 * 叠在 core/css/dark.css 之上。规则一律写在 .theme-violet 作用域下（或 violet 自己的 ss- 前缀类），
 * 不去改 dark.css——那是 blue/icafemenu 共用的。
 *
 * 客户端以 --disable-gpu 软件渲染运行（见项目 CLAUDE.md「客户端 CPU 性能规范」）：
 *   - 不用 backdrop-filter / filter: blur()，半透明面板只用 rgba()；
 *   - 不写 transition / infinite 动画，悬停效果瞬间切换；
 *   - 会被 transform 位移的元素才加 will-change。
 *
 * 目录
 *   1. 基础
 *   2. 主界面骨架（grid）
 *   3. 左侧图标栏
 *   4. 顶栏
 *   5. 内容区
 *   6. 右侧会员栏
 *   7. 任务栏
 *   8. 通用组件（按钮、卡片、徽标、标签、滚动条）
 *   9. 顶栏标签（Games / Applications）
 *  10. 游戏页：筛选条
 *  11. 游戏页：卡片网格
 *  12. 游戏详情
 *  13. 首页
 *  14. 登录页（未登录态）
 *  15. core 挂到 body 上的元素
 */

/* ===================================================================
   1. 基础
   =================================================================== */
/* 整页不滚动，滚动都在各自的容器里。core main.htm 的 #main_body 是普通流里的 height:100vh，
   客户端的老 CEF 内核在根元素 zoom 下会把 vh 再乘一次 zoom，z>1 时比视口高、冒出整页滚动条（gold 同样这样处理） */
html,
body {
	overflow: hidden;
}

/* 铺满视口的 fixed 容器一律用 top/bottom: 0 撑高，不用 height: var(--ss-vh)：
   --ss-vh 是 innerHeight / zoom 算出来的，老 CEF 和新 Chrome 对 zoom 下长度的换算不一样，
   客户端里算出来比视口高，底栏被挤出窗口；四边贴 0 跟 zoom 无关，两种内核都正好铺满 */
.theme-violet {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	color: var(--ss-text);
	font-family: var(--ss-font-body);
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	background-color: var(--ss-bg);
	/* 没配背景图时的默认底：深色加一点强调色的径向光，不用参考产品的背景图。
	   CP 配了背景时 vueGlobal.bodyStyle 用内联 background-image 盖掉这一层 */
	background-image:
		radial-gradient(ellipse at 20% 0%, rgba(var(--ss-accent-rgb), 0.22) 0%, rgba(var(--ss-accent-rgb), 0) 55%),
		radial-gradient(ellipse at 100% 100%, rgba(var(--ss-accent-rgb), 0.14) 0%, rgba(var(--ss-accent-rgb), 0) 50%);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.theme-violet a,
.theme-violet a:hover,
.theme-violet a:focus {
	color: inherit;
	text-decoration: none;
}

.theme-violet h1,
.theme-violet h2,
.theme-violet h3 {
	font-family: var(--ss-font-display);
	color: var(--ss-text);
}

/* ===================================================================
   2. 主界面骨架
   =================================================================== */
/* 直接钉在视口上：它外面还套着 main.htm 的归拢 div 和 #page-layout，都是 auto 高度，
   用 height:100% 会退化成内容高度 */
.ss-desktop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	grid-template-columns: var(--ss-rail-col) minmax(0, 1fr) var(--ss-sidebar-col);
	grid-template-rows: var(--ss-top-row) minmax(0, 1fr) var(--ss-taskbar-row);
	/* 压在背景图上的一层暗色，参考产品的值 */
	background-color: var(--ss-scrim);
}

/* ===================================================================
   3. 左侧图标栏
   =================================================================== */
.ss-rail {
	grid-column: 1;
	grid-row: 1 / 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	width: 80px;
	margin: 16px;
	padding: 16px 0;
	background: var(--ss-surface);
	border: 1px solid var(--ss-border);
	border-radius: var(--ss-radius-lg);
	min-height: 0;
}

.ss-rail-logo {
	width: 48px;
	height: 48px;
	border-radius: var(--ss-radius-md);
	overflow: hidden;
	flex-shrink: 0;
}
.ss-rail-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ss-rail-nav,
.ss-rail-bottom {
	display: flex;
	flex-direction: column;
	align-items: center;
}
.ss-rail-nav {
	gap: 16px;
}
.ss-rail-bottom {
	gap: 8px;
}

.ss-rail-item {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--ss-radius-sm);
	color: var(--ss-text-90);
	font-size: 22px;
}
/* 左栏图标 28 框：笔画外框约 18–22px，跟参考截图 01 量出来的一致 */
.ss-rail-item .ss-ico {
	width: 28px;
	height: 28px;
}
.theme-violet .ss-rail-item:hover {
	color: var(--ss-text);
	background: var(--ss-hover);
}
.theme-violet .ss-rail-item.is-active {
	color: var(--ss-accent);
}
/* 选中指示条：取值同规则 ShellDesktopSideNavigationItem:before（贴左 16、4 宽、跟按钮同高） */
.ss-rail-item.is-active::before {
	content: '';
	position: absolute;
	left: -16px;
	top: 0;
	bottom: 0;
	width: 4px;
	border-radius: 0 4px 4px 0;
	background: var(--ss-accent);
}

.ss-ico {
	width: 24px;
	height: 24px;
}

/* 版本号是日期（如 2026-07-20），比参考界面的 0.9.x 长，侧栏内宽只有 78。
   12px 会被原来 72 的限宽裁掉，11px 在客户端里两头顶到侧栏边；改成 10px 一行显示（约 58 宽），不折行、不裁切 */
.ss-rail-version {
	margin-top: 4px;
	color: rgba(255, 255, 255, 0.2);
	font-size: 10px;
	line-height: 12px;
	text-align: center;
	white-space: nowrap;
}

/* ===================================================================
   4. 顶栏
   =================================================================== */
.ss-top {
	grid-column: 2;
	grid-row: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 64px;
	margin: 16px 16px 0;
	min-width: 0;
}

.theme-violet .ss-page-title {
	margin: 0;
	font-size: 32px;
	font-weight: 600;
	line-height: 40px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 取值同规则 ShellTopPanelSession*：内边距 8、间距 16；未登录最小 240 宽，会话中 416 宽
   （规则里是定宽，这里用 min-width，长语言的状态文字不至于被截） */
.ss-session {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-shrink: 0;
	min-width: 240px;
	height: 48px;
	padding: 8px;
	border-radius: var(--ss-radius-lg);
	background: var(--ss-surface-strong);
	border: 1px solid var(--ss-border);
	font-family: var(--ss-font-display);
	color: var(--ss-text-90);
}
.ss-desktop:not(.ss-desktop-guest) .ss-session {
	min-width: 416px;
}
/* 顶栏购物车（会话胶囊左边）：底板、边框、高度跟会话胶囊一致。.ss-top 是两端对齐，
   margin-left:auto 把它跟会话胶囊一起推到右边；件数放在按钮里面，不用角标压在边上 */
.ss-top-cart {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	height: 48px;
	margin-left: auto;
	padding: 0 16px;
	border: 1px solid var(--ss-border);
	border-radius: var(--ss-radius-lg);
	background: var(--ss-surface-strong);
	color: var(--ss-text);
	font-family: var(--ss-font-display);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}
.ss-top-cart:hover {
	border-color: rgba(255, 255, 255, 0.5);
}
.ss-top-cart .fal {
	font-size: 18px;
}
.ss-cart-count {
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--ss-accent);
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 600;
	line-height: 20px;
	text-align: center;
}
.ss-session-pc {
	padding-left: 8px;
	color: var(--ss-text);
	font-size: 18px;
	font-weight: 600;
	line-height: 24px;
}
.ss-session-divider {
	align-self: stretch;
	width: 1px;
	margin: 0 -8px;
	background: rgba(255, 255, 255, 0.15);
}
.ss-session-status {
	color: var(--ss-text);
	font-size: 14px;
	font-weight: 400;
	line-height: 16px;
}
.ss-session-time {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
	color: var(--ss-text);
	font-size: 18px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: -0.54px;
	/* 等宽数字，倒计时每秒变化时宽度不跳 */
	font-variant-numeric: tabular-nums;
}
.ss-session-time .ss-ico {
	width: 20px;
	height: 20px;
}

/* ===================================================================
   5. 内容区
   =================================================================== */
.ss-main {
	grid-column: 2;
	grid-row: 2;
	min-width: 0;
	min-height: 0;
	padding: 32px 16px 16px;
	overflow: hidden;
}

.ss-page {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
}

/* ===================================================================
   6. 右侧会员栏
   =================================================================== */
.ss-sidebar {
	grid-column: 3;
	grid-row: 1 / 3;
	min-height: 0;
	padding: 16px;
	overflow-y: auto;
}
.ss-sidebar .member-sidebar {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
/* 右栏卡片没有描边（参考截图 03、规则 ShellGuestProfile 都只有底色） */
.ss-sidebar .ss-card {
	border: 0;
}
.ss-sidebar .ss-profile {
	padding: 0 16px;
}

.ss-profile-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.ss-avatar {
	width: 56px;
	height: 56px;
	flex-shrink: 0;
	border-radius: 50%;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.1);
}
.ss-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ss-profile-name {
	flex: 1;
	min-width: 0;
	color: var(--ss-text);
	font-family: var(--ss-font-display);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
}
/* 名字右边的 ▾：进账户页 */
.ss-profile-more {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: var(--ss-radius-sm);
	color: var(--ss-text-90);
}
.theme-violet .ss-profile-more:hover {
	background: var(--ss-hover);
	color: var(--ss-text);
}
.ss-profile-more .ss-ico {
	width: 20px;
	height: 20px;
}
.ss-profile-actions {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
}

.ss-wallet-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 12px;
}
.ss-wallet-balance {
	min-width: 0;
	font-family: var(--ss-font-display);
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ss-wallet-sub {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 12px;
	color: var(--ss-text-muted);
}
.ss-wallet-sub-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
/* 余额下面 bonus / 硬币之间一条竖分隔线（参考截图 01、03） */
.ss-wallet-sub-item + .ss-wallet-sub-item {
	padding-left: 12px;
	border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* 钱包下面的明细行：费率 / 欠款 / 后付费累计消费 / 最近一单。行距按每行自己的 margin 算，
   全部隐藏时容器不留空白 */
.ss-wallet-line {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	color: var(--ss-text-muted);
	font-size: 14px;
	line-height: 20px;
	text-decoration: none;
}
.ss-wallet-line .ss-ico {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
}
.ss-wallet-line-label {
	flex: 1 1 auto;
	min-width: 0;
}
.ss-wallet-line-value {
	flex-shrink: 0;
	color: var(--ss-text-90);
	font-variant-numeric: tabular-nums;
}
.ss-wallet-line.is-danger,
.ss-wallet-line.is-danger .ss-wallet-line-value {
	color: var(--ss-danger);
}
.theme-violet .ss-wallet-line.is-link:hover {
	color: var(--ss-text);
}
/* 订单状态小标签（颜色跟账户页订单表一致：已付 free 绿，待付和处理中橙，取消红） */
.ss-order-status {
	flex-shrink: 0;
	padding: 0 8px;
	border-radius: 10px;
	background: var(--ss-hover);
	font-size: 12px;
	line-height: 20px;
}
.ss-order-status.is-paid { color: var(--ss-free); }
.ss-order-status.is-process,
.ss-order-status.is-pending { color: var(--ss-warning); }
.ss-order-status.is-cancelled { color: var(--ss-danger); }

/* ===================================================================
   7. 任务栏
   =================================================================== */
.ss-taskbar {
	grid-column: 1 / 4;
	grid-row: 3;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	/* 左边 112px 留给 core 挂在左下角的关机/重启按钮（见第 14 节），运行中的游戏从内容列对齐处开始 */
	padding: 0 16px 0 var(--ss-rail-col);
	background: var(--ss-surface);
	border-top: 1px solid var(--ss-border);
	min-width: 0;
}

.ss-taskbar-running {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	overflow: hidden;
}

/* 托盘取值同规则 ShellTaskbar*：图标按钮 32 方、圆角 4、#ffffffe6；语言 10/300 占 40 宽；
   时间 14/300 白色、日期同字号 50% 白 */
.ss-taskbar-tray {
	display: flex;
	align-items: center;
	height: 100%;
	margin-left: auto;
}

.ss-taskbar-icon,
.ss-taskbar-text {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 4px;
	color: var(--ss-text-90);
	font-size: 16px;
}
.ss-taskbar-icon .ss-ico {
	width: 20px;
	height: 20px;
}
.ss-taskbar-icon .ss-badge {
	top: -2px;
	right: -2px;
}
/* 抽奖入口「今天还能抽」的小红点：静态，不做闪烁（常驻动画在软件渲染下一直占 CPU）。
   必须限定在任务栏图标里：.ss-dot 还用在会话胶囊的 Online/Offline 圆点上，全局绝对定位会把那颗点甩到页面角上 */
.ss-taskbar-icon .ss-dot {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ss-danger);
}
.ss-taskbar-text {
	width: 40px;
	padding: 8px 4px;
	font-family: var(--ss-font-display);
	font-size: 10px;
	font-weight: 300;
	line-height: 16px;
}
.ss-taskbar-icon img {
	width: 24px;
	height: 24px;
	border-radius: 4px;
	object-fit: cover;
}
.theme-violet .ss-taskbar-icon:hover,
.theme-violet .ss-taskbar-text:hover {
	background: var(--ss-hover);
}

.ss-clock {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	min-width: 64px;
	padding: 0 4px;
	font-family: var(--ss-font-display);
	font-size: 14px;
	font-weight: 300;
	line-height: 16px;
	font-variant-numeric: tabular-nums;
	text-align: right;
}
.ss-clock-time {
	color: var(--ss-text);
}
.ss-clock-date {
	color: var(--ss-text-muted);
}

.ss-lang {
	position: relative;
}
.ss-lang-menu {
	position: absolute;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-height: 360px;
	overflow-y: auto;
	padding: 6px;
	border-radius: var(--ss-radius-sm);
	background: var(--ss-drawer);
	border: 1px solid var(--ss-border);
	z-index: 20;
}
.ss-lang-option {
	min-width: 48px;
	height: 28px;
	padding: 0 8px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--ss-text-90);
	font-family: var(--ss-font-display);
	font-size: 13px;
	cursor: pointer;
}
.ss-lang-option:hover {
	background: var(--ss-hover);
}
.ss-lang-option.is-active {
	background: var(--ss-accent);
	color: var(--ss-accent-text);
}

/* ===================================================================
   8. 通用组件
   =================================================================== */
.ss-card {
	padding: 16px;
	border-radius: var(--ss-radius-lg);
	background: var(--ss-surface);
	border: 1px solid var(--ss-border);
}
.ss-card-title {
	font-family: var(--ss-font-display);
	font-size: 16px;
	font-weight: 600;
	line-height: 20px;
}

.ss-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: var(--ss-radius-sm);
	font-family: var(--ss-font-display);
	font-size: 14px;
	font-weight: 500;
	line-height: 16px;
	white-space: nowrap;
	cursor: pointer;
}
.ss-btn-sm {
	height: 32px;
}
.ss-btn-square {
	width: 40px;
	padding: 0;
	font-size: 18px;
}
.theme-violet .ss-btn-primary,
.theme-violet .ss-btn-primary:focus {
	background: var(--ss-accent);
	color: var(--ss-accent-text);
}
.theme-violet .ss-btn-primary:hover {
	background: var(--ss-accent-hover);
	color: var(--ss-accent-text);
}

.ss-icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--ss-radius-sm);
	color: var(--ss-text-90);
	font-size: 18px;
}
.theme-violet .ss-icon-btn:hover {
	background: var(--ss-hover);
	color: var(--ss-text);
}

.ss-badge {
	position: absolute;
	top: 4px;
	right: 4px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 8px;
	background: var(--ss-danger);
	color: #FFFFFF;
	font-size: 10px;
	font-weight: 600;
	line-height: 16px;
	text-align: center;
}

.theme-violet .ss-btn-secondary {
	background: var(--ss-surface-strong);
	border: 1px solid var(--ss-border);
	color: var(--ss-text);
}
.theme-violet .ss-btn-secondary:hover {
	background: var(--ss-hover);
	color: var(--ss-text);
}
.theme-violet .ss-btn-danger,
.theme-violet .ss-btn-danger:hover {
	background: var(--ss-danger);
	color: #FFFFFF;
}
.ss-btn-lg {
	height: 48px;
	padding: 0 24px;
	font-size: 16px;
}

.ss-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 28px;
	padding: 0 12px;
	border-radius: 14px;
	background: var(--ss-surface-strong);
	border: 1px solid var(--ss-border);
	color: var(--ss-text-90);
	font-size: 13px;
}
.ss-tag-free {
	color: var(--ss-free);
}

.ss-empty {
	padding: 64px 0;
	color: var(--ss-text-muted);
	text-align: center;
}

/* 滚动条：细、半透明，跟面板一个调子（只在 violet 里生效） */
.theme-violet ::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}
.theme-violet ::-webkit-scrollbar-track {
	background: transparent;
}
.theme-violet ::-webkit-scrollbar-thumb {
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.16);
}

/* ===================================================================
   9. 顶栏标签（Games / Applications）
   =================================================================== */
/* 取值来自 docs/smartshell-theme/reference/shell-css-rules.txt 的 ShellTopPanelTab（线上 demo 运行时抓的，
   跟截图 17 一致；截图 03 是 2025-09 的旧版，那时还是纯文字）：
   胶囊底板 + 图标，选中项是一块 0.2 透明度的强调色底 + 强调色描边，文字白色 */
.ss-tabs {
	display: flex;
	align-items: center;
	/* 参考写死 352px，那是按它的字宽量的；客户端 Windows 字体渲染的字更宽，
	   写死后 Applications 右边距被挤没，换成更长的译文还会溢出，所以按内容自适应 */
	flex: 0 0 auto;
	height: 48px;
	overflow: hidden;
	border: 1px solid var(--ss-border);
	border-radius: var(--ss-radius-lg);
	background: var(--ss-surface-strong);
}
.ss-tab {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	height: 48px;
	padding: 8px 16px;
	border: 1px solid transparent;
	border-radius: var(--ss-radius-md);
	background: transparent;
	color: var(--ss-text-90);
	font-family: var(--ss-font-display);
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
	cursor: pointer;
	white-space: nowrap;
}
/* 第一项保留参考的 128px 作为最小宽度，译文更长时往外撑 */
.ss-tab:first-of-type {
	min-width: 128px;
}
.ss-tab .ss-ico {
	flex: none;
	width: 24px;
	height: 24px;
}
.theme-violet .ss-tab:hover {
	color: var(--ss-text);
}
/* 参考是「强调色底 + 同色边框」整块 opacity:.2，边框和底一样深。这里只能把 0.2 写进颜色，
   边框要留透明：背景默认铺到边框下面，再叠一层 0.2 的边框就成了一圈更亮的描边 */
.theme-violet .ss-tab.is-active {
	border-color: transparent;
	background: rgba(var(--ss-accent-rgb), 0.2);
	color: var(--ss-text);
}

/* ===================================================================
   10. 游戏页：筛选条
   =================================================================== */
.ss-catalog-filters {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 32px;
	flex-shrink: 0;
	min-width: 0;
}

/* 取值同规则 ShellCatalogSearch：图标跟输入框同一行排（不是绝对定位），间距 8，输入字 14/300 */
.ss-search {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	width: 200px;
	height: 40px;
	margin: 0;
	padding: 0 16px;
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.01);
	border: 1px solid var(--ss-border);
	color: var(--ss-text-muted);
}
.ss-search .ss-ico {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
}
.ss-search input {
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	outline: none;
	background: transparent;
	color: var(--ss-text-90);
	font-family: var(--ss-font-display);
	font-size: 14px;
	font-weight: 300;
	line-height: 16px;
}
.ss-search input::placeholder {
	color: var(--ss-text-muted);
}
.ss-search:focus-within {
	border-color: var(--ss-accent);
}

/* 分类胶囊：多了横向滚动，不换行（参考产品也是一行） */
.ss-chips {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	padding-left: 16px;
	border-left: 1px solid var(--ss-border);
	overflow-x: auto;
}
.ss-chips::-webkit-scrollbar {
	height: 0;
}
/* 授权筛选 + 排序，挤在筛选条最右边 */
.ss-catalog-tools {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
	margin-left: auto;
}
.ss-catalog-tools .ss-sort {
	margin-left: 0;
}
/* 分段按钮：一个胶囊容器里几段，选中段跟顶栏标签同一套（0.2 强调色底 + 描边） */
.ss-segment {
	display: flex;
	gap: 4px;
	height: 40px;
	padding: 4px;
	border: 1px solid var(--ss-border);
	border-radius: 20px;
	background: var(--ss-surface-strong);
}
.ss-segment-btn {
	padding: 0 14px;
	border: 1px solid transparent;
	border-radius: 16px;
	background: transparent;
	color: var(--ss-text-90);
	font-family: var(--ss-font-display);
	font-size: 13px;
	font-weight: 300;
	white-space: nowrap;
	cursor: pointer;
}
.ss-segment-btn:hover {
	background: var(--ss-hover);
}
.theme-violet .ss-segment-btn.is-active {
	border-color: var(--ss-accent);
	background: rgba(var(--ss-accent-rgb), 0.2);
	color: var(--ss-text);
}
/* 取值同 shell-css-rules.txt 的 ShellCatalogGroup：选中是 2px 强调色描边 + 0.2 透明度强调色底，不是实心色块。
   选中时边框加粗 1px，左右内边距相应减 1px，胶囊宽度不跳 */
.ss-chip {
	flex-shrink: 0;
	height: 40px;
	padding: 0 16px;
	border-radius: 20px;
	border: 1px solid var(--ss-border);
	background: var(--ss-surface-strong);
	color: var(--ss-text-90);
	font-family: var(--ss-font-display);
	font-size: 14px;
	font-weight: 300;
	white-space: nowrap;
	cursor: pointer;
}
.theme-violet .ss-chip:hover {
	background: rgba(255, 255, 255, 0.1);
}
.theme-violet .ss-chip.is-active {
	padding: 0 15px;
	border: 2px solid var(--ss-accent);
	background: rgba(var(--ss-accent-rgb), 0.2);
	color: var(--ss-text);
}

/* ===================================================================
   11. 游戏页：卡片网格
   =================================================================== */
/* 封面 144x216（2:3），卡片 160 宽、列距 24：1920 下内容宽 1480，一行 8 张、实际列距约 29。
   原先照参考产品用 168x252 + 32 间距，正好 1480 才排得下 7 张，出现滚动条就掉成 6 张，space-between 把剩余宽度全撑成约 90px 的空隙，
   显得卡片又大又散；尺寸参照 purple（157x224，间距 16）、blue（168x240，间距 20） */
.ss-game-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, 160px);
	justify-content: space-between;
	gap: 24px;
}

/* 结构同规则 ShellShortcutGameCard / GameCover：卡片定高、内容贴底；封面区吃掉剩余高度，
   图片固定 144x216 贴底对齐 —— 标题折成两三行时封面从顶上被裁掉一截，同一行的卡片高度始终一致 */
.ss-game-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 16px;
	width: 160px;
	height: 264px;
	padding: 8px;
	overflow: hidden;
	cursor: pointer;
}

.ss-game-cover {
	position: relative;
	display: flex;
	align-items: flex-end;
	flex: 1 0 0;
	min-height: 0;
	width: 144px;
	border-radius: var(--ss-radius-sm);
	overflow: hidden;
	background: rgba(255, 255, 255, 0.08);
}
.ss-game-cover img {
	display: block;
	flex: none;
	width: 144px;
	height: 216px;
	object-fit: cover;
}
/* 悬停时封面中间的圆形播放键（规则 ShellShortcutGameAction：40 圆、#202028），只是提示，点击照旧开详情 */
.ss-game-action {
	position: absolute;
	z-index: 2;
	top: 50%;
	left: 50%;
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border-radius: 50%;
	background: #202028;
	color: #FFFFFF;
	font-size: 14px;
	pointer-events: none;
}
.ss-game-card:hover .ss-game-action {
	display: flex;
}
/* 悬停压暗：用一层半透明遮罩，不用 filter:brightness（软件渲染下逐像素计算）。瞬间切换，不加过渡 */
.ss-game-cover::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.38);
	display: none;
}
.ss-game-card:hover .ss-game-cover::after {
	display: block;
}

.ss-game-age,
.ss-game-license,
.ss-game-running {
	position: absolute;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 4px 8px;
	border-radius: 12px;
	background: rgba(21, 21, 21, 0.48);
	font-family: var(--ss-font-display);
	font-size: 12px;
	font-weight: 300;
	line-height: 16px;
}
.ss-game-age {
	top: 8px;
	left: 8px;
}
.ss-game-license {
	left: 8px;
	bottom: 8px;
	color: var(--ss-free);
}
.ss-game-running {
	right: 8px;
	bottom: 8px;
	background: var(--ss-accent);
	color: var(--ss-accent-text);
	font-weight: 500;
}

/* 收藏：已收藏常显，未收藏只在悬停时出现。游戏页卡片和首页 Games 卡共用。
   不要圆形底板（原来是 0.48 深灰圆，压在白底图标上很显眼）；只留爱心，
   用一层静态文字阴影保证压在亮封面上也看得清（不是动画、不是模糊滤镜，不增加 CPU 开销） */
.ss-game-fav {
	position: absolute;
	z-index: 1;
	top: 8px;
	right: 8px;
	display: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: var(--ss-text);
	font-size: 18px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.ss-game-card:hover .ss-game-fav,
.ss-game-fav.is-on {
	display: flex;
}
.theme-violet .ss-game-fav.is-on {
	color: var(--ss-accent);
}

.ss-game-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	font-family: var(--ss-font-display);
	font-size: 14px;
	font-weight: 300;
	line-height: 16px;
	text-align: center;
	word-break: break-word;
}

/* 应用：跟游戏卡同尺寸（.ss-game-card），封面区里两张图叠放：
   程序图标绝对定位垫在中间，海报在上面盖住它；海报取不到时 onerror 加 d-none，露出图标。
   海报要 position: relative —— 定位元素按 DOM 顺序叠放，不定位的话会被绝对定位的图标压在下面 */
.ss-game-cover .ss-app-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	object-fit: contain;
}
.ss-game-cover .ss-app-poster {
	position: relative;
}

/* ===================================================================
   12. 游戏详情
   =================================================================== */
.ss-detail-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: var(--ss-radius-sm);
	background: var(--ss-surface-strong);
	color: var(--ss-text-90);
	font-family: var(--ss-font-display);
	font-size: 14px;
	cursor: pointer;
}
.ss-detail-back:hover {
	color: var(--ss-text);
	background: var(--ss-hover);
}
.ss-detail-body {
	display: flex;
	gap: 40px;
	margin-top: 32px;
}
/* 详情封面跟游戏页卡片封面一样大（144x216）。原来 280x420，应用的海报多是图标放大出来的小图，放大了糊得厉害 */
.ss-detail-cover {
	width: 144px;
	height: 216px;
	flex-shrink: 0;
	border-radius: var(--ss-radius-md);
	overflow: hidden;
	background: var(--ss-surface);
}
.ss-detail-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ss-detail-main {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
}
.theme-violet .ss-detail-title {
	margin: 0;
	font-size: 40px;
	font-weight: 600;
	line-height: 48px;
	word-break: break-word;
}
.ss-detail-tags,
.ss-detail-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* ===================================================================
   13. 首页
   =================================================================== */
/* 首页不要右侧会员栏，顶栏和内容区都占到最右 */
.ss-desktop-wide .ss-top {
	grid-column: 2 / 4;
	margin-right: 32px;
}
.ss-desktop-wide .ss-main {
	grid-column: 2 / 4;
	padding-right: 32px;
}
.ss-desktop-wide .ss-sidebar {
	display: none;
}

.ss-home {
	display: flex;
	flex-direction: column;
	gap: 32px;
	min-height: 100%;
}

/* 上排：资料 + 钱包一列，后面是按数据有无出现的信息卡 */
/* 参考截图 01：上排整体也压在一块半透明底板上（跟下排三个区块同一种），卡片在底板里 */
/* 高度按参考图是 280；钱包下面的明细行（费率/欠款/最近一单）多出来时按内容长高，不裁掉 */
.ss-home-top {
	display: flex;
	gap: 16px;
	min-height: 280px;
	flex-shrink: 0;
	padding: 12px;
	border-radius: var(--ss-radius-lg);
	background: var(--ss-surface);
}
/* 底板里的卡片比底板亮一档（参考界面也是里亮外暗）。我们的面板色是压在壁纸上的 48% 黑，
   卡片再叠一层黑会更暗，所以换成一层很淡的白 */
.ss-home-top .ss-card,
.ss-home-section .ss-card {
	background: rgba(255, 255, 255, 0.05);
}
.ss-home-me {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 464px;
	flex-shrink: 0;
}
.ss-home-profile {
	display: flex;
	align-items: center;
	gap: 12px;
}
.ss-home-profile .ss-profile-name {
	flex: 1;
}
.ss-home-profile-actions {
	display: flex;
	gap: 4px;
	padding-left: 12px;
	border-left: 1px solid var(--ss-border);
}
.ss-home-wallet {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}
.ss-home-wallet-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 8px;
}
.ss-home-wallet .ss-wallet-sub {
	margin-top: auto;
}

.ss-home-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1 1 0;
	min-width: 0;
	/* 三张都在时正好铺满一行；只剩一两张时不要被拉成一长条 */
	max-width: 440px;
	overflow: hidden;
}

.ss-progress {
	height: 6px;
	border-radius: 3px;
	background: var(--ss-hover);
	overflow: hidden;
}
.ss-progress-bar {
	height: 100%;
	border-radius: 3px;
	background: var(--ss-accent);
}

.ss-level-name {
	font-family: var(--ss-font-display);
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
}
.ss-level-points {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--ss-text-90);
}
.ss-level-next {
	color: var(--ss-text-muted);
	font-size: 13px;
}

.ss-rank-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.ss-rank-row {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 40px;
	padding: 0 6px;
	border-radius: 20px;
	background: var(--ss-surface-strong);
}
.ss-rank-row.is-me {
	background: rgba(var(--ss-accent-rgb), 0.35);
}
.ss-rank-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--ss-hover);
	color: var(--ss-text-90);
}
.ss-rank-name {
	flex: 1;
	min-width: 0;
}
.ss-rank-no {
	min-width: 28px;
	height: 28px;
	padding: 0 6px;
	border-radius: 14px;
	background: var(--ss-text);
	color: #151515;
	font-weight: 600;
	line-height: 28px;
	text-align: center;
}
/* 第一名整行黄色渐变（参考截图 01 取色：左端近底色，右端 #8F8A10 → #EEDD47；名字压在暗端照样看得清） */
.ss-rank-row.is-first {
	background: linear-gradient(90deg, rgba(214, 206, 24, 0.1) 0%, rgba(214, 206, 24, 0.75) 100%);
}
.ss-rank-row.is-first .ss-rank-no {
	background: #FFD12E;
}

/* 下排三个区块：贴底，内容多时整页滚动 */
.ss-home-bottom {
	display: flex;
	gap: 16px;
	margin-top: auto;
}
.ss-home-section {
	display: flex;
	flex-direction: column;
	flex: 1 1 0;
	min-width: 0;
	padding: 16px;
	border-radius: var(--ss-radius-lg);
	background: var(--ss-surface);
}
.ss-home-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}
.theme-violet .ss-home-section-title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
}
.ss-home-section-body {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	flex: 1;
}
.ss-home-section-body.ss-home-news {
	grid-template-columns: minmax(0, 1fr);
}
/* 推荐商品 / 推荐 Offer：横卡上下两排，列数按宽度自动。
   - 竖着排（grid-auto-flow: column）：数量少时先把第一列上下排满，不会出现第二排空着的情况
   - 放不下的列是隐式列，宽 0、被 overflow 裁掉
   - 行高固定 186（跟旁边新闻卡同高：160 封面 + 上下内边距）。不能用 1fr 让内容撑：
     隐式列里的卡宽 0，文字一字一行会变得很高，把整排撑高
   - 横向间距不用 column-gap，改成卡片自己的 margin-right + 容器 margin-right:-16px 抵掉最后一列的：
     column-gap 对宽 0 的隐式列也照算，数量多时会把显示的列挤窄 */
.ss-home-section-body.ss-home-products,
.ss-home-section-body.ss-home-offers {
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	grid-template-rows: repeat(2, 186px);
	grid-auto-flow: column;
	grid-auto-columns: 0;
	gap: 16px 0;
	margin-right: -16px;
	overflow: hidden;
}
/* 卡宽下限 264（列 280 含 16 间距），1080p / 2K 两列（4 个）、4K 四列（8 个）。
   商品：CP 上传时商品图统一压成 256×256，显示超过 256 就会糊；两列时卡只有 264 宽，图固定 160 的话右边文字只剩 60 多，
   所以图宽取卡内宽的一半、上限 162（卡内高）：1080p 约 119、2K 162 */
/* 卡片改成两列网格：左图右文。行高由方形图片撑出，右边文字栏 stretch 到同样高，
   名称对齐图片顶边、价格（margin-top: auto）对齐图片底边；这一行再在卡里上下居中（align-content）。
   1080p 图比卡内高矮（119 对 162）时上下各留一样的空，2K 图 162 正好铺满 */
.ss-home-products .ss-product-card {
	display: grid;
	grid-template-columns: min(162px, 50%) minmax(0, 1fr);
	align-content: center;
	align-items: stretch;
	gap: 12px;
	min-width: 0;
	margin-right: 16px;
	padding: 12px;
}
.ss-home-products .ss-product-img {
	width: 100%;
	height: auto;
}
.ss-product-info {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	min-width: 0;
}
.ss-home-products .ss-product-name {
	align-items: flex-start;
}
.ss-home-products .ss-product-price {
	margin-top: auto;
	font-size: 20px;
	line-height: 28px;
	overflow-wrap: anywhere;
}
/* 名称最多两行，横卡右侧在 2K 下只有 170 左右宽，单行截断太狠 */
.ss-product-name-text {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}
.ss-product-name .ss-ico {
	flex-shrink: 0;
}
/* 推荐 Offer 横卡：排法和样子都同上面的推荐商品（两排、列数按宽度，整卡可点、名称右边 ⓘ）。
   商城 Offers 页那张竖卡的 360 最小高度这里不要；名称最多两行，底下一行时长 · 价格贴底 */
.ss-home-offers .ss-offer-card {
	gap: 8px;
	min-width: 0;
	min-height: 0;
	margin-right: 16px;
	overflow: hidden;
}
.ss-home-offer-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	color: var(--ss-text-90);
}
.ss-home-offer-head .ss-ico {
	flex-shrink: 0;
}
.ss-home-offers .ss-offer-name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
	color: var(--ss-text);
}
.ss-home-offer-foot {
	display: flex;
	align-items: flex-end;
	gap: 24px;
	margin-top: auto;
}
.ss-home-offer-foot .ss-offer-field {
	min-width: 0;
}
.ss-home-offer-foot .ss-offer-value {
	overflow-wrap: anywhere;
}

/* 上排的 Games 卡：不受 .ss-home-info 的 440 上限，吃掉上排剩下的全部宽度。
   封面固定 110×165（2:3），按上排 280 的高度算正好放一行；
   行内换行 + 固定一行高 + 裁掉溢出：宽度放不下的整张排到第二行被裁掉，不会露出半张封面 */
.ss-home-games {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
}
.ss-home-games-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: 20px;
}
.ss-home-games-row {
	display: flex;
	flex-wrap: wrap;
	gap: 40px 16px;
	/* 封面 165 + 间距 8 + 标题 18 = 191，再加四周 2px：悬停时封面外圈 2px 的强调色描边不被裁掉 */
	height: 195px;
	margin: -2px;
	padding: 2px;
	overflow: hidden;
}
.ss-home-game {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 110px;
	flex-shrink: 0;
	color: var(--ss-text-90);
	text-decoration: none;
}
.ss-home-game-cover {
	position: relative;
	display: block;
	width: 110px;
	height: 165px;
	border-radius: var(--ss-radius-md);
	overflow: hidden;
	background: var(--ss-surface-strong);
}
.ss-home-game-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ss-home-game-title {
	font-family: var(--ss-font-display);
	font-size: 14px;
	font-weight: 300;
	line-height: 18px;
}
.theme-violet .ss-home-game:hover {
	color: var(--ss-text);
}
.ss-home-game:hover .ss-home-game-cover {
	box-shadow: 0 0 0 2px var(--ss-accent);
}

.theme-violet .ss-btn-outline {
	background: transparent;
	border: 1px solid var(--ss-accent);
	color: var(--ss-accent-hover);
}
.theme-violet .ss-btn-outline:hover {
	background: rgba(var(--ss-accent-rgb), 0.2);
	color: var(--ss-text);
}

.ss-offer-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 360px;
}
/* 名字完整显示、按需折行。并排对齐不靠固定标题高度：卡片下半截（时长/价格/剩余时间起）
   在模板里用 mt-auto 整块贴底，同一行的卡等高，名字折几行下面都在同一高度（见 shop.htm / home.htm） */
.ss-offer-name {
	font-family: var(--ss-font-display);
	font-size: 20px;
	font-weight: 600;
	line-height: 24px;
	word-break: break-word;
}
/* My offers 正在使用的那张卡：右上角贴边的角标（外侧两角跟卡片圆角重合，内侧左下角圆角）。
   绝对定位不占行，所以各卡的剩余时间、进度条、按钮都在同一高度；标题右边让出角标的宽度，长名字不会压到它 */
.ss-offer-card {
	position: relative;
}
.ss-offer-corner {
	position: absolute;
	top: 0;
	right: 0;
	padding: 6px 12px;
	border-radius: 0 calc(var(--ss-radius-lg) - 1px) 0 var(--ss-radius-md);
	background: var(--ss-free);
	color: #151515;
	font-size: 12px;
	font-weight: 600;
	line-height: 16px;
}
.ss-offer-card.is-in-use .ss-offer-name {
	padding-right: 64px;
}
.ss-offer-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.ss-offer-tags:empty {
	display: none;
}
.ss-offer-label {
	color: var(--ss-text-muted);
	font-size: 12px;
}
.ss-offer-value {
	font-family: var(--ss-font-display);
	font-size: 20px;
	font-weight: 600;
	line-height: 28px;
}
.ss-offer-was {
	margin-left: 6px;
	color: var(--ss-text-muted);
	font-size: 14px;
	font-weight: 400;
	text-decoration: line-through;
}

.ss-news-card {
	display: flex;
	gap: 16px;
	padding: 12px;
}
.ss-news-cover {
	position: relative;
	width: 256px;
	height: 160px;
	flex-shrink: 0;
	border-radius: var(--ss-radius-md);
	overflow: hidden;
	background: var(--ss-surface-strong);
}
.ss-news-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/* 新闻链接二维码：压在封面右下角，白底留出静区，手机才扫得出 */
.ss-news-qr {
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 1;
	padding: 4px;
	border-radius: 4px;
	background: #FFFFFF;
	line-height: 0;
	cursor: pointer;
}
.ss-news-qr img,
.ss-news-qr canvas {
	width: 72px;
	height: 72px;
}
.ss-news-play {
	position: absolute;
	left: 50%;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: -24px 0 0 -24px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #FFFFFF;
}
.ss-news-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}
.ss-news-title {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-family: var(--ss-font-display);
	font-size: 16px;
	font-weight: 600;
	line-height: 22px;
	word-break: break-word;
}
.ss-news-foot {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
}
.ss-news-date {
	padding: 4px 10px;
	border-radius: 12px;
	background: var(--ss-surface-strong);
	color: var(--ss-text-90);
	font-size: 12px;
}

.ss-product-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.ss-product-img {
	aspect-ratio: 1 / 1;
	border-radius: var(--ss-radius-md);
	overflow: hidden;
	background: var(--ss-surface-strong);
}
.ss-product-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ss-product-name {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	color: var(--ss-text-90);
}
.ss-product-name i {
	flex-shrink: 0;
	color: var(--ss-text-muted);
}
.ss-product-price {
	font-family: var(--ss-font-display);
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
}

/* ===================================================================
   14. 登录页（未登录态）：只读目录 + 右侧登录面板
   =================================================================== */
/* 双屏时 core 给 #page_login 加 w-50 / h-50（Bootstrap 的 !important，压过 bottom: 0），所以这里只设 100%，
   里面的目录和面板都按这个容器绝对定位，不再钉在视口上——否则会跨到右屏 */
.ss-login {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	bottom: 0;
}
.ss-login .ss-desktop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	height: auto;
}

.ss-session-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.ss-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ss-text-muted);
}
.ss-dot-online {
	background: var(--ss-free);
}

/* 访客卡：取值同规则 ShellRightSidebar_ssShellGuest*（无描边、左右 16、头像 56、标题 16/400、48 方形登录按钮） */
.ss-guest {
	padding: 0 16px;
	border-radius: var(--ss-radius-lg);
	background: var(--ss-surface);
	color: var(--ss-text);
	overflow: hidden;
}
.ss-guest-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 0;
}
.ss-guest-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: var(--ss-text-90);
}
.ss-guest-avatar .ss-ico {
	width: 32px;
	height: 32px;
}
.ss-guest-title {
	flex: 1;
	min-width: 0;
	font-family: var(--ss-font-display);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
}
.theme-violet .ss-guest-login {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 48px;
	height: 48px;
	border: 1px solid var(--ss-border);
	border-radius: var(--ss-radius-sm);
	background: var(--ss-surface-strong);
	color: var(--ss-text);
}
.theme-violet .ss-guest-login:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--ss-text);
}
.ss-guest-login .ss-ico {
	width: 22px;
	height: 22px;
}
.ss-guest-text {
	margin: 0;
	padding: 10px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	color: var(--ss-text-muted);
	font-family: var(--ss-font-display);
	font-size: 14px;
	font-weight: 300;
	line-height: 16px;
}
.ss-booking-time {
	margin-top: 12px;
	font-family: var(--ss-font-display);
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
}
.ss-booking-left {
	margin-top: 4px;
	color: var(--ss-text-muted);
	font-variant-numeric: tabular-nums;
}

/* 面板 + 遮罩 */
/* 登录抽屉后面的遮罩：亮背景下 0.4 挡不住，提到 0.6（抽屉本身不透明） */
.ss-drawer-scrim {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 20;
	background: rgba(0, 0, 0, 0.6);
}
.ss-drawer {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 21;
	width: 480px;
	max-width: 100%;
	padding: 32px 48px;
	overflow-y: auto;
	background: var(--ss-drawer);
	box-shadow: -16px 0 32px rgba(0, 0, 0, 0.24);
	/* 打开时滑入一次（一次性反馈，跑完即停，不是常驻动画） */
	animation: ss-drawer-in 280ms ease-out 1;
}
@keyframes ss-drawer-in {
	from { transform: translateX(48px); opacity: 0; }
	to   { transform: translateX(0);    opacity: 1; }
}
/* 关闭按钮、logo、机器号取值同规则 ShellAuthClose / Logo / Host（32 方按钮贴右上 16；logo 48；机器号 32/500） */
.ss-drawer-close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: var(--ss-radius-sm);
	background: transparent;
	color: var(--ss-text);
	font-size: 20px;
	cursor: pointer;
}
.ss-drawer-close:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--ss-text);
}

.ss-login-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin: 0 0 32px;
}
.ss-login-logo {
	width: 48px;
	height: 48px;
	border-radius: var(--ss-radius-md);
	overflow: hidden;
}
.ss-login-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ss-login-pc {
	font-family: var(--ss-font-display);
	font-size: 32px;
	font-weight: 500;
	line-height: 40px;
}

/* 手风琴（表单沿用 purple，只换了 class 名） */
.ss-acc-section {
	border-bottom: 1px solid var(--ss-border);
}
.ss-acc-head {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
}
.ss-acc-head-main {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-grow: 1;
	min-width: 0;
	cursor: pointer;
	outline: none;
}
.ss-acc-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
}
.ss-acc-icon img {
	max-width: 100%;
	max-height: 100%;
}
.ss-acc-title {
	font-family: var(--ss-font-display);
	font-size: 16px;
	font-weight: 500;
	color: var(--ss-text-90);
}
.ss-acc-section.is-open .ss-acc-title {
	color: var(--ss-text);
}
.theme-violet .ss-acc-action {
	flex-shrink: 0;
	color: var(--ss-accent);
	font-size: 14px;
}
.theme-violet .ss-acc-action:hover {
	color: var(--ss-accent-hover);
}
.ss-acc-body {
	padding: 0 0 24px;
}
.ss-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.ss-btn-block {
	width: 100%;
	height: 48px;
	font-size: 16px;
}
.theme-violet .ss-btn:disabled {
	opacity: 0.5;
	cursor: default;
}

/* 登录页里的表单控件：压掉 dark.css 的底妆，统一成参考产品的输入框 */
.ss-login .form-group {
	margin-bottom: 16px;
}
.ss-login .form-label {
	display: block;
	margin-bottom: 6px;
	color: var(--ss-text-muted);
	font-size: 13px;
	line-height: 16px;
}
.theme-violet .ss-login .form-control {
	height: 48px;
	padding: 0 16px;
	border: 1px solid var(--ss-border);
	border-radius: var(--ss-radius-sm);
	background: rgba(21, 21, 21, 0.7);
	color: var(--ss-text);
	font-family: var(--ss-font-body);
	font-size: 15px;
	box-shadow: none;
}
.theme-violet .ss-login .form-control:focus {
	border-color: var(--ss-accent);
	background: rgba(21, 21, 21, 0.7);
	color: var(--ss-text);
}
.theme-violet .ss-login .form-control.is-invalid {
	border-color: var(--ss-danger);
}
.ss-login .password-wrapper {
	position: relative;
}
.ss-login .password-wrapper .form-control {
	padding-right: 48px;
}
.ss-login .password-toggle {
	position: absolute;
	top: 50%;
	right: 16px;
	margin-top: -9px;
	cursor: pointer;
}
.ss-login .reset-password-link {
	margin: -4px 0 16px;
	text-align: right;
	font-size: 13px;
}
.theme-violet .ss-login .reset-password-link a {
	color: var(--ss-text-muted);
	font-family: var(--ss-font-display);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}
.theme-violet .ss-login .reset-password-link a:hover {
	color: var(--ss-text);
}
/* 登录面板里的整行主按钮：规则 ShellAuthLogin 是 48 高、14/500 */
.ss-login-drawer .ss-btn-block {
	font-size: 14px;
	font-weight: 500;
}

/* 普通输入项（标了 ss-field 的 .form-group）：取值同规则 ShellAuthField ——
   整个 form-group 是一个框，标签 12/300 在框内上方，输入框去掉自己的边框和底色，14/300。
   金额/时长那两个带下拉的不标 ss-field，仍是外置标签 + 自带框（见 login.htm 顶部 <style>） */
.ss-login .ss-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	/* 规则是 56，但标签 16 + 间距 4 + 输入 16 + 上下内边距 20 + 边框 2 实际撑到 58；
	   空着时标签脱离文档流只剩输入那一行，min-height 写成 58 才不会一输入就高 2px */
	min-height: 58px;
	padding: 10px 16px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: var(--ss-radius-sm);
	background: rgba(21, 21, 21, 0.7);
}
.ss-login .ss-field:focus-within {
	border-color: var(--ss-accent);
}
.ss-login .ss-field .form-label {
	margin: 0;
	color: var(--ss-text-muted);
	font-family: var(--ss-font-display);
	font-size: 12px;
	font-weight: 300;
	line-height: 16px;
}
.theme-violet .ss-login .ss-field .form-control,
.theme-violet .ss-login .ss-field .form-control:focus {
	height: 16px;
	padding: 0;
	border: 0 !important;   /* 管理员密码框会被挂 Bootstrap 的 border-warning（!important） */
	border-radius: 0;
	background: transparent;
	color: var(--ss-text);
	font-family: var(--ss-font-display);
	font-size: 14px;
	font-weight: 300;
	line-height: 16px;
}
/* 框是外层，校验失败时没法给外层描红（不用 :has），改成输入文字标红 */
.theme-violet .ss-login .ss-field .form-control.is-invalid,
.theme-violet .ss-login .ss-field .form-control.border-warning {
	color: var(--ss-danger);
}
.ss-login .ss-field .password-wrapper .form-control {
	padding-right: 32px;
}

/* 空着且没聚焦时，标题当占位提示：14px 居中在框里，跟参考截图 08 的「Пароль」一样；
   一聚焦或填了内容就回到框内上方 12px。不加过渡（客户端软件渲染，见文件头）。
   is-empty 由 login.htm 按 v-model 的值挂（不用 :has / :placeholder-shown，CEF 版本不保证）；
   定位按一行高的框算（padding-box 高 56），下面有校验报错撑高时标题仍留在第一行的位置 */
.ss-login .ss-field {
	position: relative;
	cursor: text;
}
.ss-login .ss-field.is-empty:not(:focus-within) .form-label {
	position: absolute;
	top: 0;
	left: 16px;
	right: 48px;
	display: flex;
	align-items: center;
	height: 56px;
	font-size: 14px;
	pointer-events: none;
}
/* 眼睛图标按整个框垂直居中，不跟着下面那一行输入框 */
.ss-login .ss-field .password-wrapper {
	position: static;
}
.ss-login .ss-field .password-toggle {
	top: 19px;
	right: 16px;
	margin-top: 0;
}

/* 扫码登录（规则 ShellAuthQr / QrPhone / QrFrame）。
   参考的外框是下边开口的手机上半截（高 199、border-bottom: 0），码框底在 211 会探出外框 12px；
   按要求改成四边封闭的圆角框，高度放到 236，码框上下各留 25（跟左右 24 基本一致） */
.ss-qr {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	width: 244px;
	margin: 24px auto 0;
}
.ss-qr-phone {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	width: 244px;
	height: 236px;
	padding-top: 25px;
}
.ss-qr-phone::before {
	content: '';
	position: absolute;
	top: 0;
	width: 234px;
	height: 236px;
	border: 1px solid #51525C;
	border-radius: 24px;
}
.ss-qr-frame {
	position: relative;
	z-index: 1;
	width: 186px;
	height: 186px;
	padding: 4px;
	border-radius: var(--ss-radius-md);
	background: #FFFFFF;
	overflow: hidden;
}
.ss-qr-frame.is-dim {
	background: rgba(255, 255, 255, 0.1);
}
/* qrcode.js 同时生成 canvas 和 img、用内联 display:none 藏掉其中一个，这里只改尺寸、不碰 display */
.ss-qr-frame #inline_scan_qr {
	width: 100%;
	height: 100%;
}
.ss-qr-frame #inline_scan_qr img,
.ss-qr-frame #inline_scan_qr canvas {
	width: 100% !important;   /* qrcode.js 把 140 写在元素属性/内联样式上 */
	height: 100% !important;
	image-rendering: pixelated;
}
.ss-qr-text {
	margin: 0;
	color: var(--ss-text-muted);
	font-family: var(--ss-font-display);
	font-size: 14px;
	font-weight: 300;
	line-height: 16px;
	text-align: center;
}

.ss-login .access-code-container {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}
.theme-violet .ss-login .access-code-input {
	width: 64px;
	height: 64px;
	padding: 0;
	text-align: center;
	font-family: var(--ss-font-display);
	font-size: 28px;
	font-weight: 600;
}

.ss-admin-entry {
	margin-top: 24px;
	text-align: center;
}
.theme-violet .ss-admin-link {
	color: var(--ss-text-muted);
	font-size: 13px;
	text-decoration: underline;
}
.theme-violet .ss-admin-link:hover {
	color: var(--ss-text);
}

/* Admin 退出 / 家庭版填网吧 ID：整页换成一张居中卡片 */
.ss-login .adminexitDiv,
.ss-login .homecafeidDiv {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
}
.ss-login .admin-exit-form-div,
.ss-login .home-cafeid-form-div {
	position: static !important;
	width: 400px;
	max-width: calc(100% - 32px);
	flex: none;
	padding: 32px;
	border-radius: var(--ss-radius-lg);
	background: var(--ss-drawer);
	border: 1px solid var(--ss-border);
}
.ss-login .admin-exit-form-div form,
.ss-login .home-cafeid-form-div form {
	width: 100%;
}
.ss-login .client-form-row {
	margin: 0 0 24px;
	text-align: left;
}
.ss-login .client-form-row .password-wrapper,
.ss-login .client-form-row .form-control {
	width: 100%;
}

/* ===================================================================
   15. core 挂到 body 上的元素
   =================================================================== */
/* 关机/重启按钮：core 的 theme-bootstrap.js 统一挂在 body 左下角（#icc-power-bar）。
   violet 把它收进任务栏左端（任务栏左边让出了 112px），按钮尺寸跟任务栏图标一致 */
#icc-power-bar {
	height: var(--ss-taskbar-row);
	padding: 0 0 0 16px;
}
#icc-power-bar .icc-power-btn {
	width: 32px;
	height: 32px;
	border-radius: 4px;
	background: transparent;
	color: var(--ss-text-90);
	font-size: 16px;
	transition: none;
}
#icc-power-bar .icc-power-btn + .icc-power-btn {
	margin-left: 8px;
}
#icc-power-bar .icc-power-btn:hover {
	background: var(--ss-hover);
	color: var(--ss-text);
}

/* core/css/dark.css 给登录页加了一层「防烧屏」：#page_login::before 整屏 backdrop-filter 的 60s 无限动画。
   客户端是软件渲染，gold 实测登录页静置 CPU 101% → 1.4%（见 gold/css/core-overrides.css 第 1 节），这里同样关掉 */
#page_login::before {
	content: none !important;
	animation: none !important;
	backdrop-filter: none !important;
}

/* 全局关掉毛玻璃：core 的弹窗、共享片段里有内联或样式表里的 backdrop-filter，软件渲染下每帧对背后全部像素做模糊。
   做法同 purple base.css 第 2 节、gold core-overrides.css 第 2 节 */
*, *::before, *::after {
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

/* 聊天抽屉（core/shared/chat-drawer.htm）是 blue 的 GitHub 蓝配色，全部走 --cd-* 变量，这里换成 violet 的色板。
   用 html:root：抽屉自己的 :root 块是运行时注入的、排在后面，多一层 html 才压得住（做法同 gold core-overrides.css） */
html:root {
	--cd-bg: #151515;
	--cd-bg-dark: #101010;
	--cd-surface: #232323;
	--cd-hover: rgba(255, 255, 255, 0.08);
	--cd-border: rgba(255, 255, 255, 0.1);
	--cd-text: rgba(255, 255, 255, 0.9);
	--cd-text-hi: #FFFFFF;
	--cd-muted: rgba(255, 255, 255, 0.5);
	--cd-accent: var(--ss-accent);
	--cd-send: var(--ss-accent);
	--cd-danger: #FF3636;
}

/* 全局 loading（layout.htm 的 #spinner.cover，vueGlobal.isLoading 时显示，登录、开机、充值等都用它）。
   固定铺满 + 居中的样式原本在各主题 style.css 里，violet 没继承，spinner 跟着文档流跑到了角落。
   显隐由模板的行内 display 控制，这里不写 display */
#spinner.cover {
	position: fixed;
	inset: 0;
	z-index: 99999;
	overflow: hidden;
}
#spinner.cover > .cover-font {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: var(--ss-accent);
}
