/* ==========================================================================
   那么多小工具 - 工具站样式（对齐小程序 H5 版首页视觉）
   ========================================================================== */

:root {
    --ms-bg: #f6f7fb;
    --ms-card: #ffffff;
    --ms-text: #1f2333;
    --ms-sub: #6b7280;
    --ms-muted: #9aa0b4;
    --ms-line: #eceef6;
    --ms-primary: #6a5ae0;
    --ms-primary-dark: #5546c9;
    --ms-radius: 16px;
    --ms-shadow: 0 6px 20px rgba(43, 28, 100, .06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding-top: 0 !important;
    background: var(--ms-bg);
    color: var(--ms-text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }

/* ---------- 顶部导航 ---------- */
.ms-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--ms-text);
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--ms-line);
    backdrop-filter: saturate(180%) blur(12px);
}

.ms-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
}

.ms-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ms-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.ms-logo-text {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.3px;
    white-space: nowrap;
}

.ms-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.ms-menu::-webkit-scrollbar { display: none; }

.ms-menu-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ms-sub);
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease;
}

.ms-menu-item:hover { background: #f3f2fb; color: var(--ms-text); }

.ms-menu-item.is-active {
    background: #efedff;
    color: var(--ms-primary);
    font-weight: 600;
}

.ms-search {
    position: relative;
    flex-shrink: 0;
    width: 220px;
}

.ms-search input {
    width: 100%;
    height: 38px;
    padding: 0 40px 0 14px;
    border: 1px solid var(--ms-line);
    border-radius: 999px;
    background: #f7f8fc;
    color: var(--ms-text);
    font-size: 13px;
    outline: none;
    transition: border-color .2s ease, background-color .2s ease;
}

.ms-search input:focus {
    background: #fff;
    border-color: #c9c2f5;
}

.ms-search button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ms-muted);
    font-size: 14px;
    cursor: pointer;
}

.ms-user { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }

.ms-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    background: #f3f2fb;
    color: var(--ms-primary);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .2s ease;
}

.ms-ai-btn:hover { background: #e9e6ff; }

.ms-ai-btn-icon { font-size: 15px; }

.ms-login-btn,
.ms-user-link {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6a5ae0, #8a63e8);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 18px -10px rgba(106, 90, 224, .9);
}

.ms-login-btn:hover,
.ms-user-link:hover { filter: brightness(1.05); }

/* ---------- 页面容器 ---------- */
.ms-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 20px 56px;
}

.ms-section { margin-top: 40px; }
.ms-section:first-child { margin-top: 0; }

.ms-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    row-gap: 10px;
    margin-bottom: 16px;
}

.ms-head-main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.ms-section-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.2px;
}

.ms-section-more {
    font-size: 13px;
    color: var(--ms-primary);
}

.ms-section-more:hover { color: var(--ms-primary-dark); }

/* ---------- 首屏 ---------- */
.ms-hero {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    box-shadow: 0 14px 34px -20px rgba(102, 126, 234, .55);
}

.ms-hero::after {
    content: "";
    position: absolute;
    right: -100px;
    top: -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .2), transparent 65%);
    pointer-events: none;
}

.ms-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.ms-hero-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -.3px;
}

.ms-hero-sub {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .85);
}

.ms-hero-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    margin: 12px auto 0;
}

.ms-hero-engine {
    flex-shrink: 0;
    height: 36px;
    padding: 0 30px 0 14px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 999px;
    background-color: rgba(255, 255, 255, .95);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236a5ae0'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    color: var(--ms-text);
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.ms-hero-search input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 12px;
    outline: none;
    transition: background-color .2s ease, border-color .2s ease;
}

.ms-hero-search input::placeholder { color: rgba(255, 255, 255, .72); }

.ms-hero-search input:focus {
    background: rgba(255, 255, 255, .26);
    border-color: rgba(255, 255, 255, .6);
}

.ms-hero-search button {
    flex-shrink: 0;
    height: 36px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--ms-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease;
}

.ms-hero-search button:hover { transform: translateY(-1px); }

.ms-stats {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.ms-stat {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
}

.ms-stat-num {
    display: block;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.ms-stat-label {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    color: rgba(255, 255, 255, .8);
}

/* ---------- 快速导航 ---------- */
.ms-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.ms-nav-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border-radius: var(--ms-radius);
    background: var(--ms-card);
    box-shadow: var(--ms-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.ms-nav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(43, 28, 100, .12);
}

.ms-nav-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 20px;
    color: #fff;
}

.ms-nav-info { min-width: 0; flex: 1; }

.ms-nav-title {
    display: block;
    font-size: 16px;
    font-weight: 700;
}

.ms-nav-desc {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--ms-sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-nav-count {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--ms-muted);
}

.ms-nav-arrow {
    flex-shrink: 0;
    color: var(--ms-muted);
    font-size: 16px;
}

/* ---------- 卡片网格 ---------- */
.ms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.ms-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border-radius: var(--ms-radius);
    background: var(--ms-card);
    box-shadow: 0 4px 16px rgba(43, 28, 100, .05);
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: pointer;
}

.ms-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(43, 28, 100, .1);
}

.ms-card-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 20px;
    color: #fff;
}

.ms-card-body { min-width: 0; flex: 1; }

.ms-card-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.ms-card-desc {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.6;
    color: var(--ms-sub);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ms-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.ms-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f2f3f9;
    color: var(--ms-sub);
    font-size: 11px;
    line-height: 1.6;
}

