@charset "utf-8";
/* ==========================================================================
   微兔独立站 · 原生主题样式
   灵感来源：Discuz 手机模板「威兔全功能版 4.3」（mobile_plus/css/style.css）
   重写目标：CSS 变量换肤 / 移动优先 / 暗色模式 / 安全区适配 / 无 jQuery 依赖
   --------------------------------------------------------------------------
   目录：
   01 设计令牌      02 重置与基础    03 排版
   04 布局骨架      05 顶栏          06 侧滑抽屉
   07 底部标签栏    08 按钮          09 卡片
   10 列表          11 表单          12 徽章与状态
   13 分页          14 空态与提示    15 模态与抽屉
   16 用户中心      17 后台          18 动画
   19 无障碍        20 工具类
   ========================================================================== */

/* ==========================================================================
   01 设计令牌
   ========================================================================== */
:root {
    /* 主色：默认威兔蓝；后台/主题可覆盖为橙 / 黑 / 绿 */
    --wt-accent: #549FD8;
    --wt-accent-dark: #1D80CF;
    --wt-accent-light: #6FBCF8;
    --wt-accent-deep: #3D7FB0;
    --wt-accent-soft: rgba(84, 159, 216, .12);
    --wt-accent-softer: rgba(84, 159, 216, .06);
    --wt-accent-contrast: #ffffff;

    /* 语义色 */
    --wt-red: #E5484D;
    --wt-orange: #F48639;
    --wt-green: #22A06B;
    --wt-purple: #9254DE;
    --wt-gold: #E8A33D;

    /* 中性色（浅色模式） */
    --wt-bg: #F2F4F8;
    --wt-bg-alt: #E9EDF4;
    --wt-surface: #FFFFFF;
    --wt-surface-2: #F7F9FC;
    --wt-surface-3: #EFF3F8;
    --wt-text: #1B2330;
    --wt-text-2: #4A5568;
    --wt-text-3: #8A94A6;
    --wt-text-4: #AEB6C4;
    --wt-line: #E6EAF2;
    --wt-line-strong: #D5DCE8;

    /* 抽屉与遮罩：沿用旧模板 #333 / rgba(0,0,0,.6) 的深色基调 */
    --wt-drawer: #232A34;
    --wt-drawer-2: #1A2029;
    --wt-drawer-text: #E7ECF3;
    --wt-drawer-text-2: #97A3B4;
    --wt-drawer-line: rgba(255, 255, 255, .07);
    --wt-mask: rgba(12, 16, 22, .55);

    /* 圆角 */
    --wt-r-xs: 6px;
    --wt-r-sm: 10px;
    --wt-r: 14px;
    --wt-r-lg: 20px;
    --wt-r-xl: 26px;
    --wt-r-pill: 999px;

    /* 阴影 */
    --wt-shadow-xs: 0 1px 2px rgba(20, 32, 52, .05);
    --wt-shadow-sm: 0 2px 8px rgba(20, 32, 52, .06);
    --wt-shadow: 0 4px 18px rgba(20, 32, 52, .08);
    --wt-shadow-lg: 0 12px 34px rgba(20, 32, 52, .12);
    --wt-shadow-drawer: -14px 0 40px rgba(0, 0, 0, .28);

    /* 尺寸 */
    --wt-header-h: 50px;
    --wt-tabbar-h: 54px;
    --wt-drawer-w: 264px;
    --wt-max-w: 720px;

    /* 动效 */
    --wt-ease: cubic-bezier(.32, .72, 0, 1);
    --wt-ease-out: cubic-bezier(.16, 1, .3, 1);
    --wt-dur: .28s;

    /* 安全区 */
    --wt-safe-t: env(safe-area-inset-top, 0px);
    --wt-safe-b: env(safe-area-inset-bottom, 0px);
    --wt-safe-l: env(safe-area-inset-left, 0px);
    --wt-safe-r: env(safe-area-inset-right, 0px);

    /* 字体 */
    --wt-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --wt-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

    /* 层级 */
    --wt-z-drawer: 100;
    --wt-z-mask: 90;
    --wt-z-header: 60;
    --wt-z-tabbar: 60;
    --wt-z-modal: 200;
    --wt-z-toast: 300;

    color-scheme: light;
}

/* 暗色模式：既支持系统偏好，也支持手动 data-theme="dark" */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --wt-bg: #0F1319;
        --wt-bg-alt: #0B0E13;
        --wt-surface: #181E27;
        --wt-surface-2: #1E2530;
        --wt-surface-3: #242C38;
        --wt-text: #E9EEF6;
        --wt-text-2: #B4BECC;
        --wt-text-3: #7E8A9C;
        --wt-text-4: #616D7E;
        --wt-line: #262F3C;
        --wt-line-strong: #333D4C;
        --wt-drawer: #14191F;
        --wt-drawer-2: #0E1218;
        --wt-shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
        --wt-shadow-sm: 0 2px 8px rgba(0, 0, 0, .45);
        --wt-shadow: 0 4px 18px rgba(0, 0, 0, .5);
        --wt-shadow-lg: 0 12px 34px rgba(0, 0, 0, .6);
        --wt-accent-soft: rgba(84, 159, 216, .18);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --wt-bg: #0F1319;
    --wt-bg-alt: #0B0E13;
    --wt-surface: #181E27;
    --wt-surface-2: #1E2530;
    --wt-surface-3: #242C38;
    --wt-text: #E9EEF6;
    --wt-text-2: #B4BECC;
    --wt-text-3: #7E8A9C;
    --wt-text-4: #616D7E;
    --wt-line: #262F3C;
    --wt-line-strong: #333D4C;
    --wt-drawer: #14191F;
    --wt-drawer-2: #0E1218;
    --wt-shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --wt-shadow-sm: 0 2px 8px rgba(0, 0, 0, .45);
    --wt-shadow: 0 4px 18px rgba(0, 0, 0, .5);
    --wt-shadow-lg: 0 12px 34px rgba(0, 0, 0, .6);
    --wt-accent-soft: rgba(84, 159, 216, .18);
    color-scheme: dark;
}

