/* 01 · 布局与颜色参数 */

@font-face {
	font-family:'cmdpe';
	src: url('./macos-font.ttf') format('woff2');
	font-weight:normal;
	font-style:normal;
}
::selection {
    background: #ff3d00;
    color: #fff;
}
:root {
	--header-gap: 20px;
	--Window-bg: rgb(48 48 48);
    --menu-height: 240px;
    --menu-padding: 10px;
    --menu-radius: 10px;
    --row-height: 34px;
    --row-gap: 5px;
    --row-radius: 10px;
    --menu-bg: rgb(43 43 43);
    --row-bg: rgb(30 30 30);
    --active-bg: rgb(35 47 116);
    /* --accent: rgb(71 160 255); */
	--accent: rgb(22 135 255);
    --muted: #9aa2ae;
    --outline: rgb(255 255 255 / 8%);
    --preset-size: 34px;
    --preset-gap: 7px;
    --light-connected: rgb(0 221 112);
    --light-running: rgb(47 107 253);
    --light-idle: #5b6170;
    --state-success: rgb(0 221 112);
    --state-warning: rgb(255 61 0);
    --flow-line: rgb(22 22 22);
    --flow-idle: rgb(0 0 0);
    --flow-active: rgb(0 221 112);
}

/* 02 · 基础样式与统一滚动条 */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
}

::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

/* A 6px hit area with transparent borders leaves a 2px visible thumb. */
::-webkit-scrollbar-thumb {
    transition: all 0.25s ease 0s;
    min-height: 24px;
    min-width: 24px;
    background: #606060;
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    border-width: 0;
    background: #969696;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-track:hover {
	background: rgb(255 255 255 / 6%);
    border-radius: 6px;
}

/* Firefox uses standard scrollbar properties instead of WebKit pseudo-elements. */
@supports not selector(::-webkit-scrollbar) {
    * {
        scrollbar-width: thin;
        scrollbar-color: #606060 transparent;
    }

    :is(.menu-scroll, .statistics-popup, .log-window-body, .mcp-body, .mcp-form):hover {
        scrollbar-color: #969696 transparent;
    }

    .statistics-popup,
    .log-window-body {
        scrollbar-gutter: stable;
    }
}

:focus,
:focus-visible {
    outline: none !important;
    outline-offset: 0;
}

button,
input {
    font: inherit;
    border: 0;
    outline: 0;
}

[hidden] {
    display: none !important;
}