.ms-tag.is-hot { background: #fff3dc; color: #b7791f; }
.ms-tag.is-new { background: #e6f8f1; color: #12866b; }
.ms-tag.is-rec { background: #efeaff; color: #6a5ae0; }

.ms-fav {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: #f7f8fc;
    color: #c3c8d8;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}

.ms-fav:hover { background: #eef0f8; }

.ms-fav.is-on { color: #e0558a; background: #ffedf3; }

/* ---------- 筛选工具条 ---------- */
.ms-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.ms-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ms-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--ms-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ms-sub);
    font-size: 13px;
    cursor: pointer;
    transition: all .2s ease;
}

.ms-chip:hover { border-color: #c9c2f5; color: var(--ms-primary); }

.ms-chip.is-active {
    background: var(--ms-primary);
    border-color: var(--ms-primary);
    color: #fff;
    font-weight: 600;
}

.ms-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.ms-select {
    height: 36px;
    padding: 0 30px 0 12px;
    border: 1px solid var(--ms-line);
    border-radius: 10px;
    background: #fff;
    color: var(--ms-text);
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.ms-inline-search {
    position: relative;
    width: 220px;
}

.ms-inline-search input {
    width: 100%;
    height: 36px;
    padding: 0 36px 0 12px;
    border: 1px solid var(--ms-line);
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    outline: none;
}

.ms-inline-search input:focus { border-color: #c9c2f5; }

.ms-inline-search span {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ms-muted);
    font-size: 13px;
}

.ms-count {
    font-size: 13px;
    color: var(--ms-muted);
    white-space: nowrap;
}

.ms-wish-fab {
    position: fixed;
    right: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 120;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d5efc, #9c6bff);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(109, 94, 252, .35);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.ms-wish-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(109, 94, 252, .45);
}

.ms-wish-fab:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .ms-wish-fab {
        right: 14px;
        bottom: calc(18px + env(safe-area-inset-bottom));
        padding: 10px 15px;
        font-size: 13px;
    }
}

.ms-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--ms-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ms-sub);
    font-size: 13px;
    cursor: pointer;
}

.ms-switch.is-on {
    background: #ffedf3;
    border-color: #ffd3e2;
    color: #d64b7f;
}

/* ---------- 空状态 ---------- */
.ms-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--ms-muted);
}

.ms-empty-icon { display: block; font-size: 42px; margin-bottom: 12px; }
.ms-empty-title { display: block; font-size: 16px; font-weight: 600; color: var(--ms-sub); }
.ms-empty-desc { display: block; margin-top: 6px; font-size: 13px; }

/* ---------- 网址导航卡片 ---------- */
.ms-site-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f2f3f9;
    overflow: hidden;
    font-size: 18px;
    font-weight: 700;
    color: var(--ms-primary);
}

.ms-site-icon img { width: 24px; height: 24px; object-fit: contain; }

/* ---------- 个人收藏 ---------- */
.ms-site-cell {
    position: relative;
    display: flex;
}

.ms-site-cell .ms-site-item {
    flex: 1;
    min-width: 0;
}

.ms-site-cell .ms-card-body {
    padding-right: 22px;
}

.ms-site-edit {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--ms-line);
    border-radius: 8px;
    background: #fff;
    color: var(--ms-sub);
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(43, 28, 100, .08);
    transition: all .18s ease;
}

.ms-site-edit:hover {
    color: var(--ms-primary);
    border-color: var(--ms-primary);
}

.ms-chip-count {
    display: inline-block;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(106, 90, 224, .12);
    color: var(--ms-primary);
    font-style: normal;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.ms-chip.is-active .ms-chip-count {
    background: rgba(255, 255, 255, .28);
    color: #fff;
}

.ms-toolbar .ms-btn {
    text-decoration: none;
    white-space: nowrap;
}

#navChips { margin-bottom: 18px; }

/* ---------- 素材卡片 ---------- */
.ms-material {
    display: block;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.ms-material .ms-thumb {
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.ms-thumb-format {
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
}

.ms-material .ms-card-body {
    display: block;
    padding: 16px 18px 18px;
}

.ms-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--ms-muted);
}

.ms-material .ms-fav { top: 12px; }

/* ---------- AI 栏目 ---------- */
.ms-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.ms-tab {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: var(--ms-radius);
    background: var(--ms-card);
    border: 1px solid transparent;
    box-shadow: var(--ms-shadow);
    cursor: pointer;
    transition: all .2s ease;
}

.ms-tab:hover { transform: translateY(-3px); }

.ms-tab.is-active {
    border-color: var(--ms-primary);
    box-shadow: 0 12px 26px -12px rgba(106, 90, 224, .55);
}

.ms-tab-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 20px;
    color: #fff;
}

.ms-tab-title { display: block; font-size: 15px; font-weight: 700; }
.ms-tab-desc { display: block; margin-top: 3px; font-size: 12px; color: var(--ms-sub); }

.ms-panel { display: none; }
.ms-panel.is-active { display: block; }

.ms-prompt-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.ms-prompt-content {
    padding: 12px 14px;
    border-radius: 10px;
    background: #f7f8fc;
    color: var(--ms-sub);
    font-size: 12px;
    line-height: 1.7;
    word-break: break-all;
}

.ms-prompt-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ms-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #6a5ae0, #8a63e8);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ms-btn:hover { filter: brightness(1.05); }

.ms-btn-ghost {
    background: #f2f3f9;
    color: var(--ms-sub);
}

.ms-rating { color: #d69e2e; font-size: 12px; }

.ms-workflow .ms-banner {
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .5px;
}

/* ---------- 页脚 ---------- */
.ms-footer {
    border-top: 1px solid var(--ms-line);
    background: #fff;
}

.ms-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 20px;
    color: var(--ms-muted);
    font-size: 12px;
}

.ms-footer-beian {
    color: inherit;
    text-decoration: none;
}

.ms-footer-beian:hover {
    color: var(--ms-primary);
}

/* ---------- 提示与弹窗 ---------- */
.ms-toast {
    position: fixed;
    left: 50%;
    bottom: 60px;
    z-index: 300;
    transform: translateX(-50%) translateY(10px);
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(31, 35, 51, .9);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.ms-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

.ms-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 22, 34, .45);
}

.ms-modal[hidden] { display: none; }

.ms-modal-box {
    width: 100%;
    max-width: 380px;
    padding: 26px 24px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .35);
    text-align: center;
}

.ms-modal-icon { display: block; font-size: 34px; }
.ms-modal-title { display: block; margin-top: 12px; font-size: 17px; font-weight: 700; }
.ms-modal-text { display: block; margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--ms-sub); }
.ms-modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.ms-modal-actions .ms-btn { flex: 1; justify-content: center; }

/* 收藏对话框 */
.ms-dialog {
    max-width: 440px;
    padding: 0;
    text-align: left;
    overflow: hidden;
}

.ms-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 0;
}

.ms-dialog-title { font-size: 17px; font-weight: 700; }

