/**
 * m000 - 工具平台首页
 */

html, body { min-height: 100%; }

body {
    background: var(--color-bg);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 120vh;
    min-height: 760px;
    background:
        radial-gradient(circle at 18% 8%, var(--color-aurora-accent), transparent 28rem),
        radial-gradient(circle at 86% 12%, var(--color-aurora-success), transparent 26rem);
    pointer-events: none;
    z-index: 0;
}

.workspace-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* ── 顶栏 ─────────────────────────────────────────────── */

.topbar {
    width: min(1180px, calc(100% - 48px));
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-button {
    border: 0;
    background: transparent;
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    cursor: pointer;
    transition: opacity .16s ease;
}
.brand-button:hover { opacity: .82; }

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--color-accent) 13%, white);
    color: var(--color-accent);
    font-weight: 800;
    box-shadow: 0 1px 0 rgba(46,37,32,.04);
}

.brand-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}

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

.topbar-link {
    border: 0;
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
    border-radius: 999px;
    transition: background .16s ease, color .16s ease;
    padding: 8px 13px;
    font-size: 14px;
}
.topbar-link:hover {
    background: color-mix(in srgb, var(--color-accent) 8%, transparent);
    color: var(--color-accent);
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.52);
    border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
    color: var(--color-text);
    max-width: 180px;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}
.user-pill:hover {
    background: rgba(255,255,255,.68);
    border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border));
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-text);
    color: var(--color-surface);
    font-size: 12px;
    font-weight: 700;
    flex: 0 0 auto;
}

.user-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}

/* ── 主内容区 ──────────────────────────────────────────── */

.workspace-main {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 18px 0 60px;
}

.view { display: none; }
.view.is-active { display: block; }

/* ── 问候区 ────────────────────────────────────────────── */

.hero {
    padding: 28px 0 20px;
}
.hero-title {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -.04em;
    font-weight: 760;
}

/* ── 首页搜索框 ────────────────────────────────────────── */

.home-search-wrap {
    position: relative;
    margin-bottom: 8px;
}

.home-search-input {
    width: 100%;
    height: 52px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--color-border) 60%, white);
    background: rgba(255,255,255,.78);
    color: var(--color-text);
    font-size: 15px;
    padding: 0 48px 0 48px;
    box-shadow: 0 8px 28px rgba(46,37,32,.06);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.home-search-input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border));
    background: rgba(255,255,255,.96);
    box-shadow: 0 12px 36px rgba(204,120,92,.10);
}

.home-search-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
    font-size: 19px;
    pointer-events: none;
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-border) 40%, transparent);
    color: var(--color-muted);
    cursor: pointer;
    display: none;
    font-size: 18px;
    line-height: 1;
}
.search-clear-btn.is-visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.search-clear-btn:hover {
    color: var(--color-text);
    background: color-mix(in srgb, var(--color-border) 70%, transparent);
}

/* ── 内联搜索结果 ──────────────────────────────────────── */

.home-search-results {
    background: rgba(255,255,255,.96);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 24px;
}
.home-search-results.hidden { display: none; }

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background .12s ease;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover {
    background: color-mix(in srgb, var(--color-accent) 5%, transparent);
}
.search-result-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--color-accent) 9%, white);
    font-size: 18px;
    flex: 0 0 auto;
}
.search-result-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--color-text);
}
.search-result-desc {
    font-size: .78rem;
    color: var(--color-muted);
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result-empty {
    padding: 18px 16px;
    color: var(--color-muted);
    font-size: .85rem;
    text-align: center;
}

/* ── 区块通用 ──────────────────────────────────────────── */

.section-block {
    margin-top: 28px;
    margin-bottom: 4px;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.section-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.section-meta {
    color: var(--color-muted);
    font-size: 12px;
    white-space: nowrap;
}
.section-action {
    border: 0;
    background: transparent;
    color: var(--color-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: color .15s ease, background .15s ease;
}
.section-action:hover {
    color: var(--color-danger);
    background: color-mix(in srgb, var(--color-danger) 8%, transparent);
}

/* ── 继续使用：横向紧凑卡片 ────────────────────────────── */

.compact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.compact-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.60);
    border: 1px solid color-mix(in srgb, var(--color-border) 60%, white);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(46,37,32,.04);
    transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.compact-card:hover {
    background: rgba(255,255,255,.88);
    border-color: color-mix(in srgb, var(--color-accent) 22%, var(--color-border));
    transform: translateY(-1px);
}
.compact-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--color-accent) 9%, white);
    font-size: 16px;
    flex: 0 0 auto;
}
.compact-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.compact-empty {
    color: var(--color-muted);
    font-size: .82rem;
    padding: 4px 0;
}

