/* ==========================================================================
   EchoX PC 模板（templates/echox/style.css）
   左侧导航 + 顶部工具栏 · 圆角卡片风格
   ========================================================================== */

/* ---------------------------------------------------------------
   0. 自托管艺术字体（不依赖第三方 CDN）
   --------------------------------------------------------------- */
/* 拉丁字符 → Pacifico 手写体 */
@font-face {
    font-family: 'Echox Brand';
    src: url('../fonts/pacifico-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 中文 → 站酷快乐体（圆润手写感，与 Pacifico 同一气质） */
@font-face {
    font-family: 'Echox Brand';
    src: url('../fonts/zcool-kuaile.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+2E80-2FFF, U+3000-303F, U+3040-30FF, U+3100-312F, U+31A0-31BF, U+3200-33FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}

/* ---------------------------------------------------------------
   1. 变量与基础
   --------------------------------------------------------------- */
:root {
    --ec-bg: #f6f7f9;
    --ec-card: #ffffff;
    --ec-line: #f0f2f4;
    --ec-line-strong: #e5e7eb;
    --ec-text: #17181c;
    --ec-text-2: #4b5563;
    --ec-text-3: #9ca3af;
    --ec-green: #10b981;
    --ec-green-deep: #059669;
    --ec-green-soft: #ecfdf5;
    --ec-blue: #3b82f6;
    --ec-purple: #8b5cf6;
    --ec-pink: #ec4899;
    --ec-orange: #f59e0b;
    --ec-red: #ef4444;
    --ec-radius: 18px;
    --ec-radius-sm: 12px;
    --ec-shadow: 0 2px 10px rgba(35, 41, 58, 0.05);
    --ec-shadow-lg: 0 10px 34px rgba(35, 41, 58, 0.12);
    --ec-sidebar-w: 224px;
}

body {
    background: var(--ec-bg);
    color: var(--ec-text);
    font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(16, 185, 129, 0.25);
}

body ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
body ::-webkit-scrollbar-thumb {
    background: #d6dcea;
    border-radius: 4px;
}
body ::-webkit-scrollbar-thumb:hover {
    background: #c2cadd;
}
body ::-webkit-scrollbar-track {
    background: transparent;
}

.ec-shell a {
    text-decoration: none;
    color: inherit;
}

.ec-shell [hidden] {
    display: none !important;
}

/* ---------------------------------------------------------------
   2. 布局骨架
   --------------------------------------------------------------- */
.ec-shell {
    min-height: 100vh;
}

.ec-stage {
    margin-left: var(--ec-sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.ec-main {
    flex: 1;
}

.ec-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 28px 44px;
}

/* ---------------------------------------------------------------
   3. 左侧导航栏
   --------------------------------------------------------------- */
.ec-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--ec-sidebar-w);
    background: var(--ec-card);
    border-right: 1px solid var(--ec-line);
    display: flex;
    flex-direction: column;
    padding: 18px 14px 16px;
    /* 侧栏自身不滚动，滚轮事件交还页面，避免「只滚这一块」 */
    overflow: hidden;
    z-index: 50;
}

.ec-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px 20px;
}

.ec-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 5px 14px rgba(16, 185, 129, 0.35);
    flex-shrink: 0;
}

.ec-brand-name {
    font-family: 'Echox Brand', 'Segoe UI', system-ui, sans-serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.6;
    padding-top: 2px;
    letter-spacing: 0.2px;
    color: #1c2230;
}

.ec-brand-img {
    max-height: 38px;
    max-width: 100%;
    object-fit: contain;
}

.ec-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ec-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--ec-radius-sm);
    color: var(--ec-text-2);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.18s, color 0.18s;
}

.ec-nav-item i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

.ec-nav-item:hover {
    background: #f3f5fa;
    color: var(--ec-text);
}

.ec-nav-item.is-on {
    background: var(--ec-green-soft);
    color: var(--ec-green-deep);
    font-weight: 600;
}

.ec-nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--ec-red);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-side-block {
    margin-top: 22px;
    padding: 0 4px;
    min-height: 0;
    overflow: hidden;
}

.ec-side-title {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--ec-text-3);
}

.ec-side-title i {
    color: var(--ec-orange);
    font-size: 11px;
}

.ec-side-cats {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ec-side-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    color: var(--ec-text-2);
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
}

.ec-side-cat:hover {
    background: #f3f5fa;
    color: var(--ec-text);
}

.ec-side-cat-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    flex-shrink: 0;
}

.ec-side-cat-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ec-side-foot {
    margin-top: auto;
    padding: 26px 10px 12px;
    text-align: center;
}