body {
    font-family: cmdpe, "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
	/* font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif; */
    background: #000;
    color: #f2f3f5;
    width: 100vw;
    display: flex;
    min-height: 100svh;
    height: auto;
    overflow-x: hidden;
    justify-content: center;
    align-items: center;
}
body:before {
    content: "";
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(rgb(255 87 34 / 12%) 1.5px, rgb(0 0 0 / 5%) 1.0px);
    background-size: 4px 4px;
	background-image: repeating-linear-gradient(0deg, rgb(255 87 34 / 6%) 0 3.0px, transparent 3.0px calc(3.0px + 1.0px)),
                  repeating-linear-gradient(90deg, rgb(255 87 34 / 6%) 0 3.0px, transparent 3.0px calc(3.0px + 1.0px));
	background-image: repeating-linear-gradient(0deg, rgb(103 58 183 / 10%) 0 3.0px, transparent 3.0px calc(3.0px + 1.0px)),
                  repeating-linear-gradient(90deg, rgb(103 58 183 / 10%) 0 3.0px, transparent 3.0px calc(3.0px + 1.0px));
    background-size: 6px 6px;				  
    position: fixed;
    inset: 0;
    mask-image: linear-gradient(#000, #0000 90%);
}
html[lang="en"] body:before {
    background-image: radial-gradient(rgb(33 150 243 / 12%) 1.5px, rgb(0 0 0 / 5%) 1.0px);
	background-image: repeating-linear-gradient(0deg, rgb(0 142 255 / 6%) 0 3.0px, transparent 3.0px calc(3.0px + 1.0px)),
                  repeating-linear-gradient(90deg, rgb(0 142 255 / 6%) 0 3.0px, transparent 3.0px calc(3.0px + 1.0px));
}
body>header {
    display: flex;
    gap: var(--header-gap);
    justify-content: center;
    position: fixed;
    top: 10px;
	width: 400px;
    align-items: center;
    z-index: 100;
	transition: all 0.3s ease;
}
body>header::before {
    content: '';
    width: 600px;
    width: 100vw;
    top: -16px;
    bottom: -16px;
    position: absolute;
    z-index: -1;
    transition: all 0.3s ease;
    border-radius: 0;
}
body>header.is-scrolled {
    top: 8px;
}
body>header.is-scrolled::before {
    bottom: -8px;
    background-color: rgb(0 0 0 / 33%);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 0 1px rgba(20, 126, 255, .00);
}
body>header>.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--header-gap);
}
body>header>.nav-push-right {
	margin-left: auto;
    display: flex;
    gap: 10px;
}
body>header>.nav-links>ul {
    display: flex;
    gap: var(--header-gap);
	list-style: none;
}
body>header>.nav-links>ul>li {
    display: flex;
	align-items: center;
	height: 36px;
	color: #bdbdbd;
}
body>header>.nav-links>ul>li:hover {
	color: #fff;
}
body>header>.nav-links>ul ul {
	list-style: none;
    position: absolute;
    visibility: hidden;
    display: flex;
    flex-direction: column;
	gap: 4px;
	padding: 5px;
    border-radius: 12px;
	top: 36px;
    background: rgb(103 58 183 / 0%);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    backdrop-filter: blur(6px) saturate(140%);
	box-shadow: 0 0 0 .5px rgb(29 29 29), 0 1px 0px rgba(0, 0, 0, .35);
	z-index: 1;
}
html[lang="en"] body>header>.nav-links>ul ul {
	background: rgb(33 150 243 / 0%);
}
body>header ul>li:hover>ul {
    visibility: inherit;
}
body>header ul>li:hover>ul li {
    visibility: inherit;
}
body>header>.nav-links>ul ul li {
	display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 9px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
	background: rgb(255 255 255 / 5%);
	color: #bdbdbd;
}
body>header>.nav-links>ul ul li img {
    width: 16px;
}
body>header>.nav-links>ul ul li:hover {
	background: rgb(255 255 255 / 10%);
	color: #fff;
}
body>header a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
	color: inherit;
    text-decoration: none;
	position: relative;
}
body>header>.nav-push-right a {
	box-shadow: inset 0 0 0 0px rgb(255 255 255 / 40%);
    padding: 8px;
    border-radius: 33%;
    background: rgb(255 255 255 / 4%);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    backdrop-filter: blur(6px) saturate(140%);

}
body>header>.nav-push-right a:hover {
	filter: brightness(0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 3px 8px rgba(8, 64, 248, 0.26);
}
/* body>header .nav-links a::before {
    content: "";
    position: absolute;
    inset: 4px -8px;
    opacity: 0;
    z-index: -1;
    background: #4f1fff;
}
body>header .nav-links a::after {
    content: "";
    position: absolute;
    inset: 0px -4px;
    opacity: 0;
    z-index: -1;
    background: #4f1fff;
}
body>header .nav-links a:hover::before, body>header .nav-links a:hover::after {
    opacity: 1;
} */
body>header>img {
    width: 32px;
}
body>header a img {
    width: 16px;
}
/* 03 · 主窗口与标题栏 */

#window {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
	zoom: 110%;
    flex-shrink: 0;
	padding: 20px 20px 20px 20px;
	margin: 5px 0px 0px 3px;
}
.notice-ico {
    width: 662px;
    line-height: 2;
    text-align: center;
    font-family: "cmdpe2", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.notice-ico::before {
    font-family: "iconfont";
    display: inline-block;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: none;
    font-style: normal;
    content: "\e719";
    font-size: 1.1em;
    margin-right: 5px;
    vertical-align: 0px;
}
.download {
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    background: #0021d9;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    position: relative;
    top: 13px;
    font-family: "cmdpe2", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.download:hover {
    color: #ffffff;
    background: #bc2d00;
}
html.launcher-3d #window {
    position: relative;
    transform-origin: center;
}
.window {
    width: 380px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 0px;

    isolation: isolate;
    --sq: 5px;    /* 上角：先切的正方形边长 */
    --rw: 5px;    /* 上角：紧挨着正方形的长方形宽 */
    --rh: 2px;    /* 上角：长方形高，必须小于 --sq */

    --c1: 5px;    /* 下角：贴着角的正方形边长 */
    --c2: 0px;    /* 下角：斜对着它的第二个正方形边长，和 --c1 互不影响 */

    --nd: 5px;    /* 两侧缺口深度 */
    --nh: 2px;    /* 两侧缺口高度 */
    --ny: 57px;   /* 缺口顶边距上沿，必须大于 --sq */
}
.window::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--Window-bg);
    clip-path: polygon(evenodd,
        /* 上边 */
        calc(var(--sq) + var(--rw)) 0,
        calc(100% - var(--sq) - var(--rw)) 0,

        /* 右上角：长方形 + 正方形 */
        calc(100% - var(--sq) - var(--rw)) var(--rh),
        calc(100% - var(--sq)) var(--rh),
        calc(100% - var(--sq)) var(--sq),
        100% var(--sq),

        /* 右侧缺口 */
        100% var(--ny),
        calc(100% - var(--nd)) var(--ny),
        calc(100% - var(--nd)) calc(var(--ny) + var(--nh)),
        100% calc(var(--ny) + var(--nh)),

        /* 右下角：沿右边下来，切掉贴角的正方形 c1 */
        100% calc(100% - var(--c1)),
        calc(100% - var(--c1)) calc(100% - var(--c1)),      /* 两个方块相接的点 */
        /* 绕一圈挖出斜上方的正方形 c2 */
        calc(100% - var(--c1)) calc(100% - var(--c1) - var(--c2)),
        calc(100% - var(--c1) - var(--c2)) calc(100% - var(--c1) - var(--c2)),
        calc(100% - var(--c1) - var(--c2)) calc(100% - var(--c1)),
        calc(100% - var(--c1)) calc(100% - var(--c1)),      /* 回到相接的点 */
        calc(100% - var(--c1)) 100%,

        /* 下边 */
        var(--c1) 100%,

        /* 左下角（与右下角左右镜像） */
        var(--c1) calc(100% - var(--c1)),                   /* 两个方块相接的点 */
        calc(var(--c1) + var(--c2)) calc(100% - var(--c1)),
        calc(var(--c1) + var(--c2)) calc(100% - var(--c1) - var(--c2)),
        var(--c1) calc(100% - var(--c1) - var(--c2)),
        var(--c1) calc(100% - var(--c1)),                   /* 回到相接的点 */
        0 calc(100% - var(--c1)),

        /* 左侧缺口（往上走） */
        0 calc(var(--ny) + var(--nh)),
        var(--nd) calc(var(--ny) + var(--nh)),
        var(--nd) var(--ny),
        0 var(--ny),

        /* 左上角：正方形 + 长方形 */
        0 var(--sq),
        var(--sq) var(--sq),
        var(--sq) var(--rh),
        calc(var(--sq) + var(--rw)) var(--rh)
    );
}
.titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0px;
    padding: 9px 15px 10px 13px;
    position: relative;
    user-select: none;
    /* background: var(--Window-bg); */
    margin: 5px 0 2px;
}
.titlebar::before {
    content: '';
    position: absolute;
    top: -5px;
    bottom: -5px;
    left: 5px;
    right: 5px;
    z-index: -1;
    /* background: var(--Window-bg); */
}
.titlebar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 18px;
    right: 18px;
    height: 0;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.42);
}
.brand {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    flex: 0 0 auto;
    overflow: hidden;
    margin-top: 0px;
    position: relative;
    top: -1px;
}
.brand-mark img,
.status-icon img {
    width: 100%;
    height: 100%;
}
.brand-copy h1 {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: -4px;
}
.brand-copy p {
    margin: 0px 0 0;
    color: #a0a6b0;
    font-size: 11px;
}
.brand-copy p a {
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    color: rgb(25 93 255);
}
.brand-copy p a:hover {
    color: rgb(155 255 0);
}
.brand-copy p img {
    height: 12px;
    position: relative;
    top: 2.3px;
}
.window-controls {
    display: flex;
    gap: 6px;
}
.window-dot {
    position: relative;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
	/* 深色 */
	/* background: linear-gradient(180deg, rgba(190, 190, 200, .5), rgba(80, 80, 90, .3));
    box-shadow: inset 0 .04em .04em rgba(255, 255, 255, .4), inset 0 -.04em .04em rgba(0, 0, 0, .3), 0 0 0 .04em rgba(255, 255, 255, .12), 0 .07em .14em rgba(0, 0, 0, .45); */
	/* 浅色 */
	/* background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(235, 235, 240, .35));
    box-shadow: inset 0 .04em .04em rgba(255, 255, 255, .95), inset 0 -.04em .04em rgba(0, 0, 0, .14), 0 0 0 .04em rgba(0, 0, 0, .12), 0 .07em .14em rgba(0, 0, 0, .2); */
}
.window-dot.red {
    background: rgba(255, 95, 87, 0.92);
}
.window-dot.yellow {
    background: rgba(254, 188, 46, 0.92);
}
.window-dot.green {
    background: rgba(40, 200, 64, 0.92);
}
/* .window-dot::before {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    top: 7%;
    height: 38%;
    border-radius: 50%;
} */
/* 深色 */
/* .window-dot::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
} */
/* 浅色 */
/* .window-dot::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
}
 */