/* ── 账号面板 ──────────────────────────────────────────── */

.identity-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
}
.identity-panel-overlay.hidden { display: none; }
.identity-panel-overlay.is-visible { background: rgba(0,0,0,.4); }

.identity-panel {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: min(420px, 90%);
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .2s ease, transform .2s ease;
}
.identity-panel.is-visible { opacity: 1; transform: translateY(0); }

.identity-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5);
    border-bottom: 1px solid var(--color-border);
}
.identity-panel-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}
.identity-panel-close {
    border: 0;
    background: transparent;
    color: var(--color-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background .15s ease;
}
.identity-panel-close:hover {
    background: color-mix(in srgb, var(--color-border) 40%, transparent);
}

.identity-panel-body {
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.account-field { display: flex; flex-direction: column; gap: 6px; }
.account-field-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.account-field-row { display: flex; align-items: center; gap: 8px; }
.account-field-value {
    flex: 1;
    font-size: .95rem;
    font-weight: 600;
    color: var(--color-text);
    font-family: var(--font-mono);
    word-break: break-all;
}
.account-field-value.is-masked {
    color: var(--color-muted);
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: .85rem;
    font-style: italic;
}

.first-time-banner {
    background: color-mix(in srgb, var(--color-warning) 10%, var(--color-surface));
    border: 1px solid color-mix(in srgb, var(--color-warning) 30%, var(--color-border));
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: .82rem;
    color: var(--color-text);
    line-height: 1.6;
}
.first-time-banner strong { color: var(--color-warning); }

.panel-divider { height: 1px; background: var(--color-border); margin: 4px 0; }

.switch-form { display: flex; flex-direction: column; gap: 10px; }
.switch-form .input { font-size: .9rem; }

.disclaimer-dialog { text-align: left; }
.disclaimer-title { font-size: 1rem; font-weight: 700; color: var(--color-text); margin-bottom: 10px; }
.announcement-time { color: var(--color-muted); font-size: 12px; margin-bottom: 10px; }
.disclaimer-list { margin: 0; padding-left: 20px; color: var(--color-muted); line-height: 1.7; }
.disclaimer-list li + li { margin-top: 6px; }
.announcement-action-link,
.announcement-action-button {
    color: var(--color-accent);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
}
.announcement-action-link:hover { text-decoration: underline; }
.announcement-action-button {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}
.announcement-action-button:hover { text-decoration: underline; }
.official-group-dialog { text-align: center; }
.official-group-dialog .disclaimer-title { text-align: left; }
.official-group-qr {
    display: block;
    width: min(280px, 78vw);
    height: auto;
    margin: 4px auto 12px;
    border-radius: var(--radius-md);
    background: #fff;
}
.official-group-hint {
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* ── 回到顶部 ──────────────────────────────────────────── */

.back-to-top {
    position: fixed;
    right: 26px;
    bottom: 26px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.88);
    color: var(--color-accent);
    box-shadow: 0 12px 30px rgba(46,37,32,.12);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.back-to-top:hover { background: rgba(255,255,255,.98); }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ── 响应式 ────────────────────────────────────────────── */

@media (max-width: 760px) {
    body::before { height: 96vh; min-height: 640px; }
    .topbar, .workspace-main { width: min(100% - 28px, 1180px); }
    .topbar { height: 60px; }
    .brand-text { max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .user-name { display: none; }
    .topbar-actions { gap: 6px; }
    .topbar-link { padding: 7px 10px; font-size: 13px; }
    .workspace-main { padding-bottom: 40px; }
    .hero { padding: 20px 0 16px; }
    .hero-title { font-size: 1.65rem; }
    .home-search-input { height: 48px; border-radius: 16px; font-size: 14px; }
    .identity-panel-overlay { align-items: flex-end; }
    .identity-panel { width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 85vh; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition-duration: .01ms !important; }
}
/* ── 积分与充值 ───────────────────────────────────────── */
.credit-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 34px;
    padding: 3px 4px 3px 10px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    white-space: nowrap;
}
.credit-chip-balance { font-size: .82rem; color: var(--color-muted); font-weight: 600; }
.recharge-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,.42);
    opacity: 0;
    transition: opacity .18s ease;
}
.recharge-overlay.hidden { display: none; }
.recharge-overlay.is-visible { opacity: 1; }
.recharge-panel {
    width: min(520px, 100%);
    max-height: 86vh;
    overflow: auto;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
    opacity: 0;
    transform: translateY(10px) scale(.99);
    transition: opacity .18s ease, transform .18s ease;
}
.recharge-panel.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.recharge-body { padding: 18px 20px 22px; }
.recharge-current { margin-bottom: 14px; color: var(--color-muted); font-size: .9rem; }
.recharge-current b { color: var(--color-text); font-size: 1.05rem; }
.recharge-packages { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.recharge-package {
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.recharge-package:hover { border-color: var(--color-primary); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.recharge-package strong { display: block; font-size: 1.12rem; margin-bottom: 4px; }
.recharge-package span { color: var(--color-muted); font-size: .88rem; }
.recharge-note { margin: 14px 0 0; color: var(--color-muted); font-size: .82rem; line-height: 1.55; }
.payment-wait { text-align: center; padding: 8px 0 4px; }
.payment-qr { width: min(280px, 80vw); max-height: 280px; object-fit: contain; margin: 14px auto; display: block; border-radius: 12px; }
.payment-order-id { color: var(--color-muted); font-size: .78rem; word-break: break-all; }
.billing-history { display: grid; gap: 8px; margin-top: 10px; }
.billing-history-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--color-border); }
.billing-history-row:last-child { border-bottom:0; }
.billing-history-row small { display:block; color:var(--color-muted); margin-top:2px; }
.billing-positive { color: #17833d; }
.billing-negative { color: #b33a32; }
@media (max-width: 720px) {
    .credit-chip { padding-left: 8px; }
    .recharge-overlay { align-items: flex-end; padding: 0; }
    .recharge-panel { width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 88vh; }
}


/* ── 2026-10 首页 v2：工作启动器 ─────────────────────── */
.ui-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}
.app-symbol { width: 22px; height: 22px; }
.brand-mark .ui-icon { width: 18px; height: 18px; }
.brand-mark { color: var(--color-accent); }
.topbar-link--icon { display: inline-flex; align-items: center; gap: 6px; }
.topbar-link--icon .ui-icon { width: 15px; height: 15px; }
.identity-panel-close .ui-icon,
.search-clear-btn .ui-icon,
.back-to-top .ui-icon { width: 17px; height: 17px; }
.inline-status-icon { width: 15px; height: 15px; vertical-align: -2px; margin-right: 3px; }
.inline-link-icon { width: 13px; height: 13px; vertical-align: -2px; margin-left: 2px; }

/* 首页只负责 return to work，不再复制完整应用目录。 */
body::before {
    height: 680px;
    min-height: 0;
    opacity: .72;
    background:
        radial-gradient(circle at 18% 2%, color-mix(in srgb, var(--color-aurora-accent) 74%, transparent), transparent 30rem),
        radial-gradient(circle at 86% 4%, color-mix(in srgb, var(--color-aurora-success) 68%, transparent), transparent 28rem);
}
.topbar,
.workspace-main { width: min(1120px, calc(100% - 48px)); }
.workspace-main { padding-top: 12px; }
.hero { padding: 38px 0 18px; }
.hero-title {
    font-size: clamp(2rem, 4vw, 2.55rem);
    font-weight: 770;
    letter-spacing: -.045em;
}

/* 搜索是首页唯一的大型交互容器。 */
.home-search-stage {
    position: relative;
    z-index: 30;
    margin-bottom: 38px;
}
.home-search-wrap { position: relative; margin: 0; }
.home-search-input {
    height: 56px;
    border-radius: 17px;
    padding: 0 104px 0 50px;
    border: 1px solid color-mix(in srgb, var(--color-border) 58%, white);
    background: rgba(255,255,255,.84);
    box-shadow: 0 12px 34px rgba(46,37,32,.055);
}
.home-search-input:focus {
    background: rgba(255,255,255,.97);
    border-color: color-mix(in srgb, var(--color-accent) 30%, var(--color-border));
    box-shadow: 0 16px 40px rgba(46,37,32,.07), 0 0 0 3px color-mix(in srgb, var(--color-accent) 7%, transparent);
}
.home-search-icon,
.apps-search-icon { display: inline-flex; align-items: center; justify-content: center; }
.home-search-icon .ui-icon,
.apps-search-icon .ui-icon { width: 19px; height: 19px; }
.search-shortcut {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 48px;
    padding: 4px 7px;
    border: 1px solid color-mix(in srgb, var(--color-border) 76%, white);
    border-radius: 7px;
    background: rgba(255,255,255,.72);
    color: var(--color-muted);
    font: 600 11px/1.2 var(--font-sans);
    text-align: center;
    box-shadow: 0 1px 1px rgba(46,37,32,.03);
    pointer-events: none;
}
.search-shortcut.hidden { display: none; }
.search-clear-btn { font-size: 0; }
.home-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    margin: 0;
    border-radius: 16px;
    border-color: color-mix(in srgb, var(--color-border) 72%, white);
    box-shadow: 0 20px 50px rgba(46,37,32,.12);
}
.search-result-item { padding: 12px 15px; }
.search-result-icon { color: var(--color-accent); }
.search-result-icon .app-symbol { width: 18px; height: 18px; }

/* 区块保持轻量：标题只是定位，不抢视觉。 */
.section-block { margin: 0 0 38px; }
.section-head { margin-bottom: 12px; }
.section-title {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 720;
    text-transform: none;
    letter-spacing: -.01em;
}
.section-meta,
.section-action { font-size: 12px; }
.section-action { padding: 4px 7px; }

/* Continue using：紧凑 launcher，不承担说明。 */
.compact-grid { gap: 8px; }
.compact-card {
    min-height: 42px;
    padding: 7px 12px 7px 8px;
    border-radius: 12px;
    background: rgba(255,255,255,.45);
    border-color: color-mix(in srgb, var(--color-border) 64%, white);
    box-shadow: none;
}
.compact-card:hover {
    background: rgba(255,255,255,.82);
    border-color: color-mix(in srgb, var(--color-accent) 20%, var(--color-border));
    box-shadow: 0 7px 18px rgba(46,37,32,.045);
}
.compact-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: var(--color-accent);
}
.compact-card-icon .app-symbol { width: 17px; height: 17px; }
.compact-card-name { font-size: 13px; font-weight: 650; }

/* 收藏：固定桌面，用中等 tile；仍不展示描述。 */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
    gap: 10px;
}
.favorite-tile {
    position: relative;
    min-height: 112px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--color-border) 64%, white);
    border-radius: 16px;
    background: rgba(255,255,255,.48);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: none;
    transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.favorite-tile:hover {
    background: rgba(255,255,255,.82);
    border-color: color-mix(in srgb, var(--color-accent) 20%, var(--color-border));
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(46,37,32,.05);
}
.favorite-tile-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 8%, white);
}
.favorite-tile-icon .app-symbol { width: 20px; height: 20px; }
.favorite-tile-name {
    margin: 14px 30px 0 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 720;
    letter-spacing: -.01em;
}
.favorite-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.76);
    color: var(--color-muted);
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(46,37,32,.05);
    transition: transform .15s ease, color .15s ease, background .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
}
.favorite-toggle:hover { transform: scale(1.06); color: var(--color-accent); background: #fff; }
.favorite-toggle.is-active { color: #c98b16; }
.favorite-toggle .ui-icon { width: 17px; height: 17px; }

.favorites-empty {
    grid-column: 1 / -1;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 2px;
    color: var(--color-muted);
}
.favorites-empty-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.52);
    color: var(--color-muted);
    border: 1px solid color-mix(in srgb, var(--color-border) 64%, white);
}
.favorites-empty-copy { min-width: 0; display: grid; gap: 2px; }
.favorites-empty-copy strong { color: var(--color-text); font-size: 13px; font-weight: 680; }
.favorites-empty-copy small { color: var(--color-muted); font-size: 12px; line-height: 1.5; }
.favorites-empty-action {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--color-accent);
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    padding: 7px 8px;
    border-radius: 8px;
}
.favorites-empty-action:hover { background: color-mix(in srgb, var(--color-accent) 7%, transparent); }