.ec-side-foot-word {
    font-family: 'Echox Brand', 'Segoe UI', system-ui, sans-serif;
    font-size: 27px;
    line-height: 1.4;
    background: linear-gradient(120deg, #34d399, #10b981 45%, #0ea5e9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* 板块图标 / 通用色板 */
.ec-tone-1 { background: #ecfdf5; color: #059669; }
.ec-tone-2 { background: #e8f1fe; color: #2563eb; }
.ec-tone-3 { background: #fdf3e7; color: #d97706; }
.ec-tone-4 { background: #fdebf4; color: #db2777; }
.ec-tone-5 { background: #f0ebfd; color: #7c3aed; }
.ec-tone-6 { background: #e6f7f6; color: #0d9488; }
.ec-tone-7 { background: #fdeaea; color: #dc2626; }

/* ---------------------------------------------------------------
   4. 顶栏
   --------------------------------------------------------------- */
.ec-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ec-line);
}

.ec-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 64px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.ec-slogan {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ec-text-3);
    font-size: 13px;
    white-space: nowrap;
}

/* slogan 只保留文字（引号图标已按反馈去掉） */

.ec-search {
    position: relative;
    flex: 1;
    max-width: 460px;
    margin: 0 auto;
}

.ec-search > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ec-text-3);
    font-size: 13px;
    pointer-events: none;
}

.ec-search input {
    width: 100%;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--ec-line-strong);
    background: #f6f7f9;
    padding: 0 18px 0 42px;
    font-size: 13.5px;
    color: var(--ec-text);
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.ec-search input::placeholder {
    color: var(--ec-text-3);
}

.ec-search input:focus {
    outline: none;
    background: #fff;
    border-color: var(--ec-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.ec-top-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ec-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--ec-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ec-text-2);
    font-size: 16px;
    transition: background 0.18s, color 0.18s;
}

.ec-icon-btn:hover {
    background: #f3f5fa;
    color: var(--ec-text);
}

.ec-icon-dot {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ec-red);
    border: 2px solid #fff;
}

.ec-icon-badge {
    position: absolute;
    top: 3px;
    right: 1px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--ec-red);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-sizing: content-box;
}

/* 用户区 + hover 菜单 */
.ec-user {
    position: relative;
    margin-left: 4px;
}

.ec-user-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 8px 4px 4px;
    border: none;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s;
}

.ec-user-btn:hover {
    background: #f3f5fa;
}

.ec-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-avatar-fallback {
    background: var(--ec-green-soft);
    color: var(--ec-green-deep);
    font-size: 14px;
}

.ec-user-caret {
    font-size: 10px;
    color: var(--ec-text-3);
    transition: transform 0.2s;
}

.ec-user:hover .ec-user-caret,
.ec-user.is-open .ec-user-caret {
    transform: rotate(180deg);
}

.ec-user-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: 216px;
    background: #fff;
    border: 1px solid var(--ec-line);
    border-radius: 16px;
    box-shadow: var(--ec-shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 60;
}

.ec-user-menu::before {
    content: "";
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}

.ec-user:hover .ec-user-menu,
.ec-user.is-open .ec-user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ec-user-menu-head {
    padding: 10px 12px 9px;
    border-bottom: 1px solid var(--ec-line);
    margin-bottom: 6px;
}

.ec-user-menu-name {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14.5px;
    font-weight: 700;
}

.ec-user-menu-sub {
    margin-top: 3px;
    font-size: 12px;
    color: var(--ec-text-3);
}

.ec-role {
    font-size: 10.5px;
    font-weight: 700;
    padding: 1.5px 8px;
    border-radius: 999px;
}

.ec-role-admin { background: #fdeaea; color: #dc2626; }
.ec-role-mod { background: #e8f1fe; color: #2563eb; }

.ec-user-menu-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--ec-text-2);
    font-size: 13.5px;
    transition: background 0.15s, color 0.15s;
}

.ec-user-menu-item i {
    width: 16px;
    text-align: center;
    font-size: 13.5px;
    color: var(--ec-text-3);
    transition: color 0.15s;
}

.ec-user-menu-item:hover {
    background: var(--ec-green-soft);
    color: var(--ec-green-deep);
}

.ec-user-menu-item:hover i {
    color: var(--ec-green-deep);
}

.ec-user-menu-sep {
    height: 1px;
    background: var(--ec-line);
    margin: 6px 10px;
}

/* ---------------------------------------------------------------
   5. 通用组件
   --------------------------------------------------------------- */
.ec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 18px;
    border-radius: var(--ec-radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s;
    line-height: 1;
}

.ec-btn-primary {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #fff;
    box-shadow: 0 5px 16px rgba(16, 185, 129, 0.32);
}

.ec-btn-primary:hover {
    box-shadow: 0 7px 20px rgba(16, 185, 129, 0.42);
    transform: translateY(-1px);
    color: #fff;
}

.ec-btn-ghost {
    background: #fff;
    border-color: var(--ec-line-strong);
    color: var(--ec-text-2);
}

.ec-btn-ghost:hover {
    border-color: var(--ec-green);
    color: var(--ec-green-deep);
}

.ec-btn-plain {
    background: #f3f5fa;
    color: var(--ec-text-2);
}

.ec-btn-danger {
    color: #dc2626;
    border-color: #f4cfcf;
}

.ec-btn-danger:hover {
    border-color: #dc2626;
    color: #b91c1c;
}

.ec-btn-plain:hover {
    background: #eaedf5;
    color: var(--ec-text);
}

.ec-btn-danger-solid {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: #fff;
    box-shadow: 0 5px 16px rgba(239, 68, 68, 0.28);
}

.ec-btn-danger-solid:hover {
    box-shadow: 0 7px 20px rgba(239, 68, 68, 0.36);
    transform: translateY(-1px);
    color: #fff;
}

.ec-btn-lg {
    height: 44px;
    padding: 0 26px;
    font-size: 14.5px;
    border-radius: 13px;
}

.ec-btn-sm {
    height: 32px;
    padding: 0 13px;
    font-size: 12.5px;
    border-radius: 9px;
}

.ec-alert {
    padding: 12px 18px;
    border-radius: var(--ec-radius-sm);
    font-size: 13.5px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    line-height: 1.6;
}

.ec-alert-success { background: #ecfdf5; color: #15803d; border-color: #c9f0d8; }
.ec-alert-error { background: #fdeaea; color: #b91c1c; border-color: #f8d3d3; }
.ec-alert-warning { background: #fdf6e7; color: #b45309; border-color: #f5e3bd; }
.ec-alert-info { background: #e8f1fe; color: #1d4ed8; border-color: #d3e3fd; }

.ec-toast {
    position: fixed;
    top: 84px;
    left: 50%;
    transform: translate(-50%, -12px);
    background: #17181c;
    color: #fff;
    padding: 11px 24px;
    border-radius: 999px;
    font-size: 13.5px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 999;
    box-shadow: var(--ec-shadow-lg);
    pointer-events: none;
}

.ec-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* 空状态 */
.ec-empty {
    padding: 54px 20px;
    text-align: center;
    color: var(--ec-text-3);
    font-size: 13.5px;
}

.ec-empty i {
    display: block;
    font-size: 38px;
    margin-bottom: 14px;
    color: #d3dae7;
}

/* 分页（兼容旧 pagination 类） */
.ec-pagination,
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 26px 0 6px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ec-line-strong);
    background: #fff;
    color: var(--ec-text-2);
    font-size: 13px;
    transition: all 0.15s;
}

.pagination a:hover {
    border-color: var(--ec-green);
    color: var(--ec-green-deep);
}

.pagination .active,
.pagination span.current {
    background: var(--ec-green);
    border-color: var(--ec-green);
    color: #fff;
    font-weight: 700;
}

/* ---------------------------------------------------------------
   6. 首页
   --------------------------------------------------------------- */
/* Banner 轮播 */
.ec-banner-slider {
    position: relative;
    height: 176px;
    border-radius: var(--ec-radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--ec-shadow);
}

.ec-banner-slide {
    position: absolute;
    inset: 0;
    padding: 34px 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.6s ease;
    background: linear-gradient(118deg, #dbeafe 0%, #e6f7ef 55%, #eef0ff 100%);
}

.ec-banner-slide.on {
    opacity: 1;
}

.ec-banner-slide.ec-bs-2 {
    background: linear-gradient(118deg, #fdebf4 0%, #e8f1fe 55%, #ecfdf5 100%);
}

.ec-banner-slide.ec-bs-3 {
    background: linear-gradient(118deg, #f0ebfd 0%, #dbeafe 60%, #fdf3e7 100%);
}

.ec-banner-slide::before {
    content: "";
    position: absolute;
    right: 7%;
    top: -46px;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%);
}

.ec-banner-slide::after {
    content: "";
    position: absolute;
    right: 21%;
    bottom: -66px;
    width: 176px;
    height: 176px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0) 70%);
}

.ec-banner-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.85);
    color: #2f6fe4;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 13px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.ec-banner-title {
    position: relative;
    z-index: 1;
    font-size: 29px;
    font-weight: 800;
    line-height: 1.36;
    color: #1d2b4f;
    white-space: pre-line;
}

.ec-banner-sub {
    position: relative;
    z-index: 1;
    margin-top: 9px;
    color: #5b6b8c;
    font-size: 14px;
}

.ec-banner-slide.has-bg {
    background: #223;
}

.ec-banner-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.ec-banner-slide.has-bg::before {
    display: none;
}

.ec-banner-slide.has-bg::after {
    display: none;
}

.ec-banner-slide.has-bg .ec-banner-title,
.ec-banner-slide.has-bg .ec-banner-sub {
    color: #fff;
    text-shadow: 0 2px 12px rgba(20, 30, 60, 0.45);
}

.ec-banner-slide.has-bg .ec-banner-badge {
    background: rgba(255, 255, 255, 0.92);
}

.ec-banner-mask {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, rgba(24, 32, 54, 0.55), rgba(24, 32, 54, 0.05) 62%);
}

