/* ==========================================================================
   Tsuru Launcher — 官网样式
   设计语言：方块 / 终端
     · 硬边框 + 切角面板，不做大圆角和弥散阴影
     · 等宽字体承担标签、编号、状态、日志
     · 背景是「光标网格」不是极光色块，纹理是 1px 抖动不是模糊光晕
     · 动效按方块节奏来（短、脆、有停顿），不做长淡入
   配色令牌仍然取自启动器 ThemeService，三套外观 × 七种强调色。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 令牌
   -------------------------------------------------------------------------- */
:root {
    --accent: #4ADE80;
    --accent-rgb: 74, 222, 128;

    --cut: 14px;          /* 切角尺寸 */
    --r: 3px;             /* 小圆角，只用在这种地方 */

    --maxw: 1240px;
    --gut: 26px;

    --ease: cubic-bezier(.2, .8, .2, 1);
    --snap: cubic-bezier(.6, 0, .2, 1);

    --font: "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
    --display: "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont,
        "Segoe UI", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
    --bg: #0B0D10;
    --bg2: #0F1216;
    --panel: #14181D;
    --panel2: #191E24;
    --line: #262C34;
    --line2: #39414B;
    --t1: #E8EDF2;
    --t2: #B9C2CC;
    --t3: #8A949F;
    --t4: #626C77;
    --grid: rgba(255, 255, 255, .055);
    --grid-hot: rgba(var(--accent-rgb), .16);
    --scan: rgba(0, 0, 0, .16);
}

html[data-theme="oled"] {
    --bg: #000000;
    --bg2: #07080A;
    --panel: #0C0F12;
    --panel2: #111418;
    --line: #1F242A;
    --line2: #333A42;
    --t1: #EDF2F6;
    --t2: #BCC5CF;
    --t3: #868F9A;
    --t4: #5E6671;
    --grid: rgba(255, 255, 255, .06);
    --grid-hot: rgba(var(--accent-rgb), .18);
    --scan: rgba(0, 0, 0, .3);
}

html[data-theme="light"] {
    --bg: #F1F3F6;
    --bg2: #FFFFFF;
    --panel: #FFFFFF;
    --panel2: #F7F9FB;
    --line: #D5DAE1;
    --line2: #B2BAC4;
    --t1: #10141A;
    --t2: #333B45;
    --t3: #5A6472;
    --t4: #7C8695;
    --grid: rgba(16, 20, 26, .06);
    --grid-hot: rgba(var(--accent-rgb), .2);
    --scan: rgba(16, 20, 26, .035);
}

/* --------------------------------------------------------------------------
   2. 基础
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 78px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--t1);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.68;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .3s var(--ease), color .3s var(--ease);
}

h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.16; letter-spacing: -.022em; font-weight: 800; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, canvas, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .9em; background: var(--panel2); border: 1px solid var(--line); padding: 1px 5px; border-radius: var(--r); }

.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

::selection { background: rgba(var(--accent-rgb), .3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: var(--accent); color: #06120A; padding: 12px 20px; font-weight: 700;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); position: relative; z-index: 2; }

/* 图标 */
.ic-sm { width: 15px; height: 15px; fill: currentColor; flex: none; }
.ic-lg { width: 21px; height: 21px; fill: currentColor; flex: none; }

/* 光标网格背景（canvas 由 fx.js 绘制） */
.cursor-grid {
    position: fixed; inset: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
}
/* 1px 扫描线：替代模糊光晕的纹理 */
.scanlines {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    background: repeating-linear-gradient(to bottom, var(--scan) 0 1px, transparent 1px 3px);
    opacity: .5;
}
.progress {
    position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 130;
    background: var(--accent);
}

/* 点击像素火花 / 光标像素残影（fx.js 生成） */
.fx-spark {
    position: fixed; width: 4px; height: 4px; z-index: 200;
    pointer-events: none; background: var(--accent);
}
.fx-trail {
    position: fixed; width: 5px; height: 5px; z-index: 3;
    pointer-events: none; background: rgba(var(--accent-rgb), .5);
}

