/* =========================================================
   溟月城 · 百业积分系统
   明亮暖纸国风视觉，纯 CSS，无外部依赖
   ========================================================= */

:root {
    --bg: #f7f7f4;
    --bg-2: #fcfcfa;
    --bg-3: #efefeb;
    --panel: #ffffff;
    --panel-2: #f8f8f5;
    --panel-3: #efefea;
    --line: rgba(92, 86, 74, .14);
    --line-strong: rgba(92, 86, 74, .30);
    --gold: #9c7c3f;
    --gold-2: #7f6224;
    --gold-3: #c0a878;
    --jade: #2f6b4f;
    --text: #24221c;
    --muted: #6b6559;
    --muted-2: #948d7d;
    --danger: #b0472f;
    --ok: #2f6b4f;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 18px 42px rgba(70, 62, 46, .10);

    /* 表面与叠色令牌：浅色 / 深色两套只换这里的值 */
    --topbar-bg: rgba(255, 255, 255, .88);
    --surface-78: rgba(255, 255, 255, .78);
    --surface-88: rgba(255, 255, 255, .88);
    --surface-90: rgba(255, 255, 255, .90);
    --surface-92: rgba(255, 255, 255, .92);
    --surface-94: rgba(255, 255, 255, .94);
    --surface-96: rgba(255, 255, 255, .96);
    --sheen-50: rgba(255, 255, 255, .50);
    --sheen-55: var(--sheen-55);
    --sheen-62: var(--sheen-62);
    --sheen-78: rgba(255, 255, 255, .78);
    --sheen-90: rgba(255, 255, 255, .90);
    --sheen-92: rgba(255, 255, 255, .92);
    --card-grad: linear-gradient(180deg, #ffffff, #fbfbf8);
    --stat-grad: linear-gradient(180deg, #ffffff, rgba(250, 250, 246, .92));
    --panel-grad: linear-gradient(180deg, #ffffff, #f7f7f3);
    --body-grad: linear-gradient(180deg, #fdfdfb 0%, #f3f3ef 46%, #fbfbf9 100%);
    --glow-gold: rgba(201, 168, 106, .10);
    --glow-blue: rgba(120, 152, 176, .10);
    --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
    --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
}

/* ---------------- 深色主题（切换按钮控制） ---------------- */

html[data-theme="dark"] {
    --bg: #0b0d11;
    --bg-2: #0e1116;
    --bg-3: #12161d;
    --panel: #141820;
    --panel-2: #1a1f29;
    --panel-3: #212734;
    --line: rgba(216, 196, 155, .14);
    --line-strong: rgba(216, 196, 155, .32);
    --gold: #c9a86a;
    --gold-2: #e7cf9b;
    --gold-3: #91794b;
    --jade: #8ab79d;
    --text: #ece8dc;
    --muted: #a69f90;
    --muted-2: #7d786d;
    --danger: #d67f6f;
    --ok: #82b795;
    --shadow: 0 22px 55px rgba(0, 0, 0, .42);

    --topbar-bg: rgba(9, 11, 15, .86);
    --surface-78: rgba(20, 24, 32, .86);
    --surface-88: rgba(20, 24, 32, .90);
    --surface-90: rgba(20, 24, 32, .92);
    --surface-92: rgba(20, 24, 32, .94);
    --surface-94: rgba(20, 24, 32, .95);
    --surface-96: rgba(20, 24, 32, .97);
    --sheen-50: rgba(255, 255, 255, .03);
    --sheen-55: rgba(255, 255, 255, .035);
    --sheen-62: rgba(255, 255, 255, .045);
    --sheen-78: rgba(255, 255, 255, .05);
    --sheen-90: rgba(255, 255, 255, .07);
    --sheen-92: rgba(255, 255, 255, .075);
    --card-grad: linear-gradient(180deg, #171c25, #141820);
    --stat-grad: linear-gradient(180deg, rgba(26, 31, 41, .96), rgba(20, 24, 32, .92));
    --panel-grad: linear-gradient(180deg, #161b24, #12161d);
    --body-grad: linear-gradient(180deg, #0e1116 0%, #0b0d11 46%, #0d1015 100%);
    --glow-gold: rgba(201, 168, 106, .16);
    --glow-blue: rgba(120, 152, 176, .12);
    color-scheme: dark;
}

html[data-theme="dark"] body {
    background-color: var(--bg);
}

html[data-theme="dark"] .topbar {
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

html[data-theme="dark"] .table th {
    background: rgba(255, 255, 255, .035);
}

html[data-theme="dark"] .mp-panel,
html[data-theme="dark"] .mp-option.is-active {
    background: #1a1f29;
}


* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.7;
    letter-spacing: .01em;
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 520px at 82% -10%, var(--glow-gold), transparent 62%),
        radial-gradient(760px 460px at 2% 6%, var(--glow-blue), transparent 62%),
        var(--body-grad);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gold-2);
    text-decoration: none;
}

a:hover {
    color: var(--gold-2);
}

img,
svg {
    max-width: 100%;
}

::selection {
    background: rgba(201, 168, 106, .3);
    color: #fff;
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------------- 顶部栏 ---------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--topbar-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.brand:hover {
    color: var(--text);
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    color: var(--gold-2);
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1;
    background: radial-gradient(circle at 30% 20%, rgba(201, 168, 106, .3), var(--surface-92));
}

.brand-text b {
    display: block;
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .2em;
    line-height: 1.3;
}

.brand-text small {
    display: block;
    color: var(--muted-2);
    font-size: 10px;
    letter-spacing: .34em;
    line-height: 1.4;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.nav a {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: .08em;
    padding: 7px 13px;
    border-radius: 999px;
    text-decoration: none;
    transition: color .2s, background .2s;
}

.nav a:hover {
    color: var(--gold-2);
    background: rgba(201, 168, 106, .08);
}

/* ---------------- 主视觉 ---------------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 66px 0 46px;
    border-bottom: 1px solid var(--line);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(760px 420px at 74% -6%, rgba(201, 168, 106, .18), transparent 64%),
        radial-gradient(620px 340px at 8% 16%, rgba(84, 124, 148, .14), transparent 68%),
        linear-gradient(180deg, rgba(122, 96, 52, .05), transparent 70%);
}

.hero::after {
    content: "積分";
    position: absolute;
    right: 18px;
    top: 4px;
    writing-mode: vertical-rl;
    font-family: var(--serif);
    font-size: clamp(84px, 12vw, 152px);
    line-height: 1;
    letter-spacing: .08em;
    color: rgba(201, 168, 106, .16);
    pointer-events: none;
    user-select: none;
}

.hero-inner {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gold);
    font-size: 11px;
    letter-spacing: .34em;
}

.eyebrow::before {
    content: "";
    width: 34px;
    height: 1px;
    background: var(--gold-3);
}

.hero h1 {
    margin: 18px 0 12px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(42px, 6.4vw, 74px);
    line-height: 1.12;
    letter-spacing: .14em;
    color: var(--gold-2);
    background: linear-gradient(180deg, #f0dcac 0%, #d3ae61 46%, #8a6822 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    max-width: 680px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.9;
    font-family: var(--serif);
    letter-spacing: .04em;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 22px;
    color: var(--muted-2);
    font-size: 12px;
    letter-spacing: .08em;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-meta i {
    width: 5px;
    height: 5px;
    background: var(--gold-3);
    transform: rotate(45deg);
    display: inline-block;
}

.hero-meta .live {
    color: var(--gold-2);
    border: 1px solid rgba(201, 168, 106, .35);
    border-radius: 999px;
    padding: 3px 12px;
    background: rgba(201, 168, 106, .08);
}

/* ---------------- 数据条 ---------------- */

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-top: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--line);
    box-shadow: var(--shadow);
}

.stat {
    position: relative;
    padding: 22px 24px;
    background: var(--stat-grad);
}

.stat::after {
    content: "";
    position: absolute;
    left: 24px;
    top: 0;
    width: 26px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-3), transparent);
}

.stat-label {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .24em;
}

.stat-value {
    margin-top: 6px;
    font-family: var(--serif);
    font-size: 31px;
    line-height: 1.25;
    color: var(--gold-2);
    font-variant-numeric: tabular-nums;
}

.stat-value small {
    margin-left: 4px;
    font-family: var(--sans);
    font-size: 12px;
    color: var(--muted-2);
}

.stat-note {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted-2);
}

/* ---------------- 区块 ---------------- */

.section {
    padding: 62px 0;
    border-bottom: 1px solid rgba(216, 196, 155, .08);
    scroll-margin-top: 76px;
}

.section:last-of-type {
    border-bottom: none;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.section-kicker {
    margin-bottom: 8px;
    color: var(--gold);
    font-size: 11px;
    letter-spacing: .32em;
}

.section-title {
    margin: 0;
    font-family: var(--serif);
    font-size: 27px;
    font-weight: 600;
    letter-spacing: .12em;
}

.section-desc {
    max-width: 520px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.85;
}

/* ---------------- 领奖台 ---------------- */

.podium {
    display: grid;
    grid-template-columns: 1fr 1.16fr 1fr;
    align-items: end;
    gap: 16px;
    margin-bottom: 22px;
}

.podium-card {
    position: relative;
    padding: 24px 18px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: radial-gradient(130% 100% at 50% 0%, rgba(201, 168, 106, .12), var(--surface-94) 62%);
    overflow: hidden;
}

.podium-card.first {
    padding: 36px 18px 30px;
    border-color: var(--line-strong);
    box-shadow: 0 0 0 1px rgba(201, 168, 106, .09), var(--shadow);
}

.podium-rank {
    position: absolute;
    top: 4px;
    right: 14px;
    font-family: var(--serif);
    font-size: 40px;
    line-height: 1;
    color: rgba(201, 168, 106, .22);
}

.avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-family: var(--serif);
    font-size: 22px;
    color: var(--gold-2);
    background: radial-gradient(circle at 32% 22%, var(--sheen-90), rgba(201, 168, 106, .22));
}

.podium-card.first .avatar {
    width: 68px;
    height: 68px;
    font-size: 27px;
    box-shadow: 0 0 0 4px rgba(201, 168, 106, .08);
}

.podium-name {
    font-family: var(--serif);
    font-size: 19px;
    letter-spacing: .08em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-role {
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 11px;
    letter-spacing: .18em;
}

.podium-points {
    margin-top: 10px;
    font-family: var(--serif);
    font-size: 30px;
    color: var(--gold-2);
    font-variant-numeric: tabular-nums;
}

.podium-points small {
    margin-left: 3px;
    font-family: var(--sans);
    font-size: 11px;
    color: var(--muted-2);
}

/* ---------------- 表格 ---------------- */

.table-wrap {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-78);
    overflow-x: auto;
    overflow-y: hidden;
}

.table-wrap.flush {
    border: none;
    border-radius: 0;
    background: transparent;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.table th {
    padding: 12px 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-align: left;
    white-space: nowrap;
    background: rgba(122, 96, 52, .05);
    border-bottom: 1px solid var(--line);
}

.table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(216, 196, 155, .075);
    vertical-align: middle;
}

.table td.col-role,
.table td.col-joined,
.table td.num {
    white-space: nowrap;
}

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

.table tbody tr:hover {
    background: rgba(201, 168, 106, .045);
}

.table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.table .center {
    text-align: center;
}

.rank-cell {
    width: 54px;
    font-family: var(--serif);
    font-size: 17px;
    color: var(--muted);
}

.rank-cell.top {
    color: var(--gold-2);
}

.name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

.mini-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-family: var(--serif);
    font-size: 13px;
    color: var(--gold-2);
    background: rgba(201, 168, 106, .07);
}

.name-main {
    line-height: 1.35;
}

.name-main b {
    display: block;
    font-size: 14px;
    font-weight: 500;
}

.name-main small {
    color: var(--muted-2);
    font-size: 10px;
    letter-spacing: .12em;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
    letter-spacing: .04em;
    white-space: nowrap;
}

.badge.gold {
    color: var(--gold-2);
    border-color: rgba(201, 168, 106, .4);
    background: rgba(201, 168, 106, .1);
}

.badge.jade {
    color: #aacfba;
    border-color: rgba(138, 183, 157, .38);
    background: rgba(138, 183, 157, .1);
}

.badge.danger {
    color: #ebaa9c;
    border-color: rgba(214, 127, 111, .4);
    background: rgba(214, 127, 111, .1);
}

.badge.muted {
    color: var(--muted-2);
}

.is-plus {
    color: var(--jade);
}

.is-minus {
    color: var(--danger);
}

.is-zero {
    color: var(--muted-2);
}

.bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(122, 96, 52, .12);
    overflow: hidden;
}

.bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c6a40, var(--gold-2));
}

.bar.jade span {
    background: linear-gradient(90deg, #4f7460, var(--jade));
}

/* ---------------- 卡片与网格 ---------------- */

.card,
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card-grad);
}

.card {
    padding: 24px;
}

.grid {
    display: grid;
    gap: 16px;
}

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

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card-grad);
}

.metric-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .06em;
}

.metric-value {
    margin: 8px 0 10px;
    font-family: var(--serif);
    font-size: 26px;
    color: var(--gold-2);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.metric-value small {
    margin-left: 3px;
    font-family: var(--sans);
    font-size: 11px;
    color: var(--muted-2);
}

.metric-foot {
    display: flex;
    justify-content: space-between;
    color: var(--muted-2);
    font-size: 11px;
}

/* ---------------- 兑换商店 ---------------- */

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.shop-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 16px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(201, 168, 106, .12), transparent 60%),
        var(--surface-88);
}

.shop-card.sold-out {
    opacity: .58;
}

.shop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.shop-name {
    font-family: var(--serif);
    font-size: 15px;
    letter-spacing: .04em;
}

.shop-price {
    display: flex;
    align-items: baseline;
    gap: 3px;
    color: var(--gold-2);
}

.shop-price b {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 500;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.shop-price small {
    font-family: var(--sans);
    font-size: 11px;
    color: var(--muted-2);
}

.shop-foot {
    display: flex;
    justify-content: space-between;
    color: var(--muted-2);
    font-size: 11px;
}

.shop-card .bar {
    margin-top: 2px;
}

.shop-card.sold-out .bar span {
    background: rgba(122, 96, 52, .2);
}

/* ---------------- 拍卖 ---------------- */

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

.auction-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(201, 168, 106, .13), transparent 60%),
        var(--surface-90);
    display: flex;
    flex-direction: column;
}