/* ==========================================================================
   02 重置与基础
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

* { -webkit-tap-highlight-color: transparent; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--wt-bg);
    color: var(--wt-text);
    font-family: var(--wt-font);
    font-size: 15px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.wt-no-scroll { overflow: hidden; }

img, video, svg, canvas { max-width: 100%; height: auto; display: block; border: 0; }
img { background: var(--wt-surface-3); }

ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
figure, blockquote, dl, dd { margin: 0; }

table { border-collapse: collapse; border-spacing: 0; width: 100%; }

hr {
    border: 0;
    border-top: 1px solid var(--wt-line);
    margin: 16px 0;
}

[hidden] { display: none !important; }

::selection { background: var(--wt-accent-soft); }

/* 滚动条（桌面浏览器） */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--wt-line-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ==========================================================================
   03 排版
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.01em;
}

h1 { font-size: 22px; }
h2 { font-size: 19px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }

a {
    color: var(--wt-accent-dark);
    text-decoration: none;
    transition: color .15s;
}
a:hover { color: var(--wt-accent); }
a:active { opacity: .75; }

strong, b { font-weight: 600; }
small { font-size: 12px; }
em, cite, i { font-style: normal; }
code, kbd, samp { font-family: var(--wt-font-mono); font-size: .92em; }

/* 正文排版（文章详情） */
.wt-prose {
    font-size: 16px;
    line-height: 1.85;
    color: var(--wt-text);
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.wt-prose > * + * { margin-top: 14px; }
.wt-prose h2 {
    font-size: 19px;
    margin-top: 26px;
    padding-left: 11px;
    border-left: 4px solid var(--wt-accent);
    line-height: 1.4;
}
.wt-prose h3 { font-size: 17px; margin-top: 22px; color: var(--wt-text); }
.wt-prose h4 { font-size: 15px; margin-top: 18px; color: var(--wt-text-2); }
.wt-prose a { border-bottom: 1px solid var(--wt-accent-soft); }
.wt-prose ul, .wt-prose ol { padding-left: 22px; }
.wt-prose ul { list-style: disc; }
.wt-prose ol { list-style: decimal; }
.wt-prose li { margin: 6px 0; }
.wt-prose li::marker { color: var(--wt-accent); }
.wt-prose blockquote {
    padding: 12px 15px;
    border-left: 3px solid var(--wt-accent);
    background: var(--wt-accent-softer);
    border-radius: 0 var(--wt-r-sm) var(--wt-r-sm) 0;
    color: var(--wt-text-2);
    font-size: 15px;
}
.wt-prose pre {
    padding: 14px 16px;
    background: var(--wt-surface-3);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r-sm);
    overflow-x: auto;
    font-size: 13.5px;
    line-height: 1.7;
    -webkit-overflow-scrolling: touch;
}
.wt-prose pre code { background: none; padding: 0; font-size: inherit; }
.wt-prose code {
    padding: 2px 6px;
    background: var(--wt-surface-3);
    border-radius: var(--wt-r-xs);
    color: var(--wt-accent-deep);
    font-size: .88em;
}
.wt-prose img { border-radius: var(--wt-r-sm); margin: 4px 0; }
.wt-prose table { font-size: 14px; display: block; overflow-x: auto; }
.wt-prose th, .wt-prose td { padding: 9px 12px; border: 1px solid var(--wt-line); text-align: left; }
.wt-prose th { background: var(--wt-surface-2); font-weight: 600; }
.wt-prose hr { border-top: 1px dashed var(--wt-line-strong); }

/* ==========================================================================
   04 布局骨架
   ========================================================================== */
.wt-app {
    position: relative;
    min-height: 100vh;
    background: var(--wt-bg);
    transition: transform var(--wt-dur) var(--wt-ease), box-shadow var(--wt-dur);
    will-change: transform;
    z-index: 2;
}

.wt-main {
    max-width: var(--wt-max-w);
    margin: 0 auto;
    padding: calc(var(--wt-header-h) + var(--wt-safe-t) + 10px) 12px
             calc(var(--wt-tabbar-h) + var(--wt-safe-b) + 24px);
    min-height: 100vh;
}

/* 桌面端：居中一个手机宽度的容器，两侧留白 */
@media (min-width: 760px) {
    body { background: var(--wt-bg-alt); }
    .wt-app {
        max-width: 760px;
        margin: 0 auto;
        box-shadow: var(--wt-shadow-lg);
        min-height: 100vh;
    }
    .wt-drawer { left: auto; }
}

/* ==========================================================================
   05 顶栏
   ========================================================================== */
.wt-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--wt-z-header);
    height: calc(var(--wt-header-h) + var(--wt-safe-t));
    padding: var(--wt-safe-t) 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--wt-accent-light), var(--wt-accent-dark));
    color: #fff;
    box-shadow: 0 2px 12px rgba(20, 32, 52, .14);
    transition: transform var(--wt-dur) var(--wt-ease);
}

@media (min-width: 760px) {
    .wt-header {
        left: 50%;
        right: auto;
        width: 760px;
        transform: translateX(-50%);
    }
    .wt-app.wt-open ~ .wt-header,
    body.wt-drawer-open .wt-header { transform: translateX(-50%) translateX(calc(var(--wt-drawer-w) * -1)); }
}

.wt-header__btn {
    flex: none;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    border-radius: var(--wt-r-sm);
    cursor: pointer;
    transition: background .18s, transform .18s;
    padding: 0;
    position: relative;
}
.wt-header__btn:hover { background: rgba(255, 255, 255, .24); }
.wt-header__btn:active { transform: scale(.93); }
.wt-header__btn svg { width: 20px; height: 20px; }

.wt-header__title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}
.wt-header__title b {
    font-size: 17px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wt-header__title span {
    font-size: 11.5px;
    opacity: .82;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wt-header__actions { flex: none; display: flex; align-items: center; gap: 8px; }

.wt-header__dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wt-orange);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .55);
}

/* 向下滚动时顶栏收起 */
.wt-header--hide { transform: translateY(-100%); }
@media (min-width: 760px) {
    .wt-header--hide { transform: translateX(-50%) translateY(-100%); }
}