.window-controls:hover .window-dot {
    /* box-shadow: none; */
}
.window-controls:hover .window-dot.red {
    background: rgba(255, 95, 87, 0.92);
}
.window-controls:hover .window-dot.yellow {
    background: rgba(254, 188, 46, 0.92);
}
.window-controls:hover .window-dot.green {
    background: rgba(40, 200, 64, 0.92);
}
.window-dot::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 11px;
    transform: translate(-50%, -50%);
    background-image: url("../imgs/svg/window-control-glyphs.svg");
    background-repeat: no-repeat;
    background-size: 33px 11px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    zoom: 1.5;
}
.window-dot:hover::after {
    opacity: 1;
}
.window-dot.yellow::after {
    background-position: -11px 0;
}
.window-dot.green::after {
    background-position: -22px 0;
}
.window-dot.red::after {
    background-position: 0 0;
}
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0px;
    padding: 12px 15px 12px;
    /* background: var(--Window-bg); */
    position: relative;
}
.content::before {
	content: "";
	position: absolute;
	inset: 5px;
	top: 5px;
    bottom: 0px;
	background-image: url(bg5.png);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	/* background-attachment: fixed; */
	mask-image: linear-gradient(rgb(48 48 48), rgb(0 0 0 / 0%) 90%);
	opacity: 1.63;
}
.content > .section {
    position: relative;
    z-index: 1;
}

/* 04 · 接口输入框与操作按钮 */

.fields {
    display: grid;
    gap: 10px;
}

.field {
    display: block;
    min-width: 0;
}

.control {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.control input {
    font-size: 14px;
    width: 100%;
    height: 34px;
    border-radius: 10px;
    color: #f2f3f5;
    padding: 0 12px;
    outline: none;
    transition: background 0.16s ease, box-shadow 0.16s ease;
    background: rgba(0, 0, 0, 0.39);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    backdrop-filter: blur(6px) saturate(140%);
}

.control.has-toggle input {
    padding-left: 25px;
    padding-right: 34px;
}

.field-leading img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
    opacity: 1;
}

.control input::placeholder {
    color: #6d7380;
}

.control input:hover {
    /* background: rgba(0, 0, 0, 0.42); */
	background: rgb(26 26 26 / 100%);
}

.toggle-visibility:focus-visible {
    outline: 2px solid rgba(79, 140, 255, 0.7);
    outline-offset: 1px;
}

.field-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.field-control .control {
    flex: 1 1 auto;
    min-width: 0;
}

.action-btn {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    cursor: pointer;
    display: grid;
    place-items: center;
    position: relative;
    transition: all 0s ease;
    background: rgba(0, 0, 0, 0.39);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    backdrop-filter: blur(6px) saturate(140%);
}

#install {
    border-radius: 12px;
    background: rgb(16 52 255 / 60%);
}

#launchBtn {
    border-radius: 12px;
    background: rgb(0 221 112 / 60%);
}

.action-btn img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    pointer-events: none;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.action-btn:hover {
    background: rgb(204 49 0) !important;
}

.action-btn:active {
    filter: brightness(0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 3px 8px rgba(8, 64, 248, 0.26);
}

.action-btn:focus-visible {
    outline: 2px solid rgba(120, 170, 255, 0.9);
    outline-offset: 2px;
}

.field-leading {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    z-index: 1;
    pointer-events: auto;
    cursor: help;
}

.toggle-visibility {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background: transparent;
    color: #9aa2ae;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: 9px;
}

.toggle-visibility:hover {
    color: #f2f3f5;
    background: rgb(45 45 45);
}

.toggle-visibility img {
    object-fit: contain;
    display: block;
    opacity: 0.92;
    width: 16px;
    height: 16px;
}

#historyBtn img {
    width: 17px;
    height: 17px;
    transition: transform .18s;
}

#historyBtn[aria-expanded="true"] img {
    /* transform: rotate(180deg); */
}

.action-btn:disabled {
    opacity: .95;
    cursor: default;
}

.action-btn:disabled:hover {
    background: rgba(0, 0, 0, .33) !important;
}

.endpoint-light {
    position: absolute;
    z-index: 1;
    right: 37px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 22px;
    display: grid;
    place-items: center;
    cursor: help;
}

.endpoint-light::after,
.history-light.is-connected::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--light-connected);
    animation: small-live-pulse 1.4s infinite;
}

.control:has(.endpoint-light:not([hidden])) input {
    padding-right: 55px;
}

/* #install:disabled,
#launchBtn:disabled {
    background: rgb(59 59 59) !important;
} */

.action-btn:disabled img {
    opacity: .45;
}

img[src*="spinners.svg"] {
	opacity: 1 !important;
	width: 20px;
    height: 20px;
}

/* 05 · 客户端卡片与状态灯 */

.cards {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
	/* background: rgb(61 61 61 / 85%); */
    border-radius: 30px;
    padding: 15px;
    margin: 0;
	background: rgb(255 255 255 / 5%);
	-webkit-backdrop-filter: blur(20px) saturate(140%);
	backdrop-filter: blur(20px) saturate(140%);
}

.card {
    position: relative;
    appearance: none;
    border-radius: 14px;
    color: inherit;
    width: 100%;
    min-width: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: none;
    box-shadow: none;
    transition: none;
}

.card:focus-visible {
    outline: 2px solid rgba(79, 140, 255, 0.75);
    outline-offset: 2px;
}

.card.is-selected {
    background: none;
    box-shadow: none;
}

.card.is-active {
    background: none;
    box-shadow: none;
}

.card.is-selected.is-active {
    background: none;
    box-shadow: none;
}