/* --------------------------------------------------------------------------
   3. 顶栏
   -------------------------------------------------------------------------- */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s var(--ease), background .25s var(--ease);
}
.topbar.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 96%, transparent); }
.topbar-in {
    max-width: var(--maxw); margin: 0 auto; padding: 11px var(--gut);
    display: flex; align-items: center; gap: 18px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
    width: 30px; height: 30px; display: grid; place-items: center; flex: none;
    background: var(--accent); border-radius: var(--r);
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), .3);
}
.brand-mark svg { width: 18px; height: 18px; fill: #06120A; }
.brand-name {
    font-family: var(--mono); font-size: 13.5px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
}
.brand-name b { color: var(--accent); font-weight: 700; }

.topbar-status {
    font-size: 11px; color: var(--t3); letter-spacing: .06em;
    border: 1px solid var(--line); padding: 3px 9px; border-radius: var(--r);
    background: var(--panel); white-space: nowrap;
}

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
    display: inline-flex; align-items: baseline; gap: 7px;
    padding: 8px 13px; font-size: 13.5px; color: var(--t3);
    border: 1px solid transparent; border-radius: var(--r);
    transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.nav a i { font-style: normal; font-size: 10px; color: var(--t4); letter-spacing: .04em; }
.nav a:hover { color: var(--t1); background: var(--panel); border-color: var(--line); }
.nav a.active { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: rgba(var(--accent-rgb), .07); }
.nav a.active i { color: var(--accent); }

.topbar-actions { display: flex; align-items: center; gap: 7px; flex: none; }

.ibtn {
    width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
    color: var(--t2);
    transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.ibtn:hover { color: var(--t1); border-color: var(--line2); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.ibtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ibtn svg.filled, svg.filled { fill: currentColor; stroke: none; }
html[data-theme="light"] .ibtn .i-moon { display: none; }
html:not([data-theme="light"]) .ibtn .i-sun { display: none; }
.burger { display: none; }

/* 抽屉 */
.drawer { position: fixed; inset: 0; z-index: 120; display: none; }
.drawer.open { display: block; }
.drawer .scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.drawer .sheet {
    position: absolute; top: 0; right: 0; width: min(300px, 84vw); height: 100%;
    background: var(--bg2); border-left: 1px solid var(--line);
    padding: 18px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
    animation: sheetIn .24s var(--ease);
}
@keyframes sheetIn { from { transform: translateX(100%); } to { transform: none; } }
.sheet-head { font-size: 11px; letter-spacing: .18em; color: var(--t4); padding: 6px 8px 12px; }
.drawer .sheet a {
    display: flex; align-items: baseline; gap: 10px;
    padding: 12px; border: 1px solid transparent; border-radius: var(--r);
    color: var(--t2); font-size: 15px; transition: background .18s var(--ease), border-color .18s var(--ease);
}
.drawer .sheet a i { font-style: normal; font-size: 11px; color: var(--t4); }
.drawer .sheet a:hover { background: var(--panel); border-color: var(--line); color: var(--t1); }
.drawer .sheet .sep { height: 1px; background: var(--line); margin: 10px 4px; }

/* --------------------------------------------------------------------------
   4. 按钮 / 标签
   -------------------------------------------------------------------------- */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; font-size: 14px; font-weight: 650; cursor: pointer;
    border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel); color: var(--t1);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn-solid { background: var(--accent); color: #06120A; border-color: color-mix(in srgb, var(--accent) 60%, #000); }
.btn-solid:hover { box-shadow: 0 8px 22px rgba(var(--accent-rgb), .38); }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* StarBorder：绕边一圈的高光（fx.js 驱动） */
[data-starborder] { overflow: hidden; }
[data-starborder]::after {
    content: ""; position: absolute; inset: -1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent);
    transform: translateX(-120%);
    animation: starSweep 3.6s cubic-bezier(.5, 0, .5, 1) infinite;
    mix-blend-mode: overlay;
}
@keyframes starSweep {
    0%, 62% { transform: translateX(-120%); }
    88%, 100% { transform: translateX(120%); }
}

.tag {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11.5px; padding: 4px 9px; border: 1px solid var(--line);
    border-radius: var(--r); background: var(--panel); color: var(--t3); white-space: nowrap;
}
.tag-live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 38%, transparent); background: rgba(var(--accent-rgb), .08); }
.tag-hot { background: var(--accent); color: #06120A; border-color: transparent; font-weight: 700; }
.tag .dot { width: 6px; height: 6px; background: var(--accent); flex: none; animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .25; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip {
    font-size: 11px; letter-spacing: .04em; color: var(--t3);
    border: 1px dashed var(--line2); padding: 3px 8px; border-radius: var(--r);
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero { padding: 104px 0 0; position: relative; }
.hero-grid {
    display: grid; grid-template-columns: .82fr 1.18fr; gap: 34px; align-items: start;
    padding-bottom: 32px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }

h1 { font-size: clamp(38px, 4.6vw, 58px); letter-spacing: -.04em; line-height: 1.04; margin-bottom: 20px; }
h1 > span { display: block; }
h1 .hl {
    color: var(--accent);
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat; background-size: 0% 3px; background-position: 0 88%;
}
html.js h1.sp-in .hl { animation: underline 1.1s var(--ease) .45s forwards; }
@keyframes underline { to { background-size: 100% 3px; } }

.lead { font-size: 16.5px; color: var(--t2); max-width: 520px; margin-bottom: 26px; }
.lead b { color: var(--t1); font-weight: 650; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }

/* 规格表：像 release notes，不像营销文案 */
.spec {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    margin: 0; border: 1px solid var(--line); background: var(--line);
    border-radius: var(--r); overflow: hidden;
}
.spec > div { background: var(--bg2); padding: 11px 13px; }
.spec dt { font-size: 10px; letter-spacing: .14em; color: var(--t4); margin-bottom: 3px; }
.spec dd { margin: 0; font-size: 13.5px; color: var(--t2); }
.spec dd.ok { color: var(--accent); }

/* 终端 */
.hero-stage { display: grid; gap: 14px; min-width: 0; }
.term {
    border: 1px solid var(--line); border-radius: var(--r);
    background: var(--bg2); overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
html[data-theme="light"] .term { box-shadow: 0 8px 24px rgba(16, 20, 26, .08); }
.term-bar {
    display: flex; align-items: center; gap: 9px; padding: 8px 11px;
    border-bottom: 1px solid var(--line); background: var(--panel);
}
.term-dots { display: flex; gap: 5px; flex: none; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line2); }
.term-dots i:nth-child(1) { background: #FF5F57; }
.term-dots i:nth-child(2) { background: #FEBC2E; }
.term-dots i:nth-child(3) { background: #28C840; }
.term-title { font-size: 11.5px; color: var(--t3); letter-spacing: .05em; }
.term-state {
    margin-left: auto; font-size: 10.5px; letter-spacing: .12em;
    color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    padding: 1px 7px; border-radius: var(--r);
}
.term-state.ok { color: var(--accent); }
.term-body {
    margin: 0; padding: 13px 14px; min-height: 176px;
    font-size: 12.5px; line-height: 1.75; color: var(--t2);
    white-space: pre-wrap; word-break: break-word;
}
.term-body .c-dim { color: var(--t4); }
.term-body .c-key { color: var(--accent); }
.term-body .c-ok { color: var(--accent); font-weight: 700; }
.term-body .caret { display: inline-block; width: 7px; height: 13px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }

/* 应用窗口：跟随指针倾斜 */
.appwin {
    position: relative; margin: 0;
    border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
    background: var(--bg2);
    transform-style: preserve-3d;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
}
html[data-theme="light"] .appwin { box-shadow: 0 14px 40px rgba(16, 20, 26, .10); }
.appwin-bar {
    display: flex; align-items: center; gap: 9px; padding: 8px 11px;
    border-bottom: 1px solid var(--line); background: var(--panel);
    font-size: 11.5px; color: var(--t3); letter-spacing: .04em;
}
.appwin-bar .spacer { margin-left: auto; color: var(--t4); }
.appwin img { width: 100%; height: auto; }

/* 跑马灯 */
.ticker {
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    background: var(--bg2); overflow: hidden; padding: 11px 0;
}
.ticker-track {
    display: flex; align-items: center; gap: 26px; width: max-content;
    font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--t4);
    animation: tickerScroll 34s linear infinite;
}
.ticker-track span { white-space: nowrap; }
.ticker-track b { color: var(--accent); opacity: .6; }
@keyframes tickerScroll { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   6. 区块骨架
   -------------------------------------------------------------------------- */
.sec { padding: 70px 0; position: relative; z-index: 2; }
.sec-alt { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec.tight { padding: 50px 0; }
.sec-head { max-width: 720px; margin-bottom: 32px; }
.sec-kicker {
    font-size: 11.5px; letter-spacing: .2em; color: var(--accent);
    padding-bottom: 12px; margin-bottom: 14px;
    border-bottom: 1px solid var(--line); display: inline-block;
}
.sec-head h2 { font-size: clamp(26px, 3.1vw, 38px); margin-bottom: 14px; letter-spacing: -.03em; }
.sec-head p { color: var(--t3); font-size: 15.5px; max-width: 620px; }

/* --------------------------------------------------------------------------
   7. 功能墙（切角面板）
   -------------------------------------------------------------------------- */
.wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.span2 { grid-column: span 2; }

.panel {
    position: relative; padding: 20px 20px 17px;
    background: var(--panel); border: 1px solid var(--line);
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
    transition: background .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}
/* 切角处的斜线（clip-path 会把边框在转角处切掉） */
.panel::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background:
        linear-gradient(to bottom right, transparent calc(50% - .6px), var(--line) calc(50% - .6px), var(--line) calc(50% + .6px), transparent calc(50% + .6px)) top right / var(--cut) var(--cut) no-repeat,
        linear-gradient(to top left, transparent calc(50% - .6px), var(--line) calc(50% - .6px), var(--line) calc(50% + .6px), transparent calc(50% + .6px)) bottom left / var(--cut) var(--cut) no-repeat;
}
.panel::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    opacity: 0; transition: opacity .22s var(--ease);
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--accent-rgb), .1), transparent 62%);
}
.panel:hover { transform: translateY(-3px); border-color: var(--line2); background: var(--panel2); }
.panel:hover::after { opacity: 1; }
.panel > * { position: relative; z-index: 2; }
.panel .pn {
    position: absolute; top: 10px; right: 14px; z-index: 2;
    font-size: 11px; letter-spacing: .1em; color: var(--t4);
}
.panel .ico {
    width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 14px;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--bg2); color: var(--accent);
}
.panel h3 { font-size: 17px; margin-bottom: 8px; }
.panel p { font-size: 13.5px; color: var(--t3); line-height: 1.72; }
.panel p code { font-size: 12px; }

/* --------------------------------------------------------------------------
   8. 交互演示：用 HTML/CSS 复刻的启动器外壳
   外面这层框用站点的「方块」语言，里面完全是启动器自己的 iOS26 玻璃语言 ——
   所以令牌分两套：站点用 --line/--t1…，演示内部用 --d-*（取自 ThemeService）。
   -------------------------------------------------------------------------- */
.demo {
    /* 演示内部配色（浅色，对应 ThemeService Light） */
    --d-bg: #F4F6F9;
    --d-card: #FFFFFF;
    --d-pop: #FFFFFF;
    --d-t1: #141922;
    --d-t2: #3C4653;
    --d-t3: #586373;
    --d-t4: #6E7885;
    --d-line: rgba(15, 20, 28, .10);
    --d-line2: rgba(15, 20, 28, .06);
    --d-accent: #4ADE80;
    --d-accent-ink: #06120A;
    --d-shadow: 0 2px 10px rgba(20, 25, 34, .06);
    --d-radius: 12px;
    --d-scrim: .55;
    --d-ease: cubic-bezier(.4, 0, .2, 1);

    border: 1px solid var(--line); border-radius: var(--r);
    background: var(--bg2); overflow: hidden;
}
.demo[data-demo-theme="dark"] {
    --d-bg: #0F1216;
    --d-card: #1B2028;
    --d-pop: #242B34;
    --d-t1: #E8EDF2;
    --d-t2: #C3CCD6;
    --d-t3: #94A0AC;
    --d-t4: #6B7681;
    --d-line: rgba(255, 255, 255, .09);
    --d-line2: rgba(255, 255, 255, .05);
    --d-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.demo[data-demo-theme="oled"] {
    --d-bg: #000000;
    --d-card: #101317;
    --d-pop: #191E24;
    --d-t1: #EDF2F6;
    --d-t2: #C6CFD8;
    --d-t3: #8E9AA6;
    --d-t4: #66707A;
    --d-line: rgba(255, 255, 255, .10);
    --d-line2: rgba(255, 255, 255, .06);
    --d-shadow: none;
}

/* 演示的窗口标题栏（属于站点风格） */
.demo-chrome {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.demo-title { font-size: 11.5px; color: var(--t3); letter-spacing: .05em; }
.demo-crumb { font-size: 11px; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent); padding: 1px 8px; border-radius: var(--r); }
.demo-ready { margin-left: auto; font-size: 11px; color: var(--t4); display: inline-flex; align-items: center; gap: 6px; }
.demo-ready i { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }

.demo-body {
    position: relative; display: grid;
    grid-template-columns: 68px 1fr 272px;
    min-height: 420px; background: var(--d-bg); color: var(--d-t1);
    font-family: var(--font);
}
/* 壁纸 + 遮罩：让「背景遮罩浓度」这个设置有东西可调 */
.demo-wall {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(520px circle at 14% 10%, color-mix(in srgb, var(--d-accent) 26%, transparent), transparent 62%),
        radial-gradient(460px circle at 88% 92%, rgba(91, 155, 248, .22), transparent 64%),
        radial-gradient(420px circle at 74% 14%, rgba(167, 139, 250, .18), transparent 66%);
}
.demo-scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: #06080B; opacity: var(--d-scrim); }
.demo-rail, .demo-main, .demo-side { position: relative; z-index: 2; }

/* ── 左导航 ───────────────────────────────────────────────────── */
.demo-rail {
    border-right: 1px solid var(--d-line); background: color-mix(in srgb, var(--d-card) 92%, transparent);
    padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
    position: relative;
}
.rail-pill {
    /* top 必须显式写 0：靠 auto 会按"静态位置"算，容器一长高胶囊就漂走 */
    position: absolute; top: 0; left: 10px; width: 48px; height: 44px;
    background: color-mix(in srgb, var(--d-accent) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--d-accent) 34%, transparent);
    border-radius: 11px; z-index: 0;
    transition: transform .15s var(--d-ease);
}
.rail-btn {
    position: relative; z-index: 1; width: 48px; height: 44px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: none; border: 1px solid transparent; border-radius: 11px; cursor: pointer;
    color: var(--d-t4); transition: color .2s var(--d-ease);
}
.rail-btn svg { width: 17px; height: 17px; fill: currentColor; }
.rail-btn span { font-size: 10px; line-height: 1; letter-spacing: .02em; }
.rail-btn:hover { color: var(--d-t2); }
.rail-btn.on { color: var(--d-accent); }

/* ── 页面容器 ─────────────────────────────────────────────────── */
.demo-main { padding: 15px 17px 18px; overflow: hidden; }
.dpage { display: none; }
.dpage.on { display: block; animation: dpageIn .3s var(--d-ease); }
@keyframes dpageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── 通用控件 ─────────────────────────────────────────────────── */
.dbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer;
    border: 1px solid var(--d-line); border-radius: 10px;
    background: var(--d-card); color: var(--d-t1);
    transition: background .18s var(--d-ease), border-color .18s var(--d-ease), transform .18s var(--d-ease), color .18s var(--d-ease);
}
.dbtn svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.dbtn:hover { border-color: color-mix(in srgb, var(--d-t1) 22%, transparent); transform: translateY(-1px); }
.dbtn:active { transform: none; }
.dbtn-solid { background: var(--d-accent); color: var(--d-accent-ink); border-color: color-mix(in srgb, var(--d-accent) 70%, #000); }
.dbtn-solid:hover { filter: brightness(1.04); }
.dbtn-ghost { background: color-mix(in srgb, var(--d-t1) 6%, transparent); }
.dbtn-block { width: 100%; margin-top: 12px; }
.dbtn[disabled] { opacity: .55; cursor: default; transform: none; }
.dplus { width: 12px; height: 12px; }

.dsec-title {
    font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--d-t4);
    display: flex; align-items: center; gap: 6px; margin: 14px 0 8px;
}
.dsec-title:first-child { margin-top: 0; }
.dcount { font-style: normal; background: color-mix(in srgb, var(--d-t1) 8%, transparent); border-radius: 6px; padding: 0 6px; }
.dsec-x { margin-left: auto; color: var(--d-t4); }
.dsep { height: 1px; background: var(--d-line); margin: 8px 10px; }

/* ── 首页 ─────────────────────────────────────────────────────── */
.dhome { display: grid; gap: 14px; align-content: start; padding-top: 26px; }
.dgreet { font-size: 28px; font-weight: 800; letter-spacing: -.02em; text-align: center; margin-bottom: 12px; }
.dgreet em { font-style: normal; color: var(--d-accent); }
.dinst-card {
    display: flex; align-items: center; gap: 12px; padding: 13px 15px;
    border: 1px solid var(--d-line); border-radius: var(--d-radius);
    background: var(--d-card); box-shadow: var(--d-shadow);
}
.dcube {
    width: 42px; height: 42px; flex: none; display: grid; place-items: center;
    border-radius: 11px; background: color-mix(in srgb, var(--d-accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--d-accent) 30%, transparent); color: var(--d-accent);
}
.dcube svg { width: 21px; height: 21px; fill: currentColor; }
.dinst-info { flex: 1; min-width: 0; }
.dinst-info b { display: block; font-size: 15px; }
.dinst-info span { font-size: 11.5px; color: var(--d-t4); }
.dstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dstats div {
    border: 1px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-card);
    padding: 11px 13px; box-shadow: var(--d-shadow);
}
.dstats span { display: block; font-size: 10.5px; color: var(--d-t4); }
.dstats b { font-size: 16px; }
.dtip { text-align: center; font-size: 11px; color: var(--d-t4); }