/* 顶栏搜索框（滚动后出现） */
.wt-header__search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .18);
    border-radius: var(--wt-r-pill);
    color: rgba(255, 255, 255, .9);
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(6px);
}
.wt-header__search svg { width: 16px; height: 16px; flex: none; }

/* Logo 模式 */
.wt-header__logo {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.wt-header__logo img { height: 30px; width: auto; border-radius: var(--wt-r-xs); background: none; }
.wt-header__logo b { font-size: 17.5px; letter-spacing: .3px; }

/* ==========================================================================
   06 侧滑抽屉
   ========================================================================== */
.wt-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--wt-drawer-w);
    z-index: var(--wt-z-drawer);
    background: linear-gradient(180deg, var(--wt-drawer), var(--wt-drawer-2));
    color: var(--wt-drawer-text);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform var(--wt-dur) var(--wt-ease);
    overflow: hidden;
    padding-top: var(--wt-safe-t);
    padding-left: var(--wt-safe-l);
}
.wt-app.wt-open .wt-drawer { transform: translateX(0); }

.wt-drawer__profile {
    padding: 24px 18px 18px;
    border-bottom: 1px solid var(--wt-drawer-line);
    background: radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .09), transparent 60%);
}
.wt-drawer__profile .row { display: flex; align-items: center; gap: 12px; }
.wt-drawer__profile img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .22);
    flex: none;
    background: var(--wt-drawer-2);
    object-fit: cover;
}
.wt-drawer__profile .name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wt-drawer__profile .desc {
    font-size: 12px;
    color: var(--wt-drawer-text-2);
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wt-drawer__profile .guest-title { font-size: 16px; font-weight: 600; color: #fff; }
.wt-drawer__profile .guest-desc { font-size: 12px; color: var(--wt-drawer-text-2); margin-top: 2px; }

.wt-drawer__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
}
.wt-drawer__stats a {
    text-align: center;
    padding: 8px 4px;
    border-radius: var(--wt-r-sm);
    background: rgba(255, 255, 255, .06);
    color: var(--wt-drawer-text);
    transition: background .18s;
}
.wt-drawer__stats a:hover { background: rgba(255, 255, 255, .13); }
.wt-drawer__stats b { display: block; font-size: 16px; color: #fff; }
.wt-drawer__stats span { font-size: 11px; color: var(--wt-drawer-text-2); }

.wt-drawer__login {
    display: flex;
    gap: 9px;
    margin-top: 16px;
}
.wt-drawer__login a {
    flex: 1;
    text-align: center;
    padding: 9px 0;
    border-radius: var(--wt-r-sm);
    font-size: 14px;
    font-weight: 600;
    background: var(--wt-accent);
    color: #fff;
}
.wt-drawer__login a.ghost {
    background: rgba(255, 255, 255, .1);
    color: var(--wt-drawer-text);
}

.wt-drawer__nav {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0 calc(20px + var(--wt-safe-b));
    overscroll-behavior: contain;
}
.wt-drawer__group {
    padding: 14px 18px 6px;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--wt-drawer-text-2);
    opacity: .75;
}
.wt-drawer__nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: var(--wt-drawer-text);
    font-size: 15px;
    border-left: 3px solid transparent;
    transition: background .18s, border-color .18s;
}
.wt-drawer__nav a:hover { background: rgba(255, 255, 255, .05); }
.wt-drawer__nav a.is-active {
    background: linear-gradient(90deg, var(--wt-accent-soft), transparent);
    border-left-color: var(--wt-accent);
    color: #fff;
    font-weight: 600;
}
.wt-drawer__nav a .ico {
    width: 22px;
    text-align: center;
    font-size: 17px;
    flex: none;
}
.wt-drawer__nav a .txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-drawer__nav a .badge-n {
    flex: none;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--wt-r-pill);
    background: var(--wt-red);
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}

.wt-mask {
    position: fixed;
    inset: 0;
    z-index: var(--wt-z-mask);
    background: var(--wt-mask);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--wt-dur), visibility var(--wt-dur);
    border: 0;
    padding: 0;
    cursor: pointer;
}
body.wt-drawer-open .wt-mask { opacity: 1; visibility: visible; }

/* 抽屉打开时主内容右移 */
body.wt-drawer-open .wt-app { transform: translateX(var(--wt-drawer-w)); }
@media (min-width: 760px) {
    body.wt-drawer-open .wt-app { transform: none; }
}

/* ==========================================================================
   07 底部标签栏
   ========================================================================== */
.wt-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--wt-z-tabbar);
    height: calc(var(--wt-tabbar-h) + var(--wt-safe-b));
    padding-bottom: var(--wt-safe-b);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    background: color-mix(in srgb, var(--wt-surface) 86%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--wt-line);
    transition: transform var(--wt-dur) var(--wt-ease);
}
@media (min-width: 760px) {
    .wt-tabbar {
        left: 50%;
        transform: translateX(-50%);
        width: 760px;
    }
}
.wt-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    color: var(--wt-text-3);
    position: relative;
    transition: color .18s;
}
.wt-tabbar a svg { width: 21px; height: 21px; }
.wt-tabbar a.is-active { color: var(--wt-accent); font-weight: 600; }
.wt-tabbar a.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 26px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--wt-accent);
}
.wt-tabbar a .badge-n {
    position: absolute;
    top: 4px;
    left: 50%;
    margin-left: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--wt-r-pill);
    background: var(--wt-red);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
}
/* 中心凸起的发布按钮 */
.wt-tabbar a.is-fab svg {
    width: 42px;
    height: 42px;
    padding: 10px;
    margin-top: -16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wt-accent-light), var(--wt-accent-dark));
    color: #fff;
    box-shadow: 0 6px 18px var(--wt-accent-soft);
}
.wt-tabbar a.is-fab.is-active::before { display: none; }

/* ==========================================================================
   08 按钮
   ========================================================================== */
