/* ─── PVPTIER · 月雨庭战绩排行榜（前台暗色电竞风 / 后台亮色：变量驱动，0 圆角，极简）─── */

:root {
    /* 前台暗色调色板（对齐 mcpvp.com 实测值） */
    --ac-bg: #0E1326;             /* mcpvp --mcpvp-bg 深海军蓝 */
    --ac-nav: #0a0d1c;            /* mcpvp --mcpvp-nav-panel */
    --ac-surface: #111426;        /* mcpvp --mcpvp-panel */
    --ac-surface-2: #1b2032;      /* mcpvp tier-tab.active 背景 */
    --ac-text: #e7e9ef;
    --ac-text-secondary: #a9b4c9;
    --ac-text-muted: #7d879c;
    --ac-border: #1D263B;         /* mcpvp --mcpvp-panel-border */
    --ac-border-light: #1a2338;
    --ac-primary: #2dd4bf;
    --ac-primary-strong: #5eead4;   /* 暗底文字强调（更亮一档） */
    --ac-primary-hover: #14b8a6;
    --ac-primary-bg: rgba(45, 212, 191, .07);
    --ac-primary-light: rgba(45, 212, 191, .16);
    --ac-danger: #ff4444;         /* mcpvp 红 */
    --ac-danger-bg: rgba(255, 68, 68, .08);
    --ac-danger-border: rgba(255, 68, 68, .32);
    --ac-row-hover: #0e1323;      /* mcpvp 行悬停底（中性提亮） */
    --ac-shadow: 0 8px 20px rgba(0, 0, 0, .45);
    --ac-shadow-lg: 0 14px 44px rgba(0, 0, 0, .55);
    --ac-focus-ring: 0 0 0 3px rgba(45, 212, 191, .16);
    --ac-radius: 0px;
    --ac-radius-control: 4px;
    /* 段位色阶（mcpvp overall tier 15 档实测值，映射到本站 9 档） */
    --tier-ht1: #55FFFF;   /* mcpvp HT1 青 */
    --tier-ht2: #A4B3C7;   /* mcpvp HT2 银蓝 */
    --tier-ht3: #DD8849;   /* mcpvp HT3 橙 */
    --tier-ht4: #9FD27F;   /* mcpvp HT4 绿 */
    --tier-ht5: #7FC97F;   /* mcpvp HT5 绿 */
    --tier-lt1: #FACC15;   /* mcpvp LT1 黄 */
    --tier-lt2: #888D95;   /* mcpvp LT2 */
    --tier-lt3: #B36830;   /* mcpvp LT3 */
    --tier-lt4: #739F57;   /* mcpvp LT4 */
    --tier-lt5: #527F55;   /* mcpvp LT5 */
    color-scheme: dark;
}

/* 后台与登录页切回亮色调色板（admin 专属视觉不变） */
body.page-admin,
body.page-login {
    --ac-bg: #f7f8fa;
    --ac-nav: #ffffff;
    --ac-surface: #ffffff;
    --ac-surface-2: #fafbfc;
    --ac-text: #1a1a2e;
    --ac-text-secondary: #5a6070;
    --ac-text-muted: #8a9099;
    --ac-border: #e8eaee;
    --ac-border-light: #f0f0f5;
    --ac-primary: #14b8a6;
    --ac-primary-strong: #0f9488;
    --ac-primary-hover: #0f9488;
    --ac-primary-bg: #f0fdfa;
    --ac-primary-light: #ccfbf1;
    --ac-danger: #dc3545;
    --ac-danger-bg: #fef2f2;
    --ac-danger-border: #fecaca;
    --ac-row-hover: #f4f6f8;
    --ac-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    --ac-shadow-lg: 0 6px 24px rgba(0, 0, 0, 0.10);
    --tier-ht1: #0891b2;   /* 青（亮底加深） */
    --tier-ht2: #64748b;   /* 银蓝 */
    --tier-ht3: #c2410c;   /* 橙 */
    --tier-ht4: #4d7c0f;   /* 绿 */
    --tier-ht5: #2f7d46;   /* 绿（加深区分 ht4） */
    --tier-lt1: #a16207;
    --tier-lt2: #6b7280;
    --tier-lt3: #9a4a1c;
    --tier-lt4: #3f6212;
    --tier-lt5: #375e3a;
    color-scheme: light;
}