.ec-banner-dots {
    position: absolute;
    right: 22px;
    bottom: 16px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.ec-banner-dot {
    width: 7px;
    height: 7px;
    border-radius: 4px;
    background: rgba(29, 43, 79, 0.22);
    cursor: pointer;
    transition: all 0.25s;
    border: none;
    padding: 0;
}

.ec-banner-dot.on {
    width: 20px;
    background: rgba(29, 43, 79, 0.65);
}

.ec-banner-slide.has-bg ~ .ec-banner-dots .ec-banner-dot {
    background: rgba(255, 255, 255, 0.5);
}

/* 快捷入口 */
.ec-shortcuts {
    display: flex;
    gap: 10px;
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.ec-shortcut {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 8px 4px;
    border-radius: 14px;
    transition: background 0.18s, transform 0.18s;
}

.ec-shortcut:hover {
    background: #f6f7f9;
    transform: translateY(-2px);
}

.ec-shortcut-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.ec-shortcut-label {
    font-size: 12.5px;
    color: var(--ec-text-2);
    font-weight: 500;
}

.ec-sc-green { background: #ecfdf5; color: #059669; }
.ec-sc-blue { background: #e8f1fe; color: #2563eb; }
.ec-sc-purple { background: #f0ebfd; color: #7c3aed; }
.ec-sc-orange { background: #fdf3e7; color: #d97706; }
.ec-sc-pink { background: #fdebf4; color: #db2777; }
.ec-sc-red { background: #fdeaea; color: #dc2626; }
.ec-sc-teal { background: #e6f7f6; color: #0d9488; }
.ec-sc-gray { background: #f0f2f4; color: #4b5563; }

/* 首页两栏 */
.ec-home-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

/* Feed 卡片 */
.ec-feed-card {
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    overflow: hidden;
    /* 上限 = 视口内的一个窗口：鼠标悬停在帖子流上时滚轮只滚列表，
       滚到尽头后浏览器自动接力滚整页（默认 scroll chaining） */
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 104px);
}

.ec-feed-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 18px 0;
    border-bottom: 1px solid var(--ec-line);
    flex-shrink: 0;
}

.ec-feed-tab {
    padding: 9px 14px 13px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ec-text-2);
    border: none;
    background: none;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
}

.ec-feed-tab:hover {
    color: var(--ec-text);
}

.ec-feed-tab.is-on {
    color: var(--ec-green-deep);
    border-color: var(--ec-green);
    font-weight: 700;
}

.ec-feed-panel {
    display: none;
}

.ec-feed-panel.is-on {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* 帖子卡片 */
.ec-post {
    display: flex;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--ec-line);
    transition: background 0.15s;
}

.ec-post:last-child {
    border-bottom: none;
}

.ec-post:hover {
    background: #fafbfe;
}

.ec-post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-post-avatar-fallback {
    background: var(--ec-green-soft);
    color: var(--ec-green-deep);
    font-size: 15px;
}

.ec-post-body {
    flex: 1;
    min-width: 0;
}

.ec-post-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.ec-post-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ec-text);
}

.ec-post-time {
    font-size: 12px;
    color: var(--ec-text-3);
}

.ec-post-title {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--ec-text);
    line-height: 1.5;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ec-post:hover .ec-post-title {
    color: var(--ec-green-deep);
}

.ec-post-excerpt {
    font-size: 13px;
    color: var(--ec-text-2);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.ec-post-foot {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 12.5px;
    color: var(--ec-text-3);
}

.ec-post-foot i {
    margin-right: 5px;
    font-size: 12px;
}

.ec-post-foot .ec-foot-cat {
    margin-left: auto;
}

.ec-post-foot .ec-foot-right {
    margin-left: auto;
}

.ec-chip {
    display: inline-flex;
    align-items: center;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.ec-chip-top { background: #fdeaea; color: #dc2626; }
.ec-chip-essence { background: #fdf3e7; color: #d97706; }
.ec-chip-cat { background: #f0f2f4; color: #4b5563; font-weight: 600; }

/* 右侧栏面板 */
.ec-panel {
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    padding: 18px 20px;
    margin-bottom: 20px;
}

.ec-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ec-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
}

.ec-panel-title i {
    color: var(--ec-orange);
    font-size: 14px;
}

.ec-panel-title.ec-pt-green i { color: var(--ec-green); }
.ec-panel-title.ec-pt-blue i { color: var(--ec-blue); }

.ec-panel-more {
    font-size: 12px;
    color: var(--ec-text-3);
    transition: color 0.15s;
}

.ec-panel-more:hover {
    color: var(--ec-green-deep);
}

/* 话题榜 / 排行 */
.ec-rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
}

.ec-rank-no {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    background: #f0f2f4;
    color: var(--ec-text-3);
    flex-shrink: 0;
}

.ec-rank-no.is-1 { background: linear-gradient(135deg, #fb7185, #ef4444); color: #fff; }
.ec-rank-no.is-2 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.ec-rank-no.is-3 { background: linear-gradient(135deg, #60a5fa, #3b82f6); color: #fff; }

.ec-rank-title {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ec-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
}

.ec-rank-item:hover .ec-rank-title {
    color: var(--ec-green-deep);
}

.ec-rank-heat {
    font-size: 11.5px;
    color: var(--ec-text-3);
    flex-shrink: 0;
}

/* 公告列表 */
.ec-notice-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 0;
    font-size: 13px;
    color: var(--ec-text-2);
    transition: color 0.15s;
}

.ec-notice-item:hover {
    color: var(--ec-green-deep);
}

.ec-notice-type {
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: 700;
    padding: 1.5px 8px;
    border-radius: 999px;
    background: #f0f2f4;
    color: #4b5563;
}

.ec-notice-type.ec-nt-2 { background: #fdf6e7; color: #b45309; }
.ec-notice-type.ec-nt-3 { background: #fdeaea; color: #dc2626; }

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

.ec-notice-time {
    font-size: 11.5px;
    color: var(--ec-text-3);
    flex-shrink: 0;
}

/* 话题列表 */
.ec-topic-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 0;
}

.ec-topic-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.ec-topic-info {
    flex: 1;
    min-width: 0;
}

.ec-topic-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ec-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    transition: color 0.15s;
}

.ec-topic-item:hover .ec-topic-name {
    color: var(--ec-green-deep);
}

.ec-topic-meta {
    font-size: 11.5px;
    color: var(--ec-text-3);
    margin-top: 2px;
}

/* ---------------------------------------------------------------
   7. 板块页
   --------------------------------------------------------------- */
.ec-page-head {
    margin-bottom: 20px;
}

.ec-page-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ec-page-title {
    font-size: 23px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 11px;
}

.ec-page-title > i {
    color: var(--ec-green);
    font-size: 20px;
}

.ec-page-sub {
    margin-top: 7px;
    color: var(--ec-text-3);
    font-size: 13.5px;
}

.ec-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ec-cat-card {
    display: block;
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    padding: 22px;
    box-shadow: var(--ec-shadow);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.ec-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ec-shadow-lg);
    border-color: #dfe6f3;
}

.ec-cat-icon {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 15px;
}

.ec-cat-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 7px;
}

.ec-cat-desc {
    font-size: 13px;
    color: var(--ec-text-2);
    line-height: 1.62;
    min-height: 42px;
    margin-bottom: 15px;
}

.ec-cat-meta {
    display: flex;
    gap: 22px;
    padding-top: 13px;
    border-top: 1px solid var(--ec-line);
    font-size: 12.5px;
    color: var(--ec-text-3);
}

.ec-cat-meta b {
    color: var(--ec-text);
    font-weight: 700;
    margin-right: 3px;
}

.ec-cat-meta i {
    margin-right: 4px;
    font-size: 12px;
}

.ec-cat-meta .ec-meta-hot {
    color: #dc2626;
}

/* 板块详情头部 */
.ec-cat-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    padding: 24px 26px;
    margin-bottom: 20px;
}

.ec-cat-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.ec-cat-hero-info {
    flex: 1;
    min-width: 0;
}

.ec-cat-hero-name {
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ec-cat-hero-desc {
    margin-top: 6px;
    font-size: 13px;
    color: var(--ec-text-2);
    line-height: 1.6;
}

.ec-cat-hero-stats {
    display: flex;
    gap: 18px;
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--ec-text-3);
}

.ec-cat-hero-stats i {
    margin-right: 5px;
    font-size: 12px;
}

.ec-cat-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* 通用列表容器（帖子列表等） */
.ec-list-card {
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    overflow: hidden;
}

/* ---------------------------------------------------------------
   8. 发布页
   --------------------------------------------------------------- */
.ec-form-card {
    max-width: 920px;
    margin: 0 auto;
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    overflow: hidden;
}

.ec-form-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 19px 28px;
    border-bottom: 1px solid var(--ec-line);
    font-size: 16px;
    font-weight: 700;
}

.ec-form-head i {
    color: var(--ec-green);
}

.ec-form-body {
    padding: 24px 28px 28px;
}

.ec-field {
    margin-bottom: 20px;
}

.ec-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 9px;
    color: var(--ec-text);
}

.ec-input,
.ec-select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--ec-line-strong);
    border-radius: 12px;
    padding: 0 16px;
    font-size: 14px;
    background: #fff;
    color: var(--ec-text);
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    font-family: inherit;
    box-sizing: border-box;
}

.ec-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239ca3af' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.ec-input:focus,
.ec-select:focus {
    outline: none;
    border-color: var(--ec-green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

textarea.ec-input {
    height: auto;
    min-height: 96px;
    padding: 12px 16px;
    line-height: 1.65;
    resize: vertical;
}

.ec-counter {
    font-size: 12px;
    color: var(--ec-text-3);
}

.ec-field-hint {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

/* 「更多功能」折叠区 */
.ec-more-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius-sm);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ec-text-2);
    user-select: none;
    transition: background 0.15s;
}

.ec-more-toggle:hover {
    background: #f0f2f4;
}

.ec-more-toggle i {
    font-size: 12px;
    transition: transform 0.2s;
    color: var(--ec-text-3);
}

.ec-more-toggle.is-open i {
    transform: rotate(180deg);
}

.ec-more-body {
    display: none;
    border: 1px solid var(--ec-line);
    border-top: none;
    border-radius: 0 0 var(--ec-radius-sm) var(--ec-radius-sm);
    padding: 18px;
    margin-top: -12px;
    background: #ffffff;
}

.ec-more-body.is-open {
    display: block;
}

.ec-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.ec-form-actions .ec-btn-lg {
    height: 46px;
    padding: 0 30px;
    font-size: 15px;
    border-radius: 14px;
}

/* 表单列宽 —— 整块白色底框（对齐设计稿） */
.ec-form-stack {
    max-width: 840px;
    padding: 26px 30px 26px;
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
}

.ec-form-stack .ec-page-head {
    margin-bottom: 24px;
}

.ec-form-stack .ec-page-title {
    font-size: 22px;
}

.ec-form-stack .ec-field:last-of-type {
    margin-bottom: 0;
}

.ec-form-stack .ec-form-actions {
    margin-top: 0;
    padding-top: 22px;
    border-top: 1px solid var(--ec-line);
}

/* 输入框内计数 */
.ec-input-wrap {
    position: relative;
}

.ec-input-wrap .ec-input {
    padding-right: 82px;
}

.ec-count-inside {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--ec-text-3);
    pointer-events: none;
}

/* 编辑器外壳 */
.ec-editor-shell {
    border: 1px solid var(--ec-line-strong);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.ec-editor-shell:focus-within {
    border-color: var(--ec-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

/* 与 TinyMCE 自带边框融合 */
.ec-editor-shell .tox-tinymce,
.ec-editor-shell .tox.tox-tinymce {
    border: none !important;
    border-radius: 0 !important;
}

.ec-editor-shell .tox .tox-toolbar-overlord,
.ec-editor-shell .tox .tox-toolbar__primary {
    background: #fff !important;
}

.ec-editor-shell .tox .tox-edit-area::before {
    border: none !important;
}


.ec-editor-shell .tox .tox-statusbar {
    border-top: 1px solid #f0f2f7 !important;
    background: #fff !important;
    padding: 0 10px !important;
    height: 26px !important;
}

.ec-editor-shell .tox .tox-statusbar__text-container {
    font-size: 11px !important;
    color: #aab2c2 !important;
}

.ec-editor-shell .tox .tox-statusbar__branding {
    display: none !important;
}

.ec-editor-shell .tox .tox-toolbar__group {
    padding: 0 6px !important;
}

.ec-editor-loading {
    display: none;
}

.ec-editor-shell.is-loading .ec-editor-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 316px;
    font-size: 13.5px;
    color: var(--ec-text-3);
}

.ec-editor-shell.is-loading #editor-textarea {
    display: none;
}

/* 编辑器降级：CDN 不可用时露出原生文本框，发帖流程不断 */
.ec-editor-shell.ec-editor-fallback {
    border-color: #f0d3ae;
    background: #fffdf9;
}

.ec-editor-shell.ec-editor-fallback #editor-textarea {
    display: block;
    width: 100%;
    min-height: 260px;
    padding: 15px 17px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--ec-text);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.75;
    box-sizing: border-box;
    resize: vertical;
}

.ec-editor-shell .ec-editor-loading.ec-editor-fallback-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: auto;
    padding: 10px 14px;
    border-bottom: 1px solid #f4e3cd;
    background: #fff8ee;
    color: #b45309;
    font-size: 12.5px;
}

.ec-editor-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 8px;
}