.wt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--wt-r-sm);
    background: linear-gradient(135deg, var(--wt-accent-light), var(--wt-accent-dark));
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, opacity .2s;
    box-shadow: 0 5px 14px var(--wt-accent-soft);
    text-decoration: none;
    -webkit-user-select: none;
    user-select: none;
}
.wt-btn:hover { color: #fff; box-shadow: 0 8px 22px var(--wt-accent-soft); }
.wt-btn:active { transform: scale(.97); }
.wt-btn:disabled, .wt-btn.is-disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.wt-btn--block { display: flex; width: 100%; }
.wt-btn--ghost {
    background: var(--wt-surface-2);
    color: var(--wt-text-2);
    box-shadow: none;
    border: 1px solid var(--wt-line);
}
.wt-btn--ghost:hover { color: var(--wt-text); background: var(--wt-surface-3); box-shadow: none; }
.wt-btn--outline {
    background: transparent;
    color: var(--wt-accent-dark);
    border: 1px solid var(--wt-accent);
    box-shadow: none;
}
.wt-btn--danger { background: linear-gradient(135deg, #f2686c, var(--wt-red)); box-shadow: 0 5px 14px rgba(229, 72, 77, .22); }
.wt-btn--sm { min-height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: var(--wt-r-xs); }
.wt-btn--xs { min-height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: var(--wt-r-xs); gap: 4px; }
.wt-btn--lg { min-height: 50px; font-size: 16.5px; border-radius: var(--wt-r); }

/* 图标按钮 */
.wt-iconbtn {
    width: 42px;
    height: 42px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r-sm);
    background: var(--wt-surface);
    color: var(--wt-text-2);
    cursor: pointer;
    padding: 0;
    transition: background .18s, color .18s, transform .15s;
}
.wt-iconbtn:hover { background: var(--wt-surface-2); color: var(--wt-accent-dark); }
.wt-iconbtn:active { transform: scale(.94); }
.wt-iconbtn svg { width: 19px; height: 19px; }
.wt-iconbtn.is-on { background: var(--wt-accent-soft); color: var(--wt-accent-dark); border-color: transparent; }

/* ==========================================================================
   09 卡片
   ========================================================================== */
.wt-card {
    background: var(--wt-surface);
    border-radius: var(--wt-r);
    box-shadow: var(--wt-shadow-sm);
    border: 1px solid var(--wt-line);
    overflow: hidden;
    margin-bottom: 12px;
}
.wt-card__hd {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--wt-line);
    background: var(--wt-surface-2);
}
.wt-card__hd h2, .wt-card__hd h3 { font-size: 15.5px; flex: 1; min-width: 0; }
.wt-card__hd .more { font-size: 13px; color: var(--wt-text-3); flex: none; }
.wt-card__bd { padding: 15px; }
.wt-card__bd--flush { padding: 0; }
.wt-card__ft {
    padding: 12px 15px;
    border-top: 1px solid var(--wt-line);
    background: var(--wt-surface-2);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 区块标题（首页用） */
.wt-sec {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 18px 2px 10px;
}
.wt-sec h2 { font-size: 17px; flex: 1; }
.wt-sec h2::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 15px;
    border-radius: 3px;
    background: var(--wt-accent);
    margin-right: 8px;
    vertical-align: -2px;
}
.wt-sec a { font-size: 13px; color: var(--wt-text-3); }

/* ==========================================================================
   10 列表
   ========================================================================== */

/* 10.1 帖子/文章列表（旧模板 .thlist 的现代版） */
.wt-list { background: var(--wt-surface); border-radius: var(--wt-r); overflow: hidden; border: 1px solid var(--wt-line); box-shadow: var(--wt-shadow-xs); }
.wt-list__item {
    display: block;
    padding: 14px 15px;
    border-bottom: 1px solid var(--wt-line);
    position: relative;
    transition: background .16s;
}
.wt-list__item:last-child { border-bottom: 0; }
.wt-list__item:hover { background: var(--wt-surface-2); }
.wt-list__item:active { background: var(--wt-surface-3); }

.wt-item__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--wt-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 5px;
}
.wt-item__summary {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--wt-text-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}
.wt-item__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--wt-text-4);
    flex-wrap: wrap;
}
.wt-item__meta .who { color: var(--wt-text-3); display: inline-flex; align-items: center; gap: 5px; }
.wt-item__meta .who img { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.wt-item__meta .sp { flex: 1; }

/* 带缩略图的条目（旧模板 .fplist） */
.wt-item--media { display: flex; gap: 12px; align-items: flex-start; }
.wt-item--media .body { flex: 1; min-width: 0; }
.wt-item--media .thumb {
    flex: none;
    width: 104px;
    height: 74px;
    border-radius: var(--wt-r-sm);
    overflow: hidden;
    background: var(--wt-surface-3);
}
.wt-item--media .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 标签：置顶 / 精华 / 热帖 */
.wt-tag {
    display: inline-flex;
    align-items: center;
    height: 19px;
    padding: 0 6px;
    border-radius: var(--wt-r-xs);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    vertical-align: 1px;
    margin-right: 5px;
    flex: none;
}
.wt-tag--top { background: var(--wt-red); color: #fff; }
.wt-tag--digest { background: var(--wt-gold); color: #fff; }
.wt-tag--hot { background: var(--wt-orange); color: #fff; }
.wt-tag--cat { background: var(--wt-accent-soft); color: var(--wt-accent-dark); }
.wt-tag--soft { background: var(--wt-surface-3); color: var(--wt-text-3); }

/* 10.2 频道网格（首页入口） */
.wt-cats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media (min-width: 520px) { .wt-cats { grid-template-columns: repeat(6, 1fr); } }
.wt-cats a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border-radius: var(--wt-r-sm);
    background: var(--wt-surface);
    border: 1px solid var(--wt-line);
    color: var(--wt-text-2);
    font-size: 12.5px;
    transition: transform .18s, border-color .18s, box-shadow .18s;
}
.wt-cats a:active { transform: scale(.95); }
.wt-cats a:hover { border-color: var(--wt-accent); box-shadow: var(--wt-shadow-sm); }
.wt-cats .ico {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 20px;
    background: var(--wt-accent-soft);
}
.wt-cats .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* 10.3 分类行（旧模板 .catlist / .sub_forum） */
.wt-catrow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--wt-line);
    color: var(--wt-text);
    transition: background .16s;
}
.wt-catrow:last-child { border-bottom: 0; }
.wt-catrow:hover { background: var(--wt-surface-2); }
.wt-catrow .ico {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 21px;
    background: var(--wt-accent-soft);
}
.wt-catrow .body { flex: 1; min-width: 0; }
.wt-catrow .nm { font-size: 15.5px; font-weight: 600; }
.wt-catrow .ds { font-size: 12.5px; color: var(--wt-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-catrow .num {
    flex: none;
    min-width: 30px;
    padding: 3px 9px;
    border-radius: var(--wt-r-pill);
    background: var(--wt-accent-soft);
    color: var(--wt-accent-dark);
    font-size: 12px;
    text-align: center;
}

/* 10.4 评论 */
.wt-comments { display: flex; flex-direction: column; }
.wt-comment {
    display: flex;
    gap: 11px;
    padding: 14px 15px;
    border-bottom: 1px solid var(--wt-line);
}
.wt-comment:last-child { border-bottom: 0; }
.wt-comment > img, .wt-comment > a > img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex: none;
    object-fit: cover;
}
.wt-comment .cbody { flex: 1; min-width: 0; }
.wt-comment .chead { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.wt-comment .cname { font-size: 14px; font-weight: 600; color: var(--wt-text); }
.wt-comment .cname .role { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: var(--wt-accent-soft); color: var(--wt-accent-dark); margin-left: 5px; font-weight: 600; vertical-align: 1px; }
.wt-comment .ctime { font-size: 11.5px; color: var(--wt-text-4); margin-left: auto; flex: none; }
.wt-comment .ctext { font-size: 14.5px; line-height: 1.72; color: var(--wt-text-2); word-wrap: break-word; overflow-wrap: anywhere; }
.wt-comment .cacts { display: flex; gap: 14px; margin-top: 7px; font-size: 12.5px; color: var(--wt-text-4); }
.wt-comment .cacts button {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.wt-comment .cacts button:hover { color: var(--wt-accent-dark); }
.wt-comment .cacts button.is-on { color: var(--wt-red); font-weight: 600; }
.wt-comment--reply {
    margin: 10px 0 0;
    padding: 11px 13px;
    background: var(--wt-surface-2);
    border-radius: var(--wt-r-sm);
    border: 1px solid var(--wt-line);
}
.wt-comment--reply .ctext { font-size: 13.5px; }

/* 10.5 通知 */
.wt-notice {
    display: flex;
    gap: 11px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--wt-line);
    align-items: flex-start;
}
.wt-notice:last-child { border-bottom: 0; }
.wt-notice.is-unread { background: var(--wt-accent-softer); }
.wt-notice .ico {
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 17px;
    background: var(--wt-accent-soft);
}
.wt-notice .body { flex: 1; min-width: 0; }
.wt-notice .t { font-size: 14.5px; font-weight: 600; }
.wt-notice .c { font-size: 13px; color: var(--wt-text-3); margin-top: 2px; word-wrap: break-word; }
.wt-notice .d { font-size: 11.5px; color: var(--wt-text-4); margin-top: 4px; }

/* ==========================================================================
   11 表单
   ========================================================================== */
.wt-field { margin-bottom: 14px; }
.wt-field > label, .wt-label {
    display: block;
    font-size: 13px;
    color: var(--wt-text-2);
    margin-bottom: 6px;
    font-weight: 500;
}
.wt-field .tip { font-size: 12px; color: var(--wt-text-4); margin-top: 5px; }

.wt-input, .wt-select, .wt-textarea {
    width: 100%;
    padding: 11px 13px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    color: var(--wt-text);
    background: var(--wt-surface-2);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r-sm);
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
    -webkit-appearance: none;
    appearance: none;
}
.wt-input::placeholder, .wt-textarea::placeholder { color: var(--wt-text-4); }
.wt-input:focus, .wt-select:focus, .wt-textarea:focus {
    border-color: var(--wt-accent);
    background: var(--wt-surface);
    box-shadow: 0 0 0 3px var(--wt-accent-soft);
}
.wt-input:disabled, .wt-textarea:disabled { opacity: .6; cursor: not-allowed; }
.wt-input.is-error, .wt-textarea.is-error { border-color: var(--wt-red); }

.wt-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A94A6' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 15px;
    padding-right: 36px;
}
.wt-textarea { min-height: 118px; resize: vertical; }

/* 复选框 / 单选框 */
.wt-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--wt-text-2); cursor: pointer; }
.wt-check input { width: 18px; height: 18px; accent-color: var(--wt-accent); flex: none; margin: 0; }

