/* =========================================================
   悦 · 集市 · 柔和风格导航
   原生 CSS · 无框架 · 响应式 · 5 套柔和配色
   ========================================================= */

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --text:    #3d3a52;
    --sub:     #8f8aa6;
    --muted:   #b3aec9;
    --card:    rgba(255, 255, 255, .66);
    --card-br: rgba(255, 255, 255, .85);
    --shadow:  0 10px 30px rgba(150, 130, 200, .16);
    --shadow-lg: 0 18px 50px rgba(150, 130, 200, .26);
    --radius:  20px;
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
            "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 5 套柔和配色 ---------- */
[data-theme="peach"] {
    --bg-a: #fff7f0; --bg-b: #ffeef5;
    --blob-a: #ffb3c1; --blob-b: #ffd9a8; --blob-c: #ffc8dd;
    --acc: #ff7aa2; --acc-2: #ffa06b;
    --ring: rgba(255, 122, 162, .30);
}
[data-theme="mint"] {
    --bg-a: #f0fbf6; --bg-b: #e9f8ff;
    --blob-a: #9be8c5; --blob-b: #9adfff; --blob-c: #d5f5b0;
    --acc: #22c993; --acc-2: #57b8ff;
    --ring: rgba(34, 201, 147, .28);
}
[data-theme="soda"] {
    --bg-a: #f0f5ff; --bg-b: #eef1ff;
    --blob-a: #a9c6ff; --blob-b: #c0b5ff; --blob-c: #9be0ff;
    --acc: #5f8bff; --acc-2: #8f7bff;
    --ring: rgba(95, 139, 255, .30);
}
[data-theme="grape"] {
    --bg-a: #f9f5ff; --bg-b: #f3edff;
    --blob-a: #cbb1ff; --blob-b: #ffb1dd; --blob-c: #b0c8ff;
    --acc: #9a6bff; --acc-2: #ff7fc0;
    --ring: rgba(154, 107, 255, .28);
}
[data-theme="sunset"] {
    --bg-a: #fff9ef; --bg-b: #fff1e8;
    --blob-a: #ffd28f; --blob-b: #ffb28f; --blob-c: #ffd0e2;
    --acc: #ff9350; --acc-2: #ff6fa8;
    --ring: rgba(255, 147, 80, .30);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: linear-gradient(160deg, var(--bg-a), var(--bg-b)) fixed;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background .5s ease;
}

::selection { background: var(--ring); }

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- SVG 图标体系 ---------- */
.icon-sprite {
    position: absolute; width: 0; height: 0; overflow: hidden;
}
.icon {
    width: 18px; height: 18px; flex: none;
    display: inline-block; vertical-align: middle;
}

/* ---------- 背景气泡 ---------- */
.bg-blobs { position: fixed; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.blob {
    position: absolute; border-radius: 50%;
    filter: blur(90px); opacity: .55;
    animation: blob-float 20s ease-in-out infinite;
}
.b1 { width: 46vmax; height: 46vmax; top: -14vmax; left: -10vmax;  background: var(--blob-a); }
.b2 { width: 40vmax; height: 40vmax; top: 24%; right: -16vmax;    background: var(--blob-b); animation-delay: -7s; animation-duration: 26s; }
.b3 { width: 34vmax; height: 34vmax; bottom: -12vmax; left: 22%;  background: var(--blob-c); animation-delay: -13s; animation-duration: 23s; }

@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(4vmax, 5vmax) scale(1.08); }
    66%      { transform: translate(-4vmax, -3vmax) scale(.95); }
}