/* ── 资源站 ───────────────────────────────────────────────────── */
.dres { display: grid; grid-template-columns: 146px 1fr; gap: 16px; align-items: start; }
.dres-cats {
    border: 1px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-card);
    padding: 10px; box-shadow: var(--d-shadow);
}
.dcat {
    display: flex; align-items: center; gap: 9px; width: 100%; cursor: pointer;
    padding: 8px 10px; margin-bottom: 2px; font-size: 12.5px; text-align: left;
    background: none; border: 1px solid transparent; border-radius: 9px; color: var(--d-t3);
    transition: background .18s var(--d-ease), color .18s var(--d-ease), border-color .18s var(--d-ease);
}
.dcat svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.dcat:hover { background: color-mix(in srgb, var(--d-t1) 5%, transparent); color: var(--d-t1); }
.dcat.on { background: color-mix(in srgb, var(--d-accent) 14%, transparent); border-color: color-mix(in srgb, var(--d-accent) 30%, transparent); color: var(--d-accent); font-weight: 600; }
.dcat-plain { color: var(--d-t4); font-size: 12px; }

.dres-main { min-width: 0; }
.dpills { display: flex; flex-wrap: wrap; gap: 4px; }
.dpill {
    display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
    padding: 7px 13px; font-size: 12.5px; border-radius: 999px;
    background: none; border: 1px solid var(--d-line); color: var(--d-t3);
    transition: background .18s var(--d-ease), color .18s var(--d-ease), border-color .18s var(--d-ease);
}
.dpill i { font-style: normal; font-size: 10.5px; color: var(--d-t4); }
.dpill:hover { color: var(--d-t1); border-color: color-mix(in srgb, var(--d-t1) 20%, transparent); }
.dpill.on { background: var(--d-accent); border-color: color-mix(in srgb, var(--d-accent) 70%, #000); color: var(--d-accent-ink); font-weight: 600; }
.dpill.on i { color: var(--d-accent-ink); opacity: .7; }
.dpills-sm .dpill { padding: 5px 11px; font-size: 12px; }

.dsearch {
    display: flex; align-items: center; gap: 8px; margin: 12px 0 10px;
    border: 1px solid var(--d-line); border-radius: var(--d-radius);
    background: var(--d-card); padding: 5px 6px 5px 12px; box-shadow: var(--d-shadow);
}
.dsearch-ico { color: var(--d-t4); display: grid; place-items: center; }
.dsearch-ico svg { width: 15px; height: 15px; fill: currentColor; }
.dsearch input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: none;
    font: inherit; font-size: 13px; color: var(--d-t1); padding: 6px 0;
}
.dsearch input::placeholder { color: var(--d-t4); }
.dsearch select {
    border: 1px solid var(--d-line); border-radius: 9px; background: var(--d-pop);
    color: var(--d-t2); font: inherit; font-size: 12px; padding: 6px 8px; cursor: pointer;
}
.dsearch-sm { margin: 0; min-width: 210px; }
.dsearch-sm input { font-size: 12.5px; }

.dres-bar { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--d-t4); margin-bottom: 10px; }
.dres-bar b { color: var(--d-t2); }
.dres-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dcard {
    display: grid; gap: 8px; padding: 12px 13px; position: relative;
    border: 1px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-card);
    box-shadow: var(--d-shadow); transition: border-color .18s var(--d-ease), transform .18s var(--d-ease);
}
.dcard:hover { border-color: color-mix(in srgb, var(--d-accent) 40%, transparent); transform: translateY(-2px); }
.dcard-top { display: flex; align-items: center; gap: 10px; }
.dcard-ico { width: 34px; height: 34px; flex: none; border-radius: 9px; border: 1px solid var(--d-line2); }
.dcard-name { min-width: 0; }
.dcard-name b { display: block; font-size: 13px; }
.dcard-name span { font-size: 10.5px; color: var(--d-t4); }
.dcard-desc { font-size: 11.5px; color: var(--d-t3); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dcard-foot { display: flex; align-items: center; gap: 8px; }
.dcard-dl { font-size: 11px; color: var(--d-t4); }
.dcard-src { font-size: 10px; color: var(--d-accent); border: 1px solid color-mix(in srgb, var(--d-accent) 34%, transparent); border-radius: 6px; padding: 1px 6px; }
.dcard-btn { margin-left: auto; padding: 5px 11px; font-size: 11.5px; }
.dempty { grid-column: 1 / -1; padding: 28px; text-align: center; font-size: 12.5px; color: var(--d-t4); border: 1px dashed var(--d-line); border-radius: var(--d-radius); }

/* ── 实例库 ───────────────────────────────────────────────────── */
.dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.dhead h3 { font-size: 21px; letter-spacing: -.02em; }
.dhead p { font-size: 12.5px; color: var(--d-t4); margin-top: 3px; }
.dhead-act { display: flex; gap: 8px; flex-wrap: wrap; }
.dbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dinsts { display: grid; gap: 9px; }
.dinst-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-card);
    box-shadow: var(--d-shadow); transition: border-color .18s var(--d-ease);
}
.dinst-row:hover { border-color: color-mix(in srgb, var(--d-accent) 34%, transparent); }
.dinst-row .dcube { width: 38px; height: 38px; border-radius: 10px; }
.dinst-row .dcube svg { width: 19px; height: 19px; }
.dinst-meta { flex: 1; min-width: 0; }
.dinst-meta b { display: block; font-size: 13.5px; }
.dinst-meta .drow-line { display: flex; align-items: center; gap: 7px; margin-top: 3px; flex-wrap: wrap; }
.dtagchip { font-size: 10.5px; border: 1px solid var(--d-line); border-radius: 6px; padding: 1px 7px; color: var(--d-t3); }
.dpath { font-size: 10.5px; color: var(--d-t4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.dinst-when { font-size: 10.5px; color: var(--d-t4); text-align: right; flex: none; }
.dinst-when b { display: block; font-size: 11.5px; color: var(--d-t3); font-weight: 500; }
.dinst-act { display: flex; gap: 7px; flex: none; }

/* ── 实验室 ───────────────────────────────────────────────────── */
.dlab { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlab-card {
    display: flex; gap: 12px; align-items: flex-start; text-align: left; cursor: pointer;
    padding: 12px; border: 1px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-card);
    box-shadow: var(--d-shadow); transition: border-color .18s var(--d-ease), transform .18s var(--d-ease);
}
.dlab-card:hover { border-color: color-mix(in srgb, var(--d-accent) 40%, transparent); transform: translateY(-2px); }
.dlab-card.on { border-color: var(--d-accent); }
.dlab-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--d-accent); color: var(--d-accent-ink); }
.dlab-ico svg { width: 19px; height: 19px; fill: currentColor; }
.dlab-body { min-width: 0; }
.dlab-body b { display: block; font-size: 13px; }
.dlab-body span { font-size: 11rpx; color: var(--d-t4); }
.dlab-desc { font-size: 11.5px; color: var(--d-t3); margin-top: 4px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dlab-go { font-size: 11px; color: var(--d-accent); margin-top: 6px; display: inline-block; }
.dlab-panel {
    margin-top: 12px; padding: 14px; border: 1px solid var(--d-line);
    border-radius: var(--d-radius); background: var(--d-card); box-shadow: var(--d-shadow);
    animation: dpageIn .25s var(--d-ease);
}
.dlab-panel h4 { font-size: 14px; margin-bottom: 4px; }
.dlab-panel p { font-size: 12px; color: var(--d-t3); line-height: 1.7; }
.dlab-out {
    margin-top: 10px; padding: 10px 12px; border-radius: 9px; font-family: var(--mono);
    font-size: 11.5px; line-height: 1.7; color: var(--d-t2);
    background: color-mix(in srgb, var(--d-t1) 6%, transparent); word-break: break-all;
}
.dlab-out b { color: var(--d-accent); }

/* ── 设置 ─────────────────────────────────────────────────────── */
.dgroup { border: 1px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-card); box-shadow: var(--d-shadow); margin-bottom: 12px; overflow: hidden; }
.dgroup-title { padding: 11px 14px; font-size: 12.5px; font-weight: 700; border-bottom: 1px solid var(--d-line2); }
.dgroup-sub { padding: 11px 14px 6px; font-size: 12.5px; font-weight: 600; }
.dgroup-sub em { display: block; font-style: normal; font-size: 11px; color: var(--d-t4); font-weight: 400; margin-top: 2px; }
.drow {
    display: flex; align-items: center; gap: 11px; padding: 10px 14px;
    border-top: 1px solid var(--d-line2); font-size: 12.5px;
}
.dgroup-title + .drow, .dgroup-sub + .drow { border-top: 0; }
.drow-ico { color: var(--d-t3); display: grid; place-items: center; }
.drow-ico svg { width: 16px; height: 16px; fill: currentColor; }
.drow-label { color: var(--d-t2); }
.drow-val { margin-left: auto; color: var(--d-t4); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46%; }
.drow-val-ok { color: var(--d-accent); }
.drow-chev { width: 13px; height: 13px; fill: var(--d-t4); flex: none; }