/* 开关 */
.wt-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.wt-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.wt-switch .track {
    width: 46px;
    height: 27px;
    border-radius: var(--wt-r-pill);
    background: var(--wt-line-strong);
    position: relative;
    transition: background .22s;
    flex: none;
}
.wt-switch .track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .22s var(--wt-ease-out);
}
.wt-switch input:checked + .track { background: var(--wt-accent); }
.wt-switch input:checked + .track::after { transform: translateX(19px); }
.wt-switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--wt-accent-soft); }

/* 表单行 */
.wt-fromrow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--wt-line);
}
.wt-fromrow:last-child { border-bottom: 0; }
.wt-fromrow > label { flex: 1; font-size: 14.5px; color: var(--wt-text); }
.wt-fromrow .ctrl { flex: none; }

/* 输入组 */
.wt-inputgroup { display: flex; gap: 8px; }
.wt-inputgroup .wt-input { flex: 1; }
.wt-inputgroup .wt-btn { flex: none; }

/* 富文本框（发帖用） */
.wt-editor { border: 1px solid var(--wt-line); border-radius: var(--wt-r-sm); overflow: hidden; background: var(--wt-surface-2); }
.wt-editor__tabs { display: flex; border-bottom: 1px solid var(--wt-line); background: var(--wt-surface-3); }
.wt-editor__tabs button {
    flex: none;
    padding: 9px 15px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13.5px;
    color: var(--wt-text-3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.wt-editor__tabs button.is-on { color: var(--wt-accent-dark); border-bottom-color: var(--wt-accent); font-weight: 600; background: var(--wt-surface-2); }
.wt-editor__toolbar {
    display: flex;
    gap: 2px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--wt-line);
    background: var(--wt-surface-3);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.wt-editor__toolbar button {
    flex: none;
    width: 32px;
    height: 30px;
    border: 0;
    border-radius: var(--wt-r-xs);
    background: none;
    color: var(--wt-text-2);
    font-size: 14px;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.wt-editor__toolbar button:hover { background: var(--wt-surface); color: var(--wt-accent-dark); }
.wt-editor textarea {
    width: 100%;
    min-height: 200px;
    padding: 13px;
    border: 0;
    background: var(--wt-surface-2);
    color: var(--wt-text);
    font: 15px/1.7 var(--wt-font);
    outline: none;
    resize: vertical;
}
.wt-editor__preview { padding: 13px; min-height: 200px; }

/* 文件选择 */
.wt-file { position: relative; overflow: hidden; display: inline-block; }
.wt-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 100px; }

/* ==========================================================================
   12 徽章与状态
   ========================================================================== */
.wt-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 21px;
    padding: 0 9px;
    border-radius: var(--wt-r-pill);
    font-size: 12px;
    font-weight: 500;
    background: var(--wt-surface-3);
    color: var(--wt-text-3);
}
.wt-badge--ok { background: rgba(34, 160, 107, .13); color: var(--wt-green); }
.wt-badge--warn { background: rgba(232, 163, 61, .15); color: #B5791C; }
.wt-badge--err { background: rgba(229, 72, 77, .13); color: var(--wt-red); }
.wt-badge--info { background: var(--wt-accent-soft); color: var(--wt-accent-dark); }

.wt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wt-green); display: inline-block; flex: none; }
.wt-dot--off { background: var(--wt-text-4); }