.auction-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.auction-title {
    font-family: var(--serif);
    font-size: 17px;
    letter-spacing: .06em;
}

.auction-date {
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 11px;
}

.auction-sum {
    text-align: right;
    white-space: nowrap;
}

.auction-sum b {
    display: block;
    font-family: var(--serif);
    font-size: 20px;
    color: var(--gold-2);
}

.auction-sum small {
    color: var(--muted-2);
    font-size: 10px;
}

.auction-list {
    margin-top: 8px;
    flex: 1;
}

.auction-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed rgba(216, 196, 155, .1);
    font-size: 13px;
}

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

.auction-row span:first-child {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auction-row b {
    color: var(--gold-2);
    font-weight: 500;
    white-space: nowrap;
}

.auction-empty {
    padding: 18px 0;
    color: var(--muted-2);
    font-size: 12px;
    text-align: center;
}

/* ---------------- 规则 ---------------- */

.rules-body {
    max-width: 940px;
}

.rule-block {
    padding: 24px 0;
    border-top: 1px dashed rgba(216, 196, 155, .14);
}

.rule-block:first-child {
    border-top: none;
    padding-top: 0;
}

.rule-index {
    color: var(--gold);
    font-family: var(--serif);
    font-size: 12px;
    letter-spacing: .28em;
}

.rule-title {
    margin: 6px 0 12px;
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .08em;
}

.rule-list {
    margin: 0;
    padding-left: 1.15em;
    color: var(--text);
    line-height: 2.05;
}

.rule-list li {
    margin-bottom: 2px;
}

.rule-list strong {
    color: var(--gold-2);
    font-weight: 600;
}

.rule-table {
    width: 100%;
    margin: 12px 0 6px;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.rule-table th,
.rule-table td {
    padding: 9px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(216, 196, 155, .12);
}

.rule-table th {
    color: var(--muted);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: .12em;
}

.rule-table td b {
    color: var(--gold-2);
    font-weight: 600;
}

.rule-note {
    margin-top: 10px;
    color: var(--muted-2);
    font-size: 12px;
    line-height: 1.8;
}

/* ---------------- 按钮 ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--sheen-62);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    letter-spacing: .04em;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .2s, background .2s, color .2s;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--gold);
    background: rgba(201, 168, 106, .09);
    color: var(--gold-2);
}

.btn-primary {
    border-color: #e0c78f;
    background: linear-gradient(180deg, #dcc084, #b9994f);
    color: #211f18;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #ecd7a4, #c8a75c);
    color: #171610;
    border-color: #f0dda9;
}

.btn-ghost {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    color: var(--gold-2);
    background: rgba(201, 168, 106, .07);
}

.btn-danger {
    border-color: rgba(214, 127, 111, .38);
    color: #e8a99b;
    background: rgba(214, 127, 111, .06);
}

.btn-danger:hover {
    border-color: rgba(214, 127, 111, .7);
    background: rgba(214, 127, 111, .14);
    color: #f2b9ac;
}

.btn-sm {
    padding: 6px 11px;
    font-size: 12px;
    border-radius: 7px;
}

.btn-block {
    width: 100%;
}

/* ---------------- 表单 ---------------- */

.field {
    min-width: 0;
}

.field > label,
.label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .12em;
}

.field .hint {
    margin-top: 5px;
    color: var(--muted-2);
    font-size: 11px;
    line-height: 1.6;
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.input::placeholder,
.textarea::placeholder {
    color: #a49a86;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 106, .12);
}

.select {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 32px;
}

.textarea {
    min-height: 96px;
    resize: vertical;
}

.input-sm {
    padding: 5px 9px;
    font-size: 13px;
    border-radius: 6px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.checkbox input {
    width: 15px;
    height: 15px;
    accent-color: var(--gold);
    margin: 0;
}

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

.form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid .full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

fieldset {
    margin: 0;
    padding: 0;
    border: none;
}

/* ---------------- 标签页 ---------------- */

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.tab {
    padding: 9px 15px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.tab:hover {
    color: var(--gold-2);
}

.tab.active {
    color: var(--gold-2);
    border-bottom-color: var(--gold);
    background: linear-gradient(180deg, transparent, rgba(201, 168, 106, .06));
}

/* ---------------- 提示 ---------------- */

.flash {
    margin-bottom: 16px;
    padding: 11px 16px;
    border: 1px solid var(--line);
    border-left-width: 3px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.7;
    background: var(--sheen-62);
}

.flash.success {
    border-color: rgba(138, 183, 157, .45);
    border-left-color: var(--ok);
    color: #b6d8c3;
    background: rgba(138, 183, 157, .07);
}

.flash.error {
    border-color: rgba(214, 127, 111, .45);
    border-left-color: var(--danger);
    color: #eab2a6;
    background: rgba(214, 127, 111, .07);
}

.flash.info {
    border-color: rgba(201, 168, 106, .4);
    border-left-color: var(--gold);
    color: var(--gold-2);
    background: rgba(201, 168, 106, .06);
}

.empty {
    padding: 34px 20px;
    text-align: center;
    color: var(--muted-2);
    font-size: 13px;
}

.divider {
    height: 1px;
    margin: 22px 0;
    background: rgba(216, 196, 155, .1);
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 12px;
}

.tiny {
    font-size: 11px;
}

.nowrap {
    white-space: nowrap;
}

.mono {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

/* ---------------- 分页 ---------------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
}

.pagination a,
.pagination span {
    min-width: 32px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--gold);
    color: var(--gold-2);
}

.pagination .current {
    border-color: var(--gold);
    color: var(--gold-2);
    background: rgba(201, 168, 106, .1);
}

/* ---------------- 成员详情 ---------------- */

.page-head {
    position: relative;
    padding: 52px 0 34px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.page-head::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(700px 320px at 82% -20%, rgba(201, 168, 106, .14), transparent 62%);
    pointer-events: none;
}

.profile-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 18px;
    align-items: start;
}

.profile-main {
    padding: 28px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    text-align: center;
    background: radial-gradient(120% 90% at 50% 0%, rgba(201, 168, 106, .12), var(--surface-94) 62%);
}

.profile-main .avatar {
    width: 76px;
    height: 76px;
    font-size: 30px;
    margin-bottom: 14px;
}

.profile-name {
    font-family: var(--serif);
    font-size: 25px;
    letter-spacing: .1em;
}

.profile-role {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .16em;
}

.profile-points {
    margin: 16px 0 4px;
    font-family: var(--serif);
    font-size: 44px;
    line-height: 1.1;
    color: var(--gold-2);
}

.profile-points small {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--muted-2);
}

.profile-sub {
    color: var(--muted-2);
    font-size: 11px;
    letter-spacing: .1em;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 22px;
    border: 1px solid var(--line);
    background: var(--line);
}

.profile-stats div {
    padding: 10px 6px;
    background: rgba(122, 96, 52, .05);
}

.profile-stats b {
    display: block;
    font-family: var(--serif);
    font-size: 18px;
    color: var(--text);
    font-weight: 500;
}

.profile-stats small {
    color: var(--muted-2);
    font-size: 10px;
    letter-spacing: .12em;
}

.breakdown {
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-78);
}

.breakdown-row {
    display: grid;
    grid-template-columns: 84px 1fr 76px;
    gap: 14px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px dashed rgba(216, 196, 155, .1);
    font-size: 13px;
}

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

.breakdown-row .label {
    color: var(--muted);
    margin: 0;
    letter-spacing: .04em;
}

.breakdown-row .value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.breakdown-row .value em {
    display: block;
    font-style: normal;
    color: var(--muted-2);
    font-size: 10px;
}

/* ---------------- 管理后台 ---------------- */

.admin-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    border-right: 1px solid var(--line);
    background: var(--panel-grad);
    z-index: 30;
}

.sidebar .brand {
    margin: 2px 6px 26px;
}

.sidebar .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 17px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 13px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--muted);
    font-size: 13.5px;
    text-decoration: none;
    transition: color .2s, background .2s;
}

