/* Desktop shell for the operator console (loaded only on the admin portal's desktop layout).
   总后台桌面外壳样式；仅在桌面布局下生效（根元素带 .dsk-on）。 */

/* ---------- Ink & gold theme: overrides the portal tokens so every module restyles without code changes ----------
   墨金主题：覆盖门户的设计变量，各业务模块无需改代码即统一风格。 */
:root.dsk-on {
  --grad: linear-gradient(180deg, #e2c58d, #c8a462);
  --r-sm: 2px; --r: 3px; --r-lg: 4px; --r-xl: 4px;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --num: Georgia, "Times New Roman", serif;
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  --tb: 46px;
}
/* Dark: ink and gold (the default). 暗色：墨金（默认）。 */
:root.dsk-on[data-theme="dark"], :root.dsk-on:not([data-theme]) {
  --bg: #0b0b0c; --bg-2: #111113; --surface: #18181b; --surface-2: #1e1e21; --raise: #222225;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.16);
  --ink: #ece8df; --ink-2: #cfcac0; --muted: #8f8b84; --faint: #5d5a55;
  --brand: #d9bf86; --brand-2: #e8d29e; --brand-ink: #2a1f10;
  --ok: #8fd18a; --warn: #e49a3a; --bad: #d9483b; --info: #6fb6ff;
  --grad-soft: linear-gradient(90deg, rgba(217,191,134,.14), rgba(255,255,255,.03));
  --shadow: 0 0 0 1px rgba(255,255,255,.06); --shadow-lg: 0 20px 60px #000c, 0 0 0 1px rgba(255,255,255,.12);
  --focus: 0 0 0 1px #d9bf86aa;
  color-scheme: dark;
}
/* Light: ink wash on rice paper, with a deeper gold for contrast. 浅色：宣纸水墨，金色加深以保证对比度。 */
:root.dsk-on[data-theme="light"] {
  --bg: #f3eee3; --bg-2: #ece6d8; --surface: #fbf8f1; --surface-2: #f2ede2; --raise: #fdfbf6;
  --line: rgba(70,52,20,.12); --line-2: rgba(70,52,20,.22);
  --ink: #2a2418; --ink-2: #4a4234; --muted: #7a7161; --faint: #a39a88;
  --brand: #8a6a2e; --brand-2: #9c7a3c; --brand-ink: #2a1f10;
  --ok: #3f8f3a; --warn: #b9700f; --bad: #c0392b; --info: #2f7fc4;
  --grad-soft: linear-gradient(90deg, rgba(138,106,46,.12), rgba(255,255,255,.3));
  --shadow: 0 0 0 1px rgba(70,52,20,.1); --shadow-lg: 0 20px 50px rgba(70,52,20,.2), 0 0 0 1px rgba(70,52,20,.12);
  --focus: 0 0 0 1px rgba(138,106,46,.6);
  color-scheme: light;
}
:root.dsk-on body { overflow: hidden; font-size: 14px; background: var(--bg); }

/* Shared module components restyled for windows. 窗口内共享组件的墨金样式。 */
.dsk-on .btn { border-radius: 2px; min-height: 32px; padding: 5px 14px; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: #e4e0d7; }
.dsk-on .btn:hover { border-color: #d9bf8666; background: rgba(255,255,255,.1); }
.dsk-on .btn.primary { background: var(--grad); color: #2a1f10; border-color: transparent; box-shadow: none; font-family: var(--serif); letter-spacing: 1px; }
.dsk-on .btn.primary:hover { filter: brightness(1.08); }
.dsk-on .btn.ghost { background: transparent; border-color: transparent; }
.dsk-on .btn.ghost:hover { background: rgba(255,255,255,.07); }
.dsk-on .btn.glass { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #e4e0d7; backdrop-filter: none; }
.dsk-on .btn.sm { min-height: 28px; padding: 3px 11px; }
.dsk-on .btn.danger, .dsk-on .btn.danger-solid { background: #d9483b33; color: #f0a090; border-color: #d9483b66; }
.dsk-on .input, .dsk-on input.input, .dsk-on select.input, .dsk-on textarea.input { border-radius: 2px; background: rgba(0,0,0,.3); border-color: rgba(255,255,255,.1); }
.dsk-on .input:focus { border-color: #d9bf86aa; box-shadow: none; }
.dsk-on .panel { border-radius: 2px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); box-shadow: none; }
.dsk-on .panel-head { border-bottom-color: rgba(255,255,255,.08); }
.dsk-on .panel-head h2, .dsk-on .dsk-win h3 { font-family: var(--serif); font-weight: 500; letter-spacing: 2px; color: #e8e4da; }
.dsk-on .panel-head h2 { font-size: 16px; }
.dsk-on .stat { border-radius: 2px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); border: 0; }
.dsk-on .stat:hover { box-shadow: inset 0 0 0 1px #d9bf8666; transform: none; }
.dsk-on .stat-link:hover { text-decoration: none; }
.dsk-on .hero-card { border-radius: 2px; background: linear-gradient(90deg, rgba(217,191,134,.12), rgba(255,255,255,.02) 60%, transparent); box-shadow: inset 2px 0 0 var(--brand); color: var(--ink); border: 0; }
.dsk-on .hero-card::after { display: none; }
.dsk-on .hero-card h2 { font-family: var(--serif); font-weight: 500; letter-spacing: 3px; }
.dsk-on .table-wrap { border-radius: 0; border: 0; border-top: 1px solid rgba(255,255,255,.14); }
.dsk-on .rtable th, .dsk-on .sub-table th { background: transparent; font-weight: 400; border-bottom-color: rgba(255,255,255,.14); }
.dsk-on .rtable tbody tr:hover, .dsk-on .sub-table tbody tr:hover { background: rgba(255,255,255,.04); }
.dsk-on .tag { border-radius: 0; font-weight: 400; }
.dsk-on .tag.accent { background: var(--grad); color: #2a1f10; }
.dsk-on .tag.warn { color: #f3c27f; }
.dsk-on .note { border-radius: 2px; }
.dsk-on a { color: var(--brand-2); }
.dsk-on .dialog, .dsk-on .drawer, .dsk-on .palette { border-radius: 2px; background: linear-gradient(180deg, #1d1d20, #141416); box-shadow: 0 20px 60px #000, 0 0 0 1px rgba(255,255,255,.14); }
.dsk-on .dialog::backdrop, .dsk-on .drawer::backdrop { background: rgba(0,0,0,.45); }

/* ---------- Desktop ---------- */
.dsk { position: fixed; inset: 0; overflow: hidden; color: var(--ink); background: radial-gradient(ellipse at 72% 16%, #2a2722 0, #121214 55%, #08080a 100%); user-select: none; -webkit-user-select: none; }
.dsk::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(0,0,0,.6) 100%); pointer-events: none; }
/* The wallpaper is the sign-in scene (same choice), dimmed in dark mode like the game's blurred scene behind windows.
   桌面壁纸沿用登录页场景（同一选择），暗色下压暗，如同游戏窗口背后虚化的场景。 */
.dsk-bg { position: absolute; inset: -8px; pointer-events: none; background: var(--bg) center right / cover no-repeat; filter: blur(1.5px) brightness(.85) saturate(.9); }
.dsk-bg i { display: none; }
:root[data-theme="dark"] .dsk-bg[data-scene="peaks"], :root:not([data-theme]) .dsk-bg[data-scene="peaks"] { background-image: url("login-bg/dark-peaks.jpg?v=20261203T070450073Z-0515b614a984.a84afc9d4b64"); }
:root[data-theme="dark"] .dsk-bg[data-scene="sky"], :root:not([data-theme]) .dsk-bg[data-scene="sky"] { background-image: url("login-bg/dark-armillary.jpg?v=20261203T070450073Z-0515b614a984.a84afc9d4b64"); }
:root[data-theme="light"] .dsk-bg[data-scene="peaks"] { background-image: url("login-bg/light-peaks.jpg?v=20261203T070450073Z-0515b614a984.a84afc9d4b64"); }
:root[data-theme="light"] .dsk-bg[data-scene="sky"] { background-image: url("login-bg/light-pavilion.jpg?v=20261203T070450073Z-0515b614a984.a84afc9d4b64"); }
:root[data-theme="light"] .dsk-bg { filter: blur(1.5px) saturate(.9); }
:root[data-theme="light"] .dsk { background: var(--bg); }
:root[data-theme="light"] .dsk::after { background: linear-gradient(90deg, rgba(243,238,227,.55), rgba(243,238,227,0) 40%), radial-gradient(ellipse at 50% 40%, transparent 50%, rgba(120,96,50,.16) 100%); }
.dsk-sect { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; font: 500 14px var(--serif); color: #bdb8ae; letter-spacing: 1px; }
.dsk-sect::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.dsk-sect em { order: 2; font: italic 11.5px var(--num); color: var(--faint); }
.dsk-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); vertical-align: 1px; }
.dsk-rd { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 5px var(--bad); }
.dsk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border: 0; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); color: #e4e0d7; font: 13px var(--font); cursor: pointer; white-space: nowrap; }
.dsk-btn:hover { background: rgba(255,255,255,.11); box-shadow: inset 0 0 0 1px #d9bf8666; }
.dsk-btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.dsk-btn .ic { width: 15px; height: 15px; }
.dsk button { cursor: pointer; }
.dsk-inp { flex: 1; height: 32px; padding: 0 10px; border: 0; outline: none; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); color: var(--ink); font: 13px var(--font); }
.dsk-inp:focus { box-shadow: inset 0 0 0 1px #d9bf86aa; }

.dsk-brand { position: absolute; left: 18px; top: 14px; z-index: 3; display: grid; gap: 2px; text-shadow: 0 1px 3px #000; }
.dsk-brand b { font: 500 16px var(--serif); letter-spacing: 3px; color: #f1ede4; }
.dsk-brand small { font-size: 11.5px; color: #a9a59d; }

/* Desktop zones: one framed area per category, like fences on a desktop. 桌面分区：每个类别一个带框区域。 */
.dsk-icons { position: absolute; left: 14px; top: 70px; bottom: calc(var(--tb) + 12px); z-index: 2; display: flex; gap: 10px; align-items: flex-start; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.dsk-col { width: 196px; display: flex; flex-direction: column; gap: 10px; }
.dsk-icons::-webkit-scrollbar { display: none; }
.dsk-ig { position: relative; background: linear-gradient(180deg, rgba(22,22,25,.66), rgba(12,12,14,.52)); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dsk-ig::before { content: ""; position: absolute; left: 0; top: 0; width: 72px; height: 1px; background: linear-gradient(90deg, var(--brand), transparent); opacity: .8; }
.dsk-ig-h { position: relative; display: flex; align-items: center; gap: 7px; width: 100%; height: 30px; padding: 0 9px 0 12px; border: 0; background: none; font: 500 13px var(--serif); letter-spacing: 2px; color: #d6d1c7; text-align: left; }
.dsk-ig-h::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; background: var(--brand); box-shadow: 0 0 5px rgba(217,191,134,.5); }
.dsk-ig-h::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.12), rgba(255,255,255,.03)); }
.dsk-ig-h > .ic { width: 14px; height: 14px; color: var(--brand); opacity: .85; stroke-width: 1.6; }
.dsk-ig-h em { margin-left: auto; font: italic 400 11.5px var(--num); letter-spacing: 0; color: var(--faint); }
.dsk-ig-h .dsk-fold { width: 12px; height: 12px; color: var(--muted); transition: transform .15s; }
.dsk-ig-h:hover { color: #fff; } .dsk-ig-h:hover .dsk-fold { color: var(--brand-2); }
.dsk-ig.folded .dsk-fold { transform: rotate(-90deg); }
.dsk-ig.folded .dsk-ig-h::after { display: none; }
.dsk-ig-b { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 6px 6px 8px; }
.dsk-ig.folded .dsk-ig-b { display: none; }
.dsk-di { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px 4px; border: 0; background: none; color: #dcd8cf; font: 13px var(--serif); text-align: center; white-space: nowrap; }
.dsk-di:hover { background: rgba(255,255,255,.05); }
.dsk-di:focus-visible { box-shadow: inset 0 0 0 1px var(--brand); border-radius: 0; }
.dsk-di b { font-weight: 400; line-height: 1.25; text-shadow: 0 1px 3px #000; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dsk-di .dsk-rd { right: 18px; top: 8px; }
.dsk-dia { position: relative; width: 46px; height: 46px; flex: none; display: grid; place-items: center; color: #e8e2d4; }
.dsk-dia::before { content: ""; position: absolute; inset: 7px; transform: rotate(45deg); background: linear-gradient(160deg, #3a3a3d, #202023); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 4px 10px rgba(0,0,0,.5); transition: background .15s; }
.dsk-dia .ic { position: relative; width: 21px; height: 21px; stroke-width: 1.5; }
.dsk-di:hover .dsk-dia::before, .dsk-di.on .dsk-dia::before { background: linear-gradient(160deg, #eee4cf, #cbbd9e); }
.dsk-di:hover .dsk-dia, .dsk-di.on .dsk-dia { color: #2a1f10; }

.dsk-nav { position: absolute; right: 238px; top: 8px; z-index: 3; display: flex; height: 52px; padding: 0 6px; background: linear-gradient(180deg, rgba(20,20,22,.87), rgba(14,14,16,.78)); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 6px 18px rgba(0,0,0,.45); clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px); }
.dsk-tnb { position: relative; width: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: #cfcac0; font: 13px var(--serif); }
.dsk-tnb .ic { width: 20px; height: 20px; opacity: .75; stroke-width: 1.5; }
.dsk-tnb:hover, .dsk-tnb.on { color: var(--brand-2); }
.dsk-tnb:hover .ic, .dsk-tnb.on .ic { opacity: 1; }
.dsk-tnb.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; background: var(--brand); box-shadow: 0 0 6px var(--brand); }
.dsk-tnb + .dsk-tnb::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: rgba(255,255,255,.1); }
.dsk-drop { position: absolute; z-index: 30; top: 64px; min-width: 180px; padding: 4px 0; background: rgba(20,20,22,.96); box-shadow: 0 10px 28px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.12); animation: dsk-open .12s ease-out; }
.dsk-drop button { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 14px 0 16px; border: 0; background: none; font: 13.5px var(--serif); color: #dcd8cf; white-space: nowrap; text-align: left; }
.dsk-drop button .ic { width: 16px; height: 16px; opacity: .7; }
.dsk-drop button:hover { background: linear-gradient(90deg, rgba(217,191,134,.14), transparent); color: #fff; }
.dsk-drop button:hover::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--brand); box-shadow: 0 0 5px var(--brand); }
.dsk-drop em { margin-left: auto; font: italic 11px var(--num); color: var(--bad); }

.dsk-status { position: absolute; right: 12px; top: 8px; z-index: 3; width: 216px; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.dsk-st-name { display: flex; align-items: center; justify-content: space-between; height: 26px; padding: 0 10px; background: linear-gradient(90deg, rgba(14,14,16,.92), rgba(20,20,22,.83)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.dsk-st-name b { font: 500 14px var(--serif); letter-spacing: 2px; color: #f1ede4; }
.dsk-st-name small { font-size: 11px; color: var(--ok); }
.dsk-st-body { padding: 6px 10px 8px; background: rgba(11,11,12,.9); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.dsk-st-row { display: flex; align-items: center; gap: 6px; width: 100%; height: 24px; padding: 0; border: 0; background: none; font: 12px var(--font); color: var(--muted); text-align: left; }
.dsk-st-row b { margin-left: auto; font: italic 400 13px var(--num); color: #ece8df; }
.dsk-st-row b.bad { color: #f0a090; } .dsk-st-row b.warn { color: #f3c27f; }
button.dsk-st-row:hover { color: #e8e4da; }

/* ---------- Windows ---------- */
.dsk-wins { position: absolute; inset: 0 0 var(--tb) 0; z-index: 5; pointer-events: none; }
/* Keep minimum dimensions within the window layer, even in a short viewport. */
/* 最小尺寸限制在窗口层内，兼容较矮的视口。 */
.dsk-win { position: absolute; display: flex; flex-direction: column; min-width: min(360px, 100%); min-height: min(240px, 100%); pointer-events: auto; user-select: text; -webkit-user-select: text;
  background: linear-gradient(180deg, rgba(24,24,27,.95), rgba(16,16,18,.97)); box-shadow: 0 18px 50px rgba(0,0,0,.72), 0 0 0 1px rgba(255,255,255,.11), inset 0 1px 0 rgba(255,255,255,.07); backdrop-filter: blur(8px); animation: dsk-open .16s ease-out; }
@keyframes dsk-open { from { opacity: 0; transform: translateY(6px) scale(.99); } }
.dsk-win::before { content: ""; position: absolute; left: 0; top: 0; width: 180px; height: 1px; background: linear-gradient(90deg, var(--brand), transparent); opacity: 0; transition: opacity .2s; pointer-events: none; }
.dsk-win.act::before { opacity: .9; }
.dsk-win.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
.dsk-wt { position: relative; flex: none; height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 8px 0 18px; cursor: grab; user-select: none; touch-action: none; }
.dsk-wt:active { cursor: grabbing; }
.dsk-win.max .dsk-wt { cursor: default; }
.dsk-wt::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.14), rgba(255,255,255,.06) 60%, rgba(255,255,255,.02)); }
.dsk-wbar { position: absolute; left: 0; top: 13px; bottom: 13px; width: 3px; background: #4a4844; transition: background .2s, box-shadow .2s; }
.dsk-win.act .dsk-wbar { background: var(--brand); box-shadow: 0 0 6px rgba(217,191,134,.6); }
.dsk-wt > .ic { width: 18px; height: 18px; color: var(--brand-2); opacity: .55; stroke-width: 1.5; }
.dsk-win.act .dsk-wt > .ic { opacity: 1; }
.dsk-wt h2 { margin: 0; font: 500 18px/1 var(--serif); letter-spacing: 3px; color: #a29e95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.dsk-win.act .dsk-wt h2 { color: #f3efe6; }
.dsk-wback { display: none; width: 32px; height: 32px; margin-left: -10px; place-items: center; border: 0; background: none; color: #e8e4da; }
.dsk-wbtns { margin-left: auto; display: flex; gap: 2px; flex: none; }
.dsk-wbtns button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: none; opacity: .55; transition: opacity .12s, background .12s; }
.dsk-wbtns button:hover { opacity: 1; background: rgba(255,255,255,.07); }
.dsk-wbtns button.x:hover { background: rgba(217,72,59,.2); }
.dsk-wbtns svg { width: 13px; height: 13px; fill: none; stroke: #e8e4da; stroke-width: 1.4; }
.dsk-wb { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 14px 18px 18px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.dsk-wb > .page > .page-head { display: none; }
.dsk-wb > .page { gap: 14px; }
/* Window content follows the window's width, not the screen's: narrow windows get the phone layout of each module.
   窗口内容随窗口宽度而非屏幕宽度变化：窗口变窄时各模块自动采用手机端排版。 */
.dsk-wb { container: dskwin / inline-size; }
/* A mailbox fills the rest of its window: the page becomes a column and the mailbox takes the remaining height, */
/* so the list and the reader scroll inside the window instead of the whole window scrolling. */
/* 邮箱填满窗口剩余高度：页面改为纵向排列，邮箱占据剩余空间，列表与阅读区在窗口内各自滚动，而不是整个窗口滚动。 */
.dsk-wb > .page:has(> .mailbox) { display: flex; flex-direction: column; min-height: 100%; }
.dsk-wb > .page > .mailbox { flex: 1 1 0; height: auto; min-height: 420px; }
@container dskwin (max-width: 900px) {
  .mailbox { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .mail-col { border-right: 0; }
  .mail-pane { display: none; }
  .mailbox.reading .mail-col { display: none; }
  .mailbox.reading .mail-pane { display: flex; }
  .mail-back { display: block; }
  .mail-list { max-height: none; }
  .wallet-hero { grid-template-columns: minmax(0, 1fr); }
}
@container dskwin (max-width: 640px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .hero-card { align-items: stretch; flex-direction: column; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .card-head, .panel-head { padding: 14px 14px 0; }
  .card-body, .panel-body { padding: 12px 14px 16px; }
  .facts, .desk-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd, .desk-facts dd { margin-bottom: 10px; }
  .table-wrap { border: 0; overflow: visible; }
  .rtable thead, .sub-table thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { border: 1px solid var(--line); padding: 6px 12px; margin-bottom: 8px; background: rgba(255,255,255,.03); }
  .rtable td { display: grid; grid-template-columns: minmax(84px, 38%) minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); min-width: 0; }
  .rtable td:last-child { border-bottom: 0; }
  .td-label { display: block; color: var(--muted); font-size: 12.5px; }
  .enterprise-table-text { max-width: 100%; }
  .enterprise-table-rate { white-space: normal; }
}
@container dskwin (max-width: 400px) { .stats { grid-template-columns: minmax(0, 1fr); } }
/* Toasts sit above the taskbar or dock. 提示条位于任务栏或 Dock 上方。 */
.dsk-on #toasts { bottom: calc(var(--tb, 46px) + 14px); z-index: 60; }
@media (max-width: 760px) { .dsk-on #toasts { bottom: calc(72px + env(safe-area-inset-bottom)); } }
.dsk-on .toast { border-radius: 2px; }

/* ---------- Window content: the module pages restyled as game-window sections ----------
   窗口内容：把各模块页面改为游戏窗口式的分区（标题 + 渐隐金线），去掉卡片套卡片。 */
.dsk-on .btn { font-weight: 400; }
.dsk-wb .panel, .dsk-wb .card { background: none; border: 0; box-shadow: none; border-radius: 0; }
.dsk-wb .panel + .panel, .dsk-wb .card + .card { margin-top: 4px; }
.dsk-wb .panel-head, .dsk-wb .card-head { position: relative; padding: 0 0 7px; margin-bottom: 10px; }
.dsk-wb .panel-head::after, .dsk-wb .card-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.06) 60%, transparent); }
.dsk-wb .panel-body, .dsk-wb .card-body { padding: 0; gap: 12px; }
.dsk-wb h2, .dsk-wb h3, .dsk-wb h4 { font-family: var(--serif); font-weight: 500; letter-spacing: 1px; color: #e8e4da; }
.dsk-wb .panel-head h2, .dsk-wb .card-head h2, .dsk-wb .card-title h2 { font-size: 15px; }
.dsk-wb h3 { font-size: 14px; }
.dsk-wb .card-icon { width: 26px; height: 26px; border-radius: 0; background: none; color: var(--brand-2); }
.dsk-wb .card-icon .ic { width: 17px; height: 17px; }
/* Nested cards (e.g. each verification method) become quiet framed blocks. 嵌套卡片改为低调的线框块。 */
.dsk-wb .card .card, .dsk-wb .panel .card { padding: 10px 12px; background: rgba(255,255,255,.025); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.dsk-wb .card .card .card-head, .dsk-wb .panel .card .card-head { margin-bottom: 8px; }
.dsk-wb .note { font-size: 13px; padding: 9px 12px; }
.dsk-on .note.info { background: rgba(217,191,134,.06); border-color: rgba(217,191,134,.22); color: var(--ink-2); }
.dsk-on .note.info > .ic { color: var(--brand); }
.dsk-wb .sub-empty { padding: 18px 0; text-align: center; font-family: var(--serif); color: var(--faint); }

/* Compact controls and filter bars. 紧凑的输入控件与筛选栏。 */
.dsk-wb .input, .dsk-wb select.input { min-height: 32px; height: 32px; padding: 0 10px; font-size: 13px; }
.dsk-wb select.input { padding-right: 30px; }
.dsk-wb textarea.input { height: auto; padding: 8px 10px; }
.dsk-wb .catalog-actions, .dsk-wb .desk-tools { gap: 6px; }
.dsk-wb .catalog-actions > .input, .dsk-wb .desk-tools > .input { flex: 1 1 150px; width: auto; max-width: 230px; }
.dsk-wb .catalog-actions > input[type="search"].input, .dsk-wb .desk-tools > input[type="search"].input, .dsk-wb .panel-body > input[type="search"].input { flex: 2 1 240px; max-width: 380px; }
.dsk-wb .panel-body > input[type="search"].input { width: min(100%, 380px); }
.dsk-wb .btn.sm { min-height: 26px; padding: 2px 10px; font-size: 12.5px; }
.dsk-wb .catalog-actions .btn.sm { white-space: nowrap; }
.dsk-wb .pager, .dsk-wb .desk-pager, .dsk-wb .sub-pagination { justify-content: flex-end; font: italic 12.5px var(--num); color: var(--muted); }

/* Section switchers become underline tabs, as in the game's window tabs. 分区切换按钮改为游戏窗口的下划线标签。 */
.dsk-wb .catalog-tabs { gap: 0; flex-wrap: nowrap; overflow-x: auto; border-bottom: 1px solid var(--line-2); scrollbar-width: none; }
.dsk-wb .catalog-tabs .btn { position: relative; min-height: 34px; padding: 4px 14px 7px; border: 0; border-radius: 0; background: none; font: 14px var(--serif); color: #a9a59d; letter-spacing: 1px; }
.dsk-wb .catalog-tabs .btn:hover { background: none; color: #e6e2d9; }
.dsk-wb .catalog-tabs .btn[aria-pressed="true"] { background: none; color: var(--brand-2); border: 0; }
.dsk-wb .catalog-tabs .btn[aria-pressed="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--brand); box-shadow: 0 0 6px rgba(217,191,134,.55); }

/* Dense tables. 紧凑表格。 */
.dsk-wb .rtable, .dsk-wb .sub-table { font-size: 13px; }
.dsk-wb .rtable th, .dsk-wb .sub-table th { padding: 6px 10px; font-size: 12px; }
/* break-word (not anywhere) keeps words whole when sizing columns; wide tables scroll inside the window.
   使用 break-word 而非 anywhere，计算列宽时不拆单词；过宽的表格在窗口内横向滚动。 */
.dsk-wb .rtable td, .dsk-wb .sub-table td { padding: 7px 10px; overflow-wrap: break-word; }
.dsk-wb .desk-cell strong { font-weight: 500; }
.dsk-wb .desk-cell small { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.dsk-wb .catalog-actions { flex-wrap: wrap; }
.dsk-on .rtable tr { border-radius: 0; }

/* Statistic tiles and charts in the gold palette. 统计块与图表改用金色系。 */
.dsk-wb .stat { padding: 10px 12px; gap: 2px; }
.dsk-wb .stat-value { font: italic 400 24px/1.2 var(--num); letter-spacing: 0; color: #f1ede4; }
.dsk-wb .stat-top { font-size: 12px; }
.dsk-wb .analytics-figure { border-radius: 0; background: rgba(255,255,255,.025); border-color: rgba(255,255,255,.07); padding: 10px 12px; }
.dsk-wb .analytics-figure figcaption { font: 500 14px var(--serif); letter-spacing: 1px; }
.dsk-wb .analytics-summary { gap: 0 18px; }
.dsk-wb .analytics-summary > * { padding: 6px 0; border-bottom: 1px solid var(--line); }
.dsk-on .analytics-key::before, .dsk-on .analytics-day span { background: #d9bf86; border-radius: 0; }
.dsk-on .analytics-key[data-series="1"]::before, .dsk-on .analytics-day span[data-series="1"] { background: #6fb6ff; }
.dsk-on .analytics-key[data-series="2"]::before, .dsk-on .analytics-day span[data-series="2"] { background: #8fd18a; }
.dsk-on .bar.a { fill: #d9bf86; } .dsk-on .bar.b { fill: #6fb6ff; }
.dsk-wb .analytics-scroll, .dsk-wb .chart-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }

/* Phones: filters two per row, search on its own row. 手机端筛选项每行两个，搜索框独占一行。 */
.dsk.h5 .dsk-wb .catalog-actions > .input, .dsk.h5 .dsk-wb .desk-tools > .input { flex: 1 1 calc(50% - 3px); max-width: none; }
.dsk.h5 .dsk-wb .catalog-actions > input[type="search"].input, .dsk.h5 .dsk-wb .desk-tools > input[type="search"].input, .dsk.h5 .dsk-wb .panel-body > input[type="search"].input { flex-basis: 100%; max-width: none; width: 100%; }
.dsk.h5 .dsk-wb .rtable tr { padding: 4px 10px; }
.dsk.h5 .dsk-wb .rtable td { padding: 5px 0; }

/* ======================================================================================================
   Sign-in (desktop layout): generated ink-wash scenes behind a game-style window, light and dark.
   登录页（桌面布局）：生成的水墨场景 + 游戏风格窗口，支持浅色与深色，主题随页面设置（跟随系统 / 浅色 / 深色）。
   ====================================================================================================== */
:root.dsk-auth {
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --num: Georgia, "Times New Roman", serif;
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  --grad: linear-gradient(180deg, #e2c58d, #c8a462);
  --r-sm: 2px; --r: 3px; --r-lg: 4px; --r-xl: 4px;
  --ok: #8fd18a; --warn: #e49a3a; --bad: #d9483b; --info: #6fb6ff;
}
:root.dsk-auth[data-theme="dark"] {
  --bg: #0b0b0c; --bg-2: #111113; --surface: #18181b; --surface-2: #1e1e21; --raise: #1d1d20;
  --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.17);
  --ink: #ece8df; --ink-2: #cfcac0; --muted: #8f8b84; --faint: #66625b;
  --brand: #d9bf86; --brand-2: #e8d29e; --brand-ink: #2a1f10;
  --focus: 0 0 0 1px #d9bf86aa;
  --shadow-lg: 0 20px 60px #000c, 0 0 0 1px rgba(255,255,255,.12);
  --dska-win: rgba(20,20,23,.84); --dska-win-2: rgba(14,14,16,.9); --dska-field: rgba(0,0,0,.32);
  --dska-veil: linear-gradient(90deg, rgba(8,8,10,.78) 0, rgba(8,8,10,.42) 34%, rgba(8,8,10,0) 62%);
  --dska-vig: radial-gradient(ellipse at 60% 45%, transparent 45%, rgba(0,0,0,.55) 100%);
  --dska-shadow: 0 24px 70px rgba(0,0,0,.72), 0 0 0 1px rgba(255,255,255,.1), inset 0 1px 0 rgba(255,255,255,.07);
  color-scheme: dark;
}
:root.dsk-auth[data-theme="light"] {
  --bg: #f3eee3; --bg-2: #ece6d8; --surface: #fbf8f1; --surface-2: #f2ede2; --raise: #fdfbf6;
  --line: rgba(70,52,20,.12); --line-2: rgba(70,52,20,.22);
  --ink: #2a2418; --ink-2: #4a4234; --muted: #7a7161; --faint: #a39a88;
  --brand: #8a6a2e; --brand-2: #9c7a3c; --brand-ink: #2a1f10;
  --focus: 0 0 0 1px rgba(138,106,46,.6);
  --shadow-lg: 0 20px 50px rgba(70,52,20,.18), 0 0 0 1px rgba(70,52,20,.12);
  --dska-win: rgba(252,249,242,.86); --dska-win-2: rgba(246,241,231,.92); --dska-field: rgba(255,255,255,.72);
  --dska-veil: linear-gradient(90deg, rgba(246,241,232,.82) 0, rgba(246,241,232,.45) 34%, rgba(246,241,232,0) 62%);
  --dska-vig: radial-gradient(ellipse at 60% 45%, transparent 55%, rgba(120,96,50,.14) 100%);
  --dska-shadow: 0 24px 60px rgba(70,52,20,.2), 0 0 0 1px rgba(70,52,20,.12), inset 0 1px 0 rgba(255,255,255,.8);
  color-scheme: light;
}
:root.dsk-auth body { background: var(--bg); font-family: var(--font); }
/* Keep the screen-reader status region inside the viewport so it does not add a scrollbar. 读屏状态区留在视口内，避免多出滚动条。 */
:root.dsk-auth #notice, :root.dsk-on #notice { top: 0; left: 0; }

.dska { position: relative; min-height: 100dvh; color: var(--ink); overflow-x: hidden; }
.dska-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.dska-art { position: absolute; inset: -2%; background: center right / cover no-repeat; animation: dska-drift 38s ease-in-out infinite alternate; transition: opacity .4s; }
@keyframes dska-drift { from { transform: scale(1.04) translateX(0); } to { transform: scale(1) translateX(-1.2%); } }
@media (prefers-reduced-motion: reduce) { .dska-art { animation: none; } }
:root[data-theme="dark"] .dska-bg[data-scene="peaks"] .dska-art { background-image: url("login-bg/dark-peaks.jpg?v=20261203T070450073Z-0515b614a984.a84afc9d4b64"); }
:root[data-theme="dark"] .dska-bg[data-scene="sky"] .dska-art { background-image: url("login-bg/dark-armillary.jpg?v=20261203T070450073Z-0515b614a984.a84afc9d4b64"); }
:root[data-theme="light"] .dska-bg[data-scene="peaks"] .dska-art { background-image: url("login-bg/light-peaks.jpg?v=20261203T070450073Z-0515b614a984.a84afc9d4b64"); }
:root[data-theme="light"] .dska-bg[data-scene="sky"] .dska-art { background-image: url("login-bg/light-pavilion.jpg?v=20261203T070450073Z-0515b614a984.a84afc9d4b64"); }
.dska-veil { position: absolute; inset: 0; background: var(--dska-veil), var(--dska-vig); }

.dska-top { position: absolute; z-index: 3; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px clamp(16px, 3vw, 32px); }
.dska-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dska-brand b { display: block; font: 500 17px var(--serif); letter-spacing: 4px; color: var(--ink); }
.dska-brand small { display: block; margin-top: 1px; font: italic 11.5px var(--num); letter-spacing: 1px; color: var(--muted); }
.dska-mark { position: relative; width: 38px; height: 38px; flex: none; display: grid; place-items: center; font: 600 15px var(--serif); color: #2a1f10; }
.dska-mark::before { content: ""; position: absolute; inset: 7px; transform: rotate(45deg); background: linear-gradient(160deg, #eee4cf, #c8a462); box-shadow: 0 0 12px rgba(217,191,134,.4); }
.dska-mark span { position: relative; }
.dska-tools { display: flex; align-items: center; gap: 6px; }
.dska-tools .btn.ghost { min-height: 34px; width: 34px; border-radius: 2px; color: var(--ink-2); background: var(--dska-win); box-shadow: 0 0 0 1px var(--line); border: 0; }
.dska-tools .btn.ghost:hover { color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.dska-tools .lang-pop { border-radius: 2px; background: var(--raise); }
.dska-tools .lang-opt { border-radius: 0; }
.dska-scenes { display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 6px 0 12px; margin-right: 4px; background: var(--dska-win); box-shadow: 0 0 0 1px var(--line); }
.dska-scene-name { margin-right: 6px; font: 13px var(--serif); letter-spacing: 1px; color: var(--muted); white-space: nowrap; }
.dska-dot { position: relative; width: 22px; height: 22px; border: 0; background: none; cursor: pointer; }
.dska-dot::before { content: ""; position: absolute; inset: 7px; transform: rotate(45deg); background: transparent; box-shadow: inset 0 0 0 1px var(--muted); transition: background .15s, box-shadow .15s; }
.dska-dot:hover::before { box-shadow: inset 0 0 0 1px var(--brand); }
.dska-dot[aria-pressed="true"]::before { background: var(--brand); box-shadow: 0 0 6px rgba(217,191,134,.6); }

.dska-stage { position: relative; z-index: 2; min-height: 100dvh; display: flex; align-items: center; padding: 96px clamp(16px, 4vw, 48px) 96px clamp(20px, 9vw, 168px); }
.dska-win { position: relative; width: min(420px, 100%); background: linear-gradient(180deg, var(--dska-win), var(--dska-win-2)); box-shadow: var(--dska-shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: dsk-open .3s ease-out; }
.dska-win::before { content: ""; position: absolute; left: 0; top: 0; width: 200px; height: 1px; background: linear-gradient(90deg, var(--brand), transparent); }
.dska-win::after { content: ""; position: absolute; right: 0; bottom: 0; width: 120px; height: 1px; background: linear-gradient(270deg, var(--brand), transparent); opacity: .5; }
.dska-wt { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 20px 24px 14px; }
.dska-wt::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--line-2), var(--line) 60%, transparent); }
.dska-wbar { position: absolute; left: 0; top: 22px; height: 24px; width: 3px; background: var(--brand); box-shadow: 0 0 6px rgba(217,191,134,.55); }
.dska-wt > .ic { width: 20px; height: 20px; margin-top: 3px; color: var(--brand-2); stroke-width: 1.5; }
.dska-wt-text { display: grid; gap: 4px; min-width: 0; }
.dska-wt h1 { margin: 0; font: 500 21px/1.3 var(--serif); letter-spacing: 4px; color: var(--ink); }
.dska-wt p { margin: 0; font-size: 13px; color: var(--muted); }
.dska-body { display: grid; gap: 14px; padding: 18px 24px 22px; }

/* Form components inside the sign-in window. 登录窗口内的表单组件。 */
.dska .stack { gap: 14px; }
.dska .field { gap: 6px; }
.dska .field-label { font: 400 13px var(--serif); letter-spacing: 1px; color: var(--ink-2); }
.dska .input { min-height: 40px; border-radius: 2px; border: 0; background: var(--dska-field); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: 14px; }
.dska .input:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.dska .input:focus { box-shadow: inset 0 0 0 1px var(--brand), 0 0 0 3px rgba(217,191,134,.14); }
.dska .field.invalid .input { box-shadow: inset 0 0 0 1px var(--bad); }
.dska .reveal { border-radius: 2px; }
.dska .btn { border-radius: 2px; font-weight: 400; }
.dska .btn.primary { min-height: 44px; background: var(--grad); color: #2a1f10; border: 0; box-shadow: 0 8px 20px -12px rgba(200,164,98,.9); font: 500 15px var(--serif); letter-spacing: 6px; }
.dska .btn.primary:hover { filter: brightness(1.07); background: var(--grad); }
.dska .btn.primary[aria-busy="true"]::after { border-color: #2a1f10 transparent #2a1f10 transparent; }
.dska .btn.outline { background: transparent; border: 0; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.dska .btn.outline:hover { box-shadow: inset 0 0 0 1px var(--brand); color: var(--brand); }
.dska .divider { font: 12px var(--serif); letter-spacing: 2px; }
.dska .divider::before, .dska .divider::after { background: linear-gradient(90deg, transparent, var(--line-2)); }
.dska .divider::after { background: linear-gradient(270deg, transparent, var(--line-2)); }
.dska .note { border-radius: 2px; font-size: 13px; }
.dska .note.info { background: rgba(217,191,134,.08); border-color: rgba(217,191,134,.28); color: var(--ink-2); }
.dska .note.info > .ic { color: var(--brand); }
.dska .ts, .dska .reg-check { border-radius: 2px; }
.dska .strength .meter i { border-radius: 0; }
.dska a { color: var(--brand); }

.dska-foot { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 16px; padding: 14px clamp(20px, 9vw, 168px); font-size: 12px; color: var(--faint); }
.dska-foot p { margin: 0; }
.dska-env { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 10px; color: var(--ink-2); background: var(--dska-win); box-shadow: 0 0 0 1px var(--line); font: 12px var(--serif); letter-spacing: 1px; }
.dska-envdot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }

/* Phones: the scene stays visible above, the window fills the width. 手机端：上方保留场景，窗口占满宽度。 */
@media (max-width: 760px) {
  :root.dsk-auth[data-theme="dark"] { --dska-veil: linear-gradient(180deg, rgba(8,8,10,.1) 0, rgba(8,8,10,.5) 45%, rgba(8,8,10,.88) 100%); }
  :root.dsk-auth[data-theme="light"] { --dska-veil: linear-gradient(180deg, rgba(246,241,232,.05) 0, rgba(246,241,232,.5) 45%, rgba(246,241,232,.9) 100%); }
  .dska-art { background-position: 72% center; }
  .dska-top { padding: calc(12px + env(safe-area-inset-top)) 14px 12px; }
  .dska-brand b { font-size: 15px; letter-spacing: 3px; }
  .dska-scene-name { display: none; }
  .dska-scenes { padding: 0 4px; margin-right: 0; }
  .dska-stage { align-items: flex-end; padding: 140px 12px 12px; min-height: calc(100dvh - 64px); }
  .dska-win { width: 100%; }
  .dska-wt { padding: 18px 18px 12px; }
  .dska-wt h1 { font-size: 19px; letter-spacing: 3px; }
  .dska-body { padding: 16px 18px 20px; }
  .dska-foot { position: relative; flex-direction: column; align-items: flex-start; gap: 8px; padding: 4px 16px calc(16px + env(safe-area-inset-bottom)); }
}
.dsk-wrz { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none; background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,.19) 50%, rgba(255,255,255,.19) 58%, transparent 58%, transparent 70%, rgba(255,255,255,.19) 70%, rgba(255,255,255,.19) 78%, transparent 78%); }
.dsk-win.max .dsk-wrz { display: none; }

/* ---------- Taskbar & start menu ---------- */
.dsk-taskbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--tb); display: flex; align-items: center; padding: 0 10px; background: linear-gradient(180deg, rgba(20,20,22,.94), rgba(11,11,12,.97)); box-shadow: 0 -1px 0 rgba(255,255,255,.08), 0 -8px 24px rgba(0,0,0,.5); }
.dsk-tb-desk { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; height: 100%; }
.dsk-startbtn { position: relative; width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 0; background: none; color: #2a1f10; font: 600 15px var(--serif); }
.dsk-startbtn::before { content: ""; position: absolute; inset: 6px; transform: rotate(45deg); background: linear-gradient(160deg, #eee4cf, #c8a462); box-shadow: 0 0 10px rgba(217,191,134,.33); }
.dsk-startbtn span { position: relative; }
.dsk-startbtn:hover::before, .dsk-startbtn.on::before { filter: brightness(1.12); }
.dsk-tb-sep { width: 1px; height: 22px; margin: 0 4px; background: rgba(255,255,255,.1); }
.dsk-tasks { flex: 1; min-width: 0; display: flex; gap: 3px; overflow: hidden; }
.dsk-tk { position: relative; display: flex; align-items: center; gap: 8px; max-width: 180px; height: 34px; padding: 0 12px; border: 0; background: rgba(255,255,255,.03); font: 13px var(--serif); color: #a9a59d; white-space: nowrap; }
.dsk-tk > span { overflow: hidden; text-overflow: ellipsis; }
.dsk-tk .ic { width: 16px; height: 16px; }
.dsk-tk .dsk-rd { right: 4px; top: 5px; }
.dsk-tk:hover { background: rgba(255,255,255,.08); color: #e6e2d9; }
.dsk-tk.act { background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03)); color: #f3efe6; }
.dsk-tk.act::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--brand); box-shadow: 0 0 6px var(--brand); }
.dsk-tk.min { opacity: .6; }
.dsk-tray { display: flex; align-items: center; gap: 12px; padding-left: 10px; font-size: 12px; color: #cfcac0; }
.dsk-tray .lang-pop { bottom: calc(100% + 8px); top: auto; }
.dsk-clock { display: grid; text-align: right; line-height: 1.15; }
.dsk-clock b { font: italic 400 13px var(--num); color: #e8e4da; }
.dsk-clock small { font-size: 10.5px; color: var(--muted); }
.dsk-dock { display: none; }

.dsk-startmenu { position: absolute; left: 8px; bottom: calc(var(--tb) + 8px); z-index: 30; width: 540px; max-height: calc(100% - var(--tb) - 24px); display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(29,29,32,.97), rgba(20,20,22,.98)); box-shadow: 0 20px 60px #000, 0 0 0 1px rgba(255,255,255,.13); animation: dsk-open .14s ease-out; }
.dsk-sm-hd { display: flex; gap: 10px; padding: 14px 16px 6px; }
.dsk-sm-bd { flex: 1; min-height: 0; overflow: auto; padding: 0 16px 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-content: start; }
.dsk-sm-it { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 8px; border: 0; background: none; font: 13.5px var(--serif); color: #dcd8cf; text-align: left; }
.dsk-sm-it .ic { width: 16px; height: 16px; color: var(--brand); opacity: .85; }
.dsk-sm-it:hover { background: linear-gradient(90deg, rgba(217,191,134,.13), transparent); }
.dsk-sm-ft { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 16px; border-top: 1px solid rgba(255,255,255,.06); background: rgba(0,0,0,.2); }
.dsk-av { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(160deg, #3a3a3d, #222224); box-shadow: inset 0 0 0 1px rgba(217,191,134,.4); font: 500 13px var(--serif); color: var(--brand-2); }
.dsk-sm-who { display: grid; line-height: 1.3; }
.dsk-sm-who b { font: 500 14px var(--serif); }
.dsk-sm-who small { color: var(--muted); font-size: 11.5px; }
.dsk-sp { flex: 1; }
.dsk-switcher { position: absolute; inset: 0 0 var(--tb) 0; z-index: 25; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(0,0,0,.6); }
.dsk-sw-box { padding: 14px 14px 12px; background: linear-gradient(180deg, #1d1d20, #141416); box-shadow: 0 -10px 30px #000, 0 0 0 1px rgba(255,255,255,.13); }
.dsk-sw-box .dsk-sect { margin-top: 0; }
.dsk-sw-it { display: flex; align-items: center; height: 46px; margin-bottom: 4px; background: rgba(255,255,255,.03); }
.dsk-sw-it.act { box-shadow: inset 2px 0 0 var(--brand); }
.dsk-sw-it > button:first-child { flex: 1; display: flex; align-items: center; gap: 10px; height: 100%; padding: 0 12px; border: 0; background: none; font: 14px var(--serif); color: var(--ink); text-align: left; }
.dsk-sw-it .ic { width: 18px; height: 18px; color: var(--brand); }
.dsk-sw-x { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; }
.dsk-sw-x svg { width: 13px; height: 13px; fill: none; stroke: var(--muted); stroke-width: 1.4; }
.dsk-sw-act { display: flex; gap: 8px; margin-top: 8px; }
.dsk-sw-act .dsk-btn { flex: 1; height: 38px; }

/* ---------- Phones: home screen, full-screen windows, dock ---------- */
.dsk.h5 { --tb: 58px; }
.dsk.h5 .dsk-nav, .dsk.h5 .dsk-tb-desk, .dsk.h5 .dsk-wbar, .dsk.h5 .dsk-wt > .ic, .dsk.h5 [data-w="min"], .dsk.h5 [data-w="max"], .dsk.h5 .dsk-wrz { display: none; }
.dsk.h5 .dsk-brand { top: calc(12px + env(safe-area-inset-top)); left: 16px; }
.dsk.h5 .dsk-status { left: 12px; right: 12px; top: calc(60px + env(safe-area-inset-top)); width: auto; }
.dsk.h5 .dsk-st-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.dsk.h5 .dsk-icons { left: 0; right: 0; top: calc(200px + env(safe-area-inset-top)); bottom: var(--tb); display: flex; flex-direction: column; gap: 10px; align-items: stretch; padding: 4px 12px 16px; overflow-y: auto; }
.dsk.h5 .dsk-col { display: contents; }
.dsk.h5 .dsk-ig { flex: none; }
.dsk.h5 .dsk-ig-h { height: 36px; font-size: 14px; }
.dsk.h5 .dsk-ig-b { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.dsk.h5 .dsk-di { font-size: 12px; padding: 8px 0 6px; }
.dsk.h5 .dsk-win { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; min-width: 0; animation: dsk-slide .18s ease-out; }
@keyframes dsk-slide { from { transform: translateX(24px); opacity: 0; } }
.dsk.h5 .dsk-win:not(.act) { display: none; }
.dsk.h5 .dsk-win::before { display: none; }
.dsk.h5 .dsk-wt { cursor: default; height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 6px 0 16px; }
.dsk.h5 .dsk-wback { display: grid; }
.dsk.h5 .dsk-wt h2 { font-size: 17px; letter-spacing: 2px; }
.dsk.h5 .dsk-wb { padding: 12px 12px 20px; }
.dsk.h5 .dsk-taskbar { height: calc(var(--tb) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); }
.dsk.h5 .dsk-dock { display: flex; flex: 1; justify-content: space-around; }
.dsk-dk { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 6px; height: var(--tb); border: 0; background: none; font: 12px var(--serif); color: #a9a59d; }
.dsk-dk .ic { width: 21px; height: 21px; stroke-width: 1.5; }
.dsk-dk > span { max-width: 5em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dsk-dk.on { color: var(--brand-2); }
.dsk-dk.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--brand); box-shadow: 0 0 6px var(--brand); }
.dsk-dk em { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 15px; height: 15px; padding: 0 4px; font: italic 600 10px/15px var(--num); color: #2a1f10; background: var(--brand); text-align: center; }
.dsk.h5 .dsk-startmenu { left: 0; right: 0; bottom: var(--tb); width: auto; max-height: 80%; }
.dsk.h5 .dsk-sm-bd { grid-template-columns: 1fr; }

/* ======================================================================================================
   Light theme for the desktop: rice paper, ink and deeper gold. Only colors change; layout is shared with dark.
   桌面浅色主题：宣纸、水墨与加深的金色。只改颜色，布局与暗色共用。
   ====================================================================================================== */
:root.dsk-on[data-theme="light"] {
  --dl-win: linear-gradient(180deg, rgba(252,249,242,.95), rgba(246,241,231,.97));
  --dl-glass: rgba(252,249,242,.82);
  --dl-hover: rgba(138,106,46,.08);
  --dl-field: rgba(255,255,255,.75);
  --dl-rule: linear-gradient(90deg, rgba(70,52,20,.2), rgba(70,52,20,.07) 60%, transparent);
  --dl-shadow: 0 18px 46px rgba(70,52,20,.2), 0 0 0 1px rgba(70,52,20,.14), inset 0 1px 0 rgba(255,255,255,.9);
}
/* Shared module components. 共享组件。 */
:root.dsk-on[data-theme="light"] .btn { background: rgba(255,255,255,.6); border-color: var(--line-2); color: var(--ink-2); }
:root.dsk-on[data-theme="light"] .btn:hover { background: #fff; border-color: rgba(138,106,46,.5); }
:root.dsk-on[data-theme="light"] .btn.primary { background: var(--grad); color: #2a1f10; border-color: transparent; }
:root.dsk-on[data-theme="light"] .btn.ghost { background: transparent; border-color: transparent; }
:root.dsk-on[data-theme="light"] .btn.ghost:hover { background: var(--dl-hover); }
:root.dsk-on[data-theme="light"] .btn.glass { background: rgba(255,255,255,.6); border-color: var(--line-2); color: var(--ink-2); }
:root.dsk-on[data-theme="light"] .btn.danger, :root.dsk-on[data-theme="light"] .btn.danger-solid { background: rgba(192,57,43,.08); color: #a3312a; border-color: rgba(192,57,43,.35); }
:root.dsk-on[data-theme="light"] .input { background: var(--dl-field); border-color: var(--line-2); }
:root.dsk-on[data-theme="light"] .input:focus { border-color: rgba(138,106,46,.7); }
:root.dsk-on[data-theme="light"] .panel { background: rgba(255,255,255,.5); border-color: var(--line); }
:root.dsk-on[data-theme="light"] .panel-head { border-bottom-color: var(--line); }
:root.dsk-on[data-theme="light"] .panel-head h2, :root.dsk-on[data-theme="light"] .dsk-win h3 { color: var(--ink); }
:root.dsk-on[data-theme="light"] .stat { background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px var(--line); }
:root.dsk-on[data-theme="light"] .stat:hover { box-shadow: inset 0 0 0 1px rgba(138,106,46,.5); }
:root.dsk-on[data-theme="light"] .hero-card { background: linear-gradient(90deg, rgba(138,106,46,.1), rgba(255,255,255,.3) 60%, transparent); }
:root.dsk-on[data-theme="light"] .table-wrap { border-top-color: var(--line-2); }
:root.dsk-on[data-theme="light"] .rtable th, :root.dsk-on[data-theme="light"] .sub-table th { border-bottom-color: var(--line-2); }
:root.dsk-on[data-theme="light"] .rtable tbody tr:hover, :root.dsk-on[data-theme="light"] .sub-table tbody tr:hover { background: var(--dl-hover); }
:root.dsk-on[data-theme="light"] .tag.warn { color: #9a5b0c; }
:root.dsk-on[data-theme="light"] .note.info { background: rgba(138,106,46,.07); border-color: rgba(138,106,46,.25); }
:root.dsk-on[data-theme="light"] .dialog, :root.dsk-on[data-theme="light"] .drawer, :root.dsk-on[data-theme="light"] .palette { background: linear-gradient(180deg, #fdfbf6, #f4efe4); box-shadow: 0 20px 60px rgba(70,52,20,.25), 0 0 0 1px rgba(70,52,20,.14); }
:root.dsk-on[data-theme="light"] .dialog::backdrop, :root.dsk-on[data-theme="light"] .drawer::backdrop { background: rgba(60,45,20,.22); }
:root.dsk-on[data-theme="light"] .analytics-key::before, :root.dsk-on[data-theme="light"] .analytics-day span { background: #b8995a; }
:root.dsk-on[data-theme="light"] .analytics-key[data-series="1"]::before, :root.dsk-on[data-theme="light"] .analytics-day span[data-series="1"] { background: #3d8bd4; }
:root.dsk-on[data-theme="light"] .analytics-key[data-series="2"]::before, :root.dsk-on[data-theme="light"] .analytics-day span[data-series="2"] { background: #5aa655; }
:root.dsk-on[data-theme="light"] .bar.a { fill: #b8995a; } :root.dsk-on[data-theme="light"] .bar.b { fill: #3d8bd4; }

/* Desktop, zones and icons. 桌面、分区与图标。 */
:root[data-theme="light"] .dsk-sect { color: var(--ink-2); }
:root[data-theme="light"] .dsk-btn { background: rgba(255,255,255,.65); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
:root[data-theme="light"] .dsk-btn:hover { background: #fff; box-shadow: inset 0 0 0 1px rgba(138,106,46,.5); }
:root[data-theme="light"] .dsk-inp { background: var(--dl-field); box-shadow: inset 0 0 0 1px var(--line-2); }
:root[data-theme="light"] .dsk-inp:focus { box-shadow: inset 0 0 0 1px rgba(138,106,46,.7); }
:root[data-theme="light"] .dsk-brand { text-shadow: 0 1px 2px rgba(255,255,255,.8); }
:root[data-theme="light"] .dsk-brand b { color: var(--ink); }
:root[data-theme="light"] .dsk-brand small { color: var(--muted); }
:root[data-theme="light"] .dsk-ig { background: linear-gradient(180deg, rgba(252,249,242,.8), rgba(246,241,231,.7)); box-shadow: 0 0 0 1px var(--line), 0 8px 22px rgba(70,52,20,.12); }
:root[data-theme="light"] .dsk-ig-h { color: var(--ink-2); }
:root[data-theme="light"] .dsk-ig-h::before { box-shadow: none; }
:root[data-theme="light"] .dsk-ig-h::after { background: var(--dl-rule); }
:root[data-theme="light"] .dsk-ig-h:hover { color: var(--ink); }
:root[data-theme="light"] .dsk-di { color: var(--ink); }
:root[data-theme="light"] .dsk-di:hover { background: var(--dl-hover); }
:root[data-theme="light"] .dsk-di b { text-shadow: none; }
:root[data-theme="light"] .dsk-dia { color: var(--ink-2); }
:root[data-theme="light"] .dsk-dia::before { background: linear-gradient(160deg, #fffdf8, #ebe4d4); box-shadow: inset 0 0 0 1px rgba(70,52,20,.2), 0 3px 8px rgba(70,52,20,.15); }
:root[data-theme="light"] .dsk-di:hover .dsk-dia::before, :root[data-theme="light"] .dsk-di.on .dsk-dia::before { background: linear-gradient(160deg, #eee4cf, #c8a462); }

/* Top bar, drop-down and status panel. 顶部功能条、下拉菜单与状态面板。 */
:root[data-theme="light"] .dsk-nav { background: linear-gradient(180deg, rgba(252,249,242,.92), rgba(246,241,231,.86)); box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(70,52,20,.14); }
:root[data-theme="light"] .dsk-tnb { color: var(--ink-2); }
:root[data-theme="light"] .dsk-tnb:hover, :root[data-theme="light"] .dsk-tnb.on { color: var(--brand); }
:root[data-theme="light"] .dsk-tnb.on::after { box-shadow: none; }
:root[data-theme="light"] .dsk-tnb + .dsk-tnb::before { background: var(--line); }
:root[data-theme="light"] .dsk-drop { background: rgba(253,251,246,.98); box-shadow: 0 10px 28px rgba(70,52,20,.2), 0 0 0 1px var(--line-2); }
:root[data-theme="light"] .dsk-drop button { color: var(--ink); }
:root[data-theme="light"] .dsk-drop button:hover { background: linear-gradient(90deg, rgba(138,106,46,.12), transparent); color: var(--ink); }
:root[data-theme="light"] .dsk-status { box-shadow: 0 6px 18px rgba(70,52,20,.14); }
:root[data-theme="light"] .dsk-st-name { background: linear-gradient(90deg, rgba(246,241,231,.95), rgba(252,249,242,.88)); box-shadow: inset 0 0 0 1px var(--line); }
:root[data-theme="light"] .dsk-st-name b { color: var(--ink); }
:root[data-theme="light"] .dsk-st-body { background: var(--dl-glass); box-shadow: inset 0 0 0 1px var(--line); }
:root[data-theme="light"] .dsk-st-row b { color: var(--ink); }
:root[data-theme="light"] .dsk-st-row b.bad { color: #b3372b; } :root[data-theme="light"] .dsk-st-row b.warn { color: #9a5b0c; }
:root[data-theme="light"] button.dsk-st-row:hover { color: var(--ink); }

/* Windows. 窗口。 */
:root[data-theme="light"] .dsk-win { background: var(--dl-win); box-shadow: var(--dl-shadow); }
:root[data-theme="light"] .dsk-wt::after, :root[data-theme="light"] .dsk-wb .panel-head::after, :root[data-theme="light"] .dsk-wb .card-head::after { background: var(--dl-rule); }
:root[data-theme="light"] .dsk-wbar { background: #cfc6b4; }
:root[data-theme="light"] .dsk-win.act .dsk-wbar { box-shadow: none; }
:root[data-theme="light"] .dsk-wt h2 { color: var(--muted); }
:root[data-theme="light"] .dsk-win.act .dsk-wt h2 { color: var(--ink); }
:root[data-theme="light"] .dsk-wback { color: var(--ink); }
:root[data-theme="light"] .dsk-wbtns button:hover { background: rgba(70,52,20,.08); }
:root[data-theme="light"] .dsk-wbtns button.x:hover { background: rgba(192,57,43,.14); }
:root[data-theme="light"] .dsk-wbtns svg { stroke: var(--ink-2); }
:root[data-theme="light"] .dsk-wb { scrollbar-color: rgba(70,52,20,.25) transparent; }
:root[data-theme="light"] .dsk-wrz { background: linear-gradient(135deg, transparent 50%, rgba(70,52,20,.3) 50%, rgba(70,52,20,.3) 58%, transparent 58%, transparent 70%, rgba(70,52,20,.3) 70%, rgba(70,52,20,.3) 78%, transparent 78%); }
:root[data-theme="light"] .dsk-wb h2, :root[data-theme="light"] .dsk-wb h3, :root[data-theme="light"] .dsk-wb h4 { color: var(--ink); }
:root[data-theme="light"] .dsk-wb .card .card, :root[data-theme="light"] .dsk-wb .panel .card { background: rgba(255,255,255,.5); box-shadow: inset 0 0 0 1px var(--line); }
:root[data-theme="light"] .dsk-wb .catalog-tabs .btn { background: none; color: var(--muted); }
:root[data-theme="light"] .dsk-wb .catalog-tabs .btn:hover { color: var(--ink); }
:root[data-theme="light"] .dsk-wb .catalog-tabs .btn[aria-pressed="true"] { color: var(--brand); }
:root[data-theme="light"] .dsk-wb .catalog-tabs .btn[aria-pressed="true"]::after { box-shadow: none; }
:root[data-theme="light"] .dsk-wb .stat-value { color: var(--ink); }
:root[data-theme="light"] .dsk-wb .analytics-figure { background: rgba(255,255,255,.5); border-color: var(--line); }
@container dskwin (max-width: 640px) { :root[data-theme="light"] .rtable tr { background: rgba(255,255,255,.55); } }

/* Taskbar, start menu, switcher and dock. 任务栏、开始菜单、窗口切换与 Dock。 */
:root[data-theme="light"] .dsk-taskbar { background: linear-gradient(180deg, rgba(252,249,242,.95), rgba(243,238,227,.97)); box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(70,52,20,.1); }
:root[data-theme="light"] .dsk-tb-sep { background: var(--line-2); }
:root[data-theme="light"] .dsk-tk { background: rgba(255,255,255,.4); color: var(--muted); }
:root[data-theme="light"] .dsk-tk:hover { background: rgba(255,255,255,.85); color: var(--ink); }
:root[data-theme="light"] .dsk-tk.act { background: linear-gradient(180deg, #fff, rgba(255,255,255,.6)); color: var(--ink); }
:root[data-theme="light"] .dsk-tk.act::after { box-shadow: none; }
:root[data-theme="light"] .dsk-tray, :root[data-theme="light"] .dsk-clock b { color: var(--ink-2); }
:root[data-theme="light"] .dsk-tray .btn.ghost { color: var(--ink-2); }
:root[data-theme="light"] .dsk-startmenu { background: linear-gradient(180deg, rgba(253,251,246,.98), rgba(246,241,231,.98)); box-shadow: 0 20px 60px rgba(70,52,20,.25), 0 0 0 1px var(--line-2); }
:root[data-theme="light"] .dsk-sm-it { color: var(--ink); }
:root[data-theme="light"] .dsk-sm-it:hover { background: linear-gradient(90deg, rgba(138,106,46,.12), transparent); }
:root[data-theme="light"] .dsk-sm-ft { border-top-color: var(--line); background: rgba(70,52,20,.04); }
:root[data-theme="light"] .dsk-av { background: linear-gradient(160deg, #fffdf8, #ebe4d4); box-shadow: inset 0 0 0 1px rgba(138,106,46,.45); }
:root[data-theme="light"] .dsk-switcher { background: rgba(60,45,20,.3); }
:root[data-theme="light"] .dsk-sw-box { background: linear-gradient(180deg, #fdfbf6, #f4efe4); box-shadow: 0 -10px 30px rgba(70,52,20,.2), 0 0 0 1px var(--line-2); }
:root[data-theme="light"] .dsk-sw-it { background: rgba(255,255,255,.55); }
:root[data-theme="light"] .dsk-dk { color: var(--muted); }
:root[data-theme="light"] .dsk-dk.on { color: var(--brand); }
:root[data-theme="light"] .dsk-dk.on::before { box-shadow: none; }

/* Theme and wallpaper buttons in the tray. 托盘里的主题与壁纸按钮。 */
.dsk-tray .btn.ghost.icon-only, .dsk-sm-ft .btn.ghost.icon-only { width: 30px; min-height: 30px; padding: 0; border-radius: 2px; color: var(--ink-2); }
.dsk-tray .btn.ghost.icon-only .ic, .dsk-sm-ft .btn.ghost.icon-only .ic { width: 16px; height: 16px; }

/* Taskbar window tools: back to desktop and close all. 任务栏窗口工具：回到桌面、关闭全部窗口。 */
.dsk-tb-tools { display: flex; align-items: center; gap: 2px; padding-left: 6px; margin-left: 4px; border-left: 1px solid var(--line-2); }
.dsk-tbt { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-2); opacity: .75; }
.dsk-tbt:hover { opacity: 1; background: rgba(255,255,255,.08); color: var(--brand-2); }
.dsk-tbt.x:hover { background: rgba(217,72,59,.2); color: var(--ink); }
.dsk-tbt .ic { width: 16px; height: 16px; }
.dsk-tbt svg:not(.ic) { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }
:root[data-theme="light"] .dsk-tbt:hover { background: rgba(70,52,20,.08); color: var(--brand); }
:root[data-theme="light"] .dsk-tbt.x:hover { background: rgba(192,57,43,.14); color: #a3312a; }
.dsk-sw-closeall { width: 100%; height: 38px; margin-top: 4px; color: #f0a090; }
.dsk-sw-closeall svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; }
:root[data-theme="light"] .dsk-sw-closeall { color: #a3312a; }

/* Classic layout: the switch to the desktop layout. 经典界面中切换到桌面界面的入口。 */
.to-desktop { white-space: nowrap; }

/* Record windows (one customer each): title, subtitle and a lighter title bar accent. 记录窗口（每个用户一个）：标题、副标题与更轻的标题栏强调。 */
.dsk-wt .dsk-wsub { flex: 0 1 auto; min-width: 0; margin-left: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsk-recwin .dsk-wt h2 { flex: 0 1 auto; min-width: 0; font-size: 16px; letter-spacing: 2px; }
.dsk-recwin .dsk-wt > .ic { color: var(--muted); }
.dsk-recwin.act .dsk-wt > .ic { color: var(--brand-2); }
.dsk-detail { gap: 12px; }
.dsk-detail > .desk-cell { padding: 10px 12px; background: var(--grad-soft); box-shadow: inset 2px 0 0 var(--brand); }
.dsk-detail > .desk-cell strong { font: italic 400 18px var(--num); color: var(--ink); }
.dsk-detail .desk-feedback, .dsk-detail .desk-note { margin: 0; padding: 8px 12px; font-size: 13px; color: var(--ink-2); background: rgba(217,191,134,.06); box-shadow: inset 0 0 0 1px rgba(217,191,134,.2); }
.dsk-tk.rec { max-width: 150px; }
.dsk-tk.rec .ic { opacity: .7; }
.dsk.h5 .dsk-wt .dsk-wsub { display: none; }

/* 主账号与工作区: tree on the left, detail pane on the right; stacked when the window is narrow.
   主账号与工作区：左侧树形列表，右侧详情面板；窗口变窄时上下排列。 */
.dir-split { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.dir-tree { display: flex; flex-direction: column; gap: 1px; padding: 4px; max-height: 520px; overflow-y: auto; scrollbar-width: thin; background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 1px var(--line); }
.dir-node { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 42px; padding: 4px 10px 4px 8px; border: 0; background: none; color: var(--ink-2); text-align: left; cursor: pointer; }
.dir-node.lv1 { min-height: 36px; padding-left: 28px; }
.dir-node.lv1::after { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.dir-node:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.dir-node:focus-visible { outline: 1px solid var(--brand); outline-offset: -1px; box-shadow: none; }
.dir-node[aria-selected="true"] { background: linear-gradient(90deg, rgba(217,191,134,.17), rgba(217,191,134,.03)); color: var(--ink); }
.dir-node[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; background: var(--brand); box-shadow: 0 0 5px rgba(217,191,134,.5); }
.dir-caret { position: relative; width: 12px; height: 12px; flex: none; }
.dir-caret::before { content: ""; position: absolute; left: 3px; top: 2px; border: 4px solid transparent; border-left: 6px solid var(--muted); border-right: 0; transition: transform .15s; transform-origin: 2px 4px; }
.dir-node[aria-expanded="true"] .dir-caret::before { transform: rotate(90deg); }
.dir-caret.leaf { width: 0; }
.dir-caret.leaf::before { display: none; }
.dir-mark { width: 8px; height: 8px; flex: none; transform: rotate(45deg); box-shadow: inset 0 0 0 1px var(--brand); }
.dir-mark.master { background: var(--brand); }
.dir-text { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.dir-text strong { font: 500 13.5px var(--serif); letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-text small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-node > em { flex: none; min-width: 18px; text-align: right; font: italic 12px var(--num); color: var(--faint); }
.dir-node .dir-meter { gap: 0; } .dir-node .dir-meter span { width: 30px; } .dir-node .dir-meter b { display: none; }
.dir-meter { display: inline-flex; align-items: center; gap: 8px; }
.dir-meter span { display: block; width: 140px; height: 4px; background: var(--line-2); }
.dir-meter i { display: block; height: 100%; background: var(--brand); }
.dir-meter.hot i { background: var(--warn); }
.dir-meter b { font: italic 400 13px var(--num); color: var(--ink); }
.dir-pane { display: grid; gap: 12px; align-content: start; min-width: 0; }
.dir-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; background: var(--grad-soft); box-shadow: inset 2px 0 0 var(--brand); }
.dir-head .desk-cell strong { font: 500 18px var(--serif); letter-spacing: 2px; color: var(--ink); }
.dir-head .desk-cell small { max-width: none; }
.dir-sub { position: relative; display: flex; align-items: baseline; gap: 8px; margin: 4px 0 0; padding-bottom: 6px; font: 500 14px var(--serif); letter-spacing: 1px; color: var(--ink-2); }
.dir-sub::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.dir-sub em { font: 400 11.5px var(--font); letter-spacing: 0; color: var(--faint); }
.dir-pane .desk-facts dd.mono { font-size: 12px; color: var(--ink-2); }
.dir-pane .lnk { padding: 0; border: 0; background: none; color: var(--brand-2); font: inherit; cursor: pointer; }
.dir-pane .lnk:hover { text-decoration: underline; }
@container dskwin (max-width: 720px) {
  .dir-split { grid-template-columns: minmax(0, 1fr); }
  .dir-tree { max-height: 280px; }
}
:root[data-theme="light"] .dir-tree { background: rgba(255,255,255,.5); }
:root[data-theme="light"] .dir-node:hover { background: rgba(138,106,46,.08); }
:root[data-theme="light"] .dir-node[aria-selected="true"] { background: linear-gradient(90deg, rgba(138,106,46,.14), rgba(138,106,46,.02)); }
:root[data-theme="light"] .dir-node[aria-selected="true"]::before { box-shadow: none; }
:root[data-theme="light"] .dir-pane .lnk { color: var(--brand); }

/* 代理管理: agent list with unsettled amounts, detail pane with figures, websites and a settlement bar.
   代理管理：带待结算金额的代理列表；详情面板包含数据、官网与结算栏。 */
.dir-mark.agent { border-radius: 50%; transform: none; background: transparent; box-shadow: inset 0 0 0 1.5px var(--brand); }
.dir-node[aria-selected="true"] .dir-mark.agent { background: var(--brand); }
.dir-node > em.dir-due { min-width: 0; padding: 0 6px; font: italic 600 11.5px/18px var(--num); color: #2a1f10; background: var(--brand); }
.dir-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.dir-stats > div { display: grid; gap: 2px; padding: 8px 10px; background: var(--surface); }
.dir-stats span { font-size: 12px; color: var(--muted); }
.dir-stats b { font: italic 400 18px/1.2 var(--num); color: var(--ink); white-space: nowrap; }
.dir-stats .due b { color: var(--brand-2); }
.dir-sub .dir-sub-act { margin-left: auto; }
.dir-settle { position: sticky; bottom: -18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; padding: 10px 12px; background: linear-gradient(90deg, rgba(217,191,134,.16), rgba(217,191,134,.05)); box-shadow: inset 0 0 0 1px rgba(217,191,134,.32), 0 -6px 14px rgba(0,0,0,.25); }
.dir-settle span { font-size: 13px; color: var(--ink-2); }
@container dskwin (max-width: 720px) {
  .dir-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dir-stats > div:last-child { grid-column: 1 / -1; }
}
:root[data-theme="light"] .dir-stats > div { background: rgba(255,255,255,.7); }
:root[data-theme="light"] .dir-stats .due b { color: var(--brand); }
:root[data-theme="light"] .dir-settle { background: linear-gradient(90deg, rgba(138,106,46,.12), rgba(138,106,46,.03)); box-shadow: inset 0 0 0 1px rgba(138,106,46,.3), 0 -6px 14px rgba(70,52,20,.08); }

/* Company windows: record counts on the tabs, tab content without the card frame.
   企业窗口：标签上显示记录数，标签内容不再套卡片外框。 */
.dsk-wb .catalog-tabs .tab-count { margin-left: 6px; font: italic 400 11.5px var(--num); color: var(--faint); }
.dsk-wb .catalog-tabs .btn[aria-pressed="true"] .tab-count { color: var(--brand); }
.enterprise-detail-tabs > .card > .card-head { display: none; }
.enterprise-detail-tabs > .card { margin-top: 2px; }
.dsk-detail .enterprise-funds, .dsk-detail > .stats { margin-bottom: 2px; }
/* Keep the four company fund figures two per row in narrow windows. 窄窗口中企业的四项资金数据保持每行两个。 */
@container dskwin (max-width: 400px) {
  .dsk-detail > .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .dsk-detail > .stats .stat-value { font-size: 18px; }
}
@media (max-width: 760px) { .to-desktop .btn-label { display: none; } .to-desktop { width: 38px; padding: 0; } }