.icon-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.08) 42%, rgba(255, 255, 255, 0.04) 100%),
        rgba(40, 44, 54, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.icon-wrap::before {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    top: 3px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
    pointer-events: none;
    opacity: 0;
}

.client-selection-indicator {
    position: absolute;
    z-index: 4;
    left: 0;
    bottom: 0;
    width: 16px;
    height: 4px;
    background: rgb(0 221 112);
    pointer-events: none;
    transform: translateX(var(--selection-x, 0px));
    transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}

.card.is-selected .icon-wrap::after {
    display: none;
}

.icon-wrap .client-icon {
    position: relative;
    z-index: 1;
    width: 60%;
    height: 60%;
    object-fit: contain;
    filter: none;
    transition: none;
}

.icon-wrap .type-badge {
    position: absolute;
    left: 7px;
    bottom: 4px;
    z-index: 2;
    width: 24px;
    height: 24px;
    object-fit: contain;
    pointer-events: none;
    filter: none;
    transition: none;
}

.card:hover .icon-wrap,
.card.is-selected .icon-wrap {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.12) 44%, rgba(255, 255, 255, 0.06) 100%),
        rgba(50, 56, 70, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.status-dot {
    position: absolute;
    right: -3px;
    bottom: 0px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #5b6170;
    border: 2.5px solid rgb(43 43 43);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

@keyframes hv-live-pulse {
    0% {
        box-shadow: 0 0 #62c55599;
    }

    70% {
        box-shadow: 0 0 0 8px #62c55500;
    }

    100% {
        box-shadow: 0 0 #62c55500;
    }
}

.card .status-dot {
    z-index: 3;
    background: var(--light-idle);
    animation: none;
    box-shadow: none;
    display: grid;
    place-items: center;
}

.card.is-running .status-dot {
    background: var(--light-running);
}

.card.is-active .status-dot {
    background: var(--light-connected);
    animation: hv-live-pulse 1.2s infinite;
}

.card.is-uninstalled .status-dot::before,
.card.is-uninstalled .status-dot::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    height: 1.5px;
    border-radius: 1px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(45deg);
}

.card.is-uninstalled .status-dot::before,
.card.is-uninstalled .status-dot::after {
    width: 6px;
    height: 1.2px;
    background: rgb(43 43 43);
}

.card.is-uninstalled .status-dot::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.card.is-running .icon-wrap,
.card.is-selected.is-running .icon-wrap,
.card.is-running:hover .icon-wrap {
    background: linear-gradient(180deg, rgba(210,230,255,.34), rgb(0 88 255 / 18%) 48%, rgba(70,120,220,.12)), rgba(40,70,140,.22);
    box-shadow: inset 0 1px rgba(235,245,255,.46), inset 0 0 0 1px rgba(160,200,255,.22);
}

.card.is-active .icon-wrap,
.card.is-active:hover .icon-wrap,
.card.is-selected.is-active .icon-wrap {
    background: linear-gradient(180deg, rgba(210,255,235,.26), rgb(0 255 128 / 12%) 48%, rgba(30,120,80,.1)), rgba(20,70,50,.18);
    box-shadow: inset 0 1px rgba(230,255,240,.36), inset 0 0 0 1px rgba(120,230,180,.16);
}

@keyframes small-live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgb(0 221 112 / 45%);
    }

    80%,
    100% {
        box-shadow: 0 0 0 10px rgb(0 221 112 / 0%);
    }
}

/* 06 · 客户端操作栏 */

.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

#modelSourceBtn {
    border-radius: 12px;
    background: rgb(16 52 255 / 60%);
}

#modelSourceBtn[data-model-source="gateway"] {
    background: rgb(0 221 112 / 60%);
}

#modelSourceBtn:disabled {
    background: rgb(59 59 59);
}

#aboutBtn,
#mcpBtn,
#SkillsBtn,
#install:disabled, 
#launchBtn:disabled, 
.status-log-btn {
    border-radius: 12px;
    /* background: rgb(103 58 183 / 80%); */
	background: rgb(59 59 59);
	background: rgb(255 255 255 / 5%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

/* MCP Server 视图沿用主窗口标题栏与状态栏。 */
.mcp-content {
    position: relative;
    height: calc(var(--launcher-content-height, 286px) + 8px);
    min-height: 0;
    flex: 0 0 auto;
    padding-bottom: 2px;
	z-index: 1;
}

.mcp-content:not([hidden]) ~ .status-bar {
    padding-top: 0;
}

.mcp-content:not([hidden]) ~ .status-bar::after {
    display: none;
}

.mcp-panel {
    position: absolute;
    top: -3px;
    right: 15px;
    bottom: 2px;
    left: 15px;
    display: flex;
    flex-direction: column;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 10px;
    border-radius: 12px;
    background: var(--menu-bg);
    box-shadow: 0 0 0 .75px var(--outline);
}

.mcp-heading {
    position: relative;
    flex: 0 0 auto;
    margin-bottom: 8px;
}

.mcp-heading .menu-section-title {
    height: 18px;
    margin: 0;
    font-size: 12px;
    font-weight: 400;
}

.mcp-back,
.mcp-search-clear,
.mcp-search,
.mcp-refresh {
    position: absolute;
    top: -2px;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.mcp-back {
    left: -3px;
}

.mcp-search {
    right: 24px;
    display: grid;
    place-items: center;
}

.mcp-search img {
    display: block;
    width: 13px;
    height: 13px;
}

.mcp-refresh {
    right: -3px;
    display: grid;
    place-items: center;
}

.mcp-refresh img {
    display: block;
    width: 13px;
    height: 13px;
}

.mcp-search-input {
    position: absolute;
    top: -2px;
    /* left: 50%; */
	right: 24px;
    width: min(175px, calc(100% - 72px));
    height: 22px;
    padding: 0 47px 0 7px;
    border: 0;
    border-radius: 7px;
    outline: 0;
    /* transform: translateX(-50%); */
    background: var(--row-bg);
    color: #e1e5eb;
    font-size: 10px;
    text-align: left;
    /* box-shadow: inset 0 0 0 .75px var(--outline); */
}

.mcp-search-input::placeholder {
    color: var(--muted);
}

.mcp-search-input::-webkit-search-cancel-button,
.mcp-search-input::-webkit-search-decoration {
    display: none;
}

.mcp-search-clear {
    right: 46px;
}

.mcp-search-clear::before,
.mcp-search-clear::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 1px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(45deg);
}

.mcp-search-clear::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.mcp-search-clear:hover {
    color: #e1e5eb;
}

.mcp-heading.is-searching .menu-section-title {
    visibility: hidden;
}

.mcp-search:hover,
.mcp-search[aria-expanded="true"] {
    /* background: rgb(204 49 0);
    color: white; */
}

.mcp-refresh.is-refreshing img {
    animation: mcp-refresh-spin .7s linear infinite;
}

.mcp-refresh:disabled {
    cursor: wait;
}

@keyframes mcp-refresh-spin {
    to { transform: rotate(-360deg); }
}

.mcp-back::before,
.mcp-back::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
}

.mcp-back::before {
    width: 7px;
    height: 7px;
    border-left: 1.3px solid currentColor;
    border-bottom: 1.3px solid currentColor;
    transform: translate(-55%, -50%) rotate(45deg);
}

.mcp-back::after {
    width: 11px;
    height: 1.3px;
    /* border-radius: 1px; */
    background: currentColor;
    transform: translate(-45%, -50%);
}

.mcp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
	flex-shrink: 0;
    /* padding: 0 4px;
    height: 34px;
    border-radius: 10px;
    box-shadow: 0 0 0 .75px var(--outline);
	background: rgb(255 255 255 / 5%); */
}

.mcp-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 4px;
    border-radius: 9px;
    background: var(--row-bg);
}

.mcp-tabs::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 10px) / 2);
    border-radius: 6px;
    background: var(--active-bg);
    transition: transform .22s cubic-bezier(.2, .8, .2, 1);
    pointer-events: none;
}

.mcp-tabs:has([data-mcp-view="market"][aria-selected="true"])::before {
    transform: translateX(calc(100% + 2px));
}

.mcp-tabs:has([data-skills-view="market"][aria-selected="true"])::before {
    transform: translateX(calc(100% + 2px));
}

.mcp-tabs button,
.mcp-add,
.mcp-market-button {
    height: 26px;
    border-radius: 9px;
    color: #bfc3ca;
    background: var(--row-bg);
    font-size: 11px;
    cursor: pointer;
}

.mcp-tabs button {
    position: relative;
    height: 22px;
    padding: 0 8px;
    background: transparent;
}