/* 提示条 */
.wt-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--wt-r-sm);
    font-size: 14px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    line-height: 1.6;
}
.wt-alert--ok { background: rgba(34, 160, 107, .09); border-color: rgba(34, 160, 107, .25); color: #1B7F56; }
.wt-alert--err { background: rgba(229, 72, 77, .08); border-color: rgba(229, 72, 77, .25); color: #C2373B; }
.wt-alert--info { background: var(--wt-accent-softer); border-color: var(--wt-accent-soft); color: var(--wt-accent-deep); }
.wt-alert--warn { background: rgba(232, 163, 61, .1); border-color: rgba(232, 163, 61, .28); color: #A66C14; }
.wt-alert .ico { flex: none; font-size: 16px; line-height: 1.4; }

/* ==========================================================================
   13 分页
   ========================================================================== */
.wt-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 0 8px;
    flex-wrap: wrap;
}
.wt-pager a, .wt-pager span {
    min-width: 36px;
    height: 36px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--wt-r-xs);
    background: var(--wt-surface);
    border: 1px solid var(--wt-line);
    color: var(--wt-text-2);
    font-size: 14px;
    transition: background .16s, color .16s;
}
.wt-pager a:hover { background: var(--wt-surface-2); color: var(--wt-accent-dark); }
.wt-pager .is-current {
    background: linear-gradient(135deg, var(--wt-accent-light), var(--wt-accent-dark));
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}
.wt-pager .is-disabled { opacity: .45; }
.wt-pager .gap { background: none; border: 0; color: var(--wt-text-4); }

/* 加载更多 */
.wt-loadmore {
    display: block;
    width: 100%;
    padding: 15px;
    text-align: center;
    color: var(--wt-text-3);
    font-size: 14px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r);
    cursor: pointer;
    font-family: inherit;
    margin-top: 12px;
}
.wt-loadmore:hover { color: var(--wt-accent-dark); background: var(--wt-surface-2); }

/* ==========================================================================
   14 空态与提示
   ========================================================================== */
.wt-empty {
    padding: 54px 24px;
    text-align: center;
    color: var(--wt-text-3);
}
.wt-empty .ico { font-size: 46px; line-height: 1; margin-bottom: 14px; opacity: .55; }
.wt-empty h3 { font-size: 16px; color: var(--wt-text-2); margin-bottom: 6px; }
.wt-empty p { font-size: 13.5px; margin-bottom: 16px; }

.wt-skeleton {
    background: linear-gradient(90deg, var(--wt-surface-3) 25%, var(--wt-surface-2) 37%, var(--wt-surface-3) 63%);
    background-size: 400% 100%;
    animation: wt-shimmer 1.4s ease infinite;
    border-radius: var(--wt-r-xs);
    height: 14px;
}
@keyframes wt-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Toast */
.wt-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--wt-tabbar-h) + var(--wt-safe-b) + 22px);
    transform: translate(-50%, 16px);
    z-index: var(--wt-z-toast);
    max-width: 82vw;
    padding: 11px 20px;
    border-radius: var(--wt-r-pill);
    background: rgba(24, 30, 39, .93);
    color: #fff;
    font-size: 14px;
    box-shadow: var(--wt-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s, transform .24s, visibility .24s;
    text-align: center;
    backdrop-filter: blur(8px);
}
.wt-toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.wt-toast--ok { background: rgba(24, 130, 92, .95); }
.wt-toast--err { background: rgba(190, 50, 55, .95); }

/* ==========================================================================
   15 模态与抽屉面板
   ========================================================================== */
.wt-modal {
    position: fixed;
    inset: 0;
    z-index: var(--wt-z-modal);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: var(--wt-mask);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .26s, visibility .26s;
}
.wt-modal.is-open { opacity: 1; visibility: visible; }
@media (min-width: 640px) { .wt-modal { align-items: center; } }

.wt-modal__panel {
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    background: var(--wt-surface);
    border-radius: var(--wt-r-lg) var(--wt-r-lg) 0 0;
    box-shadow: var(--wt-shadow-lg);
    transform: translateY(30px) scale(.99);
    transition: transform .3s var(--wt-ease-out);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: var(--wt-safe-b);
}
@media (min-width: 640px) { .wt-modal__panel { border-radius: var(--wt-r-lg); } }
.wt-modal.is-open .wt-modal__panel { transform: none; }
.wt-modal__hd {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--wt-line);
    flex: none;
}
.wt-modal__hd h3 { flex: 1; font-size: 16px; }
.wt-modal__bd { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.wt-modal__ft { padding: 12px 16px; border-top: 1px solid var(--wt-line); display: flex; gap: 10px; flex: none; }
.wt-modal__ft .wt-btn { flex: 1; }
.wt-modal__close { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--wt-text-3); cursor: pointer; padding: 0 4px; }