.dswitch { margin-left: auto; position: relative; display: inline-flex; flex: none; }
.dswitch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.dswitch i { width: 40px; height: 22px; border-radius: 999px; background: color-mix(in srgb, var(--d-t1) 16%, transparent); position: relative; transition: background .2s var(--d-ease); }
.dswitch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--d-ease); }
.dswitch input:checked + i { background: var(--d-accent); }
.dswitch input:checked + i::after { transform: translateX(18px); }
.dswitch input:focus-visible + i { outline: 2px solid var(--d-accent); outline-offset: 2px; }

.dseg { margin-left: auto; display: inline-flex; border: 1px solid var(--d-line); border-radius: 10px; overflow: hidden; }
.dseg button {
    padding: 6px 12px; font-size: 12px; cursor: pointer; border: 0; border-right: 1px solid var(--d-line);
    background: var(--d-card); color: var(--d-t3); transition: background .18s var(--d-ease), color .18s var(--d-ease);
}
.dseg button:last-child { border-right: 0; }
.dseg button:hover { color: var(--d-t1); }
.dseg button.on { background: var(--d-accent); color: var(--d-accent-ink); font-weight: 600; }

.dswatches { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dswatches button {
    width: 24px; height: 24px; border-radius: 7px; cursor: pointer;
    border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16);
    transition: transform .16s var(--d-ease), border-color .16s var(--d-ease);
}
.dswatches button:hover { transform: translateY(-2px); }
.dswatches button[aria-pressed="true"] { border-color: var(--d-t1); }