.sidebar-nav a:hover {
    color: var(--gold-2);
    background: rgba(201, 168, 106, .07);
}

.sidebar-nav a.active {
    color: var(--gold-2);
    border-color: rgba(201, 168, 106, .25);
    background: rgba(201, 168, 106, .1);
}

.sidebar-nav a em {
    font-style: normal;
    font-size: 10px;
    color: var(--muted-2);
}

.sidebar-foot {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 12px;
}

.sidebar-foot a {
    color: var(--muted-2);
    text-decoration: none;
}

.sidebar-foot a:hover {
    color: var(--gold-2);
}

.sidebar-foot form {
    margin: 0;
}

.sidebar-foot button {
    padding: 0;
    border: none;
    background: none;
    color: var(--muted-2);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.sidebar-foot button:hover {
    color: var(--danger);
}

.admin-main {
    min-width: 0;
    background:
        radial-gradient(800px 400px at 100% -10%, rgba(201, 168, 106, .07), transparent 60%),
        var(--bg);
}

.admin-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 34px 18px;
    border-bottom: 1px solid var(--line);
}

.admin-top h1 {
    margin: 0;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: .12em;
}

.admin-top .sub {
    margin-top: 4px;
    color: var(--muted-2);
    font-size: 11px;
    letter-spacing: .16em;
}