.mcp-tabs button[aria-selected="true"] {
	color: var(--accent);
}

.mcp-tabs button:hover {
	color: var(--accent);
}

.mcp-add {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    min-width: 56px;
    padding: 0 8px;
    white-space: nowrap;
}

.mcp-plus {
    position: relative;
    width: 10px;
    height: 10px;
}

.mcp-plus::before,
.mcp-plus::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 1.2px;
    border-radius: 1px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.mcp-plus::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.mcp-market-picker {
    position: relative;
    min-width: 0;
}

.mcp-market-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 102px;
    padding: 0 8px;
}

.mcp-market-button img {
    width: 12px;
    height: 12px;
    margin-left: auto;
    transition: transform .15s ease;
}

.mcp-market-button[aria-expanded="true"] img {
    transform: rotate(180deg);
}

.mcp-back:hover,
/* .mcp-refresh:hover, */
.mcp-add:hover,
.mcp-market-button:hover {
    background: rgb(204 49 0);
    color: white;
}

.mcp-body {
    flex: 1;
    min-height: 0;
    padding: 1px 2px 1px 10px;
    margin: 10px -8px 0 -10px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.about-body {
    /* padding: 2px 10px 14px 10px; */
	padding: 0px 2px 0px 10px;
    margin-top: 0px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.about-body .about-intro {
    color: #d9dee8;
    font-size: 12px;
    line-height: 1.6;
    /* margin-bottom: 12px; */
}

.about-body .about-GitHub {
    background: rgb(103 58 183 / 45%);
    color: #c19fff;
    padding: 8px;
    border-radius: 12px;
	font-size: 11px;
    line-height: 1.6;
    margin-bottom: 11px;
}

.about-body .sponsor-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: var(--preset-gap);
    max-width: min(100%, calc(8 * var(--preset-size) + 7 * var(--preset-gap)));
    margin: 0 0 8px;
}

.about-body .sponsor-grid:empty {
    display: none;
}

.about-body .about-no-sponsors {
    margin: 0 0 8px;
    font-size: 10px;
}

.about-body .about-no-sponsors[hidden] {
    display: none;
}

.about-body .about-GitHub strong {
    color: var(--accent);
    /* font-weight: 600; */
}

.about-body h3 {
    /* margin: 14px 0 6px; */
    color: var(--accent);
    font-size: 11px;
    font-weight: 500;
}

.about-body h3:first-of-type {
    margin-top: 0;
}

.about-body h4 {
    margin: 0 0 8px;
    color: #d9dee8;
    font-size: 10px;
    font-weight: 500;
}

.Answer {
    background: rgb(0 0 0 / 25%);
    padding: 1px 9px;
    border-radius: 12px;
	margin: 0 0 9px;
}

.about-body p {
    margin: 8px 0;
}

.about-body .about-intro {
    margin: 0 0 8px ;
}

.about-body ul,
.about-body ol {
    margin: 8px 0 8px 16px;
    padding: 0;
}

.about-body li {
    margin: 3px 0;
}

.about-body .about-dot-list {
    margin-left: 0;
    list-style: none;
    --about-dot-color: rgb(61 116 255);
}

.about-dot-list > li {
    position: relative;
    padding-left: 12px;
}

.about-dot-list > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: calc((1.55em - 6px) / 2);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--about-dot-color);
}

.about-dot-list > .about-dot-gray {
    --about-dot-color: rgb(160 166 176);
}

.about-dot-list > .about-dot-green {
    --about-dot-color: var(--light-connected);
}

.about-dot-list > .about-dot-black {
    --about-dot-color: #000;
}

.about-dot-black::before {
    /* box-shadow: 0 0 0 .7px rgb(160 166 176); */
	box-shadow: 0 0 6px 0px rgb(48 48 48);
}

.about-body strong {
    color: #d9dee8;
    font-weight: 500;
}

.about-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mcp-server-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    gap: 6px;
}

.mcp-server {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 7px;
    /* min-height: 52px; */
    padding: 8px;
    border-radius: 12px;
    background: var(--row-bg);
    /* box-shadow: inset 0 0 0 1px rgb(255 255 255 / 3%); */
}

.mcp-server:hover {
    box-shadow: inset 0 0 0 1px rgb(20 126 255 / 33%);
}

.mcp-server-mark {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #8bafff;
    background: rgb(91 136 255 / 16%);
    font-size: 10px;
    font-weight: 600;
}

.mcp-server-mark[data-tone="green"] {
    color: #68d7a4;
    background: rgb(58 190 133 / 16%);
}

.mcp-server-mark[data-tone="purple"] {
    color: #c6a2ff;
    background: rgb(166 112 255 / 16%);
}

.mcp-server-mark[data-tone="orange"] {
    color: #efb47f;
    background: rgb(230 148 74 / 16%);
}

.mcp-server-copy {
    flex: 1;
    min-width: 0;
}

.mcp-server-title {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
	position: relative;
}

.mcp-server-title h3 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e1e5eb;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

.mcp-server-transport {
    flex-shrink: 0;
    padding: 1px 3px;
    border-radius: 4px;
    background: rgb(103 58 183 / 45%);
    color: rgb(193 159 255);
    font-size: 8px;
    line-height: 1.25;
}

.mcp-server-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 2px;
	position: absolute;
    right: 0px;
}

.mcp-server-actions .icon-button {
    visibility: hidden;
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.mcp-server:is(:hover, :focus-within) .mcp-server-actions .icon-button {
    visibility: visible;
}

.mcp-server-actions .icon-button img {
    width: 11px;
    height: 11px;
    opacity: .55;
}

.mcp-server-actions .icon-button:hover {
    background: rgb(255 255 255 / 7%);
}

.mcp-server-actions .icon-button:hover img {
    opacity: 1;
    filter: brightness(0) invert(1);
}

.mcp-server-description {
    min-width: 0;
    max-width: 100%;
    margin-top: 0px;
    color: #868e9a;
    font-size: 9px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* white-space: nowrap; */
}

.mcp-server-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    min-width: 0;
    margin-top: 2px;
}

.mcp-server-target {
    flex: 0 0 auto;
    padding: 1px 3px;
    border-radius: 4px;
    margin-right: 5px;
    background: rgb(98 197 85 / 15%);
    color: #7dd96e;
    font-size: 8px;
    line-height: 1.25;
}

.mcp-server-toggle {
    position: relative;
    flex: 0 0 24px;
    width: 24px;
    height: 14px;
    border-radius: 8px;
    background: #505563;
    cursor: pointer;
    transition: background .18s ease;
}

.mcp-server-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dce2eb;
    transition: transform .18s ease;
}

.mcp-server-toggle[aria-checked="true"] {
    background: #00ac63;
}

.mcp-server-toggle[aria-checked="true"]::before {
    transform: translateX(10px);
}