/* 首页最后只保留完整目录入口，不再铺“常用应用”。 */
.all-apps-gateway {
    margin-top: 6px;
    padding: 22px 2px 0;
    border-top: 1px solid color-mix(in srgb, var(--color-border) 78%, transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.all-apps-gateway-title {
    margin: 0 0 4px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 720;
}
.all-apps-gateway-meta {
    margin: 0;
    color: var(--color-muted);
    font-size: 12px;
}
.view-all-link {
    border: 0;
    background: transparent;
    color: var(--color-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    padding: 8px 4px 8px 10px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}
.view-all-link:hover { color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 6%, transparent); }
.view-all-link .ui-icon { width: 15px; height: 15px; }
.back-to-top { display: inline-flex; align-items: center; justify-content: center; font-size: 0; }

/* 积分作为一个整体入口；充值动作进入弹层，不常驻抢视觉。 */
.credit-chip {
    appearance: none;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
    border-radius: 999px;
    background: rgba(255,255,255,.52);
    color: var(--color-muted);
    cursor: pointer;
    font: inherit;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.credit-chip:hover {
    background: rgba(255,255,255,.78);
    border-color: color-mix(in srgb, var(--color-accent) 28%, var(--color-border));
    color: var(--color-text);
}
.credit-chip-balance { display: inline; font-size: 12px; font-weight: 650; white-space: nowrap; }
.credit-chip:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-accent) 12%, transparent); outline-offset: 2px; }