.ec-field-error {
    color: #dc2626;
    font-size: 13px;
}

/* 图片上传 */
.ec-media-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: var(--ec-card);
    border: 1px dashed var(--ec-line-strong);
    border-radius: var(--ec-radius);
    transition: border-color 0.18s, background 0.18s;
}

.ec-media-row:hover {
    border-color: var(--ec-green);
    background: #ffffff;
}

.ec-media-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--ec-green-soft);
    color: var(--ec-green-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.ec-media-info {
    flex: 1;
    min-width: 0;
}

.ec-media-title {
    font-size: 14px;
    font-weight: 700;
}

.ec-media-sub {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--ec-text-3);
}

.ec-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.ec-media-cell {
    aspect-ratio: 1;
    border-radius: 13px;
    overflow: hidden;
    background: #f2f4f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a8b2c6;
    font-size: 15px;
}

.ec-media-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 「更多设置」折叠区 */
.ec-more-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.ec-more-sub {
    font-size: 12.5px;
    font-weight: 400;
    color: var(--ec-text-3);
}

.ec-more-inner {
    padding: 4px 0;
}

/* 工具卡（红包 / 投票 / 草稿） */
.ec-tool {
    border: 1px solid transparent;
    border-radius: var(--ec-radius-sm);
    padding: 16px 18px;
    margin-bottom: 14px;
}

.ec-tool:last-child {
    margin-bottom: 0;
}

.ec-tool-rp { background: #fffbeb; border-color: #fcd34d; }
.ec-tool-poll { background: #f0f9ff; border-color: #7dd3fc; }
.ec-tool-draft { background: #f6f7f9; border-color: #d8dce4; }

.ec-tool-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ec-tool-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}

.ec-tool-rp .ec-tool-title { color: #92400e; }
.ec-tool-poll .ec-tool-title { color: #0369a1; }
.ec-tool-draft .ec-tool-title { color: #374151; }

.ec-tool-note {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--ec-text-3);
    white-space: nowrap;
}

.ec-tool-note b {
    color: #d97706;
}

.ec-check {
    width: 17px;
    height: 17px;
    accent-color: var(--ec-green);
    cursor: pointer;
    flex-shrink: 0;
}

.ec-tool-form {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.28s ease-out, opacity 0.22s ease-out;
}

.ec-tool-form.is-open {
    max-height: 1600px;
    opacity: 1;
}

.ec-tool-form-inner {
    padding-top: 15px;
}

.ec-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.ec-grid-2:last-child {
    margin-bottom: 0;
}

.ec-tool .ec-label {
    font-size: 12.5px;
    color: var(--ec-text-2);
    margin-bottom: 7px;
}

.ec-tool .ec-input,
.ec-tool .ec-select {
    height: 40px;
    background: #fff;
    font-size: 13.5px;
}

.ec-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--ec-text-3);
}

.ec-tool-rp .ec-hint { color: #b45309; }
.ec-tool-poll .ec-hint { color: #0369a1; }

.ec-tool-error {
    margin-top: 10px;
    padding: 10px 13px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 9px;
    font-size: 13px;
}

.ec-radio-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
}

.ec-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--ec-text);
    cursor: pointer;
}

.ec-radio input {
    accent-color: var(--ec-green);
    cursor: pointer;
}

.ec-poll-item {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 9px;
}

.ec-poll-index {
    min-width: 22px;
    font-size: 13px;
    color: var(--ec-text-3);
}

.ec-poll-item .ec-input {
    flex: 1;
}

.ec-tool-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ec-draft-status {
    margin-top: 10px;
    min-height: 18px;
    font-size: 12.5px;
    color: var(--ec-text-3);
}

.ec-draft-status.is-error {
    color: #dc2626;
}

.ec-form-cancel {
    margin-left: 4px;
    font-size: 13.5px;
    color: var(--ec-text-3);
}

.ec-form-cancel:hover {
    color: var(--ec-text-2);
}

/* 页脚 */
.ec-footer {
    margin-top: auto;
    padding: 26px 28px 30px;
    border-top: 1px solid var(--ec-line);
}

.ec-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    font-size: 12.5px;
    color: var(--ec-text-3);
    line-height: 1.9;
}

.ec-footer-inner p {
    margin: 0;
}

.ec-footer-sub {
    font-size: 12px;
    color: #9ca3af;
}

/* 站外链接提示弹窗（沿用 post.css 的类名，保证多页一致） */
.link-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.link-modal-overlay.is-open {
    display: flex;
}

.link-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.link-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff3e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: #ff9800;
}

.link-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.link-modal-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.link-modal-url {
    font-size: 12px;
    color: #999;
    word-break: break-all;
    margin-bottom: 20px;
}

.link-modal-actions {
    display: flex;
    gap: 12px;
}

.link-modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
}

.link-modal-cancel {
    background: #f5f5f5;
    color: #666;
}

.link-modal-confirm {
    background: #4CAF50;
    color: #fff;
}

/* ---------------------------------------------------------------
   9. 个人页
   --------------------------------------------------------------- */
.ec-profile {
    position: relative;
    margin-bottom: 20px;
}

.ec-profile-banner {
    position: relative;
    height: 148px;
    border-radius: var(--ec-radius) var(--ec-radius) 0 0;
    background: linear-gradient(115deg, #dbeafe 0%, #e0f2fe 42%, #ecfdf5 100%);
    overflow: hidden;
}

.ec-profile-banner::before {
    content: "";
    position: absolute;
    right: 8%;
    top: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%);
}

.ec-profile-banner::after {
    content: "";
    position: absolute;
    left: 30%;
    bottom: -90px;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0) 70%);
}

.ec-profile-main {
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-top: none;
    border-radius: 0 0 var(--ec-radius) var(--ec-radius);
    box-shadow: var(--ec-shadow);
    padding: 0 28px 4px;
}

.ec-profile-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.ec-profile-avatar-wrap {
    position: relative;
    z-index: 3;
    margin-top: 18px;
    flex-shrink: 0;
}

.ec-profile-avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 6px 18px rgba(35, 41, 58, 0.12);
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ec-green-soft);
    color: var(--ec-green-deep);
    font-size: 32px;
}

.ec-profile-meta {
    flex: 1;
    min-width: 0;
    padding-top: 26px;
}