.admin-content {
    max-width: 1240px;
    padding: 24px 34px 60px;
}

.admin-content .section-title {
    font-size: 19px;
}

.admin-panel {
    margin-bottom: 20px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--sheen-78), var(--sheen-50));
}

.admin-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-panel-head h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .08em;
}

.admin-panel-head p {
    margin: 3px 0 0;
    color: var(--muted-2);
    font-size: 11px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.toolbar .field {
    min-width: 130px;
}

.toolbar .field.grow {
    flex: 1;
}

.toolbar .btn {
    margin-top: 21px;
    margin-bottom: 1px;
}

.table-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
}

.table-actions form {
    margin: 0;
}

.chk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(122, 96, 52, .05);
    max-height: 340px;
    overflow-y: auto;
}

.chk-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}

.chk-item:hover {
    background: rgba(201, 168, 106, .06);
}

.chk-item input {
    accent-color: var(--gold);
}

.chk-item.is-left {
    opacity: .55;
}

.chk-tools strong.ok {
    color: var(--jade);
}

.chk-tools strong.bad {
    color: var(--danger);
}

.team-board {
    margin: 6px 0 16px;
    padding: 14px 16px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--sheen-55);
}

.team-board-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--muted);
}

.team-board-head strong {
    color: var(--gold-2);
    font-weight: 500;
    letter-spacing: 0;
}