.mcp-server-install {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    flex-shrink: 0;
    padding: 4px 7px;
    border-radius: 9px;
    background: var(--menu-bg);
    color: #747d89;
    cursor: pointer;
    /* font-size: 10px; */
	width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcp-server-install img {
	width: 12px;
    height: 12px;
}

.mcp-server-install::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background: currentColor;
    mask: url('../imgs/svg/install.svg') center / contain no-repeat;
}

.mcp-installed-light {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--light-connected);
}

.mcp-server-install:enabled:hover {
    background: var(--active-bg);
    color: var(--accent);
}

.mcp-server-install:enabled {
    background: var(--active-bg);
    color: var(--accent);
}

.mcp-server-install:disabled {
    background: rgb(43 43 43);
    color: #747d89;
    cursor: default;
}

.mcp-market-summary {
    grid-column: 1 / 3;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    border-radius: 4px;
}

.mcp-market-summary[role="button"] {
    cursor: pointer;
}

.mcp-market-targets {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
}

.mcp-market-targets legend {
    width: 100%;
    /* margin-bottom: 3px; */
}

.mcp-market-targets .mcp-target {
    background: var(--menu-bg);
}

.mcp-market-targets .mcp-target:has(input:checked) {
    background: var(--active-bg);
}

/* 添加 MCP：表单与列表共用固定内容区，只在内部滚动。 */
.mcp-form {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1px 2px 1px 10px;
    margin: 0 -8px 0 -10px;
    scrollbar-gutter: stable;
}

.mcp-form-fields {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
}

.mcp-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.mcp-form .mcp-form-title {
    height: 18px;
    margin: 0;
    font-size: 10px;
    font-weight: 400;
}

.mcp-form input[type="text"],
.mcp-form textarea {
    width: 100%;
    min-width: 0;
    padding: 5px 8px;
    border-radius: 10px;
    background: var(--row-bg);
    color: #e1e5eb;
    font-size: 12px;
    box-shadow: inset 0 0 0 1px transparent;
}

.mcp-form input[type="text"] {
    height: 34px;
}

.mcp-form textarea {
    display: block;
    flex: none;
    min-height: 120px;
    height: 180px;
    padding-bottom: 17px;
    resize: none;
    font: 12px/1.40 Consolas, "Cascadia Mono", monospace;
}

.mcp-json-field {
    position: relative;
    flex: 0 0 auto;
    min-height: 0;
}

.mcp-json-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-radius: 0 0 10px 0;
    color: #6f7783;
    cursor: ns-resize;
    touch-action: none;
    user-select: none;
}

.mcp-json-resize::before {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 9px;
    height: 9px;
    background: repeating-linear-gradient(135deg, transparent 0 2px, currentColor 2px 3px);
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.mcp-json-resize:is(:hover, :focus-visible, .is-resizing) {
    color: var(--accent);
}

.mcp-form :is(input[type="text"], textarea):focus {
    box-shadow: inset 0 0 0 1px rgb(20 126 255 / 65%);
}

.mcp-form :is(input[type="text"], textarea)::placeholder {
    color: #6f7783;
    font-size: 12px;
}

.mcp-form [aria-invalid="true"] {
    box-shadow: inset 0 0 0 1px var(--state-warning);
}

.mcp-targets {
    flex-shrink: 0;
    min-width: 0;
	margin-top: 0px;
}

.mcp-targets legend {
    width: 100%;
    margin-bottom: 6px;
}

.mcp-target-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.mcp-target {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    height: 28px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--row-bg);
    color: #9aa2ae;
    cursor: pointer;
    font-size: 10px;
}

.mcp-target:has(input:checked) {
    color: #c4d8ff;
    background: var(--active-bg);
}

.mcp-target input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    opacity: 0;
}

