/* 6 套可切换界面风格（默认夏莱终端，支持 localStorage + 云端账号双持久化）。
   加载顺序：tokens.css → webui.css → ui_v2.css → skins.css（登录页：tokens.css → login.css → skins.css）。
   所有规则均采用多行写法，零外链字体，100% 遵守 CSP 静态门禁。 */

/* ---------------- 皮肤选择器控件 ---------------- */
.skin-sel {
  max-width: 158px;
  min-width: 122px;
}

.theme-row {
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.theme-row .skin-sel {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  background: var(--input-bg);
  color: var(--text);
}

.sheet button.skin-opt.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

/* =====================================================================
   1. 夏莱终端 · MomoTalk 拟真风（默认：schale）
   ===================================================================== */
html[data-skin="schale"] {
  --bg: #eef4fb;
  --bg-glow1: rgba(77, 196, 255, .22);
  --bg-glow2: rgba(255, 224, 51, .14);
  --panel: rgba(255, 255, 255, .95);
  --panel2: #f4f9ff;
  --line: #d4e6f9;
  --line2: #b9d7f5;
  --text: #162a42;
  --muted: #526f8f;
  --dim: #89a4c2;
  --accent: #128afa;
  --accent2: #4dc4ff;
  --cyan: #4dc4ff;
  --accent-soft: rgba(18, 138, 250, .12);
  --accent-line: rgba(18, 138, 250, .42);
  --shadow: 0 10px 26px rgba(18, 104, 196, .10);
  --radius: 14px;
}

html[data-skin="schale"]:not([data-theme="dark"]) body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 86% 6%, rgba(77, 196, 255, .20), transparent 36%),
    radial-gradient(circle at 10% 90%, rgba(255, 224, 51, .13), transparent 34%),
    radial-gradient(rgba(18, 138, 250, .11) 1px, transparent 1px);
  background-size: auto, auto, 22px 22px;
}

html[data-skin="schale"] .card {
  position: relative;
  border-color: var(--line);
}

html[data-skin="schale"] .card::after {
  content: "SCHALE // SYS";
  position: absolute;
  right: 16px;
  top: 7px;
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--dim);
  opacity: .72;
  font-weight: 700;
  pointer-events: none;
}

