* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", SimSun, sans-serif;
    color: #222;
    background: #f3f4f6;
}
a { color: inherit; }
code { font-family: Consolas, monospace; background: #f3f4f6; padding: 1px 4px; }

.topbar {
    height: 44px;
    background: #3c78c5;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}
.topbar a { color: #fff; text-decoration: none; margin-right: 14px; font-size: 14px; }
.top-links a:hover, .topbar > a:hover { text-decoration: underline; }

.foot {
    text-align: center;
    color: #8d8d8d;
    font-size: 12px;
    padding: 18px 12px 28px;
}

.page-index { background: #000; color: #d7d7d7; }
.page-index .foot { color: #666; }

.syncbar {
    background: #111;
    color: #bbb;
    padding: 12px 16px;
    border-bottom: 1px solid #222;
}
.syncbar form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.syncbar button, .back {
    background: #3c78c5;
    color: #fff;
    border: 0;
    border-radius: 2px;
    padding: 8px 14px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}
.syncbar span { font-size: 12px; }

.catalog { padding: 8px 12px 24px; }
.group { margin: 16px 4px 22px; }
.group h2 {
    margin: 0 0 8px;
    color: #e4453b;
    font-size: 16px;
    font-weight: 700;
}
.latest { margin: 0 0 10px; font-size: 13px; color: #ddd; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.latest em { color: #888; font-style: normal; margin-left: 6px; }
.latest.muted { color: #777; }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}
.grid a {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #d5d5d5;
    border: 1px solid #2f6fed;
    padding: 10px 8px;
    font-size: 14px;
}
.grid a:hover { background: #141414; color: #fff; }

.subnav {
    background: #000;
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.subnav a {
    color: #9ec1ff;
    border: 1px solid #2f6fed;
    text-decoration: none;
    padding: 6px 10px;
    font-size: 13px;
}
.subnav a.on { color: #ff5d5d; border-color: #ff5d5d; }

.tools {
    background: #111;
    color: #ddd;
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
}
.periods { display: flex; flex-wrap: wrap; gap: 6px; }
.periods a, .filters select, .lock {
    color: #ddd;
    background: #1b1b1b;
    border: 1px solid #444;
    text-decoration: none;
    padding: 4px 8px;
    font-size: 13px;
}
.periods a.on { background: #3c78c5; border-color: #3c78c5; color: #fff; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.checks { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.checks label { display: flex; gap: 4px; align-items: center; }

.chart-page { background: #fff; }
.chart-head { padding: 10px 12px 6px; }
.chart-head h1 { margin: 0 0 6px; color: #d63031; font-size: 18px; }
.latest-line, .chart-note { margin: 0 0 4px; font-size: 13px; color: #555; }
.latest-line a { color: #3c78c5; }
.chart-wrap {
    overflow: auto;
    max-height: calc(100vh - 168px);
    border-top: 1px solid #e6e6e6;
    background: #fff;
}
.chart-inner { position: relative; display: inline-block; min-width: 100%; }
#lineCanvas { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; }
.zst-table { position: relative; z-index: 2; border-collapse: separate; border-spacing: 0; font-size: 12px; background: transparent; }
.zst-table th, .zst-table td {
    border-right: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    text-align: center;
    padding: 0;
    height: 22px;
    line-height: 22px;
    white-space: nowrap;
    font-weight: 400;
    color: #444;
}
.zst-table thead th {
    position: sticky;
    top: 0;
    background: #f4f6f8;
    z-index: 3;
    font-weight: 600;
    color: #333;
}
.zst-table thead tr:nth-child(2) th { top: 24px; }
.zst-table th.issue, .zst-table td.issue {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #fff;
    font-weight: 600;
}
.zst-table thead th.issue { background: #f4f6f8; z-index: 5; }
.zst-table td.award { color: #d63031; font-weight: 700; letter-spacing: 0.5px; }
.zst-table td.split, .zst-table th.split {
    width: 3px;
    min-width: 3px;
    max-width: 3px;
    background: #4a4a4a;
    border: 0;
    padding: 0;
}
.zst-table td.miss { color: #b5b5b5; }
.show-layer .miss.lv2 { background: #e7f3ff; color: #5d7e9a; }
.show-layer .miss.lv3 { background: #fff1cc; color: #9a7420; }
.show-layer .miss.lv4 { background: #ffd9d4; color: #c0392b; }
.hide-miss .miss { color: transparent; }
.hide-miss.show-layer .miss { color: transparent; }
.zst-table tfoot td { background: #fafafa; color: #666; }
.zst-table tfoot td.issue { background: #fafafa; color: #333; }
.ball {
    display: inline-flex;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    position: relative;
    z-index: 3;
}
.ball.red { background: #e4453b; }
.ball.blue { background: #2f79d4; }
.ball.green { background: #2f9e62; }
.ball.pill { width: auto; min-width: 16px; border-radius: 8px; padding: 0 3px; }
.tag { display: inline-block; min-width: 28px; padding: 0 4px; color: #fff; border-radius: 2px; font-size: 11px; line-height: 16px; }
.tag-zu6 { background: #3d7ec9; }
.tag-zu3 { background: #e0a106; }
.tag-bao { background: #e4453b; }
.trial { margin-left: 8px; color: #888; font-size: 12px; }

.empty { padding: 28px 16px; color: #666; }
.plain { padding: 16px; max-width: 980px; }
.plain h1 { margin: 0 0 12px; font-size: 22px; }
.report { list-style: none; padding: 0; }
.report li { padding: 8px 0; border-bottom: 1px solid #eee; display: flex; gap: 12px; flex-wrap: wrap; }
.bad { color: #d63031; }
.page-kaijiang { background: #d9e2ec; }
.page-kaijiang .m-wrap { padding-bottom: 16px; background: #fff; min-height: 100vh; }
.m-side { display: flex; align-items: center; gap: 18px; }
.page-kaijiang .plain { max-width: none; margin: 0; padding: 0 0 16px; }
.page-kaijiang .plain h1 { padding: 14px 16px 0; font-size: 18px; }
.page-kaijiang .plain > .kj-meta { padding: 0 16px; }
.page-kaijiang .history-scroll { overflow-x: auto; }
.page-kaijiang .pager { padding: 12px 16px 8px; }
.kj-tabs { display: flex; background: #fff; border-bottom: 1px solid #e5e8ee; }
.kj-tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 14px 0 12px; font-size: 16px; color: #333; cursor: pointer; }
.kj-tabs button.on { color: #2f6fbe; border-bottom-color: #2f6fbe; font-weight: 700; }
.kj-page .kj-card { border: 0; border-bottom: 1px solid #eee; border-radius: 0; padding: 14px 16px; }
.kj-page .ball { width: 28px; height: 28px; font-size: 13px; line-height: 28px; }
.ball.text { width: auto; min-width: 28px; padding: 0 6px; border-radius: 14px; }
.kj-list { display: grid; gap: 10px; }
.kj-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    padding: 12px;
}
.kj-title { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.kj-title span, .kj-meta { color: #888; font-size: 13px; }
.balls { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.history { width: 100%; border-collapse: collapse; background: #fff; }
.history th, .history td { border-bottom: 1px solid #eee; padding: 8px; text-align: left; }
.pager { display: flex; gap: 12px; align-items: center; }
.pager a { color: #3c78c5; }

.page-admin { background: #f3f4f6; }
.login-box, .admin-main { max-width: 1080px; margin: 24px auto; padding: 0 16px; }
.login-box { max-width: 380px; background: #fff; border: 1px solid #e6e6e6; padding: 20px; }
.login-box h1, .admin-main h1 { margin: 0 0 14px; font-size: 20px; }
.login-box label, .edit-form label { display: block; margin: 10px 0; font-size: 14px; }
.login-box input, .edit-form input[type="text"], .edit-form input[type="number"], .edit-form input[type="password"], .edit-form input:not([type]) {
    display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid #ccc; font-size: 14px;
}
.login-box button, .edit-form button, .admin-table button, .inline-form button {
    background: #3c78c5; color: #fff; border: 0; padding: 8px 14px; cursor: pointer; font-size: 14px;
}
.hint, .inline-form span { color: #888; font-size: 12px; }
.admin-bar { background: #243044; color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.admin-bar a { color: #fff; text-decoration: none; margin-left: 14px; font-size: 14px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.admin-table th, .admin-table td { border-bottom: 1px solid #eee; padding: 8px; text-align: left; vertical-align: top; }
.admin-table .ops { white-space: nowrap; }
.admin-table form, .inline-form { display: inline; }
.flash { background: #e8f6ee; color: #137333; padding: 8px 12px; }
.edit-form { background: #fff; padding: 16px; max-width: 480px; border: 1px solid #e6e6e6; }
.edit-form.wide { max-width: 760px; }
.edit-form textarea, .edit-form select {
    display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid #ccc; font-size: 14px; font-family: inherit;
}
.edit-form textarea { min-height: 240px; line-height: 1.6; }
.admin-bar nav { display: flex; flex-wrap: wrap; align-items: center; }
.danger { background: #c0392b !important; }
.news-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.news-tabs a { color: #3c78c5; text-decoration: none; background: #fff; border: 1px solid #e6e6e6; padding: 4px 10px; }
.news-tabs a.on { background: #3c78c5; color: #fff; }
.article-body { white-space: pre-wrap; word-break: break-word; line-height: 1.75; background: #fff; border: 1px solid #e6e6e6; padding: 16px; }
.article-html { white-space: normal; }
.article-html img { max-width: 100%; height: auto; display: block; margin: 8px 0; }
.article-html p { margin: 0 0 8px; }
.edit-form h2 { margin: 18px 0 8px; font-size: 16px; }
.seo-table input { width: 100%; padding: 6px; border: 1px solid #ccc; font-size: 13px; }
.seo-table td { min-width: 140px; }
.banner-thumb { width: 160px; max-height: 72px; object-fit: cover; display: block; border-radius: 4px; }
.edit-form input[type="file"] { display: block; margin-top: 4px; }

.page-home { background: #d9e2ec; }
.m-wrap { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f5f7fb; padding-bottom: 72px; }
.m-top {
    height: 48px; background: #2f6fbe; color: #fff;
    display: flex; align-items: center; justify-content: space-between; padding: 0 14px;
}
.m-top a { color: #fff; text-decoration: none; font-size: 16px; display: flex; align-items: center; gap: 4px; }
.m-home::before { content: ""; width: 16px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 14'%3E%3Cpath fill='%23fff' d='M8 1.2 1 7h2v6h4V9h2v4h4V7h2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.m-kj::before { content: ""; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M8 1.2 9.8 5.6 14.5 6l-3.5 3 .9 4.6L8 11.4 3.9 13.6 4.8 9 1.5 6l4.7-.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
.m-cats {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px 8px;
    padding: 14px 10px 12px; background: #fff;
}
.m-cats a, .m-cats button.more {
    border: 1px solid #2f6fbe; color: #2f6fbe; background: #fff; border-radius: 6px;
    text-align: center; text-decoration: none; font-size: 12px; line-height: 1.25;
    min-height: 32px; display: flex; align-items: center; justify-content: center; padding: 4px 2px;
}
.m-cats button.more { border-color: transparent; cursor: pointer; font-family: inherit; }
.m-overlay {
    position: fixed; top: 0; bottom: 0; left: 50%; z-index: 40;
    width: 100%; max-width: 480px; transform: translateX(-50%);
    overflow: hidden; pointer-events: none;
}
.m-overlay.is-open { pointer-events: auto; }
.m-mask {
    position: absolute; inset: 0; background: rgba(0, 0, 0, .45);
    opacity: 0; transition: opacity .2s;
}
.m-overlay.is-open .m-mask { opacity: 1; }
.m-drawer {
    position: absolute; top: 0; bottom: 0; right: 0; z-index: 1;
    width: 86%; background: #fff; overflow: auto;
    transform: translateX(100%); transition: transform .25s ease;
    box-shadow: -6px 0 18px rgba(0, 0, 0, .12);
}
.m-overlay.is-open .m-drawer { transform: translateX(0); }
.m-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff;
}
.m-drawer-head strong { font-size: 16px; }
.m-drawer-head button {
    border: 0; background: none; color: #2f6fbe; font-size: 15px; cursor: pointer;
}
.m-drawer-head button::before { content: "× "; }
.m-drawer-body { padding: 8px 14px 24px; }
.m-drawer-body h3 { margin: 16px 0 10px; font-size: 16px; }
.m-drawer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-drawer-grid a {
    display: flex; align-items: center; justify-content: center; min-height: 36px;
    border: 1px solid #d9d9d9; border-radius: 4px; color: #333; text-decoration: none;
    font-size: 13px; background: #fff; padding: 4px;
}
.m-banners { padding: 10px; }
.m-banners img { width: 100%; max-height: 168px; object-fit: cover; display: block; border-radius: 8px; margin-bottom: 8px; }
.m-sec { background: #fff; margin: 0 10px 10px; border-radius: 6px; overflow: hidden; }
.m-sec h2 { margin: 0; padding: 10px 12px; font-size: 16px; border-bottom: 1px solid #f0f0f0; }
.m-sec h2 a { color: #234; text-decoration: none; }
.m-sec ul { list-style: none; margin: 0; padding: 0; }
.m-sec li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #f6f6f6; }
.m-sec li a { color: #333; text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.m-sec li span { color: #999; font-size: 12px; flex: none; }
.m-empty { color: #999; font-size: 13px; padding: 14px; margin: 0; }
.m-more { margin: 0; padding: 8px 12px 10px; text-align: right; }
.m-more a { color: #2f6fbe; text-decoration: none; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.m-more i {
    width: 16px; height: 16px; border-radius: 50%; background: #2f6fbe;
    display: inline-block; position: relative;
}
.m-more i::before {
    content: ""; position: absolute; left: 4px; top: 5px;
    border: solid #fff; border-width: 0 1.5px 1.5px 0; padding: 2px;
    transform: rotate(-45deg);
}
.m-floor {
    position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 100%; max-width: 480px; background: #fff; text-align: center;
    padding: 8px 64px 10px; border-top: 1px solid #eee; z-index: 20;
}
.m-floor p { margin: 0; font-size: 13px; color: #666; line-height: 1.8; }
.m-floor a { color: #2f6fbe; text-decoration: none; margin: 0 8px; }
.m-topbtn {
    position: fixed; z-index: 21; width: 48px; height: 48px; border-radius: 50%;
    background: #3a3a3a; color: #fff; text-decoration: none; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    right: max(16px, calc(50% - 240px + 16px)); bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.edit-form .check { display: flex; gap: 6px; align-items: center; }
.edit-form a { margin-left: 10px; color: #3c78c5; }