/* ---------- 顶栏 ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, .45);
    border-bottom: 1px solid rgba(255, 255, 255, .6);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.08rem; }
.brand-dot {
    display: grid; place-items: center; width: 36px; height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--acc), var(--acc-2));
    box-shadow: 0 6px 16px var(--ring);
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.brand-dot .icon { width: 20px; height: 20px; color: #fff; }
.brand:hover .brand-dot { transform: rotate(-8deg) scale(1.06); }
.brand-badge {
    font-size: .68rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--acc), var(--acc-2));
    padding: 2px 8px; border-radius: 999px; margin-left: 6px;
    letter-spacing: .1em;
}
.header-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- 通用按钮 ---------- */
.icon-btn {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px; border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .66);
    color: var(--text); cursor: pointer; font-size: 15px;
    box-shadow: 0 4px 14px rgba(150, 130, 200, .12);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s, background .25s;
}
.icon-btn .icon { width: 17px; height: 17px; }
.icon-btn:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 8px 20px rgba(150, 130, 200, .2); }
.icon-btn.danger:hover { color: #ff5d7d; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; cursor: pointer; font-weight: 700; font-size: .92rem;
    padding: 11px 24px; border-radius: 999px;
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s, filter .25s;
}
.btn .icon { width: 16px; height: 16px; }
.btn:active { transform: scale(.96); }
.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--acc), var(--acc-2));
    box-shadow: 0 10px 24px var(--ring);
}
.btn.primary:hover { transform: translateY(-2px) scale(1.02); filter: saturate(1.15); }
.btn.ghost {
    color: var(--text); background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 4px 14px rgba(150, 130, 200, .1);
}
.btn.ghost:hover { background: #fff; transform: translateY(-2px); }
.btn-sm { padding: 7px 16px; font-size: .84rem; }
.btn-block { width: 100%; }

/* ---------- 卡片 ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--card-br);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}

/* ---------- 首页 Hero ---------- */
main.container { padding-top: 42px; }

.hero { text-align: center; padding: 34px 0 46px; }

.greeting-pill {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .88rem; font-weight: 700;
    color: var(--acc);
    background: rgba(255, 255, 255, .7);
    border: 1px solid var(--card-br);
    padding: 6px 18px; border-radius: 999px;
    box-shadow: 0 4px 16px var(--ring);
    margin-bottom: 18px;
    animation: pop-in .5s .05s both;
}
.greeting-pill .icon { width: 15px; height: 15px; color: var(--acc); }

.hero-title {
    font-size: clamp(1.9rem, 5.2vw, 3rem);
    font-weight: 900; letter-spacing: .02em;
    background: linear-gradient(120deg, var(--acc), var(--acc-2) 60%, var(--acc));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: pop-in .5s .12s both;
}
.hero-desc {
    margin-top: 10px; color: var(--sub); font-size: 1rem;
    animation: pop-in .5s .2s both;
}

/* ---------- 搜索框 ---------- */
.search-wrap { max-width: 640px; margin: 30px auto 0; animation: pop-in .55s .28s both; }

.search { position: relative; }

form.search {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, .72);
    border: 1.5px solid rgba(255, 255, 255, .95);
    border-radius: 999px;
    padding: 8px 8px 8px 20px;
    box-shadow: 0 12px 38px rgba(150, 130, 200, .22);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    transition: border-color .3s, box-shadow .3s, transform .3s;
}
form.search:focus-within {
    border-color: var(--acc);
    box-shadow: 0 14px 44px var(--ring), 0 0 0 4px var(--ring);
    transform: translateY(-1px);
}
.search-icon { display: grid; place-items: center; color: var(--sub); flex: none; }
.search-icon .icon { width: 20px; height: 20px; }
.search-input {
    flex: 1; min-width: 0;
    border: none; outline: none; background: transparent;
    font-size: 1.02rem; color: var(--text); font-family: inherit;
    padding: 10px 4px;
}
.search-input::placeholder { color: var(--muted); }
.search-btn {
    flex: none; border: none; cursor: pointer;
    color: #fff; font-weight: 800; font-size: .95rem;
    padding: 11px 26px; border-radius: 999px;
    background: linear-gradient(135deg, var(--acc), var(--acc-2));
    box-shadow: 0 8px 20px var(--ring);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), filter .25s;
}
.search-btn:hover { transform: scale(1.05); filter: saturate(1.2); }