/* ==========================================================================
   16 用户中心
   ========================================================================== */
.wt-profile {
    position: relative;
    border-radius: var(--wt-r);
    overflow: hidden;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--wt-accent-light), var(--wt-accent-dark));
    color: #fff;
    box-shadow: var(--wt-shadow);
}
.wt-profile__bg {
    position: absolute;
    inset: 0;
    opacity: .16;
    background-image: radial-gradient(circle at 20% 20%, #fff 0, transparent 40%),
                      radial-gradient(circle at 80% 0%, #fff 0, transparent 35%);
}
.wt-profile__bd {
    position: relative;
    padding: 20px 18px 18px;
    display: flex;
    gap: 15px;
    align-items: center;
}
.wt-profile__bd > img {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .45);
    flex: none;
    object-fit: cover;
    background: rgba(255, 255, 255, .15);
}
.wt-profile__info { flex: 1; min-width: 0; }
.wt-profile__info .nm { font-size: 19px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.wt-profile__info .nm .lvl { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--wt-r-pill); background: rgba(255, 255, 255, .22); }
.wt-profile__info .sig {
    font-size: 12.5px;
    opacity: .88;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wt-profile__bar {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .25);
    margin-top: 9px;
    overflow: hidden;
}
.wt-profile__bar i { display: block; height: 100%; background: #fff; border-radius: 4px; }
.wt-profile__stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(255, 255, 255, .18);
}
.wt-profile__stats a {
    padding: 11px 4px;
    text-align: center;
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, .13);
}
.wt-profile__stats a:last-child { border-right: 0; }
.wt-profile__stats b { display: block; font-size: 16.5px; }
.wt-profile__stats span { font-size: 11px; opacity: .82; }

.wt-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wt-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wt-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.wt-stat {
    background: var(--wt-surface);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r-sm);
    padding: 14px 10px;
    text-align: center;
}
.wt-stat b { display: block; font-size: 20px; color: var(--wt-accent-dark); }
.wt-stat span { font-size: 12px; color: var(--wt-text-3); }

/* 用户中心菜单 */
.wt-menu { background: var(--wt-surface); border-radius: var(--wt-r); border: 1px solid var(--wt-line); overflow: hidden; margin-bottom: 12px; }
.wt-menu a, .wt-menu button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 15px;
    border: 0;
    border-bottom: 1px solid var(--wt-line);
    background: none;
    font: inherit;
    font-size: 15px;
    color: var(--wt-text);
    text-align: left;
    cursor: pointer;
    transition: background .16s;
}
.wt-menu a:last-child, .wt-menu button:last-child { border-bottom: 0; }
.wt-menu a:hover, .wt-menu button:hover { background: var(--wt-surface-2); }
.wt-menu .ico { width: 24px; text-align: center; font-size: 17px; flex: none; }
.wt-menu .txt { flex: 1; }
.wt-menu .num { font-size: 13px; color: var(--wt-text-4); }
.wt-menu .arrow { color: var(--wt-text-4); font-size: 15px; flex: none; }

/* ==========================================================================
   17 后台
   ========================================================================== */
.wt-admin {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 900px) {
    .wt-admin { grid-template-columns: 216px 1fr; align-items: start; }
}

.wt-admin__side {
    background: var(--wt-surface);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r);
    overflow: hidden;
    position: sticky;
    top: calc(var(--wt-header-h) + var(--wt-safe-t) + 12px);
}
@media (max-width: 899px) {
    .wt-admin__side {
        position: static;
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .wt-admin__side::-webkit-scrollbar { display: none; }
}
.wt-admin__side .grp {
    padding: 13px 15px 6px;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--wt-text-4);
}
@media (max-width: 899px) { .wt-admin__side .grp { display: none; } }
.wt-admin__side a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    font-size: 14.5px;
    color: var(--wt-text-2);
    border-left: 3px solid transparent;
    white-space: nowrap;
    transition: background .16s, color .16s, border-color .16s;
}
.wt-admin__side a:hover { background: var(--wt-surface-2); color: var(--wt-text); }
.wt-admin__side a.is-active {
    background: var(--wt-accent-softer);
    color: var(--wt-accent-dark);
    border-left-color: var(--wt-accent);
    font-weight: 600;
}
.wt-admin__side a .ico { width: 20px; text-align: center; flex: none; font-size: 16px; }

.wt-admin__hd {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.wt-admin__hd h1 { font-size: 20px; flex: 1; min-width: 140px; }
.wt-admin__hd .sub { font-size: 13px; color: var(--wt-text-3); width: 100%; }

/* 数据表格 */
.wt-tablewrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--wt-r);
    border: 1px solid var(--wt-line);
    background: var(--wt-surface);
}
.wt-table { font-size: 13.5px; min-width: 560px; }
.wt-table th, .wt-table td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--wt-line); vertical-align: middle; }
.wt-table th {
    background: var(--wt-surface-2);
    font-weight: 600;
    font-size: 12.5px;
    color: var(--wt-text-3);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.wt-table tr:last-child td { border-bottom: 0; }
.wt-table tbody tr:hover { background: var(--wt-surface-2); }
.wt-table .act { white-space: nowrap; display: flex; gap: 6px; }
.wt-table .nowrap { white-space: nowrap; }
.wt-table img.thumb { width: 42px; height: 32px; object-fit: cover; border-radius: var(--wt-r-xs); }

/* 仪表盘小部件 */
.wt-widget {
    background: var(--wt-surface);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r);
    padding: 16px;
    box-shadow: var(--wt-shadow-xs);
}
.wt-widget h3 { font-size: 14.5px; color: var(--wt-text-3); font-weight: 500; margin-bottom: 10px; }
.wt-widget .val { font-size: 26px; font-weight: 700; color: var(--wt-text); line-height: 1.1; }
.wt-widget .val small { font-size: 13px; font-weight: 400; color: var(--wt-text-3); margin-left: 4px; }
.wt-widget .delta { font-size: 12.5px; margin-top: 6px; color: var(--wt-text-3); }
.wt-widget .delta.up { color: var(--wt-green); }
.wt-widget .delta.down { color: var(--wt-red); }