.mcp-target img {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.mcp-target span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mcp-target-check {
    visibility: hidden;
}

.mcp-target:has(input:checked) .mcp-target-check {
    visibility: visible;
}

.mcp-target:hover {
    /* box-shadow: inset 0 0 0 1px rgb(20 126 255 / 33%); */
	background: var(--active-bg);
}

.mcp-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.mcp-form-actions button {
    min-width: 48px;
    height: 25px;
    border-radius: 7px;
    background: rgb(59 59 59);
    color: #c8ced8;
    cursor: pointer;
    font-size: 11px;
}

.mcp-form-actions .mcp-save {
    background: var(--active-bg);
    color: var(--accent);
}

.mcp-form-actions button:hover {
    background: rgb(204 49 0);
    color: white;
}

.skills-add-panel .mcp-heading {
    margin-bottom: 8px;
}

.skills-add-hint {
    flex: 0 0 auto;
    width: 100%;
    /* margin: 0 0 7px; */
	margin: 0 0 0px;
    padding: 7px 8px;
    border-radius: 9px;
    color: rgb(47 123 255);
    background: rgb(0 85 254 / 12%);
    font-size: 10px;
    line-height: 1.5;
}

.skills-import-options {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

.skills-import-option {
    position: relative;
    display: grid;
    flex: 1;
    min-width: 0;
    height: 28px;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: var(--row-bg);
    color: #c8ced8;
    font-size: 10px;
    cursor: pointer;
}

.skills-import-option:hover {
    color: var(--accent);
}

.skills-markdown {
    width: 100%;
    height: 100% !important;
    min-height: 120px !important;
    padding: 8px !important;
    white-space: pre;
    overflow-x: auto !important;
    overflow-y: auto !important;
    overflow-wrap: normal;
}

.skills-markdown-field {
    position: relative;
    flex: 0 0 152px;
    min-height: 120px;
    height: 152px;
}

.skills-markdown-resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 20px;
    height: 20px;
    border-radius: 0 0 10px 0;
    color: #6f7783;
    cursor: ns-resize;
    touch-action: none;
    user-select: none;
}

.skills-markdown-resize::before {
    content: '';
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 9px;
    height: 9px;
    background: repeating-linear-gradient(135deg, transparent 0 2px, currentColor 2px 3px);
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.skills-markdown-resize:is(:hover, :focus-visible, .is-resizing) {
    color: var(--accent);
}

.skills-claude-note {
    flex: 0 0 auto;
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgb(58 37 30);
    color: rgb(255 180 84);
    font-size: 10px;
    line-height: 1.5;
}

.mcp-card-link,
.skills-card-link {
    display: grid;
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    /* margin-left: 3px; */
    place-items: center;
    color: #00c878;
}

.mcp-card-link img,
.skills-card-link img {
    display: block;
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.skills-market-summary {
    grid-column: 1 / 3;
}

.skills-server .mcp-server-install img {
    width: 12px;
    height: 12px;
}

.client-card-menu {
    z-index: 95;
    width: max-content;
    /* min-width: 130px; */
    transform-origin: top left;
}

.client-card-menu button {
    padding: 0 8px;
    text-align: left;
    white-space: nowrap;
}

/* 07 · 底部状态栏 */

.status-bar {
    display: flex;
    align-items: center;
    gap: 0px;
    padding: 8px 15px 3px;
    position: relative;
    /* background: var(--Window-bg); */
    margin: 0 0 5px;
}

.status-bar::before {
    content: '';
    position: absolute;
    top: -5px;
    top: 0;
    bottom: -5px;
    left: 5px;
    right: 5px;
    z-index: -1;
    /* background: var(--Window-bg); */
}

.status-bar::after {
    content: "";
    position: absolute;
    top: 0px;
    left: 18px;
    right: 18px;
    height: 0;
    border-top: 0.5px solid rgba(0, 0, 0, 0.42);
}

.status-bar.normal {
    color: #c8ced8;
}

.status-bar.warn {
    color: #ff3d00;
    background: rgb(58 37 30);
}

.status-bar.warn::before {
    background: rgb(58 37 30);
}

.status-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
	margin-right: 8px;
    display: grid;
    place-items: center;
}

.status-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.status-text {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-text .st-installed,
.status-text .st-running {
    color: #00dd70;
    font-weight: 600;
}

.status-text .st-missing {
    color: #ff3d00;
    font-weight: 600;
}

.status-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.status-log-btn {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 12px;
    cursor: pointer;
    display: grid;
    place-items: center;
    position: relative;
}

.status-log-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    pointer-events: none;
    display: block;
}

.status-log-btn:hover {
    background: rgb(204 49 0);
}

.status-log-btn:focus-visible {
    outline: 2px solid rgba(120, 170, 255, 0.9);
    outline-offset: 2px;
}

.status-text .st-installed,
.status-text .st-running,
.status-text .st-missing {
    font-weight: 400;
}

.status-endpoint {
    display: inline;
}

.status-endpoint img {
    width: 14px;
    height: 14px;
    vertical-align: -3px;
    margin-right: 3px;
}

.status-model-check {
    width: 13px;
    height: 13px;
    object-fit: contain;
    display: inline-block;
    margin-left: 4px;
    vertical-align: -2px;
}

.state-positive {
    color: var(--state-success);
}

.state-negative {
    color: var(--state-warning);
}

.state-delete-feedback,
.state-restart {
    color: var(--state-warning);
}

.state-model-mode {
    color: rgb(25 93 255);
}

/* 08 · 供应商与模型下拉列表 */

.dropdown {
    position: absolute;
    z-index: 50;
    height: var(--menu-height);
    padding: var(--menu-padding);
    border-radius: var(--menu-radius);
    background: var(--menu-bg);
    box-shadow: 0 0 0 .75px var(--outline);
    animation: menu-open .15s ease-out;
    transform-origin: top;
}

@keyframes menu-open {
    from {
        opacity: 0;
        transform: translateY(-4px) scaleY(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.menu-scroll {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1px 2px 1px 10px;
    margin: 0 -8px 0 -10px;
    scrollbar-gutter: stable;
}

@supports not selector(::-webkit-scrollbar) {
    .menu-scroll {
        /* Leave room even when Firefox uses an overlay scrollbar. */
        padding-right: 8px;
    }
}

.menu-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    font-size: 10px;
    height: 16px;
    margin: -2px 0 6px;
    white-space: nowrap;
	font-weight: 100;
}

.menu-section-title::before,
.menu-section-title::after {
    content: '';
    width: 52px;
    height: 0px;
    /* background: rgb(76 76 76); */
	/* border-bottom: .5px dashed rgb(76 76 76); */
	border-bottom: .5px solid rgb(76 76 76);
}

h2.menu-section-title::before,
h2.menu-section-title::after {
	border-bottom: .5px solid rgb(76 76 76);
}


.presets-title {
    margin-top: 6px;
}

.history-row,
.model-row {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    height: var(--row-height);
    margin-bottom: var(--row-gap);
    padding: 0 6px;
    border-radius: var(--row-radius);
    background: var(--row-bg);
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    text-align: left;
    position: relative;
}

.history-row:last-child,
.model-row:last-child {
    margin-bottom: 0;
}

.history-row:hover,
.history-row.is-selected,
.model-row:hover {
    background: var(--active-bg);
    color: var(--accent);
}

.history-row:focus-visible,
.model-row:focus-visible,
.preset-button:focus-visible,
.icon-button:focus-visible,
.mcp-back:focus-visible,
.mcp-refresh:focus-visible,
.mcp-tabs button:focus-visible,
.mcp-add:focus-visible,
.mcp-market-button:focus-visible,
.mcp-server:focus-visible,
.mcp-market-summary:focus-visible,
.mcp-server-toggle:focus-visible,
.mcp-server-install:focus-visible,
.mcp-form-actions button:focus-visible,
.mcp-json-resize:focus-visible,
.skills-markdown-resize:focus-visible,
.mcp-target:has(input:focus-visible),
.choice-menu button:focus-visible {
    outline: 1px solid var(--accent) !important;
    outline-offset: -1px;
}

.row-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.row-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.icon-button {
    background: none;
    width: 20px;
    height: 22px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.icon-button img {
    width: 13px;
    height: 13px;
    opacity: .55;
    pointer-events: none;
}

.icon-button:hover img {
    opacity: 1;
    filter: brightness(0) invert(1);
}

.row-actions .icon-button {
    visibility: hidden;
}

.history-row:hover .icon-button,
.history-row:focus-within .icon-button,
.model-row:hover .icon-button,
.model-row:focus-within .icon-button {
    visibility: visible;
}

.delete-record:hover img {
    filter: brightness(0) saturate(100%) invert(51%) sepia(83%) saturate(1732%) hue-rotate(326deg) brightness(105%);
}

.history-light {
    width: 12px;
    height: 22px;
    margin-left: 0px;
    margin-right: 3px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.history-light::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5b6170;
}

.history-row.is-editing {
    background: rgb(12 12 12);
    /* box-shadow: 0 0 0 .75px var(--outline); */
}

.history-row.is-editing .icon-button {
    visibility: visible;
}

.rename-input {
    flex: 1;
    width: 0;
    min-width: 0;
    height: 24px;
    color: #f2f3f5;
    background: transparent;
    font-size: 12px;
}

.history-row.is-dragging {
    opacity: .4;
}

.history-row.drop-before {
    box-shadow: 0 -2px var(--accent);
}

.provider-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, var(--preset-size)));
    gap: 8px var(--preset-gap);
    justify-content: center;
}

.preset-button {
    width: var(--preset-size);
    height: var(--preset-size);
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--outline);
    border-radius: 12px;
    cursor: pointer;
    display: grid;
    place-items: center;
    position: relative;
}

.preset-button:hover,
.preset-button:focus-visible {
    box-shadow: inset 0 0 0 1px rgb(20 126 255 / 50%);
    background: rgb(71 160 255 / 15%);
}

.preset-button img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;
}

.model-row.is-hidden {
    color: var(--muted);
}

.model-selection {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    margin: 0 2px 0 4px;
}

.model-row.is-hidden .model-selection {
    visibility: hidden;
}

.empty-history {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
    padding: 12px 0;
}

/* 09 · 用量统计 */

.statistics-popup {
    position: absolute;
    z-index: 90;
    padding: 5px 10px 10px;
    border-radius: 10px;
    background: rgb(0 5 33 / 94%);
    box-shadow: 0 0 0 0px var(--outline);
    color: var(--muted);
    overflow: auto;
    max-height: min(230px, 65vh);
}