.team-board-head strong.ok {
    color: var(--ok, #7fbf8f);
}

.team-board-head strong.bad {
    color: var(--danger);
}

.team-board-head [data-add-member] {
    margin-left: auto;
}

.member-inputs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 10px;
}

.member-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.member-no {
    width: 16px;
    flex: 0 0 16px;
    text-align: right;
    font-size: 10px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.member-row .input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 5px 8px;
    font-size: 12.5px;
    line-height: 1.5;
}

.member-row .member-driver {
    flex: 0 0 78px;
    width: 78px;
    border-color: rgba(207, 169, 92, .45);
    color: var(--gold-2);
}

.driver-toggle,
.outsider-toggle {
    flex: 0 0 auto;
    padding: 1px 6px;
    font-size: 10.5px;
    line-height: 1.7;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
}

.driver-toggle.is-on {
    color: #1a140c;
    border-color: var(--gold-2);
    background: #b98f45;
}

.outsider-toggle.is-on {
    color: #0d1b17;
    border-color: #7bb59c;
    background: #7bb59c;
}

.btn-xs {
    padding: 1px 7px;
    font-size: 11px;
    line-height: 1.7;
}

.member-remove {
    flex: 0 0 auto;
    padding: 1px 6px;
    line-height: 1.2;
    color: var(--muted);
}

.team-board-tip {
    margin-top: 8px;
    line-height: 1.6;
}

.team-form .form-tight {
    gap: 10px 14px;
}

.team-form .field label {
    margin-bottom: 5px;
    font-size: 11px;
}

.field-tight {
    margin-top: 6px;
}

.note-tight {
    margin-bottom: 10px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.7;
}

.compact-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 10px;
    font-size: 12px;
    color: var(--gold-2);
}

.team-preview {
    margin: 4px 0 16px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(201, 168, 106, .035);
}

.team-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .08em;
}

.team-preview-head strong {
    color: var(--gold-2);
    font-weight: 500;
    letter-spacing: 0;
}

.roster-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.5;
}

.roster-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 3px 8px;
    border: 1px solid rgba(216, 196, 155, .18);
    border-radius: 20px;
    background: rgba(122, 96, 52, .05);
    font-size: 12px;
    color: var(--text);
}

.roster-chip small {
    color: var(--muted);
    font-size: 10px;
}

.roster-chip.is-warn {
    border-color: rgba(207, 109, 92, .45);
    color: var(--danger);
}

.roster-chip.is-left {
    opacity: .55;
}

.team-preview .tiny {
    margin-top: 7px;
    line-height: 1.6;
    color: var(--muted);
}

.team-preview .tiny.is-bad {
    color: var(--danger);
}

.team-group {
    margin-top: 16px;
}

.team-group:first-of-type {
    margin-top: 6px;
}

.team-group-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.team-group-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--gold-2);
}

.team-run-roster {
    margin-top: 2px;
    max-width: 340px;
    line-height: 1.5;
}

.run-roster {
    margin-top: 2px;
}

.run-roster summary {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
}

.run-roster summary::-webkit-details-marker {
    display: none;
}

.run-roster > div {
    margin-top: 4px;
    max-width: 280px;
    line-height: 1.5;
}

.chk-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--muted-2);
    font-size: 11px;
}

.link-btn {
    padding: 0;
    border: none;
    background: none;
    color: var(--gold);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.link-btn:hover {
    color: var(--gold-2);
}

.section-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 12px;
}

.section-split h3 {
    margin: 0;
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .08em;
}

.note-box {
    padding: 12px 15px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
    background: rgba(201, 168, 106, .035);
}

.note-box strong {
    color: var(--gold-2);
}

.op-details {
    display: inline-block;
    position: relative;
}