/* 搜索联想 */
.suggest {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--card-br);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    padding: 8px; z-index: 40;
    overflow: hidden;
}
.suggest-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px; border-radius: 12px; cursor: pointer;
    transition: background .15s;
}
.suggest-item.active, .suggest-item:hover { background: var(--ring); }
.suggest-host { margin-left: auto; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.suggest-title { font-weight: 700; font-size: .92rem; }
.suggest-empty { padding: 12px; text-align: center; color: var(--muted); font-size: .88rem; }

/* 搜索引擎切换 */
.engine-chips {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    margin-top: 16px;
}
.chip {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid rgba(255, 255, 255, .95);
    background: rgba(255, 255, 255, .6);
    color: var(--sub); font-weight: 700; font-size: .88rem;
    padding: 8px 18px; border-radius: 999px; cursor: pointer;
    box-shadow: 0 4px 14px rgba(150, 130, 200, .1);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .25s, color .25s, box-shadow .25s;
}
.chip:hover { transform: translateY(-2px); background: #fff; color: var(--text); }
.chip.active {
    color: #fff;
    background: linear-gradient(135deg, var(--acc), var(--acc-2));
    border-color: transparent;
    box-shadow: 0 8px 22px var(--ring);
    transform: translateY(-1px);
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ---------- 分类与卡片 ---------- */
.cat { margin-bottom: 40px; scroll-margin-top: 80px; }
.cat-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cat-chip {
    display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 14px;
    background: linear-gradient(135deg, var(--acc), var(--acc-2));
    box-shadow: 0 6px 16px var(--ring);
    color: #fff;
}
.cat-chip .icon { width: 20px; height: 20px; color: #fff; }
.cat-chip.c1 { background: linear-gradient(135deg, #ff9aa8, #ffc3a0); }
.cat-chip.c2 { background: linear-gradient(135deg, #ffd166, #ffb457); }
.cat-chip.c3 { background: linear-gradient(135deg, #8ee9b4, #5fd6a2); }
.cat-chip.c4 { background: linear-gradient(135deg, #a5d8ff, #78b8ff); }
.cat-chip.c5 { background: linear-gradient(135deg, #d0b3ff, #a678ff); }
.cat-chip.c6 { background: linear-gradient(135deg, #ffc3dc, #ff8fd0); }
.admin-page .cat-chip { width: 32px; height: 32px; font-size: 16px; border-radius: 11px; }
.admin-page .cat-chip .icon { width: 15px; height: 15px; }
.cat-name { font-size: 1.22rem; font-weight: 800; letter-spacing: .01em; }
.cat-count {
    font-size: .75rem; font-weight: 800; color: var(--acc);
    background: var(--ring);
    padding: 2px 10px; border-radius: 999px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.nav-card {
    display: flex; align-items: center; gap: 14px;
    padding: 15px 16px;
    animation: pop-in .45s calc(var(--i, 0) * 45ms) both;
    transition: transform .28s cubic-bezier(.34, 1.56, .64, 1), box-shadow .28s;
}
.nav-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.nav-card:focus-visible { outline: 2.5px solid var(--acc); outline-offset: 2px; }

.tile {
    position: relative; flex: none;
    width: 48px; height: 48px; border-radius: 15px;
    display: grid; place-items: center;
    font-weight: 800; font-size: 1.2rem; color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    overflow: hidden;
    transition: transform .28s cubic-bezier(.34, 1.56, .64, 1);
}
.nav-card:hover .tile { transform: rotate(-6deg) scale(1.08); }
.tile .icon { width: 24px; height: 24px; color: #fff; }
.tile.sm { width: 36px; height: 36px; border-radius: 12px; font-size: .95rem; }
.tile.sm .icon { width: 18px; height: 18px; }

.tile.g1 { background: linear-gradient(135deg, #ff9aa8, #ffc3a0); }
.tile.g2 { background: linear-gradient(135deg, #ffd166, #ffb457); }
.tile.g3 { background: linear-gradient(135deg, #8ee9b4, #5fd6a2); }
.tile.g4 { background: linear-gradient(135deg, #a5d8ff, #78b8ff); }
.tile.g5 { background: linear-gradient(135deg, #d0b3ff, #a678ff); }
.tile.g6 { background: linear-gradient(135deg, #ffc3dc, #ff8fd0); }

.card-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card-title {
    font-weight: 800; font-size: .95rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-desc {
    font-size: .78rem; color: var(--sub);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon {
    width: 72px; height: 72px; border-radius: 50%;
    margin: 0 auto 14px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .7);
    border: 1px solid var(--card-br);
    box-shadow: 0 10px 26px var(--ring);
    color: var(--acc);
}
.empty-icon .icon { width: 32px; height: 32px; }
.empty-state p { color: var(--sub); margin-bottom: 18px; }

/* ---------- 页脚 ---------- */
.site-footer { padding: 44px 0 34px; text-align: center; }
.site-footer p { color: var(--muted); font-size: .82rem; }
.site-footer .footer-meta {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 6px; font-size: .76rem;
}
.site-footer .footer-meta .icon { width: 13px; height: 13px; color: var(--acc); }

/* ---------- 配色面板 ---------- */
.theme-panel {
    position: fixed; top: 74px; right: 20px; z-index: 60;
    width: 260px; padding: 18px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-br);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    animation: pop-in .25s both;
}
.theme-panel-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .92rem; margin-bottom: 12px; }
.theme-panel-title .icon { color: var(--acc); }
.theme-options { display: flex; flex-direction: column; gap: 6px; }
.theme-opt {
    display: flex; align-items: center; gap: 12px;
    border: none; background: transparent; cursor: pointer;
    padding: 8px 10px; border-radius: 14px;
    transition: background .2s;
    text-align: left;
}
.theme-opt:hover { background: var(--ring); }
.swatch {
    width: 32px; height: 32px; border-radius: 50%; flex: none;
    box-shadow: 0 4px 12px rgba(150, 130, 200, .35);
    border: 2.5px solid transparent;
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
.theme-opt:hover .swatch { transform: scale(1.12); }
.theme-opt.active .swatch { border-color: #fff; box-shadow: 0 0 0 3px var(--acc); }
.theme-opt.active .swatch-name { color: var(--acc); font-weight: 800; }
.swatch-name { font-size: .9rem; font-weight: 600; color: var(--text); }

/* ---------- 登录页 ---------- */
.auth-page { display: grid; place-items: center; min-height: 100vh; }
.auth-wrap { width: min(92vw, 400px); padding: 24px 0; }
.auth-card { padding: 38px 34px 30px; text-align: center; animation: pop-in .45s both; }
.auth-icon {
    width: 64px; height: 64px; border-radius: 22px;
    margin: 0 auto 6px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--acc), var(--acc-2));
    color: #fff;
    box-shadow: 0 10px 24px var(--ring);
}
.auth-icon .icon { width: 28px; height: 28px; color: #fff; }
.auth-title { font-size: 1.5rem; font-weight: 900; margin-top: 8px; }
.auth-sub { color: var(--sub); font-size: .88rem; margin: 8px 0 22px; }
.auth-back { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; font-size: .84rem; color: var(--sub); }
.auth-back:hover { color: var(--acc); }
.auth-back .icon { width: 14px; height: 14px; }

.alert {
    background: rgba(255, 93, 125, .1);
    color: #e04467;
    border: 1px solid rgba(255, 93, 125, .25);
    border-radius: 14px; padding: 10px 14px; margin-bottom: 16px;
    font-size: .86rem; text-align: left;
}
.alert p + p { margin-top: 4px; }

/* ---------- 表单 ---------- */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field > span { font-size: .82rem; font-weight: 700; color: var(--sub); }
.field input, .field select {
    font-family: inherit; font-size: .92rem; color: var(--text);
    padding: 11px 14px;
    border: 1.5px solid rgba(200, 195, 220, .55);
    border-radius: 13px;
    background: rgba(255, 255, 255, .85);
    outline: none;
    transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field select:focus {
    border-color: var(--acc);
    box-shadow: 0 0 0 4px var(--ring);
}
.form-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 800; margin-bottom: 16px; }
.form-title .icon { width: 18px; height: 18px; color: var(--acc); }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }

/* 图标选择器 */
.field-picker { margin-top: 14px; }
.icon-picker {
    display: flex; flex-wrap: wrap; gap: 6px;
    max-height: 168px; overflow-y: auto;
    padding: 8px;
    border: 1.5px solid rgba(200, 195, 220, .55);
    border-radius: 13px;
    background: rgba(255, 255, 255, .85);
}
.pick {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border: 1.5px solid transparent;
    background: transparent; border-radius: 10px;
    cursor: pointer; color: var(--text);
    transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.pick:hover { background: var(--ring); transform: translateY(-1px); }
.pick.active {
    border-color: var(--acc);
    background: var(--ring);
    color: var(--acc);
}
.pick .icon { width: 16px; height: 16px; }
.pick.auto {
    width: auto; min-width: 48px; padding: 0 10px;
    font-size: .74rem; font-weight: 700; color: var(--sub);
}

/* ---------- 后台 ---------- */
.admin-main { padding-top: 26px; }
.admin-page main.container { padding-top: 26px; }

.tabs {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, .55);
    border: 1px solid var(--card-br);
    padding: 6px; border-radius: 999px;
    width: fit-content; max-width: 100%;
    box-shadow: 0 4px 16px rgba(150, 130, 200, .1);
}
.tab {
    display: inline-flex; align-items: center; gap: 7px;
    border: none; background: transparent; cursor: pointer;
    font-weight: 700; font-size: .9rem; color: var(--sub);
    padding: 9px 18px; border-radius: 999px;
    transition: color .2s, background .25s, box-shadow .25s;
    white-space: nowrap;
}
.tab .icon { width: 15px; height: 15px; }
.tab:hover { color: var(--text); }
.tab.active {
    color: #fff;
    background: linear-gradient(135deg, var(--acc), var(--acc-2));
    box-shadow: 0 6px 18px var(--ring);
}
.tab.active .icon { color: #fff; }

.tab-panel { display: none; animation: fade-up .3s both; }
.tab-panel.active { display: block; }

.form { padding: 22px 24px; margin-bottom: 18px; }
.form-narrow { max-width: 460px; }

.admin-list-card { padding: 20px 22px; margin-bottom: 18px; }
.admin-list-card > .list-title { margin-bottom: 12px; }
.list-title { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; font-weight: 800; }
.list-title > .icon { color: var(--acc); }
.list-title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.list { display: flex; flex-direction: column; gap: 8px; min-height: 12px; }
.list.drop-hover { outline: 2.5px dashed var(--acc); outline-offset: 4px; border-radius: 14px; }

.row {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 4px 12px rgba(150, 130, 200, .08);
    transition: transform .2s, box-shadow .2s, opacity .2s;
}
.row:hover { box-shadow: 0 6px 18px rgba(150, 130, 200, .16); }
.row.dragging {
    opacity: .45; transform: scale(.98) rotate(-1deg);
    box-shadow: var(--shadow-lg);
}
.row .handle {
    cursor: grab; color: var(--muted);
    display: grid; place-items: center;
    user-select: none; padding: 4px 2px;
}
.row .handle .icon { width: 14px; height: 14px; }
.row .handle:active { cursor: grabbing; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main strong { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: .76rem; color: var(--muted); }
.row-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.row-actions .icon-btn { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.row-actions .icon-btn .icon { width: 14px; height: 14px; }
.row-actions .inline { display: inline-flex; }

.empty-hint { color: var(--muted); font-size: .86rem; text-align: center; padding: 12px; }
.empty-hint-card { padding: 26px; text-align: center; color: var(--sub); margin-bottom: 18px; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
    z-index: 100;
    font-weight: 700; font-size: .9rem;
    padding: 12px 26px; border-radius: 999px;
    color: #fff;
    box-shadow: var(--shadow-lg);
    opacity: 0; pointer-events: none;
    transition: opacity .3s, transform .3s;
    max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast-ok { background: linear-gradient(135deg, #22c993, #57b8ff); }
.toast-err { background: linear-gradient(135deg, #ff5d7d, #ff9350); }

/* ---------- 动画 ---------- */
@keyframes pop-in {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
@keyframes fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
    .container { padding: 0 14px; }
    main.container { padding-top: 24px; }
    .hero { padding: 20px 0 32px; }
    .hero-desc { font-size: .9rem; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .nav-card { padding: 12px; gap: 10px; }
    .tile { width: 42px; height: 42px; border-radius: 13px; font-size: 1.05rem; }
    .card-title { font-size: .87rem; }
    .card-desc { font-size: .72rem; }
    .cat-name { font-size: 1.08rem; }
    .cat-chip { width: 34px; height: 34px; font-size: 17px; border-radius: 12px; }
    .search-btn { padding: 10px 18px; }
    .brand-name { font-size: .98rem; }
    .tabs { border-radius: 20px; overflow-x: auto; }
    .form { padding: 18px 16px; }
    .fields { grid-template-columns: 1fr; }
    .row { flex-wrap: wrap; }
    .row-main { flex: 1 1 140px; }
    .theme-panel { right: 14px; left: 14px; width: auto; }
    .pick { width: 30px; height: 30px; }
    .icon-picker { max-height: 132px; }
    .auth-icon { width: 56px; height: 56px; }
    .auth-icon .icon { width: 24px; height: 24px; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    html { scroll-behavior: auto; }
}