.ms-dialog-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #f2f3f9;
    color: var(--ms-sub);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.ms-dialog-close:hover { background: #e8e9f2; color: var(--ms-text); }

.ms-dialog form { padding: 16px 20px 20px; }

.ms-dialog-msg { margin: 0 0 10px; font-size: 13px; color: #dc2626; }
.ms-dialog-msg[hidden] { display: none; }

.ms-dialog-actions { align-items: center; }
.ms-dialog-actions .ms-btn { flex: 1; justify-content: center; }
.ms-dialog-delete { margin-left: auto; color: #dc2626; }
.ms-dialog-delete[hidden] { display: none; }
.ms-dialog-publish { margin-left: 10px; }
.ms-dialog-publish[hidden] { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
    .ms-nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ms-search { width: 170px; }
    .ms-logo-text { display: none; }
    .ms-hero { padding: 18px 18px; }
    .ms-hero-title { font-size: 19px; }
}

@media (max-width: 768px) {
    .ms-header-inner { gap: 12px; height: 58px; }
    .ms-header-inner .ms-search { display: none; }
    .ms-menu-item { padding: 7px 10px; font-size: 13px; }
    .ms-menu-item .ms-menu-icon { display: none; }
    .ms-ai-btn { padding: 0 9px; }
    .ms-ai-btn-text { display: none; }
    .ms-main { padding: 16px 14px 40px; }
    .ms-hero { padding: 16px 14px; border-radius: 14px; }
    .ms-hero-title { font-size: 17px; }
    .ms-hero-sub { font-size: 11px; margin-top: 3px; }
    .ms-hero-search { margin-top: 10px; gap: 6px; }
    .ms-hero-engine,
    .ms-hero-search input,
    .ms-hero-search button { height: 34px; }
    .ms-hero-engine { padding: 0 26px 0 10px; background-position: right 9px center; }
    .ms-hero-search input { padding: 0 12px; }
    .ms-hero-search button { padding: 0 14px; }
    .ms-stats { gap: 6px; margin-top: 10px; }
    .ms-stat { padding: 5px 4px; border-radius: 9px; }
    .ms-stat-num { font-size: 15px; }
    .ms-stat-label { font-size: 10px; }
    .ms-nav-grid { grid-template-columns: 1fr; gap: 10px; }
    .ms-grid { grid-template-columns: 1fr; }
    .ms-tabs { grid-template-columns: 1fr; gap: 10px; }
    .ms-filter { gap: 8px; }
    .ms-toolbar { margin-left: 0; width: 100%; }
    .ms-toolbar .ms-inline-search { width: auto; flex: 1 1 auto; min-width: 0; }
    .ms-inline-search { width: 100%; }
    #navChips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    #navChips::-webkit-scrollbar { display: none; }
    #navChips .ms-chip { flex-shrink: 0; }
    .ms-section-title { font-size: 18px; }
}

/* ---------- 工具页通用 ---------- */
.ms-tool { max-width: 900px; margin: 0 auto; }
.ms-tool-head { margin-bottom: 18px; }
.ms-back { display: inline-block; margin-bottom: 10px; color: var(--ms-muted); font-size: 13px; }
.ms-back:hover { color: var(--ms-primary); }
.ms-tool-title { margin: 0 0 6px; font-size: 24px; font-weight: 800; }
.ms-tool-desc { margin: 0; color: var(--ms-sub); font-size: 13px; line-height: 1.6; }

.ms-form-card { padding: 20px; margin-bottom: 16px; }
.ms-field { display: block; margin-bottom: 14px; text-align: left; }
.ms-field-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ms-sub); }
.ms-input,
.ms-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ms-line);
    border-radius: 10px;
    background: #fafbff;
    color: var(--ms-text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ms-input:focus,
.ms-textarea:focus { border-color: var(--ms-primary); box-shadow: 0 0 0 3px rgba(106, 90, 224, .12); }
.ms-textarea { resize: vertical; line-height: 1.65; min-height: 90px; }
.ms-textarea-code { font-family: Consolas, Monaco, monospace; font-size: 12px; background: #f7f7fc; }
.ms-counter { display: block; margin-top: 4px; text-align: right; font-size: 12px; color: var(--ms-muted); }
.ms-btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ms-link-btn { border: 0; background: none; color: var(--ms-primary); font-size: 13px; cursor: pointer; padding: 0; }

.ms-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; background: #eeeff7; }
.ms-seg-item { border: 0; padding: 7px 16px; border-radius: 999px; background: transparent; color: var(--ms-sub); font-size: 13px; cursor: pointer; }
.ms-seg-item.is-active { background: #fff; color: var(--ms-primary); font-weight: 700; box-shadow: 0 2px 8px rgba(43, 28, 100, .1); }

/* ---------- AI 配置 ---------- */
.ms-tool.ms-tool-wide { max-width: 1120px; }

.ms-ai-headbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.ms-ai-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: #eeeff7; }
.ms-ai-tab {
    border: 0;
    padding: 8px 18px;
    border-radius: 9px;
    background: transparent;
    color: var(--ms-sub);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.ms-ai-tab.is-active { background: #fff; color: var(--ms-primary); box-shadow: 0 2px 8px rgba(43, 28, 100, .1); }
.ms-ai-headbar-right { display: flex; align-items: center; gap: 10px; }
.ms-save-hint { color: var(--ms-muted); font-size: 12px; }

.ms-ai-panel[hidden] { display: none; }

.ms-provider-layout {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.ms-provider-aside {
    padding: 14px 12px;
    border-radius: var(--ms-radius);
    background: #fff;
    box-shadow: var(--ms-shadow);
}
.ms-provider-aside-title { padding: 0 6px 8px; color: var(--ms-muted); font-size: 12px; letter-spacing: .5px; }
.ms-provider-list { display: flex; flex-direction: column; gap: 4px; }
.ms-provider-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease;
}
.ms-provider-item:hover { background: #f5f4fd; }
.ms-provider-item.is-selected {
    background: var(--ms-primary);
    color: #fff;
    box-shadow: inset 3px 0 0 #fff;
}
.ms-provider-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 15px;
}
.ms-provider-info { flex: 1; min-width: 0; }
.ms-provider-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ms-provider-state { display: flex; align-items: center; gap: 4px; margin-top: 2px; color: var(--ms-muted); font-size: 11px; }
.ms-provider-state i { width: 5px; height: 5px; border-radius: 50%; background: #c8cbd9; }
.ms-provider-state.is-running { color: #12866b; }
.ms-provider-state.is-running i { background: #22c55e; }
.ms-provider-item:not(.is-selected) .ms-provider-state:not(.is-empty):not(.is-running) i { background: var(--ms-primary); }
.ms-provider-item.is-selected .ms-provider-state { color: rgba(255, 255, 255, .82); }
.ms-provider-item.is-selected .ms-provider-state i { background: #fff; }
.ms-provider-arrow { margin-left: auto; color: var(--ms-muted); font-size: 14px; }
.ms-provider-item.is-selected .ms-provider-arrow { color: #fff; }
.ms-provider-add {
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    border: 1px dashed #d7daea;
    border-radius: 9px;
    background: transparent;
    color: var(--ms-sub);
    font-size: 12px;
    cursor: pointer;
}
.ms-provider-add:hover { border-color: var(--ms-primary); color: var(--ms-primary); }
.ms-provider-foot { margin: 10px 4px 0; color: var(--ms-muted); font-size: 11px; line-height: 1.6; }

.ms-detail {
    padding: 20px;
    border-radius: var(--ms-radius);
    background: #fff;
    box-shadow: var(--ms-shadow);
}
.ms-detail[hidden] { display: none; }
.ms-detail-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ms-line);
}
.ms-detail-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #f1efff;
    font-size: 26px;
}
.ms-detail-logo.is-fire { background: rgba(255, 87, 34, .14); }
.ms-detail-title-wrap { flex: 1; min-width: 0; }
.ms-detail-title { margin: 0; font-size: 19px; font-weight: 700; }
.ms-detail-sub { margin: 4px 0 0; color: var(--ms-sub); font-size: 12px; }
.ms-detail-active { margin: 3px 0 0; color: var(--ms-muted); font-size: 12px; word-break: break-all; }
.ms-detail-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ms-enable-label { color: var(--ms-muted); font-size: 12px; }

.ms-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.ms-switch input { position: absolute; width: 0; height: 0; opacity: 0; }
.ms-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d7daea;
    transition: background-color .2s ease;
    cursor: pointer;
}
.ms-switch span::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    transition: transform .2s ease;
}
.ms-switch input:checked + span { background: var(--ms-primary); }
.ms-switch input:checked + span::after { transform: translateX(20px); }

.ms-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: #f2f3f9;
    color: var(--ms-sub);
    font-size: 14px;
    cursor: pointer;
}
.ms-icon-btn:hover { background: #e9e6ff; color: var(--ms-primary); }
.ms-icon-btn:disabled { opacity: .4; cursor: not-allowed; }

.ms-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 18px;
}

.ms-section-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 18px 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ms-text);
}
.ms-section-head:first-child { margin-top: 0; }
.ms-section-head.is-sub { margin-top: 20px; font-size: 13px; color: var(--ms-sub); }
.ms-section-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ms-section-head-row .ms-section-head { margin: 0; }
.ms-section-icon { font-size: 15px; }
.ms-section-desc { margin: 0 0 10px; color: var(--ms-muted); font-size: 12px; line-height: 1.6; }

.ms-points-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: #fff8f5;
    border-left: 3px solid #ff5722;
}
.ms-points-main { min-width: 0; }
.ms-points-label { color: #a0522d; font-size: 12px; }
.ms-points-value { margin-top: 2px; font-size: 28px; font-weight: 700; color: #ff5722; line-height: 1.2; }
.ms-points-desc { margin: 6px 0 0; color: var(--ms-sub); font-size: 12px; line-height: 1.6; }
.ms-points-key { margin: 6px 0 0; color: var(--ms-muted); font-size: 12px; }
.ms-points-key code { padding: 1px 6px; border-radius: 6px; background: #fff; font-size: 11px; word-break: break-all; }

.ms-task-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.ms-task-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--ms-line);
    border-radius: 10px;
    background: #fafbff;
    transition: border-color .15s ease, background-color .15s ease;
}
.ms-task-card:hover { border-color: #d9d3ff; background: #f7f5ff; }
.ms-task-icon { font-size: 18px; }
.ms-task-body { flex: 1; min-width: 0; }
.ms-task-body strong { display: block; font-size: 13px; }
.ms-task-body em { display: block; margin-top: 2px; color: var(--ms-muted); font-size: 11px; font-style: normal; }
.ms-task-badge { padding: 3px 9px; border-radius: 999px; background: #efeaff; color: var(--ms-primary); font-size: 11px; font-weight: 600; }

.ms-model-list { display: flex; flex-direction: column; gap: 8px; }
.ms-model-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--ms-line);
    border-radius: 12px;
    background: #fafbff;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.ms-model-tile:hover { border-color: #d9d3ff; }
.ms-model-tile.is-active { border-color: var(--ms-primary); background: #f3f1ff; box-shadow: 0 0 0 3px rgba(106, 90, 224, .08); }
.ms-model-icon { font-size: 17px; }
.ms-model-body { flex: 1; min-width: 0; }
.ms-model-body strong { display: block; font-size: 13px; word-break: break-all; }
.ms-model-body em { display: block; margin-top: 2px; color: var(--ms-muted); font-size: 11px; font-style: normal; word-break: break-all; }
.ms-model-action { flex-shrink: 0; color: var(--ms-primary); font-size: 11px; font-weight: 600; }
.ms-model-tile.is-active .ms-model-action { color: #12866b; }
.ms-model-del {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ms-muted);
    font-size: 12px;
    cursor: pointer;
}
.ms-model-del:hover { background: #ffe9e9; color: #d9534f; }
.ms-model-empty {
    padding: 18px 12px;
    border: 1px dashed #dcdfec;
    border-radius: 12px;
    color: var(--ms-muted);
    font-size: 12px;
    text-align: center;
    line-height: 1.9;
}

.ms-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.ms-result {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
}
.ms-result.is-ok { background: #e6f8f1; color: #12866b; }
.ms-result.is-error { background: #fff1f1; color: #d9534f; }
.ms-result-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #12866b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.ms-result.is-error .ms-result-icon { background: #d9534f; }
.ms-result-body { min-width: 0; }
.ms-result-body strong { display: block; }
.ms-result-body p { margin: 4px 0 0; word-break: break-word; }

.ms-log-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid var(--ms-line);
    border-radius: 12px;
    background: #fafbff;
    text-align: left;
    cursor: pointer;
}
.ms-log-entry:hover { border-color: #d9d3ff; background: #f7f5ff; }
.ms-log-entry-icon { font-size: 20px; }
.ms-log-entry-body { flex: 1; min-width: 0; }
.ms-log-entry-body strong { display: block; font-size: 13px; }
.ms-log-entry-body em { display: block; margin-top: 2px; color: var(--ms-muted); font-size: 11px; font-style: normal; }
.ms-log-entry-open { color: var(--ms-primary); font-size: 12px; font-weight: 600; }

.ms-login-guide { padding: 36px 20px; text-align: center; }
.ms-login-guide-icon { font-size: 44px; }
.ms-login-guide h3 { margin: 10px 0 6px; font-size: 17px; }
.ms-login-guide p { margin: 0 0 16px; color: var(--ms-sub); font-size: 13px; }

.ms-input-wrap { display: flex; align-items: center; gap: 6px; }
.ms-input-wrap .ms-input { flex: 1; min-width: 0; }
.ms-input-btn {
    flex-shrink: 0;
    width: 34px;
    height: 38px;
    border: 1px solid var(--ms-line);
    border-radius: 9px;
    background: #fafbff;
    font-size: 14px;
    cursor: pointer;
}
.ms-input-btn:hover { background: #f2f3f9; }

.ms-slider-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ms-slider-row .ms-field-label { margin: 0; white-space: nowrap; }
.ms-slider-row input[type="range"] { flex: 1; accent-color: var(--ms-primary); }
.ms-slider-value { width: 48px; text-align: right; font-size: 13px; font-weight: 600; color: var(--ms-primary); }

.ms-config-inline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ms-config-note { margin: 10px 0 0; color: var(--ms-muted); font-size: 12px; line-height: 1.6; }
.ms-input-search { margin-bottom: 10px; }

.ms-call-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ms-call-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--ms-line);
    border-radius: 12px;
    background: #fafbff;
    text-align: left;
    cursor: pointer;
}
.ms-call-option.is-active { border-color: var(--ms-primary); background: #f3f1ff; box-shadow: 0 0 0 3px rgba(106, 90, 224, .08); }
.ms-call-icon { font-size: 20px; }
.ms-call-body { min-width: 0; }
.ms-call-body strong { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.ms-call-body em { display: block; margin-top: 5px; color: var(--ms-sub); font-size: 12px; font-style: normal; line-height: 1.6; }
.ms-chip-badge { padding: 2px 8px; border-radius: 999px; background: var(--ms-primary); color: #fff; font-size: 10px; font-weight: 600; }

.ms-summary { display: grid; gap: 8px; }
.ms-summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 12px;
    border-radius: 9px;
    background: #fafbff;
    font-size: 13px;
}
.ms-summary-row span { flex-shrink: 0; color: var(--ms-muted); }
.ms-summary-row strong { font-weight: 600; text-align: right; word-break: break-all; }

.ms-ai-modal { position: fixed; inset: 0; z-index: 260; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ms-ai-modal[hidden] { display: none; }
.ms-ai-modal-mask { position: absolute; inset: 0; background: rgba(20, 22, 34, .45); }
.ms-ai-modal-box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 620px;
    max-height: 82vh;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .35);
    overflow: hidden;
}
.ms-ai-modal-box.is-small { max-width: 400px; }
.ms-ai-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--ms-line);
}
.ms-ai-modal-head h3 { margin: 0; font-size: 16px; }
.ms-ai-modal-head-actions { display: flex; align-items: center; gap: 8px; }
.ms-ai-modal-body { padding: 16px 18px; overflow: auto; }
.ms-ai-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.ms-log-summary { margin-bottom: 10px; color: var(--ms-muted); font-size: 12px; }
.ms-log-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fafbff;
    margin-bottom: 8px;
}
.ms-log-main { min-width: 0; }
.ms-log-main strong { display: block; font-size: 13px; word-break: break-all; }
.ms-log-main span { display: block; margin-top: 2px; color: var(--ms-muted); font-size: 11px; }
.ms-log-meta { flex-shrink: 0; text-align: right; font-size: 12px; color: var(--ms-sub); }
.ms-log-meta span { display: block; }
.ms-log-points { color: #12866b; font-weight: 600; }
.ms-log-fail { color: #d9534f; font-weight: 600; }
.ms-log-empty { padding: 26px 12px; text-align: center; color: var(--ms-muted); font-size: 12px; }
.ms-media-preview {
    display: block;
    width: 100%;
    max-width: 320px;
    margin-top: 10px;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 10px;
}
.ms-audio-player { display: block; width: 100%; margin-top: 10px; }
#detailHost select.ms-input { height: 38px; padding: 0 10px; background: #fff; }

@media (max-width: 860px) {
    .ms-provider-layout { grid-template-columns: 1fr; }
    .ms-provider-aside { padding: 10px 10px 12px; }
    .ms-provider-list { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 2px; }
    .ms-provider-item { flex: 0 0 auto; width: auto; padding: 7px 10px; border: 1px solid var(--ms-line); border-radius: 999px; }
    .ms-provider-item.is-selected { box-shadow: none; }
    .ms-provider-arrow { display: none; }
    .ms-provider-foot { display: none; }
    .ms-detail { padding: 16px 14px; }
    .ms-detail-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 720px) {
    .ms-call-options { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ms-config-inline { grid-template-columns: 1fr; }
    .ms-ai-headbar { align-items: flex-start; }
    .ms-ai-headbar-right { width: 100%; justify-content: space-between; }
    .ms-detail-head { flex-wrap: wrap; }
    .ms-detail-actions { width: 100%; justify-content: flex-end; }
}

.ms-result-card { padding: 18px 20px; text-align: left; }
.ms-result-title { font-size: 15px; font-weight: 700; }
.ms-result-tip { margin: 8px 0; color: var(--ms-sub); font-size: 13px; line-height: 1.6; }
.ms-result-meta { margin-bottom: 8px; color: var(--ms-muted); font-size: 12px; }
.ms-result-text { padding: 14px; border-radius: 10px; background: #f7f7fc; font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

/* ---------- 随机点名 ---------- */
.ms-task-list { display: grid; gap: 10px; }
.ms-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--ms-shadow);
}
.ms-task-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ms-task-title { font-size: 15px; font-weight: 700; }
.ms-task-desc { font-size: 12px; color: var(--ms-sub); }
.ms-task-time { font-size: 11px; color: var(--ms-muted); }
.ms-task-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ms-task-btn {
    border: 1px solid var(--ms-line);
    background: #fff;
    color: var(--ms-sub);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}
.ms-task-btn.is-primary { border-color: transparent; background: var(--ms-primary); color: #fff; }
.ms-task-btn.is-danger { border-color: #ffe1e1; background: #fff5f5; color: #d9534f; }

.ms-modal-wide { max-width: 560px; text-align: left; }
.ms-modal-wide .ms-modal-title { text-align: left; }
.ms-item-editor { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 16px; }
.ms-item-row { display: flex; align-items: center; gap: 8px; }
.ms-input-weight { width: 76px; flex-shrink: 0; }
.ms-batch { border-top: 1px dashed var(--ms-line); padding-top: 12px; }
.ms-batch .ms-btn { margin-top: 8px; }

.ms-picker-screen { position: fixed; inset: 0; z-index: 250; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(150deg, #4c3fb3, #7b4fc4 55%, #9b5bd0); }
.ms-picker-screen[hidden] { display: none; }
.ms-picker-inner { width: 100%; max-width: 620px; max-height: 90vh; overflow: auto; padding: 24px; border-radius: 22px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(8px); color: #fff; text-align: center; }
.ms-picker-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.ms-picker-name { font-size: 17px; font-weight: 700; }
.ms-picker-exit { border: 0; background: rgba(255, 255, 255, .18); color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
.ms-count { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .14); font-size: 14px; }
.ms-count-ctrl { display: flex; align-items: center; gap: 14px; }
.ms-count-ctrl button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .25); color: #fff; font-size: 16px; cursor: pointer; }
.ms-participants { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0; max-height: 180px; overflow: auto; }
.ms-party-chip { padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 13px; }
.ms-party-chip.is-high { background: rgba(255, 214, 102, .3); border: 1px solid rgba(255, 214, 102, .6); }
.ms-picker-start { width: 100%; border: 0; padding: 14px; border-radius: 12px; background: #fff; color: var(--ms-primary); font-size: 16px; font-weight: 800; cursor: pointer; }
.ms-jumping-name { margin: 20px 0 8px; font-size: 48px; font-weight: 800; letter-spacing: 2px; min-height: 66px; }
.ms-picker-progress { color: rgba(255, 255, 255, .75); font-size: 13px; }
.ms-picker-results { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.ms-picked-chip { padding: 8px 18px; border-radius: 999px; background: #fff; color: var(--ms-primary); font-weight: 700; }
.ms-picker-actions { display: flex; gap: 12px; margin-top: 22px; }
.ms-picker-actions .ms-btn { flex: 1; justify-content: center; padding: 12px; }
.ms-picker-actions .ms-btn-ghost { background: rgba(255, 255, 255, .18); color: #fff; }

.ms-history-card { margin-top: 20px; padding: 18px; }
.ms-history-item { padding: 10px 0; border-bottom: 1px dashed var(--ms-line); text-align: left; }
.ms-history-item:last-child { border-bottom: 0; }
.ms-history-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.ms-history-head em { font-style: normal; color: var(--ms-muted); font-weight: 400; font-size: 12px; }
.ms-history-body { margin-top: 4px; color: var(--ms-sub); font-size: 13px; }

/* ---------- 货币转换 ---------- */
.ms-currency-card { padding: 16px 18px; }
.ms-currency-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ms-currency-update { color: var(--ms-muted); font-size: 12px; }
.ms-currency-tools { display: flex; gap: 14px; flex-shrink: 0; }
.ms-currency-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.ms-currency-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "flag info"
        "value value"
        "rate rate";
    align-items: center;
    gap: 6px 8px;
    padding: 12px;
    border: 1px solid var(--ms-line);
    border-radius: 12px;
    background: #fbfbfe;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.ms-currency-row:hover {
    border-color: #c9c2f5;
    background: #fff;
    box-shadow: 0 10px 20px -14px rgba(106, 90, 224, .8);
}
.ms-currency-row.is-base { border-color: var(--ms-primary); background: #f5f4ff; cursor: default; }
.ms-currency-row.is-base:hover { box-shadow: none; }
.ms-currency-flag { grid-area: flag; font-size: 20px; line-height: 1; }
.ms-currency-info { grid-area: info; display: flex; flex-direction: row; align-items: baseline; gap: 6px; min-width: 0; text-align: left; }
.ms-currency-code { font-size: 14px; font-weight: 700; }
.ms-currency-name { font-size: 11px; color: var(--ms-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-currency-value { grid-area: value; display: flex; align-items: center; gap: 4px; justify-content: flex-start; margin-top: 2px; min-width: 0; }
.ms-currency-symbol { color: var(--ms-muted); font-size: 12px; }
.ms-currency-amount { font-size: 19px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-currency-input { flex: 1; width: auto; min-width: 0; padding: 6px 8px; border: 1px solid var(--ms-primary); border-radius: 8px; background: #fff; font-size: 15px; font-weight: 700; text-align: right; outline: none; }
.ms-currency-rate { grid-area: rate; margin-top: 0; color: var(--ms-muted); font-size: 11px; text-align: left; }

.ms-check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 320px; overflow: auto; margin: 14px 0; text-align: left; }
.ms-check-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; background: #f7f8fd; font-size: 13px; cursor: pointer; }
.ms-check-inline { display: inline-flex; width: auto; background: transparent; padding: 0; margin-bottom: 14px; }

/* ---------- 小红书文案 ---------- */
.ms-style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ms-style-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border: 1px solid var(--ms-line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; }
.ms-style-item.is-active { border-color: var(--ms-primary); background: #f5f4ff; box-shadow: 0 0 0 2px rgba(106, 90, 224, .1); }
.ms-style-icon { font-size: 18px; }
.ms-style-label { font-size: 13px; font-weight: 700; }
.ms-style-desc { font-size: 11px; color: var(--ms-muted); line-height: 1.4; }
.ms-ai-output { padding: 14px; border-radius: 10px; background: #f7f7fc; font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; text-align: left; }

/* ---------- 密码纸条 ---------- */
.ms-kn-panel { display: block; padding: 18px; }
.ms-kn-panel[hidden] { display: none; }
.ms-kn-submit { width: 100%; justify-content: center; }
.ms-kn-msg { margin: 0 0 10px; color: #dc2626; font-size: 13px; }
.ms-kn-msg[hidden] { display: none; }
.ms-kn-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f2ff, #eef4ff);
    text-align: left;
}
.ms-kn-result[hidden] { display: none; }
.ms-kn-result-label { display: block; font-size: 13px; font-weight: 700; color: var(--ms-primary); }
.ms-kn-result-content { margin: 8px 0; font-size: 15px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.ms-kn-result-meta { color: var(--ms-muted); font-size: 12px; }
.ms-kn-toolbar { margin-bottom: 14px; }
.ms-kn-list { display: flex; flex-direction: column; gap: 12px; }
.ms-kn-card { display: flex; align-items: center; gap: 12px; padding: 16px; }
.ms-kn-card-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; text-align: left; }
.ms-kn-card-title { font-size: 15px; font-weight: 700; }
.ms-kn-card-desc { font-size: 12px; color: var(--ms-sub); }
.ms-kn-card-meta { font-size: 11px; color: var(--ms-muted); }
.ms-kn-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ms-kn-login { margin-top: 14px; justify-content: center; }
.ms-kn-dialog { max-width: 560px; }
.ms-kn-notes { display: flex; flex-direction: column; gap: 10px; max-height: 40vh; overflow: auto; padding-right: 2px; }
.ms-kn-note { padding: 10px; border: 1px solid var(--ms-line); border-radius: 10px; background: #fafaff; }
.ms-kn-note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ms-kn-note-pass { flex: 1; }
.ms-kn-note-remove { border: 0; background: none; color: #dc2626; font-size: 12px; cursor: pointer; flex-shrink: 0; }
.ms-kn-note-content { width: 100%; min-height: 62px; }
.ms-kn-note-state { display: inline-block; margin-top: 6px; font-size: 11px; color: var(--ms-muted); }
.ms-kn-note-state.is-drawn { color: #d97706; }
.ms-kn-add { margin-top: 10px; }

@media (max-width: 640px) {
    .ms-kn-card { flex-direction: column; align-items: stretch; }
    .ms-kn-card-actions { justify-content: flex-end; }
}

/* ---------- 单词本 ---------- */
.ms-book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ms-book-card { background: #fff; border-radius: 14px; box-shadow: var(--ms-shadow); overflow: hidden; }
.ms-book-card.is-active { outline: 2px solid var(--ms-primary); }
.ms-book-main { display: flex; gap: 10px; padding: 14px 16px 10px; }
.ms-book-icon { font-size: 22px; }
.ms-book-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-book-name { font-size: 15px; font-weight: 700; }
.ms-book-desc { font-size: 12px; color: var(--ms-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-book-count { font-size: 11px; color: var(--ms-primary); }
.ms-book-actions { display: flex; gap: 6px; padding: 0 16px 14px; }
.ms-book-actions form { margin: 0; }
.ms-book-detail { margin-top: 18px; padding: 18px 20px; }
.ms-book-detail .ms-section-head { align-items: flex-start; }
.ms-word-form { margin: 14px 0 6px; padding: 14px; border-radius: 12px; background: #f8f9fe; }
.ms-word-form-row { display: flex; gap: 8px; margin-bottom: 8px; }
.ms-word-list { margin-top: 14px; }
.ms-word-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed var(--ms-line); }
.ms-word-item:last-child { border-bottom: 0; }
.ms-word-main { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.ms-word-text { font-size: 15px; font-weight: 700; }
.ms-word-phonetic { font-size: 12px; color: var(--ms-primary); }
.ms-word-trans { font-size: 13px; color: var(--ms-sub); }
.ms-word-example { font-size: 12px; color: var(--ms-muted); font-style: italic; }

.ms-login-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px; text-align: center; }
.ms-login-icon { font-size: 40px; }
.ms-login-title { font-size: 17px; font-weight: 700; }
.ms-login-desc { margin-bottom: 8px; color: var(--ms-sub); font-size: 13px; }

/* ---------- 背诵 ---------- */
.ms-recite-setup { padding: 20px; }
.ms-recite-book { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; text-align: left; }
.ms-recite-card { padding: 20px; text-align: center; }
.ms-recite-top { display: flex; justify-content: space-between; color: var(--ms-muted); font-size: 12px; }
.ms-progress-bar { height: 6px; margin: 10px 0 20px; border-radius: 999px; background: #eeeff7; overflow: hidden; }
.ms-progress-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #6a5ae0, #8a63e8); transition: width .25s ease; }
.ms-question { font-size: 26px; font-weight: 800; word-break: break-word; }
.ms-question-sub { margin: 6px 0 18px; color: var(--ms-muted); font-size: 13px; }
.ms-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ms-option { padding: 14px 12px; border: 1px solid var(--ms-line); border-radius: 12px; background: #fff; color: var(--ms-text); font-size: 14px; cursor: pointer; text-align: left; word-break: break-word; }
.ms-option:hover { border-color: var(--ms-primary); }
.ms-option.is-correct { border-color: #2f9e44; background: #ebfbee; color: #2b8a3e; }
.ms-option.is-wrong { border-color: #e03131; background: #fff5f5; color: #c92a2a; }
.ms-feedback { min-height: 22px; margin-top: 14px; font-size: 13px; }
.ms-feedback.is-ok { color: #2b8a3e; }
.ms-feedback.is-bad { color: #c92a2a; }
.ms-recite-done { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px; text-align: center; }
.ms-done-emoji { font-size: 44px; }
.ms-done-title { font-size: 20px; font-weight: 800; }
.ms-done-desc { margin-bottom: 10px; color: var(--ms-sub); font-size: 14px; }

.ms-empty-inline { padding: 28px 16px; margin-top: 12px; }

@media (max-width: 768px) {
    .ms-tool-title { font-size: 20px; }
    .ms-book-grid { grid-template-columns: 1fr; }
    .ms-style-grid { grid-template-columns: 1fr 1fr; }
    .ms-options { grid-template-columns: 1fr; }
    .ms-task-item { flex-direction: column; align-items: stretch; }
    .ms-task-actions { justify-content: flex-end; }
    .ms-word-form-row { flex-direction: column; }
    .ms-currency-list { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ms-currency-row { padding: 10px; gap: 4px 6px; }
    .ms-currency-input { width: auto; }
    .ms-currency-amount { font-size: 16px; }
    .ms-jumping-name { font-size: 38px; }
    .ms-check-list { grid-template-columns: 1fr; }
    .ms-picker-inner { padding: 18px; }
}

/* 工具页内容卡片覆盖默认的横向卡片布局 */
.ms-form-card,
.ms-result-card,
.ms-history-card,
.ms-book-detail,
.ms-recite-setup,
.ms-recite-card,
.ms-recite-done,
.ms-login-card,
.ms-currency-card {
    display: block;
    cursor: default;
}
.ms-form-card:hover,
.ms-result-card:hover,
.ms-history-card:hover,
.ms-book-detail:hover,
.ms-recite-setup:hover,
.ms-recite-card:hover,
.ms-recite-done:hover,
.ms-login-card:hover,
.ms-currency-card:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(43, 28, 100, .05);
}
.ms-login-card,
.ms-recite-done {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* JSON 解析工具 */
.ms-json-tool-page {
    max-width: 1200px;
}

.ms-json-work {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.ms-json-pane {
    display: block;
    margin-bottom: 0;
    cursor: default;
}

.ms-json-pane .ms-section-head {
    margin-bottom: 12px;
}

.ms-json-pane-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--ms-muted);
}

.ms-json-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ms-json-toolbar .ms-field-label {
    margin: 0;
}

.ms-json-toolbar .ms-seg {
    margin-bottom: 0;
}

.ms-json-editor {
    width: 100%;
    min-height: 420px;
    line-height: 1.6;
    resize: vertical;
}

.ms-json-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--ms-muted);
}

.ms-json-status b {
    color: var(--ms-text);
    font-weight: 600;
}

.ms-json-privacy {
    margin-left: auto;
    color: #10b981;
}

.ms-json-error {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-all;
}

.ms-json-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--ms-muted);
}

.ms-json-stats span {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f2fa;
}

.ms-json-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: #eeeff7;
}

.ms-json-tabs button {
    flex: 1 1 auto;
    border: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: transparent;
    color: var(--ms-sub);
    font-size: 13px;
    cursor: pointer;
}

.ms-json-tabs button.is-active {
    background: #fff;
    color: var(--ms-primary);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(43, 28, 100, .1);
}

.ms-json-config {
    margin-bottom: 4px;
}

.ms-json-divider {
    height: 1px;
    margin: 12px 0;
    background: var(--ms-line);
}

.ms-json-inline-form {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.ms-json-inline-form .ms-input {
    flex: 1;
    min-width: 0;
}

.ms-json-inline-form .ms-btn {
    flex: 0 0 auto;
}

.ms-json-tip {
    margin: 4px 0 10px;
    color: var(--ms-muted);
    font-size: 12px;
    line-height: 1.6;
}

.ms-json-matches {
    max-height: 220px;
    overflow: auto;
    padding: 6px;
    margin-bottom: 10px;
    border: 1px solid var(--ms-line);
    border-radius: 10px;
}

.ms-json-match {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.ms-json-match:hover {
    background: #f6f7fb;
}

.ms-json-match-path {
    flex: 0 1 auto;
    font-family: Consolas, Monaco, monospace;
    color: var(--ms-primary);
    word-break: break-all;
}

.ms-json-match-val {
    flex: 1 1 auto;
    overflow: hidden;
    color: var(--ms-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-json-output {
    min-height: 420px;
    margin: 12px 0 0;
    padding: 16px;
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 640px;
    overflow: auto;
}

.ms-jv-key { color: #7dd3fc; }
.ms-jv-str { color: #86efac; }
.ms-jv-num { color: #fca5a5; }
.ms-jv-bool { color: #fcd34d; }
.ms-jv-null { color: #c4b5fd; }

@media (max-width: 900px) {
    .ms-json-work {
        grid-template-columns: 1fr;
    }

    .ms-json-pane-hint {
        display: none;
    }

    .ms-json-editor {
        min-height: 220px;
    }

    .ms-json-output {
        min-height: 220px;
        max-height: 420px;
    }
}

@media (max-width: 768px) {
    .ms-json-privacy {
        margin-left: 0;
    }

    .ms-json-output {
        padding: 12px;
        font-size: 12px;
    }
}

/* ---------- 二维码工具 ---------- */
.ms-qr-page { max-width: 1100px; }

.ms-qr-work {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.ms-qr-pane {
    display: block;
    margin-bottom: 0;
    cursor: default;
}

.ms-qr-pane .ms-json-toolbar {
    margin-top: 12px;
    margin-bottom: 4px;
}

.ms-qr-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    margin-top: 12px;
    padding: 20px;
    border: 1px dashed var(--ms-line);
    border-radius: 14px;
    background: #fbfbfe;
}

.ms-qr-stage canvas,
.ms-qr-stage img {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 8px;
}

.ms-qr-placeholder {
    font-size: 13px;
    color: var(--ms-muted);
}

.ms-qr-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 28px 20px;
    border: 1px dashed #d5d8e6;
    border-radius: 14px;
    background: #fbfbfe;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease;
}

.ms-qr-drop:hover,
.ms-qr-drop.is-dragover {
    border-color: var(--ms-primary);
    background: #f6f3ff;
}

.ms-qr-drop-icon { font-size: 26px; line-height: 1; }

.ms-qr-drop-title { font-size: 14px; font-weight: 600; }

.ms-qr-drop-desc { font-size: 12px; color: var(--ms-muted); }

.ms-qr-image-wrap {
    position: relative;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid var(--ms-line);
    border-radius: 12px;
    background: #fbfbfe;
    text-align: center;
}

.ms-qr-preview {
    display: block;
    max-width: 100%;
    max-height: 240px;
    margin: 0 auto;
    border-radius: 8px;
}

.ms-qr-image-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: rgba(31, 35, 51, .55);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.ms-qr-result {
    min-height: 96px;
    margin-top: 12px;
}

@media (max-width: 900px) {
    .ms-qr-work {
        grid-template-columns: 1fr;
    }

    .ms-qr-stage {
        min-height: 220px;
    }

    .ms-qr-pane .ms-json-pane-hint {
        display: none;
    }
}

/* ---------- 最近使用 ---------- */
.ms-recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.ms-recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--ms-card);
    box-shadow: 0 4px 14px rgba(43, 28, 100, .05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.ms-recent-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(43, 28, 100, .1);
}

.ms-recent-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(135deg, #6a5ae0, #8a63e8);
    color: #fff;
    font-size: 16px;
}

.ms-recent-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ms-recent-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.ms-recent-title {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ms-recent-type {
    font-size: 11px;
    color: var(--ms-muted);
}

@media (max-width: 640px) {
    .ms-recent-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}

/* ---------- 浏览器插件下载悬浮入口 ---------- */
.ms-ext-fab {
    position: fixed;
    right: 24px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    z-index: 120;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 16px;
    border: 1px solid #e5e2fb;
    border-radius: 999px;
    background: #fff;
    color: var(--ms-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(43, 28, 100, .12);
    transition: transform .15s ease, box-shadow .15s ease;
}

.ms-ext-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(43, 28, 100, .18);
}

.ms-ext-fab:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .ms-ext-fab {
        display: none;
    }
}