.ec-profile-name {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 20px;
    font-weight: 800;
}

.ec-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3.5px 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    flex-shrink: 0;
    text-decoration: none;
    transition: filter 0.15s, transform 0.15s;
}

.ec-level-badge i {
    font-size: 10px;
}

a.ec-level-badge:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

.ec-profile-bio {
    margin-top: 7px;
    font-size: 13px;
    color: var(--ec-text-2);
    line-height: 1.6;
}

.ec-profile-actions {
    display: flex;
    gap: 10px;
    padding-top: 26px;
    flex-shrink: 0;
}

.ec-profile-stats {
    display: flex;
    gap: 38px;
    padding: 18px 4px 18px 110px;
}

.ec-profile-stat {
    text-align: left;
    transition: opacity 0.15s;
}

a.ec-profile-stat:hover {
    opacity: 0.75;
}

.ec-profile-stat b {
    font-size: 18px;
    font-weight: 800;
    color: var(--ec-text);
    display: block;
    line-height: 1.2;
}

.ec-profile-stat span {
    font-size: 12px;
    color: var(--ec-text-3);
}

.ec-profile-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--ec-line);
    margin: 0 -28px;
    padding: 0 28px;
}

.ec-profile-tab {
    padding: 12px 16px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ec-text-2);
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}

.ec-profile-tab:hover {
    color: var(--ec-text);
}

.ec-profile-tab.is-on {
    color: var(--ec-green-deep);
    border-color: var(--ec-green);
    font-weight: 700;
}

.ec-profile-tab .ec-tab-count {
    font-size: 12px;
    color: var(--ec-text-3);
    font-weight: 500;
    margin-left: 3px;
}

/* 自定义封面 */
.ec-profile-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ec-profile-banner.has-img::before,
.ec-profile-banner.has-img::after {
    display: none;
}

.ec-cover-caption {
    position: absolute;
    left: 32px;
    top: 26px;
    z-index: 2;
}

.ec-cover-title {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.6px;
    color: #46536a;
}

.ec-cover-sub {
    margin-top: 2px;
    font-size: 12px;
    letter-spacing: 0.4px;
    color: #7d8798;
}

/* 勋章 / 积分一行 */
.ec-profile-chips {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 0 0 18px 110px;
}

.ec-chip-medal {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0f8ff;
    border: 1px solid #cfe4fb;
    color: #2f6fb5;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 11px;
    border-radius: 999px;
}

.ec-chip-medal img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.ec-chip-points {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #b45309;
}

.ec-chip-plain {
    background: #f6f7f9;
    border-color: #f0f2f4;
    color: #4b5563;
    font-weight: 500;
}

/* 审核状态筛选条 */
.ec-audit-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 22px;
    border-bottom: 1px solid var(--ec-line);
    background: #fbfcfe;
    font-size: 12.5px;
    color: var(--ec-text-3);
}

.ec-audit-bar a {
    padding: 4px 13px;
    border-radius: 999px;
    background: #f0f2f4;
    color: var(--ec-text-2);
    font-size: 12.5px;
    transition: background 0.15s, color 0.15s;
}

.ec-audit-bar a:hover {
    background: #e5e7eb;
}

.ec-audit-bar a.is-on {
    background: var(--ec-green-soft);
    color: var(--ec-green-deep);
    font-weight: 700;
}

/* 帖子行缩略图 */
.ec-post-thumb {
    width: 108px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    align-self: center;
    background: #f0f2f4;
}

/* 页尾一句 */
.ec-page-tip {
    margin-top: 24px;
    text-align: center;
    font-size: 12.5px;
    color: #9ca3af;
}

/* 审核小标 */
.ec-audit {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.ec-audit-wait { background: #fdf3e7; color: #d97706; }
.ec-audit-ok { background: #ecfdf5; color: #059669; }
.ec-audit-no { background: #fdeaea; color: #dc2626; }
.ec-audit-plain { background: #f0f2f4; color: #4b5563; }

.ec-audit-reason {
    color: #dc2626;
    font-size: 12.5px;
}

/* 我发布的帖子：行下方操作 */
.ec-post-acts {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 22px 12px;
    margin-top: -6px;
}

.ec-reply-body {
    -webkit-line-clamp: 3;
}

.ec-reply-post {
    color: var(--ec-green-deep);
    font-weight: 600;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 封禁提示 */
.ec-banned {
    text-align: center;
    padding: 64px 40px;
}

.ec-banned-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    color: #dc2626;
}

.ec-banned-title {
    color: #dc2626;
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 14px;
}

.ec-banned-desc {
    color: var(--ec-text-2);
    font-size: 13.5px;
    margin-bottom: 24px;
}

/* 头像放大查看 */
.ec-avatar-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.ec-avatar-modal.is-open {
    display: flex;
}

.ec-avatar-modal.is-grabbing {
    cursor: grabbing;
}

.ec-avatar-modal-inner {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
}

.ec-avatar-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    padding: 5px;
    cursor: pointer;
    z-index: 10;
}

.ec-avatar-modal-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s ease-out;
    transform-origin: center center;
    display: block;
}

.ec-avatar-modal-name {
    text-align: center;
    margin-top: 15px;
    color: #fff;
    font-size: 17px;
}

.ec-avatar-modal-hint {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12.5px;
    white-space: nowrap;
}

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

/* 关注/粉丝列表行 */
.ec-user-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 22px;
    border-bottom: 1px solid var(--ec-line);
    transition: background 0.15s;
}

.ec-user-row:last-child {
    border-bottom: none;
}

.ec-user-row:hover {
    background: #fafbfe;
}

.ec-user-row-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-user-row-info {
    flex: 1;
    min-width: 0;
}

.ec-user-row-name {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ec-user-row-sub {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--ec-text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------------------
   10. 兼容旧页面（.card / .btn / .form-control 等通用类换新装）
   --------------------------------------------------------------- */
.ec-stage .card {
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.ec-stage .card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--ec-line);
}

.ec-stage .card-header h1,
.ec-stage .card-header h2,
.ec-stage .card-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.ec-stage .card-header h2 { font-size: 19px; }
.ec-stage .card-header h3 { font-size: 16px; }

.ec-stage .card-header h2 i,
.ec-stage .card-header h1 i {
    color: var(--ec-green);
}

.ec-stage .card-body {
    padding: 22px 24px;
}

.ec-stage .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 18px;
    border-radius: var(--ec-radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s;
    line-height: 1;
    text-decoration: none;
}

.ec-stage .btn-primary {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #fff;
    box-shadow: 0 5px 16px rgba(16, 185, 129, 0.3);
}

.ec-stage .btn-primary:hover {
    box-shadow: 0 7px 20px rgba(16, 185, 129, 0.4);
    color: #fff;
}

.ec-stage .btn-outline {
    background: #fff;
    border-color: var(--ec-line-strong);
    color: var(--ec-text-2);
}

.ec-stage .btn-outline:hover {
    border-color: var(--ec-green);
    color: var(--ec-green-deep);
}

.ec-stage .btn-danger {
    background: #fdeaea;
    color: #dc2626;
    border-color: #f8d3d3;
}

.ec-stage .btn-sm {
    height: 32px;
    padding: 0 13px;
    font-size: 12.5px;
    border-radius: 10px;
}

.ec-stage .form-control {
    width: 100%;
    border: 1px solid var(--ec-line-strong);
    border-radius: var(--ec-radius-sm);
    padding: 10px 15px;
    font-size: 14px;
    background: #fafbfe;
    color: var(--ec-text);
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.ec-stage .form-control:focus {
    outline: none;
    border-color: var(--ec-green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.ec-stage .form-group {
    margin-bottom: 18px;
}

.ec-stage .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13.5px;
    font-weight: 600;
}

.ec-stage textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.ec-stage .tag {
    display: inline-flex;
    align-items: center;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.ec-stage .tag-top { background: #fdeaea; color: #dc2626; }
.ec-stage .tag-essence { background: #fdf3e7; color: #d97706; }

/* ---------------------------------------------------------------
   12. 个人页封面：鼠标下拉拉扯（松手回弹）+ 点击查看大图
   --------------------------------------------------------------- */
.ec-profile-banner.has-img {
    transition: height 0.34s cubic-bezier(0.22, 1.28, 0.36, 1);
    cursor: zoom-in;
}

.ec-profile-banner.is-pulling {
    transition: none;
}

.ec-cover-zoom {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border: none;
    border-radius: 999px;
    background: rgba(23, 24, 28, 0.45);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.18s, background 0.18s;
}

.ec-profile-banner:hover .ec-cover-zoom {
    opacity: 1;
}

.ec-cover-zoom:hover {
    background: rgba(23, 24, 28, 0.66);
}

/* 封面右上角「…」菜单（对齐手机版的 up-sheet） */
.ec-profile-menu {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 6;
}

.ec-cover-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(23, 24, 28, 0.42);
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s;
}

.ec-cover-more:hover,
.ec-cover-more.is-open {
    background: rgba(23, 24, 28, 0.68);
}

.ec-cover-drop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 178px;
    padding: 6px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--ec-line);
    box-shadow: 0 12px 34px rgba(23, 24, 28, 0.16);
}

.ec-cover-drop[hidden] {
    display: none;
}

.ec-cover-drop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 9px;
    background: none;
    color: var(--ec-text);
    font-family: inherit;
    font-size: 13.5px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.ec-cover-drop-item i {
    width: 15px;
    text-align: center;
    font-size: 13px;
    color: var(--ec-text-3);
}

.ec-cover-drop-item:hover {
    background: var(--ec-green-soft);
    color: var(--ec-green-deep);
}

.ec-cover-drop-item:hover i {
    color: var(--ec-green-deep);
}

.ec-cover-drop-sep {
    height: 1px;
    margin: 5px 8px;
    background: var(--ec-line);
}

.ec-cover-drop-item.is-cancel {
    justify-content: center;
    color: var(--ec-text-2);
}

.ec-cover-toast {
    position: fixed;
    left: 50%;
    bottom: 46px;
    z-index: 3200;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(23, 24, 28, 0.86);
    color: #fff;
    font-size: 13.5px;
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

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

/* ---------------------------------------------------------------
   13. 等级页（对齐手机版 mobile/level.php）
   --------------------------------------------------------------- */
.ec-lv-page {
    max-width: 880px;
    margin-bottom: 24px;
}

.ec-lv-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    color: var(--ec-text-2);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}

.ec-lv-back:hover {
    color: var(--ec-green-deep);
    border-color: var(--ec-green);
}

.ec-lv-hero {
    position: relative;
    overflow: hidden;
    padding: 32px 34px 28px;
    border-radius: var(--ec-radius);
    background: linear-gradient(135deg, #34d399 0%, #10b981 55%, #059669 100%);
    color: #fff;
    box-shadow: 0 10px 26px rgba(16, 185, 129, 0.28);
}

.ec-lv-hero::before,
.ec-lv-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.ec-lv-hero::before {
    top: -70px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.14);
}

.ec-lv-hero::after {
    bottom: -92px;
    left: -60px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.08);
}

.ec-lv-hero > * {
    position: relative;
}

.ec-lv-hero-main {
    display: flex;
    align-items: center;
    gap: 22px;
}

.ec-lv-badge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.08);
}

.ec-lv-badge-num {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.ec-lv-hero-info {
    flex: 1;
    min-width: 0;
}

.ec-lv-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 7px;
}

.ec-lv-points {
    font-size: 13.5px;
    opacity: 0.95;
}

.ec-lv-points b {
    font-size: 24px;
    font-weight: 800;
    margin-right: 3px;
}

.ec-lv-progress {
    margin-top: 24px;
}

.ec-lv-bar {
    height: 9px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.ec-lv-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #fff;
}

.ec-lv-tip {
    font-size: 13px;
    opacity: 0.95;
}

.ec-lv-tip b {
    font-weight: 700;
}

.ec-lv-panel {
    margin-top: 18px;
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    overflow: hidden;
}

.ec-lv-panel-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--ec-line);
    font-size: 15px;
    font-weight: 700;
}