@media (max-width: 760px) {
    body::before { height: 520px; min-height: 0; opacity: .62; }
    .topbar,
    .workspace-main { width: min(100% - 28px, 1120px); }
    .topbar-link--icon span { display: none; }
    .topbar-link--icon { width: 34px; height: 34px; justify-content: center; padding: 0; }
    .topbar-link--icon .ui-icon { width: 17px; height: 17px; }
    .hero { padding: 28px 0 14px; }
    .hero-title { font-size: 1.9rem; }
    .home-search-stage { margin-bottom: 30px; }
    .home-search-input { height: 50px; border-radius: 15px; font-size: 14px; padding-right: 82px; }
    .search-shortcut { min-width: 42px; right: 10px; font-size: 10px; padding: 4px 5px; }
    .section-block { margin-bottom: 30px; }
    .compact-grid { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; margin-right: -14px; padding-right: 14px; scrollbar-width: none; }
    .compact-grid::-webkit-scrollbar { display: none; }
    .compact-card { flex: 0 0 auto; }
    .favorites-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
    .favorite-tile { min-height: 102px; padding: 12px; border-radius: 14px; }
    .favorite-tile-icon { width: 34px; height: 34px; }
    .favorite-tile-name { margin-top: 12px; font-size: 13px; }
    .favorites-empty { align-items: flex-start; flex-wrap: wrap; }
    .favorites-empty-action { margin-left: 48px; }
    .all-apps-gateway { padding-top: 18px; }
    .credit-chip { padding: 0 9px; }
    .credit-chip-label { display: none; }
}