.drange { margin-left: auto; width: 190px; accent-color: var(--d-accent); cursor: pointer; }
.dfine { margin-top: 4px; font-size: 11px; color: var(--t4); }

/* ── 右侧信息面板 ─────────────────────────────────────────────── */
.demo-side {
    border-left: 1px solid var(--d-line); padding: 14px;
    background: color-mix(in srgb, var(--d-card) 78%, transparent);
    overflow: hidden;
}
.daccount {
    display: flex; align-items: center; gap: 10px; padding: 10px 11px;
    border: 1px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-card);
}
.davatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--d-accent) 16%, transparent); color: var(--d-accent); }
.davatar svg { width: 17px; height: 17px; fill: currentColor; }
.daccount b { display: block; font-size: 12.5px; }
.daccount span span, .daccount > span > span { font-size: 10.5px; color: var(--d-t4); }
.dkv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dkv div { border: 1px solid var(--d-line); border-radius: 10px; background: var(--d-card); padding: 8px 10px; }
.dkv b { font-size: 14px; }
.dkv span { display: block; font-size: 10px; color: var(--d-t4); }
.dchallenge {
    border: 1px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-card);
    padding: 10px 11px; font-size: 11.5px; color: var(--d-t2); line-height: 1.65;
}
.dchallenge span { display: block; color: var(--d-t4); font-size: 10.5px; margin-top: 3px; }
.dtags { display: flex; gap: 5px; margin-top: 7px; }
.dtags i { font-style: normal; font-size: 10px; color: var(--d-t4); border: 1px solid var(--d-line); border-radius: 5px; padding: 1px 6px; }
.dnews { display: grid; gap: 6px; }
.dnews > div { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--d-line); border-radius: 10px; background: var(--d-card); }
.dnews-ico { width: 22px; height: 22px; flex: none; border-radius: 7px; background: color-mix(in srgb, var(--d-accent) 14%, transparent); }
.dnews b { display: block; font-size: 11.5px; }
.dnews em { font-style: normal; font-size: 10px; color: var(--d-t4); }