.ec-lv-panel-head i {
    color: var(--ec-green);
}

.ec-lv-panel-note {
    margin-left: auto;
    font-size: 12px;
    font-weight: 400;
    color: var(--ec-text-3);
}

.ec-lv-panel-body {
    padding: 8px 24px 16px;
}

.ec-lv-tips {
    padding: 18px 24px 20px;
    font-size: 13.5px;
    color: var(--ec-text-2);
    line-height: 1.9;
}

.ec-lv-tips p {
    margin: 0 0 6px;
}

.ec-lv-link {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    padding: 13px 16px;
    border-radius: 12px;
    background: #fffbeb;
    color: #b45309;
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    transition: background 0.15s;
}

.ec-lv-link:hover {
    background: #fef3c7;
}

.ec-lv-link .fa-chevron-right {
    margin-left: auto;
    color: #f59e0b;
}

/* 等级阶梯 */
.ec-lv-ladder-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 10px;
    border-bottom: 1px solid var(--ec-line);
    font-size: 13.5px;
}

.ec-lv-ladder-item:last-child {
    border-bottom: none;
}

.ec-lv-ladder-badge {
    flex: 0 0 auto;
    min-width: 54px;
    padding: 3px 0;
    border-radius: 999px;
    text-align: center;
    font-size: 11.5px;
    font-weight: 700;
    background: #f0f2f4;
    color: #64748b;
}

.ec-lv-ladder-name {
    flex: 1;
    min-width: 0;
    color: var(--ec-text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ec-lv-ladder-need {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--ec-text-3);
}

.ec-lv-ladder-state {
    flex: 0 0 auto;
    width: 52px;
    text-align: right;
    font-size: 11.5px;
    color: #cbd5e1;
}

.ec-lv-ladder-item.is-done .ec-lv-ladder-badge {
    background: #ecfdf5;
    color: #059669;
}

.ec-lv-ladder-item.is-done .ec-lv-ladder-state {
    color: #10b981;
}

.ec-lv-ladder-item.is-current {
    background: #f0fdf4;
    border-radius: 10px;
    border-bottom-color: transparent;
}

.ec-lv-ladder-item.is-current .ec-lv-ladder-badge {
    background: #10b981;
    color: #fff;
}

.ec-lv-ladder-item.is-current .ec-lv-ladder-name {
    color: #065f46;
    font-weight: 700;
}

.ec-lv-ladder-item.is-current .ec-lv-ladder-state {
    color: #059669;
    font-weight: 600;
}

.ec-lv-ladder-item.is-locked {
    opacity: 0.62;
}

/* ---------------------------------------------------------------
   14. 积分页（对齐手机版 points.php 的信息编排）
   --------------------------------------------------------------- */
.ec-pt-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.ec-pt-col {
    min-width: 0;
}

.ec-pt-card {
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.ec-pt-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--ec-line);
    font-size: 15px;
    font-weight: 700;
}

.ec-pt-head i {
    color: var(--ec-green);
}

.ec-pt-head .ec-btn {
    margin-left: auto;
}

.ec-pt-body {
    padding: 20px 22px;
}

.ec-pt-total {
    text-align: center;
    font-size: 46px;
    font-weight: 800;
    line-height: 1.1;
    color: #f59e0b;
}

.ec-pt-total-label {
    text-align: center;
    font-size: 13px;
    color: var(--ec-text-3);
    margin: 7px 0 20px;
}

.ec-pt-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ec-pt-rules {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--ec-line);
}

.ec-pt-rules-title {
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ec-pt-rule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--ec-line);
    font-size: 13.5px;
    color: var(--ec-text-2);
}

.ec-pt-rule:last-child {
    border-bottom: none;
}

.ec-pt-rule b {
    color: var(--ec-green-deep);
    font-weight: 700;
}

.ec-pt-table-wrap {
    /* 记录列表在限高内自己滚：鼠标悬停在表上滚轮只滚记录，
       滚到尽头后浏览器自动接力滚整页 */
    overflow: auto;
    max-height: min(calc(100vh - 320px), 640px);
}

.ec-pt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.ec-pt-table th {
    padding: 12px 18px;
    text-align: left;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ec-text-2);
    background: #f6f7f9;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.ec-pt-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--ec-line);
    color: var(--ec-text-2);
}

.ec-pt-table tbody tr:last-child td {
    border-bottom: none;
}

.ec-pt-table tbody tr:hover td {
    background: #fbfcfd;
}

.ec-pt-center {
    text-align: center;
}

.ec-pt-time {
    color: var(--ec-text-3);
    font-size: 12.5px;
    white-space: nowrap;
}

.ec-pt-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f0f2f4;
    color: var(--ec-text-2);
    font-size: 12px;
    white-space: nowrap;
}

.ec-pt-pos {
    color: var(--ec-green-deep);
    font-weight: 700;
}

.ec-pt-neg {
    color: #dc2626;
    font-weight: 700;
}

.ec-pt-empty {
    text-align: center;
    padding: 58px 20px;
    color: var(--ec-text-3);
}

.ec-pt-empty i {
    display: block;
    font-size: 42px;
    margin-bottom: 14px;
    color: #d6dbe4;
}