a { text-decoration: none; color: inherit; }
body {
    background: var(--ac-bg); color: var(--ac-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px; line-height: 1.6; margin: 0;
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column;
}
main.flex-grow { flex: 1 0 auto; width: 100%; }
img { max-width: 100%; }
/* 内容井渐变（mcpvp --mcpvp-content-well 同款，仅前台暗色） */
body:not(.page-admin):not(.page-login) {
    background: #0b0b0e;
    box-sizing: border-box;
    flex-direction: row;
    justify-content: center;
    padding: 16px 80px;
    min-height: 100vh;
}
body:not(.page-admin):not(.page-login)::-webkit-scrollbar { width: 6px; height: 6px; }
body:not(.page-admin):not(.page-login)::-webkit-scrollbar-track { background: #0b0b0e; }
body:not(.page-admin):not(.page-login)::-webkit-scrollbar-thumb { background: #2a2a3a; border-radius: 10px; }
body:not(.page-admin):not(.page-login)::-webkit-scrollbar-thumb:hover { background: #3a3a4a; }

/* ─── 鼠标拖选文字高亮：品牌色实底 + 白字（前台深色站与后台浅色站共用一套），
   ::selection 里 var() 解析不到 :root 变量，故直接写色值 ─── */
::selection { background: #14b8a6; color: #fff; }
::-moz-selection { background: #14b8a6; color: #fff; }   /* 老版 Firefox */

/* ─── 顶部加载进度条（官网同款）─── */
.page-progress {
    position: fixed; top: 0; left: 0; height: 2px; width: 0;
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.85), rgba(45, 212, 191, 0.85));
    z-index: 1100; opacity: 0;
    transition: width 0.2s ease, opacity 0.3s ease;
}

/* ─── 页面容器（对齐 PVPTIERS demo 的 .container 卡片）─── */
.pvptier-container {
    width: 100%;
    display: flex; flex-direction: column;
    box-sizing: border-box;
    background: #0f0f13; border-radius: 16px;
    padding: 12px 20px 14px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;   /* 划屏跟手位移时内容裁在卡片内，不外溢 */
}
/* ─── 顶部导航（对齐 PVPTIERS demo：金色渐变 Logo + 搜索/分数信息）─── */
.navbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid #21212a; flex-wrap: wrap; gap: 12px 20px; flex-shrink: 0; }
.nav-left { display: flex; align-items: center; gap: 20px; }
.logo { font-size: 28px; font-weight: 900; letter-spacing: 2px; background: linear-gradient(135deg, #f5c542 0%, #dba32b 50%, #f5c542 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; cursor: default; user-select: none; transition: transform 0.2s; }
.logo:hover { transform: scale(1.02); }
.nav-links { display: flex; gap: 18px; font-size: 14px; font-weight: 500; color: #b0b0b8; }
.nav-links a { display: flex; align-items: center; gap: 8px; color: #b0b0b8; text-decoration: none; transition: color 0.2s; position: relative; cursor: pointer; }
.nav-links a:hover { color: #f0e6d0; }
.nav-links a.active { color: #f5c542; }
.nav-links a.active::after { content: ''; position: absolute; bottom: -6px; left: 0; width: 100%; height: 2px; background: #f5c542; border-radius: 2px; }
.nav-links a i { font-size: 16px; }
.nav-links a img { width: 16px; height: 16px; flex-shrink: 0; }   /* 排行榜：奖杯图（tier_1.svg）与其它图标同尺寸 */
.nav-right { display: flex; align-items: center; gap: 20px; }

/* ─── 页头（已并入导航栏 logo，前台不再单独渲染）─── */

/* ─── 模式 Tab ─── */
/* 模式 Tab：圆顶金边（对齐 PVPTIERS demo） */
.tabs {
    margin: 14px 0 0; flex-shrink: 0;
    display: flex; gap: 4px; overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    flex: 0 0 110px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px;
    position: relative;
    background: transparent; border: 2px solid #2a2a36; border-bottom: none;
    border-radius: 1.5rem 1.5rem 0 0; padding: 6px 16px 8px;
    font-size: 14px; font-weight: 600; color: rgba(160, 160, 170, 0.55);
    cursor: pointer; transition: all .15s ease; font-family: inherit; margin-bottom: 0;
    animation: tabUp .42s cubic-bezier(.22, 1, .36, 1) backwards;
}
/* Tab 按钮入场：从下往上划入（按序错开延迟，与列表行 rowIn 同语言） */
.tab:nth-child(2) { animation-delay: 40ms; }
.tab:nth-child(3) { animation-delay: 80ms; }
.tab:nth-child(4) { animation-delay: 120ms; }
.tab:nth-child(5) { animation-delay: 160ms; }
.tab:nth-child(6) { animation-delay: 200ms; }
.tab:nth-child(7) { animation-delay: 240ms; }
.tab:nth-child(8) { animation-delay: 280ms; }
.tab:nth-child(9) { animation-delay: 320ms; }
@keyframes tabUp {
    from { opacity: 0; transform: translateY(16px); }
}
.tab-underline { display: none; width: 100%; height: 2px; background: #f5c542; position: absolute; bottom: 0; left: 0; }
.tab.active .tab-underline { display: block; }
.tab img { width: 22px; height: 22px; object-fit: contain; filter: grayscale(100%) opacity(0.6); transition: filter .2s; }
.tab span { font-size: 13px; font-weight: 600; letter-spacing: .3px; line-height: 1.4; }
.tab:hover { background: rgba(255, 255, 255, 0.05); color: #e0e0e8; }
.tab:hover img { filter: grayscale(0%) opacity(1); }
.tab.active { background: #181820; border-color: #f5c542; color: #f5c542; }
.tab.active img { filter: grayscale(0%) opacity(1); }

/* ─── 导航内搜索框 + 分数信息按钮（对齐 PVPTIERS demo 暗色胶囊）─── */
.search-box {
    display: flex; align-items: center; gap: 8px;
    background: #1c1c24; border-radius: 40px;
    padding: 6px 16px 6px 18px; border: 1px solid #2c2c36;
    transition: border-color .2s;
}
.search-box:focus-within { border-color: #f5c542; }
.search-box i { color: #6a6a78; font-size: 14px; }
.search-box input { border: 0; outline: none; width: 120px; max-width: 30vw; font-size: 14px; background: none; color: #e0e0e8; font-family: inherit; padding: 6px 0; }
.search-box input::placeholder { color: #5a5a68; }
.points-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    font-size: 13px; font-weight: 600; color: #c8c8d8; font-family: inherit;
    background: #1c1c24; border: 1px solid #2c2c36; border-radius: 40px;
    cursor: pointer; transition: color .2s, border-color .2s;
}
.points-btn:hover { color: #f5c542; border-color: #f5c542; }

/* ─── 排行表（玩家名次块 / 地区 / 八模式段位格，排版参照旧版 PVPTIERS demo）─── */
.table-card {
    margin: 14px 0 0;
}
.table-scroll {
    background: #0d0d12;
    border: 1px solid #1c1c26; border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}
.lb-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.lb-table thead th {
    font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    color: #6b7280; text-align: left; padding: 12px 10px;
    background: #13131b; border-bottom: 2px solid #252530; white-space: nowrap;
}
.lb-table thead th.col-tiers-head { text-align: right; padding-right: 10px; }
.lb-table tbody td { padding: 10px 12px; border-bottom: 1px solid #17171f; }
.lb-table tbody tr:last-child td { border-bottom: 0; }
.lb-table tbody tr { cursor: pointer; transition: background-color .15s, transform .2s ease; animation: rowIn .35s ease backwards; }
/* 列表载入：逐行从左划入（delay 由 JS 按行序注入，封顶 19 行防长列表久等） */
@keyframes rowIn {
    from { opacity: 0; transform: translateX(-28px); }
}
/* 悬浮整行左移（demo 同构） */
.lb-table tbody tr:hover { background: #16161f; transform: translateX(-6px); }
/* 后台排名列（admin players 表复用） */
.col-rank { width: 56px; text-align: center !important; }
/* 玩家格：名次块（名次数字 + 3D 半身像，cntier 同款斜切素材图）+ 名字/称号/积分 */
.player-cell { display: flex; align-items: center; }
/* 名次块：cntier 同款斜切素材图（other=深蓝静态 / 1-shimmer=金 / 3-shimmer=铜；SVG 自带斜切形状、描边与扫光动画） */
.rank-block {
    display: flex; align-items: center; gap: 14px; flex-shrink: 0;
    height: 68px; min-width: 124px; padding: 0 36px 0 22px; margin-right: 12px;
    background-image: url('/assets/images/rank/other.svg');
    background-size: 100% 100%; background-position: center; background-repeat: no-repeat;
}
/* 第 4 名起：底色写进 CSS 兜底（图片缺失也保证有可见卡片），斜切比例与素材一致（35/200 = 17.5%） */
.rank-block:not(.is-top1):not(.is-top2):not(.is-top3) {
    background-color: #263244;
    clip-path: polygon(0 0, 100% 0, calc(100% - 17.5%) 100%, 0 100%);
}
.rank-block.is-top1 { background-image: url('/assets/images/rank/1-shimmer.svg'); }
.rank-block.is-top2 { background-image: url('/assets/images/rank/2-shimmer.svg'); }
.rank-block.is-top3 { background-image: url('/assets/images/rank/3-shimmer.svg'); }
.rank-num { font-weight: 900; font-size: 28px; font-style: italic; color: #fff; font-variant-numeric: tabular-nums; }
.rank-block:not(.is-top1):not(.is-top2):not(.is-top3) .rank-num { font-style: normal; }
/* 3D 半身像：定高不定宽（bust 竖长透明底，width:auto 自适应）；贴名次块底部站立 */
.p-avatar { height: 58px; width: auto; border-radius: 4px; flex-shrink: 0; object-fit: cover; align-self: flex-end; }
.player-info { display: flex; flex-direction: column; min-width: 0; }
.player-name { display: block; font-weight: 800; font-size: 19px; line-height: 1.2; color: #f0f0f8; margin-bottom: 2px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-sub { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #9a9aaa; white-space: nowrap; }
.player-sub > img { height: 15px; flex-shrink: 0; }
/* 称号行：徽章 + 称号 + 括号积分（同一行；称号过长省略号，积分不被压缩） */
.p-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.p-score { margin-left: 2px; color: #9a9aaa; font-size: 13px; flex-shrink: 0; }
/* 地区徽章（前台）：每地独立彩色 —— 色相/明度由 JS 按地区算出（--rg / --rgl） */
.region-badge {
    display: inline-block; padding: 4px 12px; font-size: 12px; font-weight: 700;
    border: 1px solid var(--ac-border); color: var(--ac-text-secondary); border-radius: var(--ac-radius-control);
}
body:not(.page-admin) .region-badge {
    padding: 6px 14px; font-size: 14px; font-weight: 800; border-radius: 6px; border-color: transparent;
    color: hsl(var(--rg, 210), 72%, var(--rgl, 64%));
    background: hsla(var(--rg, 210), 72%, var(--rgl, 64%), .16);
}
/* 段位格：模式图标圆座 + 段位色签（demo 同构，色签用固定底色配色） */
td.col-tier, .cell-tier { text-align: center; }
.lb-table td.col-tier { padding: 10px 2px; width: 54px; }
.tier-cell { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.tier-icon-wrap {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    background: #14141e; border: 2px solid #2a2a36; border-radius: 50%;
}
.tier-icon-wrap img { width: 20px; height: 20px; opacity: .9; }
.tier-label {
    font-size: 11px; font-weight: 900; line-height: 1; display: inline-block;
    padding: 3px 7px; border-radius: 12px; text-align: center;
    letter-spacing: .5px;
}
/* 段位色签：cntier 原站变量同步（--htN 底 + --htN-foreground 字，无边框；表格与弹窗通用） */
.tier-label.t-ht1 { background: #6d5d2c; color: #e8ba3a; }
.tier-label.t-lt1 { background: #584c25; color: #d5b355; }
.tier-label.t-ht2 { background: #5e6979; color: #c4d3e7; }
.tier-label.t-lt2 { background: #4a505a; color: #a0a7b2; }
.tier-label.t-ht3 { background: #6b4b36; color: #f89f5a; }
.tier-label.t-lt3 { background: #593722; color: #c67b42; }
.tier-label.t-ht4 { background: #303144; color: #81749a; }
.tier-label.t-lt4 { background: #2c2e40; color: #655b79; }
.tier-label.t-ht5 { background: #2b2c3d; color: #8f82a8; }
.tier-label.t-lt5 { background: #262a3a; color: #655b79; }
.tier-cell.tier-empty .tier-label, .modal-tier-item.is-empty .tier-label { background: none; border: 0; padding: 3px 0; color: #4a4a5a; }
.t-ht1 { color: var(--tier-ht1); } .t-ht2 { color: var(--tier-ht2); } .t-ht3 { color: var(--tier-ht3); } .t-ht4 { color: var(--tier-ht4); } .t-ht5 { color: var(--tier-ht5); }
.t-lt1 { color: var(--tier-lt1); } .t-lt2 { color: var(--tier-lt2); } .t-lt3 { color: var(--tier-lt3); } .t-lt4 { color: var(--tier-lt4); } .t-lt5 { color: var(--tier-lt5); }
.tier-empty { color: #4a4a5a; }
/* 列表未定级格子：与弹窗 is-empty 同款遮罩变暗（整格 50% + 图标座 60%） */
.tier-cell.is-empty { opacity: .5; }
.tier-cell.is-empty .tier-icon-wrap { opacity: .6; }
.table-empty { text-align: center; color: var(--ac-text-muted); padding: 24px 0; }
/* 懒加载哨兵：不占视觉空间，滚到此处即追加下一批 */
.lb-sentinel { height: 1px; width: 100%; }

/* ─── 模式段位列（参照 cntier：Tier 1-5 五列，HT 上 LT 下）─── */
/* 切 Tab 淡入：五列从左到右错开划入（display 切换/重渲染时自动重放） */
.tier-col { animation: colIn .35s ease backwards; }
.tier-col:nth-child(2) { animation-delay: 60ms; }
.tier-col:nth-child(3) { animation-delay: 120ms; }
.tier-col:nth-child(4) { animation-delay: 180ms; }
.tier-col:nth-child(5) { animation-delay: 240ms; }
@keyframes colIn {
    from { opacity: 0; transform: translateX(-16px); }
}
.tier-columns {
    margin: 12px 0 0;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; align-items: start;
}
.tier-col {
    background: linear-gradient(90deg, #000003 0%, #000007 33.78%, #000007 66.66%, #000 103%);
    border: 1px solid var(--ac-border); box-shadow: inset 0 0 0 1px rgba(114, 145, 245, .08), var(--ac-shadow);
    min-width: 0;
}
.tier-col-head {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 11px 12px; font-size: 14px; font-weight: 800; letter-spacing: .5px;
    border-bottom: 1px solid var(--ac-border);
}
.tier-col-head i { font-size: 14px; }
.tier-col-head .tier-col-trophy { width: 18px; height: 18px; }
/* Tier 列头：按段位配色（cntier --tier-N 底 + --tier-N-foreground 字） */
.tier-col.is-t1 .tier-col-head { background: #41361b; color: #f0b857; }
.tier-col.is-t2 .tier-col-head { background: #343843; color: #a9b1b9; }
.tier-col.is-t3 .tier-col-head { background: #352620; color: #d59161; }
.tier-col.is-t4 .tier-col-head { background: #161e2a; color: #b1c0cc; }
.tier-col.is-t5 .tier-col-head { background: #161e2a; color: #b1c0cc; }
.tier-col-body { display: flex; flex-direction: column; }
.tier-chip {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 6px;
    border-bottom: 1px solid var(--ac-border-light);
    border-left: 3px solid hsl(var(--rg, 210), 72%, var(--rgl, 64%));   /* 侧线 = 地区色 */
    cursor: pointer; transition: background-color .15s, filter .15s;
}
.tier-chip img { height: 42px; width: auto; flex-shrink: 0; }
/* 行底：高段位 / 低段位（cntier --hightier / --lowtier），悬停仅轻微提亮不改色相 */
.tier-chip.is-ht { background: #263244; }
.tier-chip.is-lt { background: #161e2a; }
.tier-chip:hover { filter: brightness(1.12); }
.chip-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 悬停滑入的地区：紧贴侧线、贯通整行高的色块（负边距吃进行内边距），底色同地区色 */
.chip-region {
    align-self: stretch; display: inline-flex; align-items: center;
    flex-shrink: 0; max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap;
    margin: -9px -10px -9px -6px; padding: 0; border-radius: 0;
    font-size: 13px; font-weight: 800;
    color: hsl(var(--rg, 210), 80%, 72%);
    background: hsla(var(--rg, 210), 72%, var(--rgl, 64%), .3);
    transition: max-width .18s ease, opacity .18s ease, margin-right .18s ease, padding .18s ease;
}
.tier-chip:hover .chip-region { max-width: 96px; opacity: 1; margin-right: 0; padding: 0 10px; }
/* 右侧段位箭头：HT 双箭头 / LT 单箭头（cntier 版式），颜色随段位 */
.chip-arrow { margin-left: auto; flex-shrink: 0; font-size: 16px; opacity: .85; }
.tier-chip:hover .chip-arrow { opacity: 1; }
.tier-col-empty { padding: 20px 12px; text-align: center; font-size: 12px; color: var(--ac-text-muted); }

/* ─── 玩家详情弹窗 ─── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000; display: none;
    background: rgba(2, 6, 12, .66); padding: 24px; overflow-y: auto;
}
.modal-overlay.active { display: flex; align-items: flex-start; justify-content: center; }
.modal-card {
    position: relative; width: 440px; max-width: 100%; margin-top: 6vh;
    background: linear-gradient(90deg, #000003 0%, #000007 33.78%, #000007 66.66%, #000 103%);
    border: 1px solid var(--ac-border); border-radius: var(--ac-radius);
    box-shadow: inset 0 0 0 1px rgba(114, 145, 245, .08), var(--ac-shadow-lg); padding: 28px 26px 24px;
    animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal-close-btn {
    position: absolute; top: 10px; right: 10px; width: 32px; height: 32px;
    background: none; border: 0; color: var(--ac-text-muted); font-size: 20px; cursor: pointer;
}
.modal-close-btn:hover { color: var(--ac-text); }
/* 头部：复用列表头像卡（斜切素材图 + 3D 半身像，靠左）+ 名字/地区 */
.modal-head { display: flex; align-items: center; gap: 20px; min-width: 0; }
.modal-rank-block { height: 92px; padding: 0 22px 0 10px; justify-content: flex-start; margin-right: 0; }
.modal-rank-block .p-avatar { height: 84px; }
.modal-head-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.modal-name { font-size: 26px; font-weight: 800; line-height: 1.2; word-break: break-all; }
.modal-region { font-size: 12px; color: hsl(var(--rg, 210), 72%, var(--rgl, 64%)); }
/* 弹窗 POSITION 行（demo 同构）：左斜切名次块 + 奖杯 + 模式名 + 括号积分 */
.modal-rank-row { display: flex; align-items: stretch; background: #0b0b0e; border: 1px solid #21212a; border-radius: 8px; overflow: hidden; height: 48px; }
.modal-rank-left { display: flex; align-items: center; justify-content: center; width: 78px; flex-shrink: 0; font-size: 22px; font-weight: 900; font-style: italic; color: #fff; background: #1e2634; clip-path: polygon(0% 0%, 100% 0%, 86% 100%, 0% 100%); }
.modal-rank-left.p1 { background: #f5c542; }
.modal-rank-left.p2 { background: #808c9c; }   /* 第 2 名银色（cntier --placement-2） */
.modal-rank-left.p3 { background: #b56326; }
.modal-rank-right { display: flex; align-items: center; gap: 8px; padding: 0 16px; color: #e0e0e8; font-size: 16px; font-weight: 700; }
.modal-rank-right i { color: #f5c542; font-size: 17px; }
.modal-rank-right .rank-ico { width: 18px; height: 18px; flex-shrink: 0; }   /* POSITION 行：奖杯图（tier_1.svg） */
.modal-rank-right .mr-points { color: #6b7280; font-weight: 500; font-size: 15px; }
/* 段位行：圆角卡片（徽章 + 称号，无边框，颜色随称号档位，取自 cntier HTML 的称号色） */
.modal-title-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-weight: 700; font-size: 17px; }
.modal-title-card img { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.modal-title-card.tt-0, .modal-title-card.tt-1 { color: #fde047; background: rgba(253, 224, 71, .13); }
.modal-title-card.tt-2 { color: #fda4af; background: rgba(253, 164, 175, .13); }
.modal-title-card.tt-3 { color: #d8b4fe; background: rgba(216, 180, 254, .13); }
.modal-title-card.tt-4, .modal-title-card.tt-5 { color: #c4b5fd; background: rgba(196, 181, 253, .13); }
.modal-title-card.tt-6 { color: #d1d5db; background: rgba(209, 213, 219, .13); }
.modal-section { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--ac-text-muted); text-transform: uppercase; margin: 20px 0 10px; text-align: left; }
.modal-tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.modal-tier-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    border: 1px solid var(--ac-border-light); padding: 6px 4px;
    height: 98px; min-width: 0;
}
/* 弹窗图标座复用列表同款 .tier-icon-wrap 圆框（38px，img 继承 20px） */
.modal-tier-item .mode-label { font-size: 10px; color: var(--ac-text-muted); }
.modal-tier-item .tier-label { font-size: 13px; }
.modal-tier-item.is-empty { color: var(--ac-text-muted); opacity: .5; }
.modal-tier-item.is-empty .tier-icon-wrap { opacity: .6; }
.modal-namemc {
    display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 20px;
    padding: 10px; font-size: 13px; font-weight: 600;
    color: var(--ac-text-secondary); border: 1px solid var(--ac-border);
    transition: color .2s, border-color .2s;
}
.modal-namemc:hover { color: var(--ac-primary-strong); border-color: var(--ac-primary); }

/* 分数信息弹窗（称号阈值 + 段位换算） */
.points-card { width: 560px; text-align: left; }
.points-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.points-col-title {
    font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
    color: var(--ac-text-muted); margin-bottom: 10px;
}
.points-item {
    display: flex; align-items: center; gap: 9px; padding: 8px 0;
    border-bottom: 1px solid var(--ac-border-light);
}
.points-item:last-child { border-bottom: 0; }
.points-item img { width: 18px; height: 18px; flex-shrink: 0; }
.pi-name { font-size: 13px; font-weight: 700; }
.pi-req { margin-left: auto; font-size: 12px; color: var(--ac-text-secondary); white-space: nowrap; }
.tp-group { margin-bottom: 14px; }
.tp-group:last-child { margin-bottom: 0; }
.tp-head { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; margin-bottom: 7px; }
.tp-trophy { width: 20px; height: 20px; }
.tp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tp-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
    border: 1px solid var(--ac-border); border-radius: var(--ac-radius-control);
    font-size: 12px; color: var(--ac-text-secondary);
}
.tp-chip i { font-size: 12px; line-height: 1; color: var(--ac-text-muted); }
.tp-chip .tier-label { font-size: 11px; }

/* ─── 社区视图（排版参照 PVPTIERS demo：渐变标题 + 卡片网格 + 条目列表；复制走站内 #copyTip）─── */
.community-header {
    text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 2px;
    margin: 28px 0 24px;
    background: linear-gradient(135deg, #f5c542 0%, #dba32b 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.community-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1080px; margin: 0 auto; }
.comm-card { background: #0d0d12; border: 1px solid #252530; border-radius: 12px; padding: 20px; }
.comm-card-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: #f0f0f8; margin-bottom: 14px; }
.comm-card-title i { color: #f5c542; font-size: 20px; }
.comm-card-title img { width: 26px; height: 26px; object-fit: contain; }
.comm-list { display: flex; flex-direction: column; gap: 10px; }
.comm-item {
    display: flex; align-items: center; gap: 12px;
    background: #121822; border: 1px solid #1c1c24; border-radius: 10px;
    padding: 12px 14px; transition: background .2s, border-color .2s;
}
.comm-item:hover { background: #1c1c24; border-color: #2c2c36; }
.comm-icon { font-size: 22px; width: 32px; text-align: center; flex-shrink: 0; color: #f5c542; }
.comm-icon.qq { color: #12b7f5; }
.comm-info { display: flex; flex-direction: column; min-width: 0; }
.comm-name { font-weight: 600; color: #e8e8e8; font-size: 14px; }
.comm-desc { font-size: 12px; color: #6b7280; margin-top: 2px; word-break: break-all; }
.comm-copy {
    margin-left: auto; flex-shrink: 0; width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 1px solid #2c2c36; border-radius: 4px;
    color: #6b7280; cursor: pointer; font-family: inherit; transition: color .2s, border-color .2s;
}
.comm-copy:hover { color: #f5c542; border-color: #f5c542; }
/* PC 三列一行居中；中屏两列 */
@media (max-width: 1024px) {
    .community-grid { grid-template-columns: repeat(2, 1fr); max-width: none; }
}

/* ─── 后台（排版参照 acc：topbar + 左侧菜单 + 内容区；亮色由 body.page-admin 变量覆盖）─── */
.admin-topbar {
    height: 56px; background: var(--ac-surface); border-bottom: 2px solid var(--ac-primary);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 20px; position: sticky; top: 0; z-index: 1030;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .06);
}
.admin-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.admin-brand:hover { color: var(--ac-primary); }
.admin-brand img { height: 28px; width: auto; display: block; }
.admin-brand-title { font-size: 15px; font-weight: 700; letter-spacing: -.2px; color: var(--ac-text); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--ac-primary);
    border: 1px solid var(--ac-primary); background: transparent;
    padding: 5px 12px; border-radius: var(--ac-radius-control);
    transition: background-color .2s, color .2s;
}
.topbar-btn:hover { background: var(--ac-primary); color: #fff; }

/* ─── 后台滚动条：4px 细轨 + 白轨 + 品牌色实底胶囊滑块（规格同 acc / 官网）───
   ① 标准属性（scrollbar-width / scrollbar-color）**只留给 Firefox**：Chrome 121+ 只要看到它们，
      就会整组忽略下面的 ::-webkit-scrollbar 自绘规则 → 表现成"自绘没生效、退回原生细条"。
   ② 滚动条与 ::selection 伪元素一律直接写色值（此处不解析 var()）。#14b8a6 = --ac-primary。 */
body.page-admin::-webkit-scrollbar,
body.page-login::-webkit-scrollbar,
body.page-admin ::-webkit-scrollbar { width: 4px; height: 4px; }
body.page-admin::-webkit-scrollbar-track,
body.page-login::-webkit-scrollbar-track,
body.page-admin ::-webkit-scrollbar-track { background: #fff; }
body.page-admin::-webkit-scrollbar-thumb,
body.page-login::-webkit-scrollbar-thumb,
body.page-admin ::-webkit-scrollbar-thumb { background: #14b8a6; border-radius: 2px; }   /* 4px 宽 → 半径 2px 即两端全圆 */
body.page-admin::-webkit-scrollbar-corner,
body.page-login::-webkit-scrollbar-corner,
body.page-admin ::-webkit-scrollbar-corner { background: #fff; }
@supports (-moz-appearance: none) {   /* 只有 Firefox 命中，Chrome 恒不命中 */
    body.page-admin, body.page-login { scrollbar-width: thin; scrollbar-color: #14b8a6 #fff; }
}

.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100dvh - 58px); }
/* 侧栏：对齐 accounts 站后台 .admin-side（220px + 吸顶 + 独立滚动 + 圆角菜单项） */
.admin-sidebar {
    background: var(--ac-surface); border-right: 1px solid var(--ac-border);
    padding: 12px 10px;
    position: sticky; top: 58px; align-self: start;
    height: calc(100dvh - 58px); overflow-y: auto;
}
.sidebar-title { font-size: 12px; color: var(--ac-text-muted); padding: 4px 10px 8px; letter-spacing: .4px; }
.sidebar-nav { display: flex; flex-direction: column; }
.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px;
    font-size: 14px; color: var(--ac-text-secondary); border-radius: var(--ac-radius-control);
    transition: background-color .2s ease, color .2s ease;
}
.sidebar-nav .nav-link + .nav-link { margin-top: 2px; }
.sidebar-nav .nav-link i { width: 18px; text-align: center; font-size: 15px; flex: 0 0 auto; }
.sidebar-nav .nav-link:hover { background: var(--ac-primary-bg); color: var(--ac-primary); }
.sidebar-nav .nav-link.active { background: var(--ac-primary-bg); color: var(--ac-primary); font-weight: 600; }
.sidebar-nav .nav-link.nav-danger { color: var(--ac-danger); }
.sidebar-nav .nav-link.nav-danger:hover { background: var(--ac-danger-bg); color: var(--ac-danger); }
.sidebar-nav hr { border: 0; border-top: 1px solid var(--ac-border); margin: 10px 6px; }
.admin-content-area { padding: 24px; min-width: 0; }
.admin-content-area > * + * { margin-top: 20px; }
.admin-page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-page-header h1 { font-size: 20px; font-weight: 800; margin: 0; }
.admin-page-header .page-desc { font-size: 13px; color: var(--ac-text-muted); }

/* 后台卡片：灰头 + 白身（acc card-header/card-body 模式） */
.admin-card {
    background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: var(--ac-radius);
    box-shadow: var(--ac-shadow); overflow: hidden;
}
.card-head {
    background: var(--ac-surface-2); border-bottom: 1px solid var(--ac-border);
    padding: 12px 20px; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-head .head-hint { font-weight: 400; font-size: 12px; color: var(--ac-text-muted); }
.card-body { padding: 20px; }

/* 仪表盘：统计卡 + 图表 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card-lg { background: var(--ac-surface); border: 1px solid var(--ac-border); box-shadow: var(--ac-shadow); padding: 20px 22px; }
.stat-card-lg .stat-number { font-size: 28px; font-weight: 800; color: var(--ac-primary-strong); line-height: 1.2; }
.stat-card-lg .stat-number.is-text { font-size: 16px; line-height: 1.7; }
.stat-card-lg .stat-label { font-size: 13px; color: var(--ac-text-secondary); margin-top: 4px; }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
/* 左列：模式分布 + 地图两卡纵向紧贴堆叠（避免被右列高度顶开） */
.dash-main { display: grid; gap: 16px; align-content: start; }
.dash-side { display: grid; gap: 16px; }
.chart-box { position: relative; height: 260px; }
.chart-box--sm { height: 220px; }
.chart-box--map { height: 520px; }
.quick-links { display: flex; flex-direction: column; gap: 8px; }
.quick-links a {
    display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
    color: var(--ac-text-secondary); border: 1px solid var(--ac-border); padding: 9px 14px;
    transition: color .2s, border-color .2s;
}
.quick-links a:hover { color: var(--ac-primary-strong); border-color: var(--ac-primary); }

/* ── 仪表盘页头（对齐 acc .dash-head：左标题+副行、右日期胶囊）── */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-head .dash-title { font-size: 22px; font-weight: 700; letter-spacing: -.2px; margin: 0; }
.dash-head .dash-sub { font-size: 13px; color: var(--ac-text-muted); margin-top: 6px; }
.dash-date {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 6px 12px; border: 1px solid var(--ac-border); border-radius: 999px;
    font-size: 13px; color: var(--ac-text-secondary); background: var(--ac-surface);
}
.dash-date i { color: var(--ac-primary); }

/* ── 仪表盘统计卡（对齐 acc .dash-stat：左图标块 + 右数字/标签/副行）── */
.dash-stat {
    display: flex; align-items: center; gap: 14px;
    background: var(--ac-surface); border: 1px solid var(--ac-border);
    padding: 16px 18px; transition: box-shadow .15s ease, border-color .15s ease;
}
.dash-stat:hover { border-color: var(--ac-primary); box-shadow: var(--ac-shadow); }
.dash-stat__icon {
    flex: 0 0 auto; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    border-radius: var(--ac-radius-control);
    background: var(--ac-primary-bg); color: var(--ac-primary);
}
.dash-stat--ok   .dash-stat__icon { background: #e6f7ed; color: #1a9c54; }
.dash-stat--info .dash-stat__icon { background: #e8f0ff; color: #165dff; }
.dash-stat--warn .dash-stat__icon { background: #fff4e6; color: #d9730d; }
.dash-stat__body { min-width: 0; }
.dash-stat__num { font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--ac-text); font-variant-numeric: tabular-nums; }
.dash-stat__num.is-text { font-size: 15px; line-height: 1.5; font-weight: 600; }
.dash-stat__label { font-size: 12px; color: var(--ac-text-secondary); margin-top: 2px; }
.dash-stat__sub { font-size: 11px; color: var(--ac-text-muted); margin-top: 4px; }
@media (max-width: 1024px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .stat-grid { grid-template-columns: 1fr; } .dash-date { display: none; } }
.admin-note { font-size: 12px; color: var(--ac-text-muted); }
.flash { padding: 10px 16px; font-size: 13px; display: flex; align-items: center; gap: 8px; border-radius: var(--ac-radius-control); }
.flash-ok { background: var(--ac-primary-bg); color: var(--ac-primary-strong); border: 1px solid var(--ac-primary-light); }
.flash-danger { background: var(--ac-danger-bg); color: var(--ac-danger); border: 1px solid var(--ac-danger-border); }
.form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.tiers-grid { grid-template-columns: repeat(4, 1fr); }
.fg-item { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ac-text-secondary); }
.fg-item span { display: flex; align-items: center; gap: 5px; }
.fg-icon { width: 15px; height: 15px; }
.fg-item input, .fg-item select {
    border: 1px solid var(--ac-border); border-radius: var(--ac-radius-control);
    padding: 8px 10px; font-size: 14px; color: var(--ac-text); background: var(--ac-surface);
    font-family: inherit; outline: none; transition: border-color .2s, box-shadow .2s; width: 100%;
    box-sizing: border-box;
}
.fg-item input:focus, .fg-item select:focus { border-color: var(--ac-primary); box-shadow: var(--ac-focus-ring); }
/* 地区复合控件：分类窄列 + 省/国下拉（二选一显隐，admin.js 控制） */
.region-pick { display: flex; gap: 6px; }
.region-pick select:first-child { flex: 0 0 76px; }
.region-pick select:not(:first-child) { flex: 1; min-width: 0; }
.form-actions { display: flex; gap: 10px; }
.btn-teal {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    background-image: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%); color: #fff; border: 0; font-weight: 700; font-size: 14px;
    padding: 10px 22px; border-radius: var(--ac-radius-control); cursor: pointer; font-family: inherit;
    transition: filter .2s;
}
.btn-teal:hover { filter: brightness(.95); color: #fff; }
.btn-ghost, .btn-danger {
    display: inline-flex; align-items: center; gap: 7px; padding: 10px 22px; font-size: 14px; font-weight: 600;
    border-radius: var(--ac-radius-control); cursor: pointer; font-family: inherit; transition: background-color .2s, color .2s;
}
.btn-ghost { background: none; border: 1px solid var(--ac-border); color: var(--ac-text-secondary); }
.btn-ghost:hover { color: var(--ac-text); border-color: var(--ac-text-muted); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.card-head-right { display: flex; align-items: center; gap: 12px; }

/* ─── 后台：右侧抽屉（玩家配置）+ 积分自动计算展示 ───
   遮罩/抽屉渲染在 body 根级，z-index 取 2000/2010：必须高于 .admin-topbar(1030)，
   否则顶栏会压在遮罩之上（曾出现该问题） */
.drawer-mask {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(16, 22, 29, .38);
    opacity: 0; visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}
.drawer-mask.show { opacity: 1; visibility: visible; }
.admin-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 2010;
    width: 620px; max-width: 100vw;
    display: flex; flex-direction: column;
    background: var(--ac-surface); border-left: 1px solid var(--ac-border);
    box-shadow: -14px 0 36px -14px rgba(16, 22, 29, .28);
    transform: translateX(100%);
    transition: transform .26s cubic-bezier(.22, 1, .36, 1);
}
.admin-drawer.show { transform: translateX(0); }
.drawer-head {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 20px; background: var(--ac-surface-2);
    border-bottom: 1px solid var(--ac-border);
    font-size: 14px; font-weight: 700;
}
.drawer-close {
    width: 30px; height: 30px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 1px solid var(--ac-border); color: var(--ac-text-secondary);
    cursor: pointer; transition: color .15s ease, border-color .15s ease;
}
.drawer-close:hover { color: var(--ac-text); border-color: var(--ac-text-muted); }
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 22px 24px 0; }
.drawer-body .form-grid { grid-template-columns: 1fr 1fr; gap: 16px 18px; }
/* 段位 8 项改 2 列：每格约 280px，模式名与下拉都不再被压 */
.drawer-body .tiers-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }
/* 抽屉内字段整体放宽：标签字号与控件内边距都提一档 */
.drawer-body .fg-item { gap: 7px; font-size: 13px; }
.drawer-body .fg-item input, .drawer-body .fg-item select { padding: 9px 12px; }
/* 底部操作条吸底：表单较长滚动时「添加/保存」始终可见 */
.drawer-body .form-actions {
    position: sticky; bottom: 0; z-index: 2;
    padding: 14px 0 18px; margin-top: 4px;
    background: var(--ac-surface); border-top: 1px solid var(--ac-border);
}

.points-box {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
    margin: 16px 0 18px; padding: 14px 18px;
    background: var(--ac-primary-bg); border: 1px solid var(--ac-primary-light);
}
.points-box-main { display: flex; align-items: baseline; gap: 5px; color: var(--ac-primary); flex: 0 0 auto; }
.points-box-num { font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.points-box-unit { font-size: 13px; font-weight: 700; }
/* 提示占满剩余宽度、左对齐换行，不再被挤到窄条里 */
.points-box-tip { flex: 1 1 200px; min-width: 0; font-size: 12.5px; line-height: 1.7; color: var(--ac-text-secondary); }
/* 手动积分输入独占一整行 */
.points-box .fg-item { flex: 1 1 100%; margin: 4px 0 0; }
@media (max-width: 767px) {
    .admin-drawer { width: 100%; }
    .drawer-body { padding: 18px 16px 0; }
    .drawer-body .form-grid { grid-template-columns: 1fr; }
    .drawer-body .tiers-grid { grid-template-columns: 1fr; }
    .points-box { flex-direction: column; align-items: flex-start; gap: 6px; }
    .points-box-tip { text-align: left; }
}
.btn-danger { background: var(--ac-danger); border: 0; color: #fff; font-weight: 700; }
.btn-danger:hover { filter: brightness(.94); }
.btn-block { width: 100%; }
.admin-table td, .admin-table th { font-size: 13px; }
/* 表头模式图标：深色圆形底座（彩色 SVG 白底看不清，且无宽高约束会按原始尺寸渲染） */
.admin-table thead th.col-tier img {
    display: block; margin: 0 auto;
    width: 16px; height: 16px; padding: 6px;
    box-sizing: content-box; background: #1D263B; border-radius: 50%;
}
.admin-table .cell-name { font-weight: 700; }
.admin-table .cell-points { font-weight: 700; color: var(--ac-primary-strong); }
.admin-table .cell-tier { font-weight: 800; font-size: 12px; }
/* 覆盖共用 .lb-table 的前台暗色样式：后台亮色主题下改回浅色表头 / 分隔线 / 悬停，并去掉行位移动画 */
.admin-table thead th {
    background: var(--ac-surface-2); color: var(--ac-text-secondary);
    border-bottom: 1px solid var(--ac-border); font-size: 13px; padding: 10px 12px;
}
.admin-table tbody td { border-bottom: 1px solid var(--ac-border-light); }
.admin-table tbody tr { cursor: default; animation: none; transition: background-color .15s; }
.admin-table tbody tr:hover { background: var(--ac-row-hover); transform: none; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.col-ops { width: 88px; text-align: center !important; white-space: nowrap; }
.op-btn {
    background: none; border: 1px solid var(--ac-border); color: var(--ac-text-secondary);
    width: 28px; height: 28px; border-radius: var(--ac-radius-control); cursor: pointer; font-size: 13px;
    transition: color .2s, border-color .2s;
}
.op-btn:hover { color: var(--ac-primary-strong); border-color: var(--ac-primary); }
.op-danger:hover { color: var(--ac-danger); border-color: var(--ac-danger); }
.inline-form { display: inline; }
.danger-zone { border-color: var(--ac-danger-border); }
.danger-zone .card-head { background: var(--ac-danger-bg); border-bottom-color: var(--ac-danger-border); color: var(--ac-danger); }
.danger-desc { font-size: 13px; color: var(--ac-text-secondary); margin: 0 0 14px; }
.table-scroll.is-plain { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.pw-form { max-width: 360px; }
.pw-form .fg-item { margin-bottom: 14px; }

/* 后台登录页（page-login 亮色）：卡片视口内垂直水平居中 + 品牌头部 */
body.page-login main.flex-grow { display: flex; flex-direction: column; }
.login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 16px 56px; }
.login-card {
    width: 400px; max-width: 100%;
    background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: var(--ac-radius);
    box-shadow: var(--ac-shadow); padding: 36px 32px 28px;
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.login-logo { width: 52px; height: 52px; margin-bottom: 8px; }
.login-brand-name { font-weight: 800; font-size: 20px; letter-spacing: 1.5px; color: var(--ac-text); }
.login-brand-sub { font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--ac-text-muted); }
.login-heading {
    display: flex; align-items: center; gap: 12px;
    font-size: 13px; font-weight: 700; color: var(--ac-text-secondary); letter-spacing: 2px;
    margin: 24px 0 18px;
}
.login-heading::before, .login-heading::after { content: ""; flex: 1; height: 1px; background: var(--ac-border-light); }
.login-card .fg-item { margin-bottom: 14px; }
.login-card .fg-item input { padding: 11px 12px; }
.login-card form .btn-block { margin-top: 4px; }
.login-flash { max-width: none; margin: 0 0 14px; }
.login-back { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 18px; font-size: 13px; color: var(--ac-text-muted); }
.login-back:hover { color: var(--ac-primary-strong); }

/* ─── 页脚（右对齐：恢复原有版权 + 凌云海运营提示）─── */
.footer-note { margin-top: auto; font-size: 12px; color: #4a4a58; text-align: right; border-top: 1px solid #16161e; padding-top: 14px; }
.footer-note span { display: inline-block; margin-left: 14px; }
.footer-note a { color: #6b7280; text-decoration: none; transition: color .2s; }
.footer-note a:hover { color: #f5c542; }

/* 复制成功提示：右上角从右往左划出，暗色底直角 */
#copyTip {
    position: fixed; top: 76px; right: 24px; z-index: 9999;
    display: flex; align-items: center; gap: 8px;
    background: var(--ac-surface); color: var(--ac-text);
    border: 1px solid var(--ac-border);
    padding: 12px 20px; border-radius: 0;
    font-size: 14px; font-weight: 500;
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.45);
    max-width: min(440px, calc(100vw - 48px));
    pointer-events: none;
    opacity: 0; transform: translateX(calc(100% + 24px));
    transition: opacity .35s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
}
#copyTip.show { opacity: 1; transform: translateX(0); }
#copyTip i { color: var(--ac-primary); flex-shrink: 0; }

/* ─── 响应式 ─── */
@media (max-width: 767px) {
    .search-box input { width: 110px; }
    body:not(.page-admin):not(.page-login) { padding: 12px 12px; }
    /* ── 导航栏：链接文字不折行，宽度不够时整组换到下一行 ── */
    .nav-left { flex-wrap: wrap; gap: 8px 16px; }
    .nav-links { flex-wrap: wrap; gap: 12px; font-size: 13px; }
    .nav-links a { white-space: nowrap; }
    /* ── Tab 条：3 列 × 3 行的圆角按钮网格（9 个全显示、不裁切）── */
    .tabs { flex-wrap: wrap; overflow-x: visible; gap: 6px; }
    .tab {
        flex: 0 0 calc(33.333% - 8px); border-radius: 6px; border-bottom: 2px solid #2a2a36;
        padding: 9px 4px 8px; gap: 3px;
    }
    .tab.active { background: rgba(245, 197, 66, .07); }
    .tab-underline { display: none; }
    .tab span { font-size: 12px; }
    .tab img { width: 20px; height: 20px; }
    .table-card { padding: 0; }
    /* ── 列表移动端：8 列网格 —— 上方左玩家块 / 右地区，下方整行 8 段位格 ── */
    .lb-table thead { display: none; }
    .lb-table, .lb-table tbody { display: block; }
    .lb-table tbody tr {
        display: grid; grid-template-columns: repeat(8, 1fr); align-items: center;
        padding: 10px 0 8px; border-bottom: 1px solid #17171f; animation: none;
    }
    .lb-table tbody tr:hover { background: none; transform: none; }
    .lb-table tbody td { display: block; padding: 0; border-bottom: 0; min-width: 0; }
    .lb-table tbody td:first-child { grid-column: 1 / 7; }          /* 上排左：名次块 + 名字/称号/积分 */
    .lb-table td.col-region { grid-column: 7 / 9; text-align: right; }   /* 上排右：地区 */
    .lb-table td.col-tier { grid-column: span 1; width: auto; padding: 8px 0 0; }   /* 下排：8 格整行 */
    .region-badge { padding: 4px 8px; font-size: 12px; }
    .player-sub { white-space: nowrap; }   /* 称号与积分同一行 */
    .lb-table td.col-tier .tier-icon-wrap { width: 30px; height: 30px; }
    .lb-table td.col-tier .tier-icon-wrap img { width: 15px; height: 15px; }
    .tier-cell { gap: 3px; }
    .tier-label { font-size: 10px; padding: 2px 5px; }
    .community-grid { grid-template-columns: 1fr; max-width: none; }
    .lb-table .rank-block { height: 60px; min-width: 112px; padding: 0 30px 0 10px; margin-right: 10px; gap: 8px; }   /* 仅列表：右内边距 30px 让头像避开斜切（斜切吃 17.5%） */
    .rank-num { font-size: 20px; }
    .lb-table .p-avatar { height: 52px; width: 44px; object-fit: contain; object-position: bottom center; }   /* 固定框图，仅列表头像 */
    .player-name { font-size: 15px; }
    /* ── 模式页（其他 Tab）：Tier 列改纵向堆叠，去掉横向滚动 ── */
    .tier-columns { grid-template-columns: 1fr; gap: 12px; overflow-x: visible; padding: 0; }
    .tier-col-head { font-size: 13px; padding: 10px 12px; }
    .tier-chip img { height: 36px; }
    /* 移动端无悬停：地区改为常显（仍为整行高色块） */
    .chip-region, .tier-chip:hover .chip-region { max-width: none; opacity: 1; margin-right: 0; padding: 0 8px; }
    /* ── 弹窗：铺满宽度、收窄内边距；分数信息双栏改单栏 ── */
    .modal-overlay { padding: 12px; }
    .modal-card, .points-card { width: 100%; padding: 20px 16px 18px; }
    .modal-name { font-size: 22px; }
    .modal-rank-block { height: 76px; min-width: 0; }   /* 弹窗头像块：随头像收紧，不吃列表的 min-width */
    .modal-rank-block .p-avatar { height: 66px; }
    .points-grid { grid-template-columns: 1fr; gap: 16px; }
    .admin-shell { grid-template-columns: 1fr; min-height: 0; }
    .admin-sidebar { border-right: 0; border-bottom: 1px solid var(--ac-border); padding: 6px 10px; position: static; height: auto; overflow: visible; }
    .sidebar-title { display: none; }
    .sidebar-nav { flex-direction: row; overflow-x: auto; position: static; gap: 0; scrollbar-width: none; }
    .sidebar-nav::-webkit-scrollbar { display: none; }
    .sidebar-nav hr { display: none; }
    .sidebar-nav .nav-link { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; padding: 9px 12px; }
    .sidebar-nav .nav-link.active { border-left: 0; border-bottom: 2px solid var(--ac-primary); }
    .sidebar-nav .nav-link i { margin-right: 6px; }
    .admin-content-area { padding: 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .dash-grid { grid-template-columns: 1fr; }
    .form-grid, .tiers-grid { grid-template-columns: 1fr 1fr; }
    .modal-tiers { grid-template-columns: repeat(4, 1fr); gap: 6px; }   /* 移动端 4 个一行 */
    .modal-tier-item { height: auto; padding: 8px 2px; gap: 4px; }
    /* 页脚已改为 demo 风格 footer-note，原 .footer-grid / .footer-bottom 样式移除 */
    #copyTip { top: 72px; right: 16px; max-width: calc(100vw - 32px); font-size: 13px; padding: 10px 16px; }
}

/* 管理员账户页：当前登录账户标记 */
.badge-me {
    display: inline-block; margin-left: 8px; padding: 1px 7px;
    font-size: 11px; font-weight: 700; letter-spacing: .3px;
    color: var(--ac-primary); background: var(--ac-primary-bg);
    border: 1px solid var(--ac-primary-light); border-radius: 3px;
    vertical-align: middle;
}

/* 管理员账户页：新增表单铺满卡片（区别于改密页的窄表单 .pw-form） */
.stack-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.stack-form .form-actions { grid-column: 1 / -1; }
.admin-note { margin-top: 14px; font-size: 12px; line-height: 1.7; color: var(--ac-text-muted); }
@media (max-width: 767px) {
    .stack-form { grid-template-columns: 1fr; }
}
/* 后台列表操作列（按钮组）与卡片间距 */
.ops-cell { display: inline-flex; align-items: center; gap: 6px; }
.admin-content-area .admin-card + .admin-card { margin-top: 16px; }

/* 后台表格：单元格内边距 + 不换行 + 列宽下限。
   玩家表 11 列，若允许换行收缩会被挤成一团；这里让列保持自然宽度，
   超出部分交给外层 .table-scroll 横向滚动。 */
.admin-table th, .admin-table td { padding: 11px 14px; vertical-align: middle; white-space: nowrap; }
.admin-table .cell-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.admin-table .col-tier { min-width: 56px; text-align: center; }
.admin-table .col-rank { width: 52px; text-align: center; }
.col-ops { width: 124px; }   /* 三个操作按钮（编辑/重置/删除）需要更宽，避免换行 */
/* 后台表格基础：账户页的表只有 .admin-table（没有 .lb-table），
   之前 width / border-collapse 都没生效，退化成按内容宽度的默认表格 → 列挤在左边、边框分离。 */
.admin-table { width: 100%; border-collapse: collapse; table-layout: auto; }
/* 表头默认居中（浏览器 th 默认值），与左对齐的单元格错位 —— 统一左对齐；
   但操作列、段位列（玩家表图标）、名次列仍保持居中（选择器特指到 th.col-* 才能压过上面这条） */
.admin-table thead th { text-align: left; }
.admin-table thead th.col-ops, .admin-table thead th.col-tier, .admin-table thead th.col-rank,
.admin-table td.col-ops, .admin-table td.col-tier, .admin-table td.col-rank { text-align: center; }

/* ─── 404 页（样式对齐 acc 站点：插图 → 中英提示 → 两个按钮，顶部起排不垂直居中）─── */
.err404 {
    flex: 1 0 auto;   /* 与 acc 一致：有 flex 父容器时撑满内容区高度 */
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    text-align: center; padding: 28px 16px 48px;
}
.err404-img { width: 80%; max-width: 600px; height: auto; }
.err404-text { margin: 24px 0 0; font-size: 15px; color: var(--ac-text-muted); }
.err404-text-en { display: block; margin-top: 4px; font-size: 13px; }
.err404-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
/* 品牌色浅底描边按钮：与官网同名同款，保证两站 404 的第二颗按钮观感一致
   （原来用 .btn-ghost 是灰色描边，与实心品牌色按钮并排时显得不是一套） */
.btn-teal-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 22px; font-size: 14px; font-weight: 600;
    background: var(--ac-primary-bg); color: var(--ac-primary);
    border: 1px solid var(--ac-primary-light); border-radius: var(--ac-radius-control);
    font-family: inherit; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.btn-teal-outline:hover { background: var(--ac-primary-light); color: var(--ac-primary-strong); border-color: var(--ac-primary); }
/* ═══════════════════════════════════════
   自定义下拉（ui-select.js 重建原生 select 的外观）
   原生 select 仍留在 DOM 里承载 name / value / 表单提交，只被视觉隐藏；
   外观（触发器 + 面板 + 选项）全部由组件重建。
   ═══════════════════════════════════════ */

/* 原生 select 的隐藏。两处 `!important` 都是必需的：
   ① 要压过 Bootstrap / main.css 里 `.form-select{width:100%}` 这类同优先级规则；
   ② **`min-width: 0 !important` 尤其关键** —— min-width 恒定压过 width，而 main.css 里有
      `.admin-toolbar .form-select { min-width: 180px }`，不写这条的话 1px 会被顶成 180px，
      原生下拉就重新露出来了（表现为「自定义下拉旁边多出一个原生下拉」）。 */
.ui-sel-native {
    position: absolute !important;
    width: 1px !important;
    min-width: 0 !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.ui-sel { position: relative; display: block; }

.ui-sel-trigger {
    display: flex; align-items: center; gap: 8px;
    width: 100%; min-height: 38px; padding: 8px 12px;
    border: 1px solid var(--ac-border);
    border-radius: var(--ac-radius-control);
    background: #fff; color: var(--ac-text);
    font-size: 14px; line-height: 1.4; font-family: inherit;
    text-align: left; cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ui-sel-trigger:hover { border-color: var(--ac-primary); }
.ui-sel-trigger[aria-expanded="true"] {
    border-color: var(--ac-primary);
    box-shadow: 0 0 0 3px var(--ac-primary-bg);
}
/* 触发器是 <button>，浏览器默认那圈 outline 只在**键盘聚焦**时画，且换成品牌色
   （这也是补上的 a11y 缺口之一：nimbus 版触发器没有任何 :focus-visible 样式） */
.ui-sel-trigger:focus { outline: none; }
.ui-sel-trigger:focus-visible { outline: 2px solid var(--ac-primary); outline-offset: 1px; }
.ui-sel-trigger:disabled,
.ui-sel.is-disabled .ui-sel-trigger { cursor: not-allowed; opacity: .6; background: #f7f8fa; }

.ui-sel-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-sel-text.is-placeholder { color: var(--ac-text-muted); opacity: .8; }

.ui-sel-arrow {
    flex: 0 0 auto; width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--ac-text-muted);
    transition: transform .18s ease;
}
.ui-sel-trigger[aria-expanded="true"] .ui-sel-arrow { transform: rotate(180deg); }

/* 原生带 form-select-sm 时由 JS 自动加 .ui-sel-sm */
.ui-sel-sm .ui-sel-trigger { min-height: 32px; padding: 5px 10px; font-size: 13px; }

/* 面板：fixed 定位（坐标由 JS 算，不会被 overflow 容器裁掉）。
   圆角 0 = 容器级；z-index 2600 —— 高于后台弹窗(2410)、低于 toast·confirm(3000)，符合层级铁律。 */
.ui-sel-panel {
    position: fixed; z-index: 2600;
    min-width: 120px; max-height: 280px; overflow-y: auto;
    padding: 4px 0;
    border: 1px solid var(--ac-border);
    background: #fff;
    box-shadow: var(--ac-shadow-lg);
    opacity: 0; transform: translateY(-4px);
    transition: opacity .14s ease, transform .14s ease;
}
.ui-sel-panel.is-open { opacity: 1; transform: translateY(0); }

.ui-sel-opt {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; font-size: 14px;
    color: var(--ac-text-secondary); cursor: pointer; white-space: nowrap;
}
.ui-sel-opt:hover,
.ui-sel-opt.is-active { background: var(--ac-primary-bg); color: var(--ac-primary); }
.ui-sel-opt.is-selected { color: var(--ac-primary); font-weight: 600; }
.ui-sel-opt.is-selected::after {
    content: ""; margin-left: auto; width: 4px; height: 8px;
    border: solid var(--ac-primary); border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.ui-sel-opt.is-disabled { color: var(--ac-text-muted); opacity: .5; cursor: not-allowed; background: transparent; }

/* ui-select 会把原生 select 包进 .ui-sel 容器，上面两条基于 select 的规则会失效
   （.region-pick select:first-child 等），这里同步到容器上，保持"分类窄列 + 省/国下拉"的布局 */
.region-pick > .ui-sel:first-child { flex: 0 0 76px; }
.region-pick > .ui-sel:not(:first-child) { flex: 1; min-width: 0; }