.op-details summary {
    list-style: none;
    cursor: pointer;
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.op-details summary::-webkit-details-marker {
    display: none;
}

.op-details[open] summary {
    color: var(--gold-2);
    border-color: var(--gold);
}

.op-form {
    position: absolute;
    right: 0;
    z-index: 20;
    width: 260px;
    margin-top: 6px;
    padding: 14px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.op-form .field {
    margin-bottom: 8px;
}

.op-form .row-actions {
    display: flex;
    gap: 6px;
}

.op-form .row-actions .btn {
    flex: 1;
    padding: 6px 8px;
    font-size: 12px;
}

/* ---------------- 登录 ---------------- */

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px 20px;
    background:
        radial-gradient(760px 420px at 70% 0%, rgba(201, 168, 106, .13), transparent 62%),
        radial-gradient(600px 340px at 10% 20%, rgba(84, 124, 148, .1), transparent 66%),
        var(--bg);
}

.auth-card {
    width: min(440px, 100%);
    padding: 38px 34px 32px;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: var(--surface-96);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.auth-title {
    margin: 0;
    font-family: var(--serif);
    font-size: 24px;
    letter-spacing: .12em;
}

.auth-sub {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .08em;
}

.auth-card form {
    margin-top: 18px;
}

.auth-card .field {
    margin-bottom: 14px;
}

.auth-foot {
    margin-top: 18px;
    color: var(--muted-2);
    font-size: 11px;
    text-align: center;
    letter-spacing: .08em;
}

/* ---------------- 页脚 ---------------- */

.site-footer {
    padding: 32px 0 46px;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 12px;
}

.site-footer .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.site-footer a {
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--gold-2);
}

/* ---------------- 筛选 ---------------- */

.filter-input {
    max-width: 220px;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1024px) {
    .stat-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auction-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-main {
        max-width: 420px;
    }
}

@media (max-width: 900px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding: 14px 16px;
    }

    .sidebar .brand {
        margin-bottom: 14px;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        overflow: visible;
        gap: 4px;
    }

    .sidebar-nav a {
        padding: 7px 11px;
        font-size: 12px;
    }

    .sidebar-nav a em {
        display: none;
    }

    .sidebar-foot {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-top: 12px;
    }

    .admin-top {
        padding: 18px 20px 14px;
    }

    .admin-content {
        padding: 18px 20px 46px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid-3,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }

    .member-inputs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .wrap {
        padding: 0 16px;
    }

    .topbar-inner {
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .nav a {
        padding: 6px 9px;
        font-size: 12px;
    }

    .hero {
        padding: 44px 0 34px;
    }

    .hero-inner {
        padding: 0 16px;
    }

    .hero::after {
        right: 4px;
        opacity: .7;
    }

    .hero-sub {
        font-size: 14px;
    }

    .stat {
        padding: 18px;
    }

    .stat-value {
        font-size: 26px;
    }

    .section {
        padding: 44px 0;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-title {
        font-size: 23px;
    }

    .podium {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .podium-card {
        padding: 16px 8px 14px;
    }

    .podium-card.first {
        order: 0;
        padding: 20px 8px 16px;
    }

    .podium-rank {
        top: 2px;
        right: 6px;
        font-size: 24px;
    }

    .avatar {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
        font-size: 15px;
    }

    .podium-card.first .avatar {
        width: 46px;
        height: 46px;
        font-size: 17px;
        box-shadow: none;
    }

    .podium-name {
        font-size: 14px;
        letter-spacing: 0;
    }

    .podium-role {
        display: none;
    }

    .podium-points {
        margin-top: 6px;
        font-size: 20px;
    }

    .podium-points small {
        font-size: 9px;
    }

    .col-cat,
    .col-role,
    .col-joined,
    .col-note {
        display: none;
    }

    .table-actions .btn-sm {
        padding: 5px 8px;
        font-size: 11px;
    }

    .auction-grid {
        grid-template-columns: 1fr;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .table th,
    .table td {
        padding: 10px;
    }

    .profile-main {
        max-width: none;
    }

    .toolbar .field {
        min-width: 110px;
        flex: 1;
    }

    .admin-panel {
        padding: 18px 16px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 38px;
        letter-spacing: .08em;
    }

    .stat-strip {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 24px;
    }

    .tabs .tab {
        padding: 8px 10px;
        font-size: 12px;
    }

    .podium-points {
        font-size: 26px;
    }
}

/* ---------------- 补充组件 ---------------- */

.notice-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 24px;
    padding: 16px 18px;
    border: 1px solid rgba(201, 168, 106, .22);
    border-left: 3px solid var(--gold);
    border-radius: 10px;
    background: rgba(201, 168, 106, .05);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.85;
}

.notice-card p {
    margin: 0;
}

.notice-card .badge {
    flex: 0 0 auto;
    margin-top: 1px;
}

.auction-list {
    max-height: 330px;
    overflow-y: auto;
}

.op-form.inline {
    position: static;
    width: 250px;
    margin: 8px 0 0;
    box-shadow: none;
    background: var(--bg);
}

@media print {
    .topbar,
    .nav,
    .site-footer,
    .hero::after,
    .no-print {
        display: none !important;
    }

    body {
        background: var(--panel);
        color: var(--text);
    }

    .table,
    .card,
    .panel {
        border-color: #ccc;
        color: var(--text);
    }
}

/* =========================================================
   明亮主题补充 & 新组件（成员搜索框、验证码、子页面头部）
   ========================================================= */

/* 导航当前页 */
.nav a.active {
    color: var(--gold-2);
    background: rgba(201, 168, 106, .16);
    box-shadow: inset 0 0 0 1px rgba(165, 129, 59, .26);
}

.topbar {
    box-shadow: 0 1px 0 rgba(122, 96, 52, .08);
}

/* 子页面头部 */
.page-head {
    position: relative;
    overflow: hidden;
    padding: 44px 0 32px;
    border-bottom: 1px solid var(--line);
    background-image:
        radial-gradient(760px 380px at 80% -20%, rgba(201, 168, 106, .24), transparent 64%),
        radial-gradient(560px 300px at 4% 0%, rgba(120, 152, 176, .14), transparent 68%);
}

.page-title {
    margin: 12px 0 10px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(30px, 4.2vw, 46px);
    line-height: 1.2;
    letter-spacing: .1em;
    color: var(--gold-2);
}

.page-sub {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-family: var(--serif);
    letter-spacing: .03em;
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 16px;
    color: var(--muted-2);
    font-size: 12px;
}

.page-meta i {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 8px;
    background: var(--gold-3);
    transform: rotate(45deg);
    vertical-align: middle;
}

.section-tight {
    padding: 42px 0;
}

.link-card {
    display: block;
    color: var(--text);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.link-card:hover {
    color: var(--text);
    border-color: var(--line-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.shop-grid-lg {
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    gap: 16px;
}

.rules-body a {
    border-bottom: 1px dashed rgba(138, 104, 34, .45);
}

/* ---------- 成员搜索选择框 ---------- */
.mp {
    position: relative;
}

.mp-control {
    position: relative;
}

.mp-input {
    width: 100%;
    padding-right: 30px;
}

.mp-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 5px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--muted-2);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.mp-clear:hover {
    background: rgba(122, 96, 52, .12);
    color: var(--text);
}

.mp-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 60;
    max-height: 262px;
    overflow: auto;
    padding: 5px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: 0 16px 34px rgba(92, 70, 32, .18);
}

.mp-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mp-option:hover,
.mp-option.is-active {
    background: rgba(201, 168, 106, .2);
}

.mp-option-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-option-meta {
    flex: 0 0 auto;
    color: var(--muted-2);
    font-size: 11px;
}

.mp-option.is-left .mp-option-name {
    color: var(--muted);
    font-weight: 500;
}

.mp-empty {
    padding: 10px;
    color: var(--muted-2);
    font-size: 12px;
    text-align: center;
}

.mp-hint {
    margin-top: 4px;
    color: var(--muted-2);
    font-size: 11px;
}

.mp-hint.is-bad {
    color: var(--danger);
}

.mp-sm .mp-input {
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 13px;
}

.toolbar .mp {
    min-width: 200px;
}

.toolbar .mp-hint {
    margin-top: 4px;
    white-space: nowrap;
}

.toolbar .mp-input {
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 13px;
}

/* ---------- 登录与验证码 ---------- */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-title {
    margin: 0;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--gold-2);
}

.auth-sub {
    margin: 2px 0 0;
    color: var(--muted-2);
    font-size: 12px;
}

.auth-foot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 12px;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-img {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.captcha-input {
    width: 104px;
    text-align: center;
    letter-spacing: .3em;
}

.captcha-refresh {
    flex: 0 0 auto;
    font-size: 12px;
    white-space: nowrap;
}

/* 表格里较长的说明列 */
.table td.col-note {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 登录记录等页面的浅色表头 */
.table th {
    background: rgba(122, 96, 52, .06);
}

@media (max-width: 720px) {
    .page-head {
        padding: 34px 0 26px;
    }

    .captcha-row {
        flex-wrap: wrap;
    }
}

/* ---------- 收尾微调 ---------- */
.rule-index {
    color: var(--gold-2);
    font-size: 12.5px;
}

.section-head > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.section-head .filter-input {
    flex: 0 0 auto;
    margin-bottom: 2px;
    background: var(--panel);
}

/* ---------------- 深浅色切换按钮 ---------------- */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--sheen-55);
    color: var(--muted);
    font-family: inherit;
    font-size: 12px;
    letter-spacing: .06em;
    line-height: 1;
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}

.theme-toggle:hover {
    color: var(--gold-2);
    border-color: var(--line-strong);
    background: var(--sheen-78);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--gold-3);
    outline-offset: 2px;
}

.theme-toggle .tt-icon {
    font-size: 13px;
    line-height: 1;
}

.topbar-inner .theme-toggle {
    margin-left: 12px;
    flex: 0 0 auto;
}

.admin-top-side {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-page .theme-toggle {
    position: fixed;
    top: 22px;
    right: 24px;
    z-index: 5;
    background: var(--surface-78);
}

html[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, .04);
}

@media (max-width: 720px) {
    .theme-toggle .tt-label {
        display: none;
    }

    .theme-toggle {
        padding: 0 10px;
    }

    .topbar-inner .theme-toggle {
        margin-left: 6px;
    }

    .admin-top-side {
        gap: 8px;
    }
}