@media (max-width: 460px) {
    .brand-text { max-width: 92px; }
    .topbar-actions { gap: 4px; }
    .user-pill { padding-right: 6px; }
    .favorites-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .all-apps-gateway { align-items: flex-end; }
    .view-all-link { padding-right: 0; }
}



/* ── m000 视觉可用性增强 · 暖陶系工作台 ───────────────────── */
:root {
    --m000-bg: #f6f4ef;
    --m000-bg-soft: #efece6;
    --m000-card: #ffffff;
    --m000-card-soft: #faf8f5;
    --m000-ink: #2a231e;
    --m000-muted: #6e6358;
    --m000-weak: #9a8e82;
    --m000-border: #e8e4de;
    --m000-accent: #c46b52;
    --m000-accent-deep: #ad5a44;
    --m000-accent-soft: #f3e6e0;
    --m000-success: #4f8f72;
    --m000-warn: #c9956a;
    --m000-danger: #c45f5f;
    --m000-aurora-accent: rgba(196, 107, 82, .08);
    --m000-aurora-success: rgba(79, 143, 114, .06);
    --m000-aurora-gold: rgba(201, 149, 106, .05);
}
body {
    background: linear-gradient(180deg, var(--m000-bg) 0%, #f3f0ea 100%);
    color: var(--m000-ink);
}
body::before {
    height: 760px;
    min-height: 0;
    opacity: .94;
    background:
        radial-gradient(circle at 16% 5%, var(--m000-aurora-accent), transparent 27rem),
        radial-gradient(circle at 84% 4%, var(--m000-aurora-success), transparent 25rem),
        radial-gradient(circle at 54% -8%, var(--m000-aurora-gold), transparent 24rem);
}
.topbar { min-height: 76px; height: auto; gap: 26px; }
.brand-button {
    padding: 8px 0;
    gap: 12px;
    border-radius: 12px;
    flex: 0 0 auto;
}
.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffaf7 0%, #f3ede6 100%);
    border: 1px solid var(--m000-border);
    color: var(--m000-accent);
    box-shadow: 0 8px 18px rgba(46, 37, 32, .06);
}
.brand-logo { display: block; width: 28px; height: 28px; }
.brand-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    line-height: 1;
}
.brand-text {
    font-size: 18px;
    font-weight: 760;
    letter-spacing: .02em;
    color: var(--m000-ink);
}
.brand-copy small {
    font-size: 8px;
    font-weight: 760;
    letter-spacing: .19em;
    color: var(--m000-weak);
}
.brand-button:hover { opacity: 1; }
.brand-button:hover .brand-mark {
    background: linear-gradient(180deg, #fff 0%, #f7f0ea 100%);
    border-color: color-mix(in srgb, var(--m000-accent) 24%, var(--m000-border));
}
.topbar-actions { gap: 10px; min-width: 0; }
.topbar-nav {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    gap: 3px;
    background: rgba(255,255,255,.70);
    border: 1px solid var(--m000-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(46,37,32,.035);
}
.topbar-nav-item {
    border: 1px solid transparent;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 13px;
    min-height: 38px;
    font-weight: 680;
    font-size: 13px;
    color: var(--m000-muted);
    white-space: nowrap;
}
.topbar-nav-item .ui-icon { width: 16px; height: 16px; }
.topbar-nav-item:hover {
    background: var(--m000-card-soft);
    color: var(--m000-ink);
}
.topbar-nav-item.is-active,
.workspace-shell.is-apps-view #viewToggleButton {
    color: var(--m000-accent);
    border-color: color-mix(in srgb, var(--m000-accent) 18%, var(--m000-border));
    background: var(--m000-accent-soft);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.topbar-nav-item.is-active:hover,
.workspace-shell.is-apps-view #viewToggleButton:hover {
    color: var(--m000-accent-deep);
    background: color-mix(in srgb, var(--m000-accent-soft) 72%, white);
}
.topbar-action {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    padding: 9px 13px;
    border: 1px solid var(--m000-border);
    background: rgba(255,255,255,.72);
    color: var(--m000-muted);
    border-radius: 11px;
    font-size: 13px;
    font-weight: 650;
}
.topbar-action .ui-icon { width: 17px; height: 17px; }
.topbar-action:hover {
    color: var(--m000-ink);
    background: #fff;
    border-color: color-mix(in srgb, var(--m000-accent) 18%, var(--m000-border));
}
.credit-chip {
    min-height: 45px;
    border-color: var(--m000-border);
    padding: 0 13px;
    border-radius: 11px;
    background: rgba(255,255,255,.78);
    color: var(--m000-muted);
}
.credit-chip:hover {
    color: var(--m000-accent-deep);
    background: #fff;
    border-color: color-mix(in srgb, var(--m000-accent) 22%, var(--m000-border));
}
.credit-chip-balance { color: inherit; font-size: 13px; font-weight: 760; }
.credit-chip-label { font-weight: 600; opacity: .8; }
.user-pill {
    min-height: 45px;
    border-radius: 12px;
    background: rgba(255,255,255,.78);
    border-color: var(--m000-border);
    padding: 5px 11px 5px 6px;
}
.user-pill:hover {
    background: #fff;
    border-color: color-mix(in srgb, var(--m000-accent) 18%, var(--m000-border));
}
.user-avatar {
    background: linear-gradient(180deg, #3b312b 0%, #2a231e 100%);
    color: #fff;
}
.topbar button:focus-visible,
.view-all-link:focus-visible,
.compact-card:focus-visible,
.favorite-tile:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--m000-accent) 18%, transparent);
    outline-offset: 3px;
}
.hero { padding-top: 34px; padding-bottom: 20px; }
.hero-title { color: var(--m000-ink); }
.hero-subtitle {
    color: var(--m000-weak);
    font-size: 13px;
    margin: 12px 0 0;
    line-height: 1.5;
}
.home-search-input {
    border-color: var(--m000-border);
    background: rgba(255,255,255,.82);
    box-shadow: 0 12px 28px rgba(46,37,32,.05);
    color: var(--m000-ink);
}
.home-search-input:focus {
    border-color: color-mix(in srgb, var(--m000-accent) 30%, var(--m000-border));
    box-shadow: 0 10px 30px rgba(46,37,32,.08), 0 0 0 3px color-mix(in srgb, var(--m000-accent) 10%, transparent);
}
.home-search-icon { color: var(--m000-accent-deep); }
.search-shortcut {
    border-color: color-mix(in srgb, var(--m000-border) 86%, white);
    background: rgba(255,255,255,.72);
    color: var(--m000-weak);
}
.home-search-results {
    border-color: var(--m000-border);
    background: rgba(255,255,255,.96);
    box-shadow: 0 20px 50px rgba(46,37,32,.12);
}
.search-result-icon,
.compact-card-icon,
.favorite-tile-icon { color: var(--m000-accent); }
.section-title {
    font-size: 15px;
    letter-spacing: -.012em;
    color: var(--m000-ink);
}
.section-meta,
.section-action { color: var(--m000-weak); }
.section-action:hover {
    color: var(--m000-danger);
    background: color-mix(in srgb, var(--m000-danger) 7%, transparent);
}
.compact-card {
    min-height: 46px;
    background: rgba(255,255,255,.82);
    border-color: var(--m000-border);
}
.compact-card:hover {
    background: #fff;
    border-color: color-mix(in srgb, var(--m000-accent) 18%, var(--m000-border));
    box-shadow: 0 8px 18px rgba(46,37,32,.06);
}
.compact-card-icon {
    background: var(--m000-accent-soft);
}
.favorite-tile {
    min-height: 138px;
    background: rgba(255,255,255,.82);
    border-color: var(--m000-border);
    padding: 15px;
}
.favorite-tile:hover {
    background: #fff;
    border-color: color-mix(in srgb, var(--m000-accent) 20%, var(--m000-border));
    box-shadow: 0 10px 27px rgba(46,37,32,.08);
}
.favorite-tile-icon {
    background: var(--m000-accent-soft);
}
.favorite-tile-name {
    margin: 10px 25px 0 0;
    color: var(--m000-ink);
}
.favorite-tile-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--m000-weak);
    font-size: 11px;
    font-weight: 700;
    margin-top: 9px;
}
.favorite-tile-open .ui-icon { width: 13px; height: 13px; }
.favorite-tile:hover .favorite-tile-open { color: var(--m000-accent-deep); }
.favorite-toggle {
    background: rgba(255,255,255,.88);
    color: var(--m000-weak);
    box-shadow: 0 3px 10px rgba(46,37,32,.05);
}
.favorite-toggle:hover { transform: scale(1.06); color: var(--m000-accent); background: #fff; }
.favorite-toggle.is-active { color: var(--m000-warn); }
.favorites-empty-icon {
    background: rgba(255,255,255,.68);
    color: var(--m000-weak);
    border-color: var(--m000-border);
}
.favorites-empty-copy strong { color: var(--m000-ink); }
.favorites-empty-copy small { color: var(--m000-muted); }
.favorites-empty-action {
    color: var(--m000-accent);
}
.favorites-empty-action:hover {
    background: color-mix(in srgb, var(--m000-accent) 7%, transparent);
}
.all-apps-gateway {
    padding: 24px;
    border: 1px solid var(--m000-border);
    border-radius: 17px;
    background: linear-gradient(180deg, rgba(255,255,255,.82) 0%, rgba(250,248,245,.88) 100%);
    box-shadow: 0 12px 28px rgba(46,37,32,.04);
}
.all-apps-gateway-title {
    font-size: 16px;
    color: var(--m000-ink);
}
.all-apps-gateway-meta {
    font-size: 13px;
    color: var(--m000-muted);
}
.view-all-link {
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid var(--m000-accent);
    border-radius: 10px;
    background: var(--m000-accent);
    color: #fff;
    font-weight: 700;
}
.view-all-link:hover {
    background: var(--m000-accent-deep);
    border-color: var(--m000-accent-deep);
    color: #fff;
}
@media (max-width: 900px) {
    .topbar { gap: 15px; }
    .topbar-actions { gap: 7px; }
    .topbar-nav-item { padding: 8px 11px; }
    .topbar-action { padding: 9px 11px; }
}
@media (max-width: 760px) {
    body::before { height: 560px; opacity: .88; }
    .topbar { min-height: 68px; height: auto; flex-wrap: wrap; justify-content: space-between; padding: 10px 0; row-gap: 8px; }
    .brand-mark { width: 35px; height: 35px; border-radius: 10px; }
    .brand-logo { width: 25px; height: 25px; }
    .brand-text { font-size: 16px; max-width: none; }
    .brand-copy small { font-size: 7px; }
    .topbar-nav-item { min-height: 36px; padding: 7px 10px; }
    .topbar-nav-item span { display: inline; }
    .topbar-action { width: 38px; height: 38px; min-height: 38px; padding: 0; }
    .topbar-action span { display: none; }
    .credit-chip, .user-pill { min-height: 38px; height: 38px; }
    .credit-chip-label { display: inline; }
    .hero { padding-top: 27px; }
    .hero-subtitle { margin-top: 7px; }
    .favorite-tile { min-height: 130px; }
    .all-apps-gateway { padding: 17px; }
}
@media (max-width: 570px) {
    .topbar { align-items: flex-start; }
    .topbar-actions { justify-content: space-between; width: 100%; gap: 6px; }
    .topbar-nav { flex: 0 1 auto; }
    .topbar-nav-item { gap: 5px; font-size: 12px; padding: 7px 9px; }
    .topbar-nav-item .ui-icon { width: 14px; height: 14px; }
    .user-pill { max-width: 44px; }
    .credit-chip { padding: 0 10px; }
    .all-apps-gateway { flex-wrap: wrap; }
    .view-all-link { width: 100%; justify-content: center; }
}