/* ── 皮肤页 ───────────────────────────────────────────────────── */
.dskin { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.dskin-stage {
    position: relative; border: 1px solid var(--d-line); border-radius: var(--d-radius);
    background: linear-gradient(180deg, color-mix(in srgb, var(--d-accent) 12%, var(--d-card)), var(--d-card));
    box-shadow: var(--d-shadow); overflow: hidden;
}
.dskin-stage canvas { display: block; width: 100%; height: 288px; cursor: grab; touch-action: none; }
.dskin-stage canvas.dragging { cursor: grabbing; }
.dskin-hint {
    position: absolute; left: 10px; bottom: 9px; font-size: 10px; letter-spacing: .1em;
    color: var(--d-t4); pointer-events: none;
}
.dskin-side {
    border: 1px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-card);
    box-shadow: var(--d-shadow); padding: 14px;
}
.dskin-side .daccount { margin-bottom: 4px; }
.dseg-left { margin-left: 0; }
.dskins { display: flex; flex-wrap: wrap; gap: 7px; }
.dskin-pick {
    width: 40px; height: 40px; padding: 0; cursor: pointer; overflow: hidden;
    border: 2px solid transparent; border-radius: 10px; background: var(--d-pop);
    box-shadow: inset 0 0 0 1px var(--d-line);
    transition: transform .16s var(--d-ease), border-color .16s var(--d-ease);
}
.dskin-pick:hover { transform: translateY(-2px); }
.dskin-pick[aria-pressed="true"] { border-color: var(--d-accent); }
/* 用 8× 放大的头部正面（皮肤图里 8,8 起的 8×8）当缩略图 */
.dskin-pick i {
    display: block; width: 40px; height: 40px;
    background-size: 320px 320px; background-position: -40px -40px; background-repeat: no-repeat;
    image-rendering: pixelated;
}

/* 筛选面板（资源页） */
.side-filter { display: none; }
.demo[data-page="resources"] .side-account { display: none; }
.demo[data-page="resources"] .side-filter { display: block; }
.dfilter-title { font-size: 11px; color: var(--d-t4); margin: 13px 0 7px; }
.dchips { display: flex; flex-wrap: wrap; gap: 5px; }
.dchip {
    padding: 5px 10px; font-size: 11.5px; cursor: pointer; border-radius: 999px;
    border: 1px solid var(--d-line); background: var(--d-card); color: var(--d-t3);
    transition: background .16s var(--d-ease), color .16s var(--d-ease), border-color .16s var(--d-ease);
}
.dchip:hover { color: var(--d-t1); border-color: color-mix(in srgb, var(--d-t1) 20%, transparent); }
.dchip.on { background: color-mix(in srgb, var(--d-accent) 16%, transparent); border-color: color-mix(in srgb, var(--d-accent) 38%, transparent); color: var(--d-accent); }

/* ── Toast ────────────────────────────────────────────────────── */
.demo-toast {
    position: absolute; right: 16px; bottom: 16px; z-index: 20;
    display: flex; align-items: center; gap: 8px;
    max-width: 320px; padding: 9px 13px; font-size: 11.5px;
    background: var(--d-pop); color: var(--d-t1);
    border: 1px solid var(--d-line); border-left: 3px solid var(--d-accent);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
    opacity: 0; transform: translateY(8px); pointer-events: none;
    transition: opacity .22s var(--d-ease), transform .22s var(--d-ease);
}
.demo-toast.on { opacity: 1; transform: none; }

/* 启动流程盖层 */
.demo-launch {
    position: absolute; inset: 0; z-index: 15;
    display: grid; place-content: center; gap: 14px; text-align: center;
    background: color-mix(in srgb, var(--d-bg) 88%, transparent);
    backdrop-filter: blur(6px);
}
.demo-launch ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.demo-launch li { font-family: var(--mono); font-size: 11.5px; color: var(--d-t4); display: flex; align-items: center; gap: 8px; }
.demo-launch li.done { color: var(--d-t2); }
.demo-launch li.done::before { content: "✓"; color: var(--d-accent); }
.demo-launch li::before { content: "·"; width: 10px; display: inline-block; }
.demo-launch h4 { font-size: 15px; }
.demo-launch .dbar-track { width: 230px; height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--d-t1) 12%, transparent); overflow: hidden; margin: 0 auto; }
.demo-launch .dbar-fill { height: 100%; width: 0; background: var(--d-accent); transition: width .3s var(--d-ease); }

/* --------------------------------------------------------------------------
   9. 外观工作室
   -------------------------------------------------------------------------- */
.studio {
    display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start;
}
.studio-ctl {
    border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
    padding: 20px; display: grid; gap: 20px;
}
.field .lbl { font-size: 10.5px; letter-spacing: .18em; color: var(--t4); margin-bottom: 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button {
    padding: 8px 15px; font-size: 12.5px; cursor: pointer; background: var(--bg2); border: 0;
    border-right: 1px solid var(--line); color: var(--t3);
    transition: background .18s var(--ease), color .18s var(--ease);
}
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--t1); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #06120A; font-weight: 700; }