.ec-pt-empty p {
    margin: 0 0 4px;
    font-size: 14px;
}

.ec-pt-empty-sub {
    font-size: 12.5px;
}

.ec-pt-pager {
    padding: 16px 22px;
    border-top: 1px solid var(--ec-line);
}

.ec-pt-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.ec-pt-day {
    text-align: center;
    padding: 14px 6px;
    border-radius: 12px;
    border: 1px solid var(--ec-line);
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}

.ec-pt-day.is-on {
    background: var(--ec-green-soft);
    border-color: #a7f3d0;
}

.ec-pt-day.is-today {
    border-color: var(--ec-green);
}

.ec-pt-day-date {
    font-size: 12px;
    color: var(--ec-text-3);
}

.ec-pt-day-ico {
    font-size: 20px;
    margin: 7px 0 5px;
    color: #d6dbe4;
}

.ec-pt-day.is-on .ec-pt-day-ico {
    color: var(--ec-green-deep);
}

.ec-pt-day.is-today .ec-pt-day-ico {
    color: #f59e0b;
}

.ec-pt-day-txt {
    font-size: 11.5px;
    color: var(--ec-text-3);
}

.ec-pt-day.is-on .ec-pt-day-txt {
    color: var(--ec-green-deep);
    font-weight: 600;
}

.ec-pt-day.is-today .ec-pt-day-txt {
    color: #b45309;
    font-weight: 600;
}

/* 紧凑等级进度卡（积分页 / 个人页通用，对齐手机版 .lv-progress-card） */
.ec-lv-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--ec-radius);
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    box-shadow: var(--ec-shadow);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}

.ec-lv-card:hover {
    border-color: var(--ec-green);
    transform: translateY(-1px);
}

.ec-lv-card-badge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: linear-gradient(135deg, #34d399, #059669);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.ec-lv-card-main {
    flex: 1;
    min-width: 0;
    display: block;
}

.ec-lv-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ec-lv-card-name {
    font-size: 14.5px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ec-lv-card-more {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--ec-text-3);
}

.ec-lv-card-bar {
    display: block;
    height: 7px;
    margin-bottom: 7px;
    border-radius: 999px;
    background: #eef2f0;
    overflow: hidden;
}

.ec-lv-card-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #34d399, #10b981);
}

.ec-lv-card-tip {
    display: block;
    font-size: 12px;
    color: var(--ec-text-3);
}

.ec-lv-card-tip b {
    color: var(--ec-green-deep);
}

@media (max-width: 1120px) {
    .ec-pt-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------
   15. 个人设置（page/settings.php）
   --------------------------------------------------------------- */
.ec-set-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 840px;
}

.ec-set-hidden { display: none; }

.ec-set-card {
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    overflow: hidden;
}

.ec-set-head {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px 24px;
    border-bottom: 1px solid var(--ec-line);
}

.ec-set-ico {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--ec-green-soft);
    color: var(--ec-green-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.ec-set-ico.is-crown { background: #fdf3e7; color: #d97706; }

.ec-set-head-main { flex: 1; min-width: 0; }

.ec-set-title {
    font-size: 15.5px;
    font-weight: 700;
}

.ec-set-sub {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--ec-text-3);
}

.ec-set-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.ec-set-badge.is-on { background: var(--ec-green-soft); color: var(--ec-green-deep); }
.ec-set-badge.is-off { background: #fdeaea; color: #b91c1c; }

.ec-set-body { padding: 20px 24px 22px; }

.ec-set-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    padding: 13px 16px;
    margin-bottom: 18px;
    background: #f6f7f9;
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius-sm);
    font-size: 13px;
    color: var(--ec-text-3);
}

.ec-set-info > i { color: var(--ec-text-3); }

.ec-set-info b {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ec-text);
    letter-spacing: 0.2px;
}

.ec-set-info-tail { margin-left: auto; font-size: 12.5px; }

.ec-set-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ec-set-pane { min-width: 0; padding-right: 26px; }

.ec-set-pane + .ec-set-pane {
    padding-right: 0;
    padding-left: 26px;
    border-left: 1px solid var(--ec-line);
}

.ec-set-pane-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--ec-text);
}

.ec-set-pane-title i { font-size: 13px; color: var(--ec-green-deep); }
.ec-set-pane-title.is-danger { color: #b91c1c; }
.ec-set-pane-title.is-danger i { color: #dc2626; }

.ec-set-warn {
    display: flex;
    gap: 9px;
    padding: 11px 13px;
    margin-bottom: 15px;
    border-radius: var(--ec-radius-sm);
    background: #fdf6e7;
    border: 1px solid #f5e3bd;
    color: #b45309;
    font-size: 12.5px;
    line-height: 1.65;
}

.ec-set-warn i { margin-top: 3px; }

.ec-set-grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ec-code-row { display: flex; gap: 10px; }
.ec-code-row .ec-input { flex: 1; min-width: 0; }

.ec-code-btn {
    flex-shrink: 0;
    height: 46px;
    padding: 0 16px;
}

.ec-set-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--ec-line);
}

.ec-set-row.is-last {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.ec-set-row-txt b {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ec-text);
}

.ec-set-row-txt span {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--ec-text-3);
}

.ec-set-field-sm { max-width: 320px; margin-bottom: 0; }

.ec-set-actions {
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid var(--ec-line);
}

.ec-set-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ec-set-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 17px 8px;
    background: #fff;
    border: 1px solid var(--ec-line);
    border-radius: var(--ec-radius-sm);
    color: var(--ec-text-2);
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.18s, background 0.18s, transform 0.18s, color 0.18s;
}

.ec-set-tile i { font-size: 17px; color: var(--ec-green-deep); }

.ec-set-tile:hover {
    border-color: var(--ec-green);
    background: var(--ec-green-soft);
    color: var(--ec-green-deep);
    transform: translateY(-2px);
}

/* 开关（替代设置页里那块 Win95 风格 + 旧 .switch） */
.ec-switch {
    position: relative;
    flex-shrink: 0;
    display: inline-block;
    width: 48px;
    height: 28px;
    cursor: pointer;
}

.ec-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.ec-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d7dbe2;
    transition: background 0.2s;
}

.ec-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(16, 24, 40, 0.24);
    transition: transform 0.2s;
}