/* 迷你柱状图 */
.wt-bars { display: flex; align-items: flex-end; gap: 3px; height: 54px; margin-top: 12px; }
.wt-bars i {
    flex: 1;
    background: var(--wt-accent-soft);
    border-radius: 3px 3px 0 0;
    min-height: 3px;
    position: relative;
    transition: background .18s;
}
.wt-bars i:hover { background: var(--wt-accent); }

/* 空态行 */
.wt-norow { padding: 40px 20px; text-align: center; color: var(--wt-text-3); font-size: 14px; }

/* 过滤栏 */
.wt-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.wt-filters .wt-input, .wt-filters .wt-select { width: auto; min-width: 120px; padding: 8px 11px; font-size: 14px; }
.wt-filters .sp { flex: 1; }
.wt-filters .wt-select { padding-right: 32px; }

/* 后台登录 */
.wt-authpage {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 18px calc(24px + var(--wt-safe-b));
    background:
        radial-gradient(700px 400px at 15% 0%, var(--wt-accent-soft), transparent 60%),
        radial-gradient(600px 380px at 100% 100%, var(--wt-accent-softer), transparent 55%),
        var(--wt-bg);
}
.wt-authbox {
    width: 100%;
    max-width: 400px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r-lg);
    box-shadow: var(--wt-shadow-lg);
    padding: 28px 24px;
}
.wt-authbox .logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-size: 30px;
    background: linear-gradient(145deg, var(--wt-accent-light), var(--wt-accent-dark));
    box-shadow: 0 10px 24px var(--wt-accent-soft);
}
.wt-authbox h1 { font-size: 21px; text-align: center; margin-bottom: 4px; }
.wt-authbox .sub { text-align: center; color: var(--wt-text-3); font-size: 13px; margin-bottom: 22px; }

/* ==========================================================================
   18 动画
   ========================================================================== */
@keyframes wt-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
.wt-anim { animation: wt-fade-up .32s var(--wt-ease-out) both; }
.wt-anim-d1 { animation-delay: .04s; }
.wt-anim-d2 { animation-delay: .08s; }
.wt-anim-d3 { animation-delay: .12s; }

@keyframes wt-spin { to { transform: rotate(360deg); } }
.wt-spin { animation: wt-spin .8s linear infinite; }

/* 回到顶部 */
.wt-totop {
    position: fixed;
    right: 14px;
    bottom: calc(var(--wt-tabbar-h) + var(--wt-safe-b) + 16px);
    z-index: 55;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(40, 48, 60, .82);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    box-shadow: var(--wt-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .24s, transform .24s, visibility .24s;
}
.wt-totop.is-show { opacity: 1; visibility: visible; transform: none; }
.wt-totop svg { width: 19px; height: 19px; }

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

/* ==========================================================================
   19 无障碍
   ========================================================================== */
.wt-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
:focus-visible {
    outline: 2px solid var(--wt-accent);
    outline-offset: 2px;
    border-radius: 4px;
}
.wt-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 10px 16px;
    background: var(--wt-surface);
    border-radius: 0 0 var(--wt-r-sm) 0;
}
.wt-skip:focus { left: 0; }

/* ==========================================================================
   20 工具类
   ========================================================================== */
.wt-flex { display: flex; }
.wt-flex-c { display: flex; align-items: center; }
.wt-flex-b { display: flex; align-items: center; justify-content: space-between; }
.wt-flex-wrap { flex-wrap: wrap; }
.wt-gap4 { gap: 4px; } .wt-gap6 { gap: 6px; } .wt-gap8 { gap: 8px; }
.wt-gap10 { gap: 10px; } .wt-gap12 { gap: 12px; } .wt-gap16 { gap: 16px; }
.wt-col { display: flex; flex-direction: column; }
.wt-1 { flex: 1; min-width: 0; }
.wt-none { flex: none; }
.wt-mt6 { margin-top: 6px; } .wt-mt10 { margin-top: 10px; } .wt-mt16 { margin-top: 16px; }
.wt-mt20 { margin-top: 20px; } .wt-mb6 { margin-bottom: 6px; } .wt-mb10 { margin-bottom: 10px; }
.wt-mb16 { margin-bottom: 16px; } .wt-mb20 { margin-bottom: 20px; }
.wt-p0 { padding: 0 !important; } .wt-p12 { padding: 12px; } .wt-p16 { padding: 16px; }
.wt-tc { text-align: center; } .wt-tr { text-align: right; }
.wt-f12 { font-size: 12px; } .wt-f13 { font-size: 13px; } .wt-f14 { font-size: 14px; }
.wt-f16 { font-size: 16px; } .wt-f18 { font-size: 18px; } .wt-f22 { font-size: 22px; }
.wt-fw6 { font-weight: 600; } .wt-fw7 { font-weight: 700; }
.wt-muted { color: var(--wt-text-3); } .wt-muted2 { color: var(--wt-text-4); }
.wt-accent { color: var(--wt-accent-dark); }
.wt-red { color: var(--wt-red); } .wt-green { color: var(--wt-green); } .wt-orange { color: var(--wt-orange); }
.wt-clamp1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.wt-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wt-clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wt-break { word-wrap: break-word; overflow-wrap: anywhere; }
.wt-scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wt-hidden { display: none !important; }
.wt-mono { font-family: var(--wt-font-mono); }
.wt-round { border-radius: 50%; }
.wt-divider { height: 1px; background: var(--wt-line); margin: 14px 0; border: 0; }

/* 打印 */
@media print {
    .wt-header, .wt-drawer, .wt-tabbar, .wt-totop, .wt-mask { display: none !important; }
    .wt-main { padding: 0; }
}