.stat-identity {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 23px;
    font-size: 13px;
}

.stat-identity img {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.stat-identity span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.stat-lines {
    display: grid;
    gap: 4px;
    margin-top: 6px;
    width: max-content;
    min-width: 100%;
}

.stat-line {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    white-space: nowrap;
}

.stat-line img {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.stat-label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6px;
    width: 40px;
    flex: 0 0 40px;
}

html[lang="en"] .stat-label {
    width: 44px;
    flex: 0 0 44px;
}

.stat-label-text {
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
}

.stat-label-colon {
    text-align: right;
}

.stat-badge {
    padding: 2px 4px;
    border-radius: 6px;
    color: var(--accent);
    background: rgb(71 160 255 / 20%);
}

.stat-badge.success {
    color: rgb(0 210 106);
    background: rgb(0 210 106 / 15%);
}

.stat-badge.failure {
    color: rgb(255 87 34);
    background: rgb(255 87 34 / 20%);
}

.statistics-arrow {
    z-index: 90;
    background: rgb(0 5 33 / 94%);
}

/* 10 · 日志菜单与日志窗口 */

.log-window.is-open {
    display: flex;
}

.log-window-title img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex: 0 0 18px;
    display: none;
}

.log-window-close {
    left: 7px;
    top: 50%;
    transform: translateY(-50%);
}

.choice-menu {
    position: absolute;
    z-index: 85;
    /* width: 90px; */
    padding: 5px;
    border-radius: 12px;
    background: var(--menu-bg);
    box-shadow: 0 0 0 .75px var(--outline);
    display: grid;
    gap: 4px;
    animation: menu-open .15s ease-out;
}

.choice-menu button {
    background: rgb(59 59 59);
    color: #c8ced8;
    height: 26px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 11px;
	padding: 0 8px;
}

.choice-menu button:hover,
.choice-menu button:focus-visible {
    background: rgb(204 49 0);
    color: white;
}

.model-source-menu {
    /* width: 124px; */
    /* transform-origin: bottom right; */
	transform-origin: bottom center;
}

.model-source-menu button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 7px;
    white-space: nowrap;
}

.model-source-menu button img {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.model-source-menu button[aria-checked="true"] {
    background: var(--active-bg);
    color: var(--accent);
}

.model-source-menu button[aria-checked="true"]:is(:hover, :focus-visible) {
    background: rgb(204 49 0);
    color: white;
}

.mcp-market-menu {
    top: calc(100% + 6px);
    right: 0;
    width: 124px;
    transform-origin: top right;
}

.mcp-market-menu button {
    padding: 0 8px;
    text-align: left;
    white-space: nowrap;
}

.mcp-market-menu button[aria-selected="true"] {
    background: var(--active-bg);
    color: var(--accent);
}

.mcp-market-menu button[aria-selected="true"]:is(:hover, :focus-visible) {
    background: rgb(204 49 0);
    color: white;
}

.choice-menu button:disabled {
    opacity: .65;
    cursor: default;
}

.log-window {
    position: absolute;
    height: 316px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 80;
    width: calc(100% - 60px);
    left: 30px;
    bottom: 30px;
    transform: none;
    border-radius: 12px;
    box-shadow: 0 0 0 .75px var(--outline);
}

.log-window-titlebar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-bottom: 0px solid rgb(255 255 255 / 10%);
    user-select: none;
    background: #2b2b2b;
    padding: 10px 34px;
    min-height: 44px;
}

.log-window-title {
    display: flex;
    gap: 3px;
    min-width: 0;
    color: #f2f3f5;
    font-weight: 400;
    align-items: center;
    font-size: 15px;
}

.log-window-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    font-family: Consolas, "Cascadia Mono", "Microsoft YaHei UI", monospace;
    color: #c8ced8;
    padding: 10px;
    background: rgb(0 2 16);
    font-size: 11px;
    line-height: 1.85;
}

.runtime-section {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin-bottom: 12px;
}

.runtime-section:last-child {
    margin-bottom: 0;
}

.request-line,
.request-heading {
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
    margin-bottom: 0px;
}

.request-heading {
    color: #9aa2ae;
    margin-bottom: 4px;
}

.request-line:nth-of-type(even) {
    color: rgb(112 211 255);
}

.request-success {
    color: #00dd70;
}

.request-failure {
    color: #ff5722;
}

.log-demo-label {
    color: #7f8796;
    font-size: 10px;
    margin-bottom: 4px;
}

/* 11 · 悬停提示与箭头 */

.tooltip-layer {
    position: absolute;
    z-index: 110;
    pointer-events: none;
}

.client-tooltip-line {
    text-align: center;
}

.demo-tooltip {
    position: absolute;
    z-index: 110;
    pointer-events: none;
    border-radius: 8px;
    background: rgb(54 0 148 / 94%);
    color: white;
    padding: 5px 8px 6px;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre;
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.demo-tooltip.is-mcp-description {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 7px 10px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow: visible;
    text-align: justify;
    text-align-last: justify;
}

.popup-arrow {
    position: absolute;
    width: 10px;
    height: 5px;
    pointer-events: none;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.popup-arrow.points-up {
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.tooltip-arrow {
    z-index: 110;
    background: rgb(54 0 148 / 94%);
}

/* 12 · 连接线与流动光点 */

.cascade-fx object,
.cascade-fx img,
.cascade-fx svg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 920 / 127.384615;
}

.cascade-fx {
    height: 36px;
    width: 100%;
}

.flow-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.flow-track {
    stroke: var(--flow-line);
    stroke-width: .9px;
    fill: none;
    stroke-linecap: round;
}

.flow-branch {
    fill: var(--flow-idle);
}

.flow-branch.is-connected {
    fill: var(--flow-active);
}

/* 13 · 嵌入模式与响应式设置 */

html.launcher-embed,
html.launcher-embed body {
    margin: 0;
    padding: 0;
    background: transparent;
}

html.launcher-embed body {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    height: auto;
}

html.launcher-embed body > :not(#window) {
    display: none !important;
}

html.launcher-embed #window {
    flex-shrink: 0;
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .card.is-active .status-dot,
    .endpoint-light::after,
    .history-light.is-connected::after,
    .dropdown,
    .choice-menu,
    .mcp-refresh.is-refreshing img {
        animation: none;
    }

    #historyBtn img,
    .mcp-tabs::before,
    .client-selection-indicator,
    .mcp-server-toggle,
    .mcp-server-toggle::before {
        transition: none;
    }
}

@media (max-width: 640px) {
	body {
		width: 100%;
	}
	html[lang="en"]:root {
		--header-gap: 13px;
	}
	body>header {
		width: auto;
	}
    #window {
		/* Keep the 380px layout; scale the whole window to leave 10px on each side. */
		zoom: var(--window-scale, 1);
		padding: 0;
		margin: 0;
    }
}