.ec-switch input:checked + .ec-switch-track { background: linear-gradient(135deg, #34d399, #10b981); }
.ec-switch input:checked + .ec-switch-track::after { transform: translateX(20px); }
.ec-switch input:focus-visible + .ec-switch-track { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }

/* 头像设置 */
.ec-avatar-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.ec-avatar-now { text-align: center; }

.ec-avatar-now-circle {
    width: 150px;
    height: 150px;
    margin: 0 auto 14px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f2f4;
    border: 1px solid var(--ec-line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-avatar-now-circle img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ec-avatar-now-circle i { font-size: 54px; color: var(--ec-text-3); }

.ec-avatar-work { min-width: 0; }

.ec-avatar-idle {
    padding: 30px 20px;
    border: 1px dashed var(--ec-line-strong);
    border-radius: var(--ec-radius-sm);
    background: #fbfcfd;
    text-align: center;
    color: var(--ec-text-3);
    font-size: 12.5px;
    line-height: 1.7;
}

.ec-avatar-idle i { display: block; margin-bottom: 9px; font-size: 22px; color: #c5ccdb; }
.ec-avatar-idle.is-off { display: none; }

.ec-crop.is-off,
.ec-crop-preview.is-off,
.ec-crop-loading.is-off,
.ec-crop-fail.is-off,
#preview-container.is-off { display: none; }

.ec-crop-live {
    display: grid;
    grid-template-columns: minmax(0, 400px) 150px;
    gap: 18px;
    align-items: start;
}

.ec-crop-stage {
    max-width: 400px;
    max-height: 400px;
    overflow: hidden;
    background: #f0f2f4;
    border-radius: var(--ec-radius-sm);
}

.ec-crop-stage img { display: block; max-width: 100%; }

.ec-crop-side { min-width: 0; }

.ec-crop-preview-t { margin-bottom: 8px; font-size: 12.5px; color: var(--ec-text-3); }

.ec-crop-preview-circle {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--ec-green);
    background: #f0f2f4;
}

.ec-crop-preview-circle img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ec-crop-tip {
    display: flex;
    gap: 7px;
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--ec-text-3);
}

.ec-crop-tip i { margin-top: 3px; }

.ec-crop-loading,
.ec-crop-fail {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 15px;
    margin-bottom: 14px;
    border-radius: var(--ec-radius-sm);
    font-size: 13px;
}

.ec-crop-loading { background: #f6f7f9; border: 1px solid var(--ec-line); color: var(--ec-text-3); }
.ec-crop-fail { background: #fdf6e7; border: 1px solid #f5e3bd; color: #b45309; }

.ec-crop-actions { display: flex; gap: 10px; margin-top: 16px; }

/* Cropper 主题色（覆盖 CDN 默认蓝，靠 .ec-crop 提升权重） */
.ec-crop .cropper-view-box { outline-color: rgba(16, 185, 129, 0.75); }
.ec-crop .cropper-line,
.ec-crop .cropper-point { background-color: #10b981; }
.ec-crop .cropper-point.point-se { width: 16px; height: 16px; }

/* 禁用态 */
.ec-btn:disabled,
.btn-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* 侧栏矮屏自适应：优先保住主导航，热门板块不再被裁一半 */
@media (max-height: 790px) {
    .ec-brand { padding: 8px 12px 12px; }
    .ec-nav-item { padding: 9px 14px; }
    .ec-side-block { margin-top: 14px; }
    .ec-side-title { padding-bottom: 6px; }
    .ec-side-cat { padding: 4px 10px; }
    .ec-side-cat-icon { width: 24px; height: 24px; border-radius: 8px; font-size: 11px; }
    .ec-side-foot { padding: 12px 10px 4px; }
    .ec-side-foot-word { font-size: 22px; }
}

@media (max-height: 680px) {
    .ec-side-block { display: none; }
}

@media (max-width: 1000px) {
    .ec-set-cols { grid-template-columns: 1fr; }
    .ec-set-pane { padding-right: 0; }
    .ec-set-pane + .ec-set-pane {
        padding-left: 0;
        margin-top: 20px;
        padding-top: 20px;
        border-left: none;
        border-top: 1px solid var(--ec-line);
    }
    .ec-set-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ec-avatar-row { grid-template-columns: 1fr; }
    .ec-avatar-now { text-align: left; }
    .ec-avatar-now-circle { margin-left: 0; }
    .ec-crop-live { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   11. 媒体查询
   --------------------------------------------------------------- */
@media (max-width: 1380px) {
    .ec-cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1240px) {
    .ec-home-cols {
        grid-template-columns: minmax(0, 1fr) 272px;
    }
    .ec-topbar-inner,
    .ec-container {
        padding-left: 22px;
        padding-right: 22px;
    }
}

@media (max-width: 1120px) {
    :root {
        --ec-sidebar-w: 196px;
    }
    .ec-slogan {
        display: none;
    }
    .ec-home-cols {
        grid-template-columns: 1fr;
    }
    .ec-home-right {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
    .ec-home-right .ec-panel {
        margin-bottom: 0;
    }
}

@media (max-width: 900px) {
    .ec-cat-grid {
        grid-template-columns: 1fr;
    }
    .ec-shortcuts {
        flex-wrap: wrap;
    }
    .ec-shortcut {
        flex: 0 0 calc(33.33% - 8px);
    }
    .ec-profile-stats {
        padding-left: 0;
    }
}

/* ============================================================
   鉴权页（登录 / 注册 / 忘记密码 / 重置密码）
   与手机版 auth.css 同一视觉语言：图标块 + 圆角卡片 + 胶囊切换
   ============================================================ */
.ec-auth-page {
    display: flex;
    justify-content: center;
    padding: 44px 20px 64px;
    min-height: calc(100vh - 200px);
}

.ec-auth-inner {
    width: 100%;
    max-width: 424px;
}

/* 品牌区 */
.ec-auth-brand {
    text-align: center;
    padding: 4px 0 24px;
}

.ec-auth-brand-img {
    height: 56px;
    width: auto;
    object-fit: contain;
}

.ec-auth-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, #22c55e, var(--ec-green));
    color: #fff;
    font-size: 26px;
    box-shadow: 0 10px 24px rgba(16, 185, 129, .30);
}

.ec-auth-brand-title {
    margin: 14px 0 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--ec-text);
}

/* 提示条 */
.ec-auth-alert {
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.6;
}

.ec-auth-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.ec-auth-alert-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* 卡片 */
.ec-auth-card {
    background: var(--ec-card);
    border: 1px solid var(--ec-line);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 28px rgba(16, 24, 40, .06);
}

/* 登录方式切换（胶囊，同手机版） */
.ec-auth-tabs {
    display: flex;
    gap: 6px;
    padding: 5px;
    background: #f1f3f5;
    border-radius: 14px;
    margin-bottom: 20px;
}

.ec-auth-tab {
    flex: 1;
    padding: 11px 8px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--ec-text-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.ec-auth-tab.is-on {
    background: #fff;
    color: var(--ec-green-deep);
    box-shadow: 0 2px 8px rgba(16, 24, 40, .08);
}

/* 表单 */
.ec-auth-field {
    margin-bottom: 16px;
}

.ec-auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ec-text-2);
    margin-bottom: 8px;
}

.ec-auth-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e5e8ec;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    color: var(--ec-text);
    background: #fafbfc;
    box-sizing: border-box;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.ec-auth-input::placeholder {
    color: var(--ec-text-3);
}

.ec-auth-input:focus {
    outline: none;
    border-color: var(--ec-green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .14);
}

/* 验证码行 */
.ec-auth-code-row {
    display: flex;
    gap: 10px;
}

.ec-auth-code-row .ec-auth-input {
    flex: 1 1 auto;
    min-width: 0;
}

.ec-auth-code-btn {
    flex: 0 0 auto;
    padding: 0 16px;
    border: 1.5px solid var(--ec-green);
    border-radius: 12px;
    background: var(--ec-green-soft);
    color: var(--ec-green-deep);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .18s ease, opacity .18s ease;
}

.ec-auth-code-btn:hover:not(:disabled) {
    background: #d1fae5;
}

.ec-auth-code-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.ec-auth-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--ec-text-3);
}

/* 记住我（label 同用 ec-auth-field 容器，需覆盖上一段 label 规则） */
label.ec-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: var(--ec-text-2);
    cursor: pointer;
}

.ec-auth-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--ec-green);
}

/* 主按钮 */
.ec-auth-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    padding: 14px 20px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #22c55e, var(--ec-green));
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(16, 185, 129, .30);
    transition: opacity .18s ease, transform .18s ease;
}

.ec-auth-submit:hover {
    opacity: .92;
}

.ec-auth-submit:active {
    opacity: .9;
    transform: translateY(1px);
}

/* 区块显隐（JS 切换 is-off 类） */
.ec-auth-section.is-off {
    display: none;
}

/* 页面说明文字 */
.ec-auth-desc {
    text-align: center;
    color: var(--ec-text-2);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 20px;
}

.ec-auth-desc strong {
    color: var(--ec-green-deep);
}

/* 底部链接 */
.ec-auth-foot {
    text-align: center;
    font-size: 14px;
    color: var(--ec-text-2);
    margin-top: 18px;
}

.ec-auth-foot a {
    color: var(--ec-green-deep);
    font-weight: 600;
    text-decoration: none;
}

.ec-auth-foot a:hover {
    text-decoration: underline;
}

.ec-auth-aux {
    text-align: center;
    margin-top: 10px;
}

.ec-auth-aux a {
    color: var(--ec-text-3);
    font-size: 13px;
    text-decoration: none;
}

.ec-auth-aux a:hover {
    color: var(--ec-green-deep);
}

.ec-auth-aux-sep {
    margin: 0 8px;
    color: #d1d5db;
}

/* 设置页：单行复选 */
.ec-check-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.7;
    cursor: pointer;
}

.ec-check-line input {
    margin-top: 3px;
    accent-color: #10b981;
}

/* 搜索结果里的群组卡片 */
.search-group-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
}

.search-group-card:hover {
    border-color: #a7f3d0;
}

.search-group-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    color: #047857;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.search-group-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-group-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.search-group-main strong {
    font-size: 14px;
    color: #17181c;
}

.search-group-meta {
    font-size: 12px;
    color: #9ca3af;
}

.search-group-go {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 8px;
    background: #10b981;
    color: #fff;
    font-size: 12.5px;
}

.search-empty-line {
    margin: 0 0 18px;
    font-size: 13px;
    color: #9ca3af;
}

/* 外观模式：三选一分段控件 */
.ec-seg {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: #f4f5f7;
    border-radius: 12px;
}

.ec-seg-item {
    position: relative;
    flex: 1;
}

.ec-seg-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ec-seg-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 9px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.ec-seg-item span i {
    font-size: 12px;
}

.ec-seg-item input:checked + span {
    background: #fff;
    color: #17181c;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .1);
}

.ec-set-actions {
    margin-top: 14px;
}