.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatches button {
    width: 34px; height: 34px; cursor: pointer; border-radius: var(--r);
    border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
    transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.swatches button:hover { transform: translateY(-2px); }
.swatches button[aria-pressed="true"] { border-color: var(--t1); }
.custom-color { display: flex; align-items: center; gap: 10px; }
.custom-color input[type="color"] {
    width: 34px; height: 34px; padding: 0; cursor: pointer;
    border: 1px solid var(--line); border-radius: var(--r); background: none;
}
.custom-color code { font-size: 12px; padding: 5px 9px; }
.fine { font-size: 11.5px; color: var(--t4); line-height: 1.7; }

.studio-view { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); overflow: hidden; }
.mini-bar { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 11.5px; color: var(--t3); }
.mini-body { display: grid; grid-template-columns: 54px 1fr 200px; min-height: 264px; }
.mini .rail { border-right: 1px solid var(--line); padding: 11px 0; display: flex; flex-direction: column; align-items: center; gap: 7px; background: var(--panel); }
.mini .rail i { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid transparent; border-radius: var(--r); color: var(--t4); }
.mini .rail i.on { background: rgba(var(--accent-rgb), .14); border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); }
.mini .rail svg { width: 15px; height: 15px; fill: currentColor; }
.mini .main { padding: 20px; display: grid; gap: 12px; align-content: start; }
.mini .greet { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.mini .greet em { color: var(--accent); font-style: normal; }
.mini .inst { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.mini .inst.dim { opacity: .7; }
.mini .cube { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--r); background: rgba(var(--accent-rgb), .12); color: var(--accent); }
.mini .cube svg { width: 18px; height: 18px; fill: currentColor; }
.mini .info { flex: 1; min-width: 0; }
.mini .info b { display: block; font-size: 13.5px; }
.mini .info span { font-size: 11px; color: var(--t4); }
.mini .play { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 7px 13px; font-size: 12px; font-weight: 700; background: var(--accent); color: #06120A; border-radius: var(--r); }
.mini .play.dim { opacity: .5; }
.mini .play svg { width: 12px; height: 12px; fill: currentColor; }
.mini .side { border-left: 1px solid var(--line); padding: 16px; display: grid; gap: 10px; align-content: start; background: var(--panel); }
.mini .side h4 { font-size: 10.5px; letter-spacing: .1em; color: var(--t4); font-weight: 700; }
.mini .side .box, .mini .side .kv div { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg2); padding: 10px 11px; }
.mini .side .row { display: flex; align-items: center; gap: 9px; }
.mini .side .av { width: 28px; height: 28px; flex: none; border-radius: var(--r); background: rgba(var(--accent-rgb), .16); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.mini .side b { font-size: 12.5px; display: block; }
.mini .side span { font-size: 10.5px; color: var(--t4); }
.mini .side .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini .side .kv b { font-size: 14px; }

/* --------------------------------------------------------------------------
   10. 更新日志（终端列表）
   -------------------------------------------------------------------------- */
.logwin { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); overflow: hidden; }
.loglist { list-style: none; margin: 0; padding: 0; }
.loglist li {
    display: grid; grid-template-columns: 92px 52px 1fr; gap: 14px; align-items: baseline;
    padding: 13px 18px; border-bottom: 1px solid var(--line);
    font-size: 12.5px; line-height: 1.7; color: var(--t2);
    transition: background .18s var(--ease);
}
.loglist li:last-child { border-bottom: 0; }
.loglist li:hover { background: var(--panel); }
.loglist .t { color: var(--t4); font-size: 11.5px; }
.loglist .k { font-size: 10.5px; letter-spacing: .08em; text-align: center; padding: 2px 0; border-radius: var(--r); border: 1px solid currentColor; }
.loglist .k.fix { color: #FACC15; }
.loglist .k.perf { color: #38BDF8; }
.loglist .k.add { color: var(--accent); }
.loglist .m { color: var(--t3); font-family: var(--font); font-size: 13px; }
.loglist .m b { color: var(--t1); }
.loglist .m code { font-size: 12px; }
.log-more { margin-top: 18px; }

/* --------------------------------------------------------------------------
   11. 下载
   -------------------------------------------------------------------------- */
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dl {
    position: relative; border: 1px solid var(--line); border-radius: var(--r);
    background: var(--panel); padding: 24px; display: flex; flex-direction: column; gap: 10px;
    transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.dl:hover { border-color: var(--line2); transform: translateY(-3px); }
.dl.rec { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.dl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dl h3 { font-size: 20px; }
.dl-meta { font-size: 11.5px; letter-spacing: .06em; color: var(--t4); }
.dl p { font-size: 13.5px; color: var(--t3); flex: 1; }
.hash { border-top: 1px solid var(--line); padding-top: 11px; display: grid; gap: 5px; }
.hash-lbl { font-size: 10.5px; letter-spacing: .1em; color: var(--t4); display: flex; align-items: center; gap: 8px; }
.hash code { font-size: 10.5px; word-break: break-all; background: none; border: 0; padding: 0; color: var(--t3); line-height: 1.5; }
.copy {
    font-size: 10px; letter-spacing: .06em; cursor: pointer; padding: 1px 7px;
    background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); color: var(--t3);
    transition: color .18s var(--ease), border-color .18s var(--ease);
}
.copy:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.copy.done { color: var(--accent); border-color: var(--accent); }

.install { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 18px 20px; }
.install-head { font-size: 11.5px; letter-spacing: .1em; color: var(--t4); margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.replay { cursor: pointer; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); padding: 2px 9px; border-radius: var(--r); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.step {
    background: var(--bg2); padding: 13px 14px; position: relative;
    font-size: 12.5px; color: var(--t3); transition: background .3s var(--ease), color .3s var(--ease);
}
.step i { display: block; font-style: normal; font-size: 10.5px; color: var(--t4); margin-bottom: 5px; }
.step em { display: block; font-style: normal; font-size: 11px; color: var(--t4); margin-top: 4px; }
.step.on { background: color-mix(in srgb, var(--accent) 12%, var(--bg2)); color: var(--t1); }
.step.on i { color: var(--accent); }
.step.done::after {
    content: "✓"; position: absolute; top: 11px; right: 12px;
    font-size: 12px; color: var(--accent);
}

.req {
    margin-top: 18px; display: flex; gap: 13px; align-items: flex-start;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--bg2); padding: 16px 18px;
    font-size: 13px; color: var(--t3);
}
.req svg { width: 18px; height: 18px; fill: var(--accent); flex: none; margin-top: 2px; }
.req b { color: var(--t1); }
.req a { color: var(--accent); }
.req a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   12. FAQ
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: 8px; max-width: 860px; }
.faq details {
    border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
    transition: border-color .2s var(--ease), background .2s var(--ease);
}
.faq details:hover { border-color: var(--line2); }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 38%, transparent); background: var(--panel2); }
.faq summary {
    display: flex; align-items: center; gap: 13px; padding: 15px 18px;
    cursor: pointer; list-style: none; font-weight: 650; font-size: 14.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .q { font-size: 11px; color: var(--t4); border: 1px solid var(--line); padding: 2px 7px; border-radius: var(--r); flex: none; }
.faq details[open] .q { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 38%, transparent); }
.faq summary svg { width: 17px; height: 17px; margin-left: auto; fill: none; stroke: var(--t3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); flex: none; }
.faq details[open] summary svg { transform: rotate(180deg); stroke: var(--accent); }
.faq .ans { padding: 0 18px 17px 63px; font-size: 13.5px; color: var(--t3); line-height: 1.8; }
.faq .ans a { color: var(--accent); }
.faq .ans a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   13. 结尾带
   -------------------------------------------------------------------------- */
.endband {
    position: relative; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--r);
    background: var(--panel); padding: 40px;
    display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.endband-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .9), transparent 62%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, .9), transparent 62%);
}
.endband > div { position: relative; }
.endband h2 { font-size: clamp(23px, 2.5vw, 31px); margin-bottom: 10px; }
.endband p { color: var(--t3); font-size: 14.5px; max-width: 540px; }
.endband-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   14. 页脚
   -------------------------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); background: var(--bg2); padding: 46px 0 30px; position: relative; z-index: 2; }
.foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 34px; }
.foot-brand p { font-size: 13px; color: var(--t4); margin-top: 13px; max-width: 330px; }
.foot-col h4 { font-size: 10.5px; letter-spacing: .16em; color: var(--t4); margin-bottom: 12px; font-weight: 700; }
.foot-col a { display: block; font-size: 13px; color: var(--t3); padding: 5px 0; transition: color .18s var(--ease); }
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
    border-top: 1px solid var(--line); padding-top: 20px;
    display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    font-size: 10.5px; letter-spacing: .08em; color: var(--t4);
}

/* --------------------------------------------------------------------------
   15. 回顶
   -------------------------------------------------------------------------- */
.to-top {
    position: fixed; right: 22px; bottom: 22px; width: 40px; height: 40px; z-index: 90;
    display: grid; place-items: center; cursor: pointer;
    background: var(--accent); color: #06120A; border: 1px solid color-mix(in srgb, var(--accent) 60%, #000);
    border-radius: var(--r);
    opacity: 0; pointer-events: none; transform: translateY(10px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), box-shadow .18s var(--ease);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { box-shadow: 0 6px 18px rgba(var(--accent-rgb), .45); }
.to-top svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------------------
   16. 进场（默认可见，只有 JS 跑起来才加初值）
   -------------------------------------------------------------------------- */
.rv { opacity: 1; transform: none; }
html.js :is(.panel, .dl, .dither, .studio, .install, .endband, .loglist li, .faq details, .sec-head, .spec, .term) {
    transform: translateY(16px);
    opacity: .001;
    transition: transform .5s var(--ease), opacity .45s var(--ease);
}
html.js :is(.panel, .dl, .dither, .studio, .install, .endband, .loglist li, .faq details, .sec-head, .spec, .term).in {
    transform: none;
    opacity: 1;
}

/* 文字逐字入场（fx.js SplitText） */
.sp-ch { display: inline-block; white-space: pre; }
html.js .sp-ch { transform: translateY(14px); opacity: .001; }
html.js .sp-in .sp-ch { transform: none; opacity: 1; transition: transform .42s var(--ease), opacity .3s linear; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    html.js :is(.panel, .dl, .dither, .studio, .install, .endband, .loglist li, .faq details, .sec-head, .spec, .term) {
        transform: none; opacity: 1; transition: none;
    }
    html.js .sp-ch, html.js .sp-in .sp-ch { transform: none; opacity: 1; transition: none; }
    .ticker-track, .tag .dot, [data-starborder]::after, .term-body .caret { animation: none !important; }
}

/* --------------------------------------------------------------------------
   17. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
    .studio { grid-template-columns: 1fr; }
    .mini-body { grid-template-columns: 54px 1fr; }
    .mini .side { display: none; }
    .topbar-status { display: none; }
    /* 演示：空间不够就先收起右侧信息面板 */
    .demo-body { grid-template-columns: 68px 1fr; }
    .demo-side { display: none; }
}

@media (max-width: 980px) {
    :root { --gut: 20px; }
    .hero { padding-top: 104px; }
    .hero-grid { grid-template-columns: 1fr; gap: 22px; }
    .lead { max-width: none; }
    .spec { max-width: 520px; }
    .wall { grid-template-columns: repeat(2, 1fr); }
    .span2 { grid-column: span 2; }
    .nav { display: none; }
    .burger { display: grid; }
    .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .loglist li { grid-template-columns: 84px 48px 1fr; gap: 10px; }

    .dres { grid-template-columns: 1fr; }
    .dres-cats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
    .dres-cats .dsec-title { width: 100%; margin-bottom: 4px; }
    .dres-cats .dsep { display: none; }
    .dcat { width: auto; margin-bottom: 0; }
}

@media (max-width: 720px) {
    .sec { padding: 62px 0; }
    .wall { grid-template-columns: 1fr; }
    .span2 { grid-column: auto; }
    .dl-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
    .spec { grid-template-columns: 1fr; }
    .endband { padding: 26px; }
    .loglist li { grid-template-columns: 1fr; gap: 4px; }
    .loglist .k { justify-self: start; padding: 2px 8px; }
    .faq .ans { padding-left: 56px; }
    .brand-name { display: none; }
    /* 演示：左导航改成横向一条 */
    .demo-body { grid-template-columns: 1fr; }
    .demo-rail {
        flex-direction: row; justify-content: center; gap: 2px;
        border-right: 0; border-bottom: 1px solid var(--d-line); padding: 8px 0;
    }
    .rail-pill { display: none; }
    .rail-btn { width: 58px; height: 42px; }
    .rail-btn.on { background: color-mix(in srgb, var(--d-accent) 14%, transparent); border-color: color-mix(in srgb, var(--d-accent) 30%, transparent); }
    .demo-main { padding: 14px; }
    .dstats { grid-template-columns: 1fr 1fr; }
    .dres-grid, .dlab { grid-template-columns: 1fr; }
    .dinst-card { flex-wrap: wrap; }
    .dhead { flex-direction: column; }
    .dbar { flex-direction: column; align-items: stretch; }
    .dsearch-sm { min-width: 0; }
    .dinst-row { flex-wrap: wrap; }
    .dpath { max-width: 150px; }
    .drow { flex-wrap: wrap; }
    .drow-val { max-width: 100%; margin-left: 0; order: 3; width: 100%; }
    .dseg, .dswatches, .drange, .dswitch { margin-left: 0; }
    .demo-toast { left: 14px; right: 14px; max-width: none; }
}

@media (max-width: 420px) {
    .steps { grid-template-columns: 1fr; }
    .foot-bottom { flex-direction: column; }
}

/* 打印 */
@media print {
    .topbar, .to-top, .cursor-grid, .scanlines, .progress, .ticker, .term { display: none !important; }
    body { background: #fff; color: #000; }
    .appwin, .panel, .dl { box-shadow: none; }
    .panel { clip-path: none; }
}