html[data-skin="schale"] .btn.primary {
  background: linear-gradient(180deg, #ffe652 0%, #ffd217 100%);
  color: #1b2738;
  border-color: #e6b400;
  font-weight: 750;
  box-shadow: 0 2px 0 #d4a300, 0 6px 14px rgba(240, 185, 0, .28);
}

html[data-skin="schale"] .btn.primary:hover {
  background: linear-gradient(180deg, #ffed75 0%, #ffdb38 100%);
  color: #142030;
  box-shadow: 0 2px 0 #d4a300, 0 8px 18px rgba(240, 185, 0, .36);
}

html[data-skin="schale"] .res .pill {
  transform: skewX(-8deg);
  border-radius: 7px;
}

html[data-skin="schale"] .res .pill > * {
  transform: skewX(8deg);
}

html[data-skin="schale"] .nav-item.active {
  border-left: 3px solid var(--accent);
}

/* 夏莱配合夜间模式 */
html[data-skin="schale"][data-theme="dark"] {
  --bg: #0c1726;
  --panel: rgba(17, 30, 50, .92);
  --panel2: #152540;
  --line: rgba(77, 196, 255, .20);
  --line2: rgba(77, 196, 255, .34);
  --text: #eaf3ff;
  --muted: #93b0d1;
  --dim: #6382a6;
  --btn-bg: #162742;
  --btn-bg-hover: #1e3559;
  --input-bg: #101e34;
}

/* =====================================================================
   2. 千禧年 · 战术玻璃拟态（暗色：millennium）
   ===================================================================== */
html[data-skin="millennium"] {
  --bg: #0b1220;
  --bg-glow1: rgba(56, 189, 248, .22);
  --bg-glow2: rgba(167, 139, 250, .20);
  --panel: rgba(18, 30, 54, .68);
  --panel2: rgba(24, 40, 70, .64);
  --line: rgba(125, 211, 252, .22);
  --line2: rgba(125, 211, 252, .38);
  --text: #eaf3ff;
  --muted: #93b0d1;
  --dim: #607b9c;
  --accent: #38bdf8;
  --accent2: #a78bfa;
  --cyan: #38bdf8;
  --accent-soft: rgba(56, 189, 248, .15);
  --accent-line: rgba(125, 211, 252, .52);
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --ok-soft: rgba(52, 211, 153, .16);
  --warn-soft: rgba(251, 191, 36, .16);
  --bad-soft: rgba(251, 113, 133, .18);
  --mute-soft: rgba(148, 163, 184, .14);
  --btn-bg: rgba(22, 38, 68, .82);
  --btn-bg-hover: rgba(56, 189, 248, .18);
  --input-bg: rgba(11, 19, 36, .84);
  --hover: rgba(56, 189, 248, .12);
  --shadow: 0 14px 36px rgba(0, 6, 20, .52);
  --shadow-lg: 0 22px 52px rgba(0, 4, 16, .70);
  --radius: 18px;
}

html[data-skin="millennium"] body {
  background-color: #0b1220;
  background-image:
    radial-gradient(ellipse 760px 460px at 14% 0%, rgba(56, 189, 248, .22), transparent 62%),
    radial-gradient(ellipse 680px 460px at 88% 12%, rgba(167, 139, 250, .20), transparent 60%),
    linear-gradient(rgba(148, 197, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 197, 255, .05) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
}

html[data-skin="millennium"] .sidebar,
html[data-skin="millennium"] .topbar,
html[data-skin="millennium"] .card,
html[data-skin="millennium"] .box {
  backdrop-filter: blur(18px);
}

html[data-skin="millennium"] .card {
  position: relative;
  border-color: rgba(125, 211, 252, .24);
  box-shadow: 0 14px 36px rgba(0, 6, 20, .52), inset 0 1px 0 rgba(255, 255, 255, .08);
}

html[data-skin="millennium"] .card::after {
  content: "MILLENNIUM // SEMINAR";
  position: absolute;
  right: 16px;
  top: 7px;
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--dim);
  opacity: .75;
  font-weight: 700;
  pointer-events: none;
}

html[data-skin="millennium"] .btn.primary {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #06101f;
  border-color: #7dd3fc;
  font-weight: 750;
  box-shadow: 0 8px 22px rgba(56, 189, 248, .32);
}

html[data-skin="millennium"] .btn.primary:hover {
  background: linear-gradient(135deg, #56ccf9, #96a0fa);
  color: #040b16;
  box-shadow: 0 10px 26px rgba(56, 189, 248, .42);
}

html[data-skin="millennium"] .badge {
  color: #7dd3fc;
}

/* =====================================================================
   3. 极简苹果 / Linear 质感风（linear）
   ===================================================================== */
html[data-skin="linear"] {
  --bg: #f7f8fa;
  --bg-glow1: transparent;
  --bg-glow2: transparent;
  --panel: #ffffff;
  --panel2: #f7f8fa;
  --line: #e6e9ef;
  --line2: #d4dae4;
  --text: #111827;
  --muted: #6b7280;
  --dim: #9ca3af;
  --accent: #2563eb;
  --accent2: #3b82f6;
  --cyan: #2563eb;
  --accent-soft: rgba(37, 99, 235, .08);
  --accent-line: rgba(37, 99, 235, .32);
  --green: #16a34a;
  --amber: #b45309;
  --red: #dc2626;
  --ok-soft: #ecfdf3;
  --warn-soft: #fffbeb;
  --bad-soft: #fef2f2;
  --mute-soft: #f3f4f6;
  --btn-bg: #ffffff;
  --btn-bg-hover: #f3f4f6;
  --input-bg: #ffffff;
  --hover: rgba(17, 24, 39, .04);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px rgba(16, 24, 40, .03);
  --radius: 14px;
}

html[data-skin="linear"]:not([data-theme="dark"]) body {
  background-color: #f7f8fa;
  background-image: none;
}

html[data-skin="linear"] .card-head h2::before {
  display: none;
}

html[data-skin="linear"] .btn.primary {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(17, 24, 39, .16);
}

html[data-skin="linear"] .btn.primary:hover {
  background: #1f2937;
  border-color: #1f2937;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(17, 24, 39, .22);
}

html[data-skin="linear"] .btn:not(.primary):not(.danger):hover {
  background: #f3f4f6;
  border-color: #cbd5e1;
  color: #111827;
}

html[data-skin="linear"] .nav-item em {
  display: none;
}

html[data-skin="linear"][data-theme="dark"] {
  --bg: #0f1115;
  --panel: #161920;
  --panel2: #1c2029;
  --line: #272c38;
  --line2: #353c4c;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --dim: #6b7280;
  --btn-bg: #1c2029;
  --btn-bg-hover: #252b37;
  --input-bg: #12151b;
}

html[data-skin="linear"][data-theme="dark"] .btn.primary {
  background: #f3f4f6;
  border-color: #f3f4f6;
  color: #111827;
}

/* =====================================================================
   4. 崔尼蒂 · 下午茶暖调手账风（trinity）
   ===================================================================== */
html[data-skin="trinity"] {
  --bg: #faf6ef;
  --bg-glow1: rgba(235, 146, 173, .16);
  --bg-glow2: rgba(212, 168, 102, .15);
  --panel: #fffdf9;
  --panel2: #f8f1e6;
  --line: #e9dcc9;
  --line2: #d8c0a0;
  --text: #352924;
  --muted: #786357;
  --dim: #a89386;
  --accent: #d96b88;
  --accent2: #c6934b;
  --cyan: #d96b88;
  --pink: #e26d8a;
  --accent-soft: rgba(217, 107, 136, .12);
  --accent-line: rgba(217, 107, 136, .38);
  --green: #3c8c62;
  --amber: #b87324;
  --red: #cc445c;
  --ok-soft: rgba(60, 140, 98, .12);
  --warn-soft: rgba(184, 115, 36, .13);
  --bad-soft: rgba(204, 68, 92, .12);
  --mute-soft: #f3ebe0;
  --btn-bg: #fffdf9;
  --btn-bg-hover: #f6ecdf;
  --input-bg: #fffdf9;
  --hover: rgba(217, 107, 136, .08);
  --shadow: 0 8px 22px rgba(120, 86, 52, .08);
  --radius: 20px;
}

html[data-skin="trinity"]:not([data-theme="dark"]) body {
  background-color: #faf6ef;
  background-image:
    radial-gradient(circle at 88% 8%, rgba(235, 146, 173, .16), transparent 38%),
    radial-gradient(circle at 12% 84%, rgba(212, 168, 102, .14), transparent 36%),
    linear-gradient(rgba(198, 147, 75, .055) 1px, transparent 1px);
  background-size: auto, auto, 100% 28px;
}

html[data-skin="trinity"] .card {
  position: relative;
  border-color: #e6d5be;
  box-shadow: 0 8px 22px rgba(120, 86, 52, .07), inset 0 0 0 3px var(--panel), inset 0 0 0 4px rgba(213, 184, 146, .32);
}

html[data-skin="trinity"] .card-head h2::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

html[data-skin="trinity"] .btn {
  border-radius: 999px;
}

html[data-skin="trinity"] .btn.primary {
  background: linear-gradient(135deg, #e07693, #cf5c7c);
  border-color: #cf5c7c;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(207, 92, 124, .26);
}

html[data-skin="trinity"] .btn.primary:hover {
  background: linear-gradient(135deg, #e884a0, #d86787);
  color: #ffffff;
}

html[data-skin="trinity"] .btn:not(.primary):not(.danger):hover {
  background: #f6ecdf;
  border-color: #d8a5b4;
  color: #a3435e;
}

html[data-skin="trinity"] .badge {
  color: #b44b69;
}

html[data-skin="trinity"][data-theme="dark"] {
  --bg: #1c1614;
  --panel: #261e1b;
  --panel2: #302622;
  --line: #44352f;
  --line2: #59463e;
  --text: #f6ece4;
  --muted: #c2ada0;
  --dim: #8f7a6e;
  --btn-bg: #2e2420;
  --btn-bg-hover: #3b2e29;
  --input-bg: #221b18;
}

/* =====================================================================
   5. 崩坏3 · 休伯利安夜航（经典深色：hi3-dark）
   ===================================================================== */
html[data-skin="hi3-dark"] {
  --bg: #071120;
  --bg-glow1: rgba(38, 152, 255, .24);
  --bg-glow2: rgba(255, 214, 51, .09);
  --panel: rgba(14, 30, 56, .84);
  --panel2: rgba(19, 41, 74, .74);
  --line: rgba(77, 196, 255, .30);
  --line2: rgba(77, 196, 255, .52);
  --text: #eaf4ff;
  --muted: #8fb1d4;
  --dim: #5d7e9e;
  --accent: #38d2ff;
  --accent2: #ffd83d;
  --cyan: #38d2ff;
  --accent-soft: rgba(56, 210, 255, .15);
  --accent-line: rgba(77, 196, 255, .64);
  --green: #2fe69d;
  --amber: #ffb84d;
  --red: #ff5777;
  --ok-soft: rgba(47, 230, 157, .16);
  --warn-soft: rgba(255, 184, 77, .16);
  --bad-soft: rgba(255, 87, 119, .18);
  --mute-soft: rgba(125, 165, 205, .15);
  --btn-bg: rgba(19, 41, 74, .82);
  --btn-bg-hover: rgba(36, 76, 132, .85);
  --input-bg: rgba(8, 19, 36, .90);
  --hover: rgba(56, 210, 255, .12);
  --shadow: 0 12px 34px rgba(0, 8, 22, .54);
  --shadow-lg: 0 22px 52px rgba(0, 4, 14, .72);
  --radius: 4px;
}

html[data-skin="hi3-dark"] body {
  background-color: #071120;
  background-image:
    radial-gradient(ellipse 850px 520px at 15% -10%, rgba(38, 152, 255, .24), transparent 65%),
    radial-gradient(ellipse 680px 440px at 92% 8%, rgba(255, 214, 51, .09), transparent 60%),
    linear-gradient(rgba(74, 198, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 198, 255, .055) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
}

html[data-skin="hi3-dark"] .card,
html[data-skin="hi3-light"] .card {
  position: relative;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

html[data-skin="hi3-dark"] .card::before,
html[data-skin="hi3-light"] .card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 68px;
  height: 3px;
  background: linear-gradient(90deg, #ffd83d, var(--accent));
}

html[data-skin="hi3-dark"] .card-head h2::before,
html[data-skin="hi3-light"] .card-head h2::before {
  width: 0;
  height: 0;
  border-radius: 0;
  border: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #ffd83d;
  box-shadow: none;
}

html[data-skin="hi3-dark"] .btn,
html[data-skin="hi3-light"] .btn {
  border-radius: 0;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

html[data-skin="hi3-dark"] .btn.primary,
html[data-skin="hi3-light"] .btn.primary {
  background: linear-gradient(135deg, #ffd83d, #f4b000);
  color: #141923;
  border-color: #fff3a6;
  font-weight: 800;
  padding-left: 18px;
  padding-right: 18px;
  box-shadow: 0 6px 20px rgba(255, 216, 61, .34);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

html[data-skin="hi3-dark"] .btn.primary:hover,
html[data-skin="hi3-light"] .btn.primary:hover {
  background: linear-gradient(135deg, #ffe266, #ffbe1a);
  color: #0e141d;
  box-shadow: 0 8px 26px rgba(255, 216, 61, .44);
}

html[data-skin="hi3-dark"] .badge,
html[data-skin="hi3-light"] .badge {
  border-radius: 0;
  transform: skewX(-12deg);
}

html[data-skin="hi3-dark"] .badge {
  color: #7ee3ff;
  border-color: rgba(77, 196, 255, .36);
}

html[data-skin="hi3-dark"] .res .pill,
html[data-skin="hi3-light"] .res .pill {
  border-radius: 0;
  transform: skewX(-12deg);
}

html[data-skin="hi3-dark"] .res .pill > *,
html[data-skin="hi3-light"] .res .pill > * {
  transform: skewX(12deg);
}

html[data-skin="hi3-dark"] .nav-item.active {
  border-left: 4px solid #ffd83d;
}

/* =====================================================================
   6. 崩坏3 · 第二部科幻（清透浅色：hi3-light）
   ===================================================================== */
html[data-skin="hi3-light"] {
  --bg: #eaf1f8;
  --bg-glow1: rgba(30, 136, 255, .17);
  --bg-glow2: rgba(255, 212, 46, .14);
  --panel: rgba(255, 255, 255, .92);
  --panel2: rgba(238, 246, 254, .88);
  --line: rgba(28, 118, 226, .22);
  --line2: rgba(20, 126, 245, .44);
  --text: #10233b;
  --muted: #4b6787;
  --dim: #7f99b5;
  --accent: #0b84f3;
  --accent2: #ffe03b;
  --cyan: #0b84f3;
  --accent-soft: rgba(11, 132, 243, .11);
  --accent-line: rgba(20, 126, 245, .54);
  --green: #0e9f6e;
  --amber: #c97700;
  --red: #e03156;
  --btn-bg: #ffffff;
  --btn-bg-hover: #e4f1ff;
  --input-bg: #ffffff;
  --shadow: 0 10px 28px rgba(17, 64, 126, .09);
  --radius: 4px;
}

html[data-skin="hi3-light"]:not([data-theme="dark"]) body {
  background-color: #eaf1f8;
  background-image:
    radial-gradient(ellipse 800px 460px at 14% -8%, rgba(30, 136, 255, .17), transparent 65%),
    radial-gradient(ellipse 640px 400px at 90% 8%, rgba(255, 212, 46, .14), transparent 60%),
    linear-gradient(rgba(25, 108, 214, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 108, 214, .055) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
}

html[data-skin="hi3-light"] .nav-item.active {
  border-left: 4px solid #0b84f3;
}

/* =====================================================================
   7. 蔚蓝档案 · 游戏原版 UI（ba-game：深藏青标题条 + 实体浮雕斜切黄/蓝按钮）
   ===================================================================== */
html[data-skin="ba-game"] {
  --bg: #e7f0f9;
  --bg-glow1: rgba(70, 192, 247, .24);
  --bg-glow2: rgba(251, 232, 75, .14);
  --panel: #ffffff;
  --panel2: #eef4fa;
  --line: #cfdceb;
  --line2: #b5cbe0;
  --text: #223852;
  --muted: #55708f;
  --dim: #869fb8;
  --accent: #2ba9f2;
  --accent2: #4cc7ff;
  --cyan: #4cc7ff;
  --accent-soft: rgba(43, 169, 242, .14);
  --accent-line: rgba(43, 169, 242, .48);
  --green: #3cb857;
  --amber: #e29b0e;
  --red: #f24b78;
  --ok-soft: #e3f7e8;
  --warn-soft: #fff6db;
  --bad-soft: #ffe8ef;
  --mute-soft: #e8eff7;
  --btn-bg: #ffffff;
  --btn-bg-hover: #e8f5ff;
  --input-bg: #ffffff;
  --hover: rgba(43, 169, 242, .09);
  --shadow: 0 5px 0 rgba(34, 56, 82, .08), 0 10px 22px rgba(34, 56, 82, .08);
  --radius: 10px;
}

html[data-skin="ba-game"]:not([data-theme="dark"]) body {
  background-color: #e7f0f9;
  background-image:
    linear-gradient(125deg, rgba(255, 255, 255, .58) 0%, rgba(255, 255, 255, .58) 28%, transparent 28.2%, transparent 62%, rgba(76, 199, 255, .10) 62.2%, rgba(76, 199, 255, .10) 100%),
    repeating-linear-gradient(-45deg, rgba(44, 70, 102, .025) 0 12px, transparent 12px 24px);
}

/* 游戏内经典深藏青左侧导航栏 */
html[data-skin="ba-game"] .sidebar {
  background: linear-gradient(180deg, #2d4665 0%, #22364f 100%);
  border-right: 3px solid #4cc7ff;
  color: #eaf4ff;
}

html[data-skin="ba-game"] .sidebar .brand b,
html[data-skin="ba-game"] .sidebar .side-user b {
  color: #ffffff;
}

html[data-skin="ba-game"] .sidebar .brand span,
html[data-skin="ba-game"] .sidebar .side-foot,
html[data-skin="ba-game"] .sidebar .side-links a {
  color: #b4cde6;
}

html[data-skin="ba-game"] .sidebar .nav-group-title {
  color: #93b8dc;
}

html[data-skin="ba-game"] .sidebar .nav-item {
  background: transparent;
  color: #e6f2ff;
  border-radius: 6px;
  transform: skewX(-6deg);
}

html[data-skin="ba-game"] .sidebar .nav-item em {
  color: #9cc2e6;
}

html[data-skin="ba-game"] .sidebar .nav-item > * {
  transform: skewX(6deg);
}

html[data-skin="ba-game"] .sidebar .nav-item:hover {
  background: rgba(76, 199, 255, .20);
  color: #ffffff;
}

html[data-skin="ba-game"] .sidebar .nav-item:hover em {
  color: #d6ecff;
}

html[data-skin="ba-game"] .sidebar .nav-item.active {
  background: linear-gradient(135deg, #4cc7ff, #269ee8);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 0 #1875b5;
}

html[data-skin="ba-game"] .sidebar .nav-item.active em {
  color: #eef9ff;
}

html[data-skin="ba-game"] .sidebar .sidebar-toggle {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(156, 194, 230, .35);
  color: #e6f2ff;
  box-shadow: none;
}

html[data-skin="ba-game"] .sidebar .sidebar-toggle:hover {
  background: rgba(76, 199, 255, .22);
  border-color: rgba(76, 199, 255, .6);
  color: #ffffff;
}

/* 顶栏：游戏内洁白微浮雕底边 */
html[data-skin="ba-game"] .topbar {
  background: rgba(255, 255, 255, .94);
  border-bottom: 2px solid #cddceb;
  box-shadow: 0 3px 0 rgba(34, 56, 82, .06);
}

/* 顶栏资源条：游戏内经典斜切白卡 + 下阴影 */
html[data-skin="ba-game"] .res .pill {
  background: #ffffff;
  border: 1.5px solid #c6d7e8;
  border-radius: 6px;
  transform: skewX(-10deg);
  box-shadow: 0 2px 0 #c6d7e8;
}

html[data-skin="ba-game"] .res .pill > * {
  transform: skewX(10deg);
}

/* 游戏内弹窗/任务面板卡片：白色实体卡 + 深藏青色块标题头 */
html[data-skin="ba-game"] .card {
  position: relative;
  border: 1.5px solid #c7d8ea;
  border-radius: 10px;
  box-shadow: 0 4px 0 #ccdbee, 0 10px 22px rgba(34, 56, 82, .09);
  overflow: hidden;
}

html[data-skin="ba-game"] .card > .card-head,
html[data-skin="ba-game"] details.card > summary.card-head {
  margin: -18px -20px 14px;
  padding: 11px 18px;
  background: linear-gradient(115deg, #2d4665 0%, #36567c 78%, #3e6490 78.2%, #3e6490 100%);
  border-bottom: 3px solid #4cc7ff;
  color: #ffffff;
}

html[data-skin="ba-game"] .card > .card-head h2,
html[data-skin="ba-game"] details.card > summary.card-head h2 {
  color: #ffffff;
  letter-spacing: .02em;
}

html[data-skin="ba-game"] .card > .card-head .meta,
html[data-skin="ba-game"] details.card > summary.card-head .meta {
  color: #cde2f7;
}

html[data-skin="ba-game"] .card-head h2::before {
  width: 6px;
  height: 16px;
  border-radius: 2px;
  border: 0;
  background: #fbe84b;
  transform: skewX(-12deg);
  box-shadow: none;
}

/* 招牌游戏内斜切实体浮雕按钮：亮黄主按钮 + 白/天蓝次级按钮 */
html[data-skin="ba-game"] .btn {
  border: 1.5px solid #bfd3e7;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fd 100%);
  color: #223852;
  font-weight: 700;
  transform: skewX(-8deg);
  box-shadow: 0 3px 0 #c2d4e6;
}

html[data-skin="ba-game"] .btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e4f3ff 100%);
  border-color: #4cc7ff;
  color: #165e9e;
}

html[data-skin="ba-game"] .btn:active {
  transform: skewX(-8deg) translateY(2px);
  box-shadow: 0 1px 0 #c2d4e6;
}

html[data-skin="ba-game"] .btn.primary {
  background: linear-gradient(135deg, #fff066 0%, #fbe84b 54%, #f7dc22 54.5%, #f5d314 100%);
  border: 1.5px solid #e6c619;
  color: #1f334d;
  font-weight: 800;
  box-shadow: 0 3px 0 #cfa90a;
}

html[data-skin="ba-game"] .btn.primary:hover {
  background: linear-gradient(135deg, #fff485 0%, #ffef5e 54%, #fce438 54.5%, #fae028 100%);
  color: #182a40;
  box-shadow: 0 3px 0 #cfa90a;
}

html[data-skin="ba-game"] .btn.primary:active {
  transform: skewX(-8deg) translateY(2px);
  box-shadow: 0 1px 0 #cfa90a;
}

/* 状态标签：游戏内平行四边形印章 */
html[data-skin="ba-game"] .badge {
  border-radius: 4px;
  transform: skewX(-10deg);
  background: #33b8fa;
  color: #ffffff;
  font-weight: 700;
}

html[data-skin="ba-game"] .badge.on {
  background: #48c25f;
  color: #ffffff;
}

html[data-skin="ba-game"] .badge.off {
  background: #7c96b2;
  color: #ffffff;
}

html[data-skin="ba-game"] .badge.warn {
  background: #f5b423;
  color: #21344d;
}

html[data-skin="ba-game"] .badge.err {
  background: #f24b78;
  color: #ffffff;
}

/* 清单行与 KPI：游戏内微浮雕实体块 */
html[data-skin="ba-game"] .rows .row,
html[data-skin="ba-game"] .kpi {
  background: #f5f9fd;
  border: 1px solid #d2e0ee;
  border-radius: 8px;
  box-shadow: 0 2px 0 #dce7f2;
}

html[data-skin="ba-game"] .clair-item {
  background: #f5f9fd;
  border: 1.5px solid #cfe0f0;
  border-left: 4px solid #2ba9f2;
  border-radius: 8px;
  box-shadow: 0 2px 0 #d5e3f0;
}

/* 游戏原版配合夜间模式 */
html[data-skin="ba-game"][data-theme="dark"] {
  --bg: #121e2e;
  --panel: #1b2b40;
  --panel2: #22354f;
  --line: #314a6b;
  --line2: #3f5d85;
  --text: #edf5ff;
  --muted: #9eb9d6;
  --dim: #708fae;
  --btn-bg: #233752;
  --btn-bg-hover: #2d476a;
  --input-bg: #172538;
}

html[data-skin="ba-game"][data-theme="dark"] .topbar {
  background: rgba(24, 38, 58, .94);
  border-bottom-color: #314a6b;
}

html[data-skin="ba-game"][data-theme="dark"] .card {
  border-color: #314a6b;
  box-shadow: 0 4px 0 #0d1623, 0 10px 24px rgba(0, 0, 0, .35);
}

html[data-skin="ba-game"][data-theme="dark"] .rows .row,
html[data-skin="ba-game"][data-theme="dark"] .kpi,
html[data-skin="ba-game"][data-theme="dark"] .clair-item,
html[data-skin="ba-game"][data-theme="dark"] .res .pill {
  background: #22354f;
  border-color: #344f73;
  box-shadow: 0 2px 0 #111c2b;
}

html[data-skin="ba-game"][data-theme="dark"] .btn:not(.primary):not(.danger) {
  background: linear-gradient(180deg, #283f5e 0%, #20334d 100%);
  border-color: #3c5b82;
  color: #eaf4ff;
  box-shadow: 0 3px 0 #101b29;
}

/* =====================================================================
   8. 崩坏3 · 休伯利安 2017（hi3-2017：星穹晚霞冰蓝玻璃 + 六边形冷光徽标 + 鎏金主按钮）
   ===================================================================== */
html[data-skin="hi3-2017"] {
  --bg: #0b1328;
  --bg-glow1: rgba(36, 166, 255, .26);
  --bg-glow2: rgba(255, 146, 102, .22);
  --panel: rgba(16, 39, 78, .78);
  --panel2: rgba(14, 34, 68, .72);
  --line: rgba(96, 214, 255, .36);
  --line2: rgba(126, 232, 255, .64);
  --text: #f1f8ff;
  --muted: #9bc2e6;
  --dim: #6f94ba;
  --accent: #24d2ff;
  --accent2: #ffbe19;
  --cyan: #24d2ff;
  --accent-soft: rgba(36, 210, 255, .17);
  --accent-line: rgba(126, 232, 255, .68);
  --green: #38f2a6;
  --amber: #ffbe19;
  --red: #f02c28;
  --ok-soft: rgba(56, 242, 166, .16);
  --warn-soft: rgba(255, 190, 25, .18);
  --bad-soft: rgba(240, 44, 40, .24);
  --mute-soft: rgba(130, 164, 202, .16);
  --btn-bg: rgba(22, 74, 142, .82);
  --btn-bg-hover: rgba(34, 118, 206, .88);
  --input-bg: rgba(10, 26, 52, .88);
  --hover: rgba(36, 210, 255, .16);
  --shadow: 0 10px 28px rgba(4, 12, 30, .48);
  --shadow-lg: 0 20px 46px rgba(3, 10, 26, .68);
  --radius: 6px;
}

/* 星穹晚霞通透蓝底 + 细微 60 度科技斜网（纯 CSS 渐变，零 data: URI） */
html[data-skin="hi3-2017"] body {
  background-color: #0b1328;
  background-image:
    radial-gradient(ellipse 74% 52% at 54% 16%, rgba(255, 146, 102, .24) 0%, rgba(164, 78, 168, .16) 36%, transparent 70%),
    radial-gradient(ellipse 68% 58% at 14% 78%, rgba(36, 166, 255, .24) 0%, transparent 66%),
    radial-gradient(ellipse 58% 50% at 88% 72%, rgba(92, 118, 255, .22) 0%, transparent 68%),
    repeating-linear-gradient(60deg, rgba(86, 210, 255, .04) 0 1px, transparent 1px 36px),
    repeating-linear-gradient(-60deg, rgba(86, 210, 255, .04) 0 1px, transparent 1px 36px),
    linear-gradient(180deg, #0b1028 0%, #15224b 44%, #1a3466 78%, #0f1c3a 100%);
  background-attachment: fixed;
}

/* 休伯利安左舷装甲侧栏 + 青粉双色霓虹导光微边 */
html[data-skin="hi3-2017"] .sidebar {
  position: relative;
  background: linear-gradient(180deg, rgba(11, 22, 44, .94) 0%, rgba(14, 28, 56, .92) 55%, rgba(10, 20, 40, .96) 100%);
  border-right: 2px solid rgba(72, 206, 255, .44);
  box-shadow: 4px 0 24px rgba(3, 10, 26, .52), inset -1px 0 0 rgba(140, 240, 255, .22);
  backdrop-filter: blur(12px);
}

html[data-skin="hi3-2017"] .sidebar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 74px;
  width: 3px;
  height: 54px;
  background: linear-gradient(180deg, #ff4fa8, transparent);
  box-shadow: 0 0 10px rgba(255, 79, 168, .75);
  pointer-events: none;
}

html[data-skin="hi3-2017"] .sidebar .brand b {
  font-style: italic;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(36, 210, 255, .55);
}

html[data-skin="hi3-2017"] .sidebar .brand span {
  color: #8cf0ff;
}

html[data-skin="hi3-2017"] .sidebar .nav-group-title {
  color: #7cc9ec;
}

html[data-skin="hi3-2017"] .sidebar .nav-item {
  background: transparent;
  border-radius: 5px;
  border: 1px solid transparent;
  color: #c2e0fa;
}

html[data-skin="hi3-2017"] .sidebar .nav-item em {
  color: #7cb6e0;
}

html[data-skin="hi3-2017"] .sidebar .nav-item:hover {
  background: rgba(28, 86, 158, .38);
  border-color: rgba(96, 214, 255, .36);
  color: #ffffff;
}

html[data-skin="hi3-2017"] .sidebar .nav-item.active {
  background: linear-gradient(90deg, rgba(28, 134, 224, .56) 0%, rgba(18, 72, 146, .36) 100%);
  border-color: rgba(126, 232, 255, .74);
  border-left: 3px solid #8cf0ff;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(36, 210, 255, .26);
}

html[data-skin="hi3-2017"] .sidebar .nav-item.active em {
  color: #8cf0ff;
}

html[data-skin="hi3-2017"] .sidebar .sidebar-toggle {
  background: rgba(24, 62, 118, .42);
  border-color: rgba(96, 214, 255, .35);
  color: #d8f2ff;
}

/* 顶栏深海蓝玻璃 + 粗斜体冷光标题 + 资源槽 */
html[data-skin="hi3-2017"] .topbar {
  background: linear-gradient(180deg, rgba(10, 20, 40, .92) 0%, rgba(15, 32, 62, .86) 100%);
  border-bottom: 2px solid rgba(72, 206, 255, .44);
  box-shadow: 0 4px 20px rgba(3, 10, 26, .42), inset 0 -1px 0 rgba(140, 240, 255, .28);
  backdrop-filter: blur(12px);
}

html[data-skin="hi3-2017"] .topbar h1 {
  font-style: italic;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(36, 210, 255, .48);
}

html[data-skin="hi3-2017"] .topbar h1 small {
  font-style: normal;
  color: #8cf0ff;
}

html[data-skin="hi3-2017"] .res .pill {
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(16, 48, 92, .76), rgba(11, 28, 56, .66));
  border: 1px solid rgba(96, 214, 255, .40);
  border-bottom: 2px solid rgba(96, 214, 255, .72);
}

html[data-skin="hi3-2017"] .res .pill b {
  font-style: italic;
  font-weight: 900;
  color: #ffffff;
}

/* 红底白边立体未读角标 */
html[data-skin="hi3-2017"] .bell-badge {
  background: radial-gradient(circle at 35% 30%, #ff7a6b, #f02c28);
  border: 2px solid #ffffff;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(240, 44, 40, .68);
}

/* 冰蓝双描边磨砂玻璃卡片（不叠 clip-path，保留干净 6px 圆角） */
html[data-skin="hi3-2017"] .card {
  position: relative;
  border-radius: 6px;
  background: linear-gradient(155deg, rgba(19, 46, 90, .80) 0%, rgba(11, 26, 54, .88) 100%);
  border: 1px solid rgba(96, 214, 255, .36);
  border-top: 2px solid rgba(110, 224, 255, .72);
  box-shadow: 0 10px 28px rgba(4, 12, 30, .48), inset 0 1px 0 rgba(186, 244, 255, .16);
  backdrop-filter: blur(10px);
}

html[data-skin="hi3-2017"] .card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(225deg, rgba(64, 214, 255, .42) 0 46%, transparent 48%);
  border-top-right-radius: 5px;
  pointer-events: none;
}

/* 标题粗斜体冷光 + 冰蓝六边形徽标点 */
html[data-skin="hi3-2017"] .card-head h2 {
  font-style: italic;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(36, 210, 255, .35);
}

html[data-skin="hi3-2017"] .card-head h2::before {
  width: 12px;
  height: 14px;
  border-radius: 0;
  border: 0;
  background: linear-gradient(180deg, #8cf0ff, #1694eb);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow: 0 0 8px rgba(36, 210, 255, .75);
}

/* 今日问候卡晚霞光晕 */
html[data-skin="hi3-2017"] .today-hero {
  background:
    radial-gradient(ellipse 60% 95% at 88% 20%, rgba(255, 148, 92, .22), transparent 70%),
    linear-gradient(135deg, rgba(20, 56, 112, .86) 0%, rgba(12, 30, 64, .92) 100%);
  border-top-color: #8cf0ff;
}

/* 活动面板橙红发光活动横幅框 */
html[data-skin="hi3-2017"] #todayStories {
  border-color: rgba(255, 146, 86, .70);
  border-top: 2px solid #ff9c5a;
  box-shadow: 0 10px 28px rgba(4, 12, 30, .48), 0 0 20px rgba(255, 122, 54, .18);
}

/* 总力战安全暂停：休伯利安经典黑黄警示斜纹顶条 */
html[data-skin="hi3-2017"] #safePauseCard,
html[data-skin="hi3-2017"] .notice.pause {
  border-color: rgba(255, 196, 56, .58);
  border-top: 5px solid transparent;
  background-image:
    linear-gradient(155deg, rgba(19, 46, 90, .86), rgba(11, 26, 54, .92)),
    repeating-linear-gradient(-45deg, #f2a81d 0 10px, #162238 10px 20px);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
}

/* 2017 冰蓝立体按钮 + 耀眼鎏金主按钮（无 clip-path 避免切角瑕疵） */
html[data-skin="hi3-2017"] .btn {
  border-radius: 5px;
  border: 1.5px solid rgba(114, 224, 255, .60);
  background: linear-gradient(180deg, rgba(30, 112, 198, .78) 0%, rgba(16, 58, 116, .88) 100%);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 3px 12px rgba(4, 18, 44, .44), inset 0 1px 0 rgba(190, 245, 255, .36);
}

html[data-skin="hi3-2017"] .btn:hover {
  filter: brightness(1.12);
  border-color: #9ef2ff;
  box-shadow: 0 4px 18px rgba(36, 210, 255, .44), inset 0 1px 0 rgba(220, 250, 255, .52);
}

html[data-skin="hi3-2017"] .btn.primary {
  border-color: #fff4b8;
  background: linear-gradient(180deg, #fff07a 0%, #ffbe19 55%, #e08600 100%);
  color: #241500;
  font-weight: 900;
  box-shadow: 0 4px 18px rgba(255, 194, 30, .42), inset 0 1px 0 rgba(255, 255, 255, .78);
}

html[data-skin="hi3-2017"] .btn.primary:hover {
  background: linear-gradient(180deg, #fff599 0%, #ffca36 55%, #ee9600 100%);
  color: #1c1000;
  box-shadow: 0 5px 24px rgba(255, 206, 54, .70), inset 0 1px 0 rgba(255, 255, 255, .90);
}

html[data-skin="hi3-2017"] .btn.danger {
  border-color: rgba(255, 134, 128, .72);
  background: linear-gradient(180deg, rgba(214, 52, 52, .86), rgba(142, 24, 32, .92));
  color: #ffffff;
}

/* 徽标、清单行、KPI、千里眼与弹窗 */
html[data-skin="hi3-2017"] .badge {
  border-radius: 4px;
  background: rgba(36, 210, 255, .17);
  border: 1px solid rgba(102, 216, 255, .52);
  color: #8cf0ff;
  font-weight: 800;
}

html[data-skin="hi3-2017"] .badge.on {
  background: rgba(56, 242, 166, .16);
  border-color: rgba(56, 242, 166, .58);
  color: #88ffd0;
}

html[data-skin="hi3-2017"] .badge.warn {
  background: rgba(255, 204, 46, .18);
  border-color: rgba(255, 218, 92, .72);
  color: #ffe680;
}

html[data-skin="hi3-2017"] .badge.err {
  background: rgba(240, 44, 40, .24);
  border-color: rgba(255, 118, 110, .76);
  color: #ffc2be;
}

html[data-skin="hi3-2017"] .kpi,
html[data-skin="hi3-2017"] .clair-item {
  background: rgba(9, 22, 46, .70);
  border: 1px solid rgba(96, 214, 255, .34);
  border-left: 3px solid #24d2ff;
  border-radius: 5px;
}

html[data-skin="hi3-2017"] .kpi .value {
  font-style: italic;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(36, 210, 255, .36);
}

html[data-skin="hi3-2017"] .sec-tab.active,
html[data-skin="hi3-2017"] .roster-cat.active {
  background: linear-gradient(180deg, #3ad8ff 0%, #0e8be0 100%);
  color: #031528;
  border-color: #d6fbff;
  box-shadow: 0 0 12px rgba(36, 210, 255, .42);
}

/* 登录页适配 */
html[data-skin="hi3-2017"] .box {
  background: linear-gradient(155deg, rgba(19, 46, 90, .86) 0%, rgba(11, 26, 54, .94) 100%);
  border: 1px solid rgba(96, 214, 255, .48);
  border-top: 2px solid #8cf0ff;
  box-shadow: 0 18px 46px rgba(3, 10, 26, .68);
}

html[data-skin="hi3-2017"] .box button[type="submit"] {
  background: linear-gradient(180deg, #fff07a 0%, #ffbe19 55%, #e08600 100%);
  color: #241500;
  font-weight: 900;
  box-shadow: 0 4px 18px rgba(255, 194, 30, .44);
}


