:root {
  /* light, blue and grey like an office chat app (企业微信, 2026-10-29 user), so the window is not eye-catching at work.
     --gold is the accent colour (now blue); the names stay so the rules below read the same. */
  color-scheme: light;
  --bg: #f5f6f7;
  --side: #eceef1;
  --panel: #ffffff;
  --panel2: #f7f8fa;
  --hover: #e3e6ea;
  --line: #e4e6ea;
  --line2: #d4d8de;
  --text: #1f2329;
  --muted: #646a73;
  --faint: #8f959e;
  --gold: #0082ef;
  --gold2: #3a9bf0;
  --green: #1ea34a;
  --red: #e5463c;
  --blue: #0082ef;
  --amber: #e08a00;
  --soft: #e6f2fe;
  --radius: 6px;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", "Noto Sans SC", system-ui, sans-serif;
  font-size: 14px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
code { font-family: Consolas, "Cascadia Mono", monospace; color: var(--gold); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d5d9df; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* layout */
.app { display: flex; height: 100vh; }
.sidebar { width: 132px; flex: none; background: linear-gradient(180deg, #eef2f8, #e2e8f1); border-right: 1px solid #dde2ea;
  display: flex; flex-direction: column; padding: 20px 8px 16px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 4px 26px; }
.brand strong { display: block; font-size: 15px; font-weight: 600; }
.brand small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 6px;
  color: #fff; font-size: 19px; font-weight: 600; background: var(--gold); }
.mark.big { width: 60px; height: 60px; font-size: 32px; border-radius: 10px; margin: 0 auto; }
.mark i { width: 22px; height: 22px; display: inline-grid; }
.mark.big i { width: 36px; height: 36px; }
nav { display: grid; gap: 4px; }
.nav-sep { height: 1px; margin: 6px 8px; background: #d3dae4; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 8px;
  border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; text-align: left;
  transition: background .15s, color .15s; }
.nav-item:hover { background: #dbe2ec; }
.nav-item.active, .nav-item.active:hover { background: linear-gradient(180deg, #4b95fa, #3a85f5); color: #fff; }
.nav-item.active i { color: #fff; }
.nav-item i { width: 18px; height: 18px; display: inline-grid; color: var(--muted); }
/* 通知, the window's main page: larger than the other items, so it is easy to find (2026-10-16 user). */
.nav-item.nav-main { padding: 13px 10px; font-size: 16px; font-weight: 600; gap: 12px; }
.nav-item.nav-main i { width: 22px; height: 22px; }
.nav-item.nav-main .badge { min-width: 24px; padding: 2px 7px; font-size: 13px; line-height: 20px; border-radius: 12px; }
.badge { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: #c5cad2; color: #fff;
  font: 600 11px/18px "Segoe UI", sans-serif; text-align: center; }
.badge:empty { display: none; }
.badge.alert { background: var(--red); color: #fff; }
.nav-main .badge, #badge-chat { background: var(--red); color: #fff; }
.side-status { margin-top: auto; padding: 14px 8px 4px; border-top: 1px solid #d3dae4; line-height: 1.6; }
.side-status small { display: block; color: var(--faint); font-size: 12px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-right: 8px;
  vertical-align: 1px; }
.dot.run { background: var(--green); box-shadow: 0 0 0 0 #1ea34a80; animation: pulse 2s infinite; }
.dot.err { background: var(--red); }
.dot.wait { background: var(--amber); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #1ea34a60; } 70% { box-shadow: 0 0 0 7px #1ea34a00; } 100% { box-shadow: 0 0 0 0 #1ea34a00; } }

.main { flex: 1; min-width: 0; overflow-y: auto; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 28px; min-height: 64px; background: var(--panel); border-bottom: 1px solid #ebedf0; }
.topbar h1 { margin: 0; font-size: 18px; font-weight: 600; }
.sub { margin: 2px 0 0; color: var(--faint); font-size: 12px; }
.page { display: none; padding: 20px 28px 32px; max-width: 1180px; }
#page-notices { max-width: none; }
.page.active { display: block; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px;
  border-radius: 4px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--panel2); border-color: #b9bfc8; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #1a8ff2; border-color: #1a8ff2; }
.btn.danger { background: var(--panel); border-color: #f1b4ae; color: var(--red); }
.btn.danger:hover:not(:disabled) { background: #fdeeed; border-color: var(--red); }
.btn.ghost { background: var(--panel); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn .spin { width: 14px; height: 14px; border: 2px solid #ffffff60; border-top-color: currentColor; border-radius: 50%;
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { border: 0; background: none; color: var(--gold); cursor: pointer; padding: 0; font-size: 13px; }
.link:hover { text-decoration: underline; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions.center { justify-content: center; }

/* banners */
.banners { padding: 0 28px; }
.banners:not(:empty) { padding-top: 16px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 8px; border-radius: 4px;
  border: 1px solid; font-size: 13px; line-height: 1.6; }
.banner i { width: 18px; height: 18px; flex: none; display: inline-grid; }
.banner .text { flex: 1; white-space: pre-line; }
.banner.error { background: #fdeeed; border-color: #f6c6c2; color: #b4322a; }
.banner.warn { background: #fff6e6; border-color: #f7d9a6; color: #8a5600; }
.banner.info { background: var(--soft); border-color: #b8dafb; color: #0b5fa8; }
.banner .btn { padding: 5px 12px; font-size: 12px; }

/* overview */
.hero { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel); margin-bottom: 16px; }
.hero.err { border-color: #f6c6c2; }
.hero.idle { background: var(--panel); }
.hero-icon { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: #e5f6ea; color: var(--green); }
.hero-icon svg { width: 28px; height: 28px; }
.hero.err .hero-icon { background: #fdeeed; color: var(--red); }
.hero.idle .hero-icon { background: var(--panel2); color: var(--muted); }
.hero.wait .hero-icon { background: #fff6e6; color: var(--amber); }
.hero-text { flex: 1; min-width: 0; }
.hero-text h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.hero-text p { margin: 0; color: var(--muted); line-height: 1.6; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* The upload counters, one small line at the top right of every page. */
.top-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; color: var(--faint); font-size: 12px; }
.top-stats span { white-space: nowrap; cursor: default; }
.top-stats b { margin-left: 2px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.columns { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  margin-bottom: 16px; }
.columns .card { margin-bottom: 0; }
.card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.mini-list { display: grid; gap: 2px; }
.mini { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.mini:last-child { border-bottom: 0; }
.mini .main-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .time { color: var(--faint); font-size: 12px; flex: none; font-variant-numeric: tabular-nums; }
.empty { color: var(--faint); padding: 18px 4px; text-align: center; font-size: 13px; }
.tag { flex: none; display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 12px; line-height: 20px;
  background: var(--soft); color: var(--blue); border: 1px solid #b8dafb; }
.tag.alarm { background: #fdeeed; color: var(--red); border-color: #f6c6c2; }
.tag.warn { background: #fff6e6; color: var(--amber); border-color: #f7d9a6; }
.state { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 9px;
  border-radius: 20px; background: var(--panel2); color: var(--muted); }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state.ok { color: var(--green); background: #e5f6ea; }
.state.warn { color: var(--amber); background: #fff6e6; }
.state.err { color: var(--red); background: #fdeeed; }

/* notices */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; }
.chip { padding: 5px 14px; border-radius: 4px; border: 1px solid var(--line2); background: var(--panel); color: var(--muted);
  cursor: pointer; font-size: 13px; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--soft); border-color: var(--gold2); color: var(--gold); }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; cursor: pointer; user-select: none; }
.check input { accent-color: var(--gold); width: 15px; height: 15px; }
.notice-list { display: grid; gap: 8px; }
.notice { display: grid; grid-template-columns: 76px 1fr auto; gap: 4px 12px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--blue); }
.notice.alarm { border-left-color: var(--red); background: linear-gradient(90deg, #fff4f3, var(--panel) 45%); }
.notice.warn { border-left-color: var(--amber); }
.notice > .tag { justify-self: stretch; text-align: center; padding: 1px 4px; }
.notice .title { font-weight: 600; line-height: 22px; min-width: 0; }
.notice .when { color: var(--faint); font-size: 12px; line-height: 22px; font-variant-numeric: tabular-nums; }
.notice .when.countdown { color: var(--amber); font-weight: 600; }
.notice-group { color: var(--faint); font-size: 12px; padding: 4px 2px 0; }
.notice .body { grid-column: 2 / 4; color: #3b4048; white-space: pre-wrap; line-height: 1.65; font-size: 13px; }
.notice .body.view { white-space: normal; grid-column: 1 / 4; }
.notice .body.view .line { white-space: pre-wrap; }
.notice .body.view .vtable { margin: 6px 0; overflow: hidden; }
.notice .body.view .vtable table.fit { table-layout: fixed; width: 100%; }
.notice .body.view .vtable td, .notice .body.view .vtable th { padding: 4px 10px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.notice .body.view .vtable td.cd { color: var(--amber); font-weight: 600; }
.notice .body.view .vtable td.cd.soon { color: var(--red); }
.notice .body.view .vtable td.key { color: var(--gold); font-weight: 700; font-size: 14px; }
/* A row that opens to its army's lineup when clicked: ▸ before the lineup, ▾ when open. */
.notice .body.view .vtable tr.has-detail { cursor: pointer; }
.notice .body.view .vtable tr.has-detail:hover td { background: var(--hover); }
.notice .body.view .vtable tr.has-detail td.key::before { content: '▸ '; color: var(--faint); font-weight: 400; }
.notice .body.view .vtable tr.has-detail.open td.key::before { content: '▾ '; }
.notice .body.view .vtable tr.detail td { white-space: normal; max-width: none; padding: 4px 10px 6px 22px; color: var(--text);
  background: var(--panel2); line-height: 1.6; }
/* 复制 at the end of a row, over its last cell while the row is hovered (noticeTable). */
.notice .body.view .vtable td:last-child { position: relative; }
.notice .body.view .vtable .row-copy { display: none; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  padding: 0 8px; height: 20px; line-height: 18px; font-size: 12px; font-weight: 400; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.notice .body.view .vtable tr:hover .row-copy { display: block; }
.notice .body.view .vtable .row-copy:hover { color: var(--gold); border-color: var(--gold); }
.notice .who { color: var(--gold); font-weight: 400; margin-right: 6px; }

/* accounts */
.account-list { display: grid; gap: 14px; margin-bottom: 16px; }
.account { padding: 0; overflow: hidden; margin-bottom: 0; }
.account.invalid { border-color: #f1b4ae; box-shadow: 0 0 0 1px #f1b4ae66; }
.account-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.avatar { width: 42px; height: 42px; border-radius: 6px; flex: none; display: grid; place-items: center; font-size: 18px;
  background: var(--gold); color: #fff; }
.account.invalid .avatar { background: #f3a29b; color: #fff; }
.account-head .who { flex: 1; min-width: 0; }
.account-head .who b { display: block; font-size: 15px; }
.account-head .who small { display: block; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-text { font-family: Consolas, monospace; color: var(--faint); font-size: 12px; }
.account-problem { margin: 0 20px 14px; padding: 10px 12px; border-radius: 4px; background: #fdeeed; border: 1px solid #f6c6c2;
  color: #b4322a; font-size: 13px; line-height: 1.6; }
.account-problem.warn { background: #fff6e6; border-color: #f7d9a6; color: #8a5600; }
.inline-form { display: flex; gap: 8px; flex: 1; min-width: 0; }
input[type=text], input[type=password] { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 4px;
  border: 1px solid var(--line2); background: var(--panel); outline: none; transition: border-color .15s, box-shadow .15s; }
input[type=text]:focus, input[type=password]:focus { border-color: var(--gold2); box-shadow: 0 0 0 3px #0082ef1f; }
.add-card p { margin: 6px 0 12px; line-height: 1.6; font-size: 13px; }
.guide summary { cursor: pointer; font-weight: 600; color: var(--gold); }
.guide ol { margin: 12px 0 0; padding-left: 20px; line-height: 1.9; color: #3b4048; }

/* settings */
.settings h3 { margin-bottom: 4px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0;
  border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; padding-bottom: 2px; }
.setting p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.path { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px !important; word-break: break-all; }
.setting.column { flex-direction: column; align-items: stretch; gap: 10px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.option { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 4px;
  border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; }
.option:hover { background: var(--hover); }
.option.active { border-color: var(--gold2); background: var(--soft); }
.option input { accent-color: var(--gold); margin: 3px 0 0; flex: none; }
.option b { font-weight: 600; }
.option small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.prefs-note { margin: 0 0 14px; font-size: 13px; line-height: 1.6; }
.switch { position: relative; flex: none; width: 44px; height: 24px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 12px; background: #c9ced6; transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform .2s, background .2s; }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .45; cursor: default; }

/* diagnostics */
.checks { display: grid; gap: 2px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }
.check-row i { width: 20px; height: 20px; flex: none; display: inline-grid; }
.check-row.ok i { color: var(--green); }
.check-row.bad i { color: var(--red); }
.check-row.unknown i { color: var(--faint); }
.check-row b { width: 120px; flex: none; font-weight: 600; }
.check-row span { color: var(--muted); font-size: 13px; min-width: 0; word-break: break-all; }
.small-note { font-size: 12px; margin: 12px 0 0; }
.log { height: 340px; overflow-y: auto; padding: 10px 12px; border-radius: 4px; background: var(--panel2); border: 1px solid var(--line);
  font: 12px/1.7 Consolas, "Cascadia Mono", monospace; color: #3b4048; }
.log div { white-space: pre-wrap; word-break: break-all; }
.log .t { color: var(--faint); margin-right: 8px; }
.log .warn { color: var(--amber); }
.log .error { color: var(--red); }

/* about */
.about { text-align: center; padding: 36px 28px; }
.about h2 { margin: 14px 0 4px; font-size: 20px; font-weight: 600; }
.version { margin: 18px 0 4px; }
.facts { text-align: left; max-width: 520px; margin: 26px auto 0; color: var(--muted); line-height: 1.9; font-size: 13px; }

/* toasts, closed */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 20; }
.toast { min-width: 240px; max-width: 420px; padding: 11px 16px; border-radius: 6px; background: #353a42; border: 0; color: #fff;
  box-shadow: 0 6px 20px #0003; font-size: 13px; line-height: 1.5; animation: rise .2s ease-out; }
.toast.error { background: #d9443a; color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.gone { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: #f5f6f7f2; text-align: center; }
.gone h2 { margin: 16px 0 6px; }
.gone p { color: var(--muted); }

@media (max-width: 900px) {
  .sidebar { width: 64px; padding: 16px 8px; }
  .brand div, .nav-item span, .side-status small, #side-state { display: none; }
  .brand { padding: 0 4px 20px; }
  .nav-item { justify-content: center; padding: 10px; }
  .nav-item .badge { position: absolute; top: 2px; right: 2px; }
  .columns { grid-template-columns: 1fr; }
  .columns .card { margin-bottom: 16px; }
  .page, .topbar { padding-left: 16px; padding-right: 16px; }
  .banners { padding: 0 16px; }
  .hero { flex-wrap: wrap; }
}

/* a release's notes in the update banners */
.release-notes { margin-top: 6px; }
.release-notes summary { cursor: pointer; color: var(--gold); font-size: 13px; }
.notes-body { margin-top: 6px; white-space: pre-wrap; color: var(--muted); font-size: 13px; line-height: 1.6;
  max-height: 260px; overflow-y: auto; }

/* the server's pages (玩家信息) */
.vcards.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 10px; }
.vcards.grid .vcard { margin: 0; padding: 12px 14px; }
.vcards.grid .vcard.wide { grid-column: 1 / -1; }
.vcards.grid .vtable { margin-top: 8px; }
.vcards.grid .vtable td { padding: 5px 8px; }
.vtoolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.vfilters { display: grid; gap: 8px; min-width: 0; }
.vfilter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vfilter > span { width: 36px; flex: none; color: var(--faint); font-size: 12px; }
.vfilter .chips { flex-wrap: wrap; }
.vfilter .chip { padding: 4px 12px; }
.vcard { padding: 16px 18px; }
.vhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vtitle { min-width: 0; }
.vtitle small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.vtags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.vtag { padding: 1px 8px; border-radius: 3px; font-size: 12px; line-height: 20px; background: var(--soft); color: var(--blue);
  border: 1px solid #b8dafb; white-space: nowrap; }
.vtag.good { color: var(--green); background: #e5f6ea; border-color: #b5e2c2; }
.vtag.bad { color: var(--red); background: #fdeeed; border-color: #f6c6c2; }
.vtag.warn { color: var(--amber); background: #fff6e6; border-color: #f7d9a6; }
.vtag.muted { color: var(--muted); background: transparent; border-color: var(--line); }
.vstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.vstat { padding: 10px 12px; border-radius: 4px; background: var(--panel2); border: 1px solid var(--line); }
.vstat span { display: block; color: var(--faint); font-size: 12px; }
.vstat b { display: block; margin-top: 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vlines { margin: 12px 0 0; padding-left: 18px; line-height: 1.75; font-size: 13px; color: #3b4048; }
.lv.good { color: var(--green); }
.lv.bad { color: var(--red); }
.lv.warn { color: var(--amber); }
.lv.muted { color: var(--faint); }
.vtable { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
.vtable table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vtable th { position: sticky; top: 0; text-align: left; font-weight: 600; color: var(--muted); background: var(--panel2);
  padding: 8px 10px; white-space: nowrap; }
.vtable td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
.vtable tbody tr:hover { background: var(--panel2); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 13px; }

/* 群聊: laid out like WeChat's chat (2026-10-28 user), in the window's colours */
.main:has(#page-chat.active) { display: flex; flex-direction: column; overflow: hidden; }
#page-chat { max-width: none; }
#page-chat.active { display: flex; flex: 1; min-height: 0; padding: 0; }
.chat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--panel); overflow: hidden; }
.chat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 28px; border-bottom: 1px solid #ebedf0; background: var(--panel); }
.chat-head b { font-size: 13px; font-weight: 400; color: var(--muted); }
.chat-head small { color: var(--faint); font-size: 12px; }
.chat-head small.err { color: var(--red); }
.chat-me { font-size: 13px; color: var(--muted); }
.chat-me strong { color: var(--gold); font-weight: 600; }
.chat-who { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); }
.chat-who .chip { padding: 2px 10px; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 28px 16px; background: var(--panel); }
.chat-more { display: block; margin: 8px auto 4px; }
/* @ me (2026-11-12): the bubble stands out; the push switches under the chat's head. */
.msg.at:not(.mine) .bubble { box-shadow: inset 0 0 0 2px var(--gold); }
/* On the line of 在线 N 人 and one's name (2026-11-13 user), not a line of their own. */
.chat-opts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-left: auto; font-size: 12px; color: var(--muted); }
.chat-opts[hidden] { display: none; }
.chat-who:not(:empty) + .chat-opts { margin-left: 0; }  /* the account chips (margin-left: auto) push it right then */
.chat-opts label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.chat-opts input { margin: 0; }
.chat-opts small { color: var(--faint); }
.chat-opts .link { font-size: 12px; }
/* 撤回 under a message: seen when the pointer is on it (2026-11-12). */
.msg .recall { margin-top: 3px; font-size: 12px; color: var(--faint); visibility: hidden; }
.msg:hover .recall, .msg .recall:focus-visible { visibility: visible; }
.chat-tip { margin: 12px auto; width: fit-content; max-width: 80%; padding: 3px 10px; border-radius: 5px;
  background: transparent; color: var(--faint); font-size: 12px; line-height: 1.6; text-align: center; }
.chat-time { margin: 14px 0 4px; color: var(--faint); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.msg { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0; }
.msg.mine { flex-direction: row-reverse; }
.msg .av { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 6px;
  font-size: 16px; color: #fff; }
.msg .av.c0 { background: #3a8ee6; }
.msg .av.c1 { background: #e6a23c; }
.msg .av.c2 { background: #2fb5a8; }
.msg .av.c3 { background: #e5735f; }
.msg .av.c4 { background: #8c7ae6; }
.msg .av.c5 { background: #45b36b; }
/* The administrator (率土战局): gold, ringed, and its bubble tinted, to stand out among the players. */
.msg .av.official { background: linear-gradient(135deg, #f5c24c, #d9901a); font-weight: 700; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e6a23c; }
.msg .tag-official { margin-left: 6px; padding: 0 5px; border-radius: 3px; background: #e6a23c; color: #fff; font-size: 11px; font-weight: 600; }
/* A 管理员 (server 2026-11-12): a round rose-to-violet avatar with a gold star, apart from both the
   level-3 players (an old client shows it as one) and the official's gold square. */
.msg .av.staff { position: relative; border-radius: 50%; background: linear-gradient(135deg, #ff5f6d, #7b4fd6); font-weight: 700;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7b4fd6, 0 0 12px 3px rgba(123, 79, 214, .45); }
.msg .av.staff::after { content: '★'; position: absolute; right: -5px; bottom: -5px; width: 16px; height: 16px; border-radius: 50%;
  background: #f5b82e; color: #fff; font-size: 10px; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.msg .tag-staff { margin-left: 6px; padding: 0 5px; border-radius: 3px; background: #7b4fd6; color: #fff; font-size: 11px; font-weight: 600; }
.msg.official:not(.mine) .bubble { background: #fff4dc; box-shadow: inset 0 0 0 1px #f0d08a; }
/* Players by how much they play (server level 1-3): a ring that stands out more the higher; never gold. */
.msg .av.lv1 { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #b8c4d4; }
.msg .av.lv2 { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3a8ee6; }
.msg .av.lv3 { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #8c5ae6, 0 0 14px 5px rgba(140, 90, 230, .65); font-weight: 700; }
.msg .col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(62%, 560px); }
.msg.mine .col { align-items: flex-end; }
.msg.mine .who { margin: 0 2px 5px 0; }  /* one's own name too (2026-11-08) */
.msg .who { margin: 0 0 5px 2px; color: var(--muted); font-size: 13px; }
.bubble { position: relative; padding: 9px 12px; border-radius: 6px; background: #eef0f3; border: 0;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; line-height: 1.6; user-select: text; }
.msg.mine .bubble { background: #d3e6fe; color: var(--text); }
.chat-input { display: flex; flex-direction: column; gap: 6px; margin: 0 20px 16px; padding: 12px 14px 10px; border: 1px solid #e3e6eb;
  border-radius: 8px; background: var(--panel); }
.chat-input:focus-within { border-color: #c9d6e8; }
.chat-input textarea { width: 100%; resize: none; border: 0; outline: none; background: transparent; color: var(--text);
  font: inherit; line-height: 1.6; }
.chat-input textarea:disabled { opacity: .5; }
.chat-send { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.chat-send small { color: var(--faint); font-size: 12px; }
.chat-send .btn { padding: 5px 16px; }
.chat-send small.over { color: var(--red); }

.msg .av.custom { --av-gap: #fff; }  /* the ring's gap: the chat's background */

/* ===== the same in app.css and classic.css from here on: colours only through the variables ===== */

/* A banner's close button says so (2026-11-07 user: the × alone was too small to be seen). */
.banner .close { flex: none; gap: 4px; padding: 5px 10px; font-size: 12px; background: transparent; color: inherit;
  border-color: currentColor; }
.banner .close svg { width: 12px; height: 12px; }
.banner .close:hover:not(:disabled) { background: color-mix(in srgb, currentColor 10%, transparent); border-color: currentColor; }
.banner .close .left { font-variant-numeric: tabular-nums; }

/* 概览: what the top bar's figures are, in words; the accounts with their push and the phone. */
.ov-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ov-stat { padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.ov-stat span { display: block; color: var(--muted); font-size: 12px; }
.ov-stat b { display: block; margin: 4px 0 2px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-stat small { display: block; color: var(--faint); font-size: 12px; line-height: 1.5; }
.ov-stat.warn b { color: var(--amber); }
.ov-account .main-text b { font-weight: 600; }
.ov-account .sub-line { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 12px; }
.push { color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.push.ok { color: var(--green); }
.push.warn { color: var(--amber); }
.push.err { color: var(--red); }
.ov-account .link { font-size: 12px; flex: none; }

/* 账号: the name and its state, then what it is, then what can be done with it. */
.account-head .who b { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.account-head .who b .state { font-weight: 400; }
.account-head .who small { margin-top: 4px; }
.account-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); }
.account-actions .hint { font-size: 12px; }
.account-actions .danger-text { margin-left: auto; color: var(--red); }
.add-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.add-head .muted { font-size: 12px; }
.add-public { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.add-public .muted { font-size: 12px; }

/* 查询: a short name box (2026-11-13 user); 刷新 and 导出玩家信息 on the right. */
.vtoolbar .vfilters { flex: 1; }
.vsearch { width: auto; flex: none; }
.vsearch input { width: calc(14em + 28px); min-width: 0; flex: none; }  /* the placeholder whole (13 characters), no wider */
.vtoolbar .vactions { display: flex; align-items: center; gap: 8px; flex: none; }

/* 提醒: a setting a line, its help one line under its name, its switch or choices beside it. */
.prefs-note { margin: 0 0 12px; }
.pref-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 0 16px; align-items: start; }
.pref-group h3 { margin-bottom: 2px; }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pref:last-child { border-bottom: 0; padding-bottom: 0; }
.pref-text { min-width: 0; }
.pref-text b { font-weight: 600; }
.pref-text small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.segmented { flex: none; display: inline-flex; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; }
.segmented label { padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.segmented label + label { border-left: 1px solid var(--line2); }
.segmented label:hover { color: var(--text); }
.segmented label.active { background: var(--gold); color: var(--bg); }
.segmented input { display: none; }

/* 手机: the choosers on one line, the step filling the window, 上一步 / 下一步 at its bottom; no scrolling. */
.main:has(#page-phone.active) { display: flex; flex-direction: column; overflow: hidden; }
#page-phone.active { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-top: 16px; padding-bottom: 16px; }
#page-phone .banner { margin-bottom: 10px; }
#phone-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.phone-bar { display: flex; align-items: center; gap: 10px 24px; flex-wrap: wrap; margin-bottom: 12px; }
.phone-bar .vfilter > span { width: auto; }
.phone-dots { display: flex; gap: 6px; margin-left: auto; }
.phone-dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line2); background: transparent; color: var(--muted);
  font-size: 12px; cursor: pointer; }
.phone-dot.done { border-color: var(--gold); color: var(--gold); }
.phone-dot.active { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 600; }
.phone-step { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-bottom: 0; padding: 20px 24px 16px; }
.phone-step-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; gap: 28px; align-items: flex-start; }
.phone-step-media { flex: none; }
.phone-step-media .qr { display: block; width: 212px; height: 212px; padding: 8px; border-radius: 6px; background: #fff;
  border: 1px solid var(--line); image-rendering: pixelated; }
.qr-none { width: 212px; height: 212px; display: grid; place-items: center; padding: 16px; text-align: center; border-radius: 6px;
  border: 1px dashed var(--line2); color: var(--faint); font-size: 13px; }
.spin.dark { border-color: var(--line2); border-top-color: var(--gold); width: 22px; height: 22px; }
.phone-step-text { flex: 1; min-width: 0; }
.phone-step-text h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 17px; }
.step-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold);
  color: var(--bg); font-size: 13px; }
.phone-step-text > p { margin: 0 0 12px; line-height: 1.8; }
.phone-step-text .row-actions { margin-top: 10px; align-items: center; }
.phone-check { font-weight: 600; }
.phone-check.ok { color: var(--green); }
.phone-check.bad { color: var(--red); }
.phone-check.wait { color: var(--muted); font-weight: 400; }
.phone-links { margin-top: 16px !important; color: var(--faint); font-size: 12px !important; line-height: 1.6 !important; }
.phone-links .link { font-size: 12px; }
.phone-links .sep { margin: 0 8px; }
.phone-sub { font-size: 12px !important; color: var(--muted); line-height: 1.7 !important; }
.phone-sub code { word-break: break-all; }
.phone-sub .link { font-size: 12px; margin-right: 4px; }
.phone-bark { max-width: 520px; margin-top: 4px; }
.ally-list { margin: 8px 0 12px; border-top: 1px solid var(--line); }
.ally-row { display: flex; align-items: center; gap: 12px; padding: 7px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ally-row.active { background: var(--hover, rgba(127, 127, 127, .08)); }
.ally-name { font-weight: 600; min-width: 6em; overflow: hidden; text-overflow: ellipsis; }
.ally-bad { color: var(--red); font-size: 12px; }
.ally-actions { margin-left: auto; display: flex; gap: 10px; }
.ally-actions .link { font-size: 12px; }
.ally-how { margin: 4px 0 12px; font-size: 13px; }
.ally-how ol { margin: 6px 0; padding-left: 20px; line-height: 1.7; }
.ally-form { flex-wrap: wrap; gap: 8px; max-width: 820px; margin-top: 4px; }
.ally-form .ally-name-input { flex: 0 0 7em; }
.ally-form input[data-ally-address] { flex: 1 1 260px; }
.phone-step-nav { flex: none; display: flex; align-items: center; justify-content: space-between; padding-top: 14px; margin-top: 12px;
  border-top: 1px solid var(--line); }
.phone-step-nav .btn { min-width: 96px; }
.invisible { visibility: hidden; }

/* the sidebar, narrower (2026-11-07 user: more room on the right) */
.nav-item { white-space: nowrap; }
.nav-item.nav-main { gap: 8px; padding: 12px 8px; }
.brand { padding-bottom: 20px; }

/* the overview's status, compact: the figures and lists below it are what is read */
.hero { padding: 14px 20px; gap: 16px; margin-bottom: 12px; }
.hero-icon { width: 44px; height: 44px; }
.hero-icon svg { width: 22px; height: 22px; }
.hero-text h2 { font-size: 16px; margin-bottom: 2px; }
.ov-stats { margin-bottom: 12px; }

/* 提醒 in columns: a choice's buttons under its name */
.pref-groups { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.pref.choice { flex-direction: column; align-items: stretch; gap: 8px; }
.pref.choice .segmented { align-self: flex-start; }

/* many banners on 手机 scroll among themselves: the step keeps the window */
.main:has(#page-phone.active) .banners { flex: none; max-height: 34%; overflow-y: auto; padding-bottom: 0; }
.phone-step { min-height: 280px; }

.brand strong { white-space: nowrap; }
.phone-step-body { container-type: size; }
@container (max-height: 236px) { .phone-step-media .qr, .qr-none { width: 160px; height: 160px; } }

@media (max-width: 900px) {
  .ov-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-step-media .qr, .qr-none { width: 172px; height: 172px; }
  .vsearch input { min-width: 0; }
}

/* 群聊 images and emoji, as WeChat / WeCom (2026-11-11 user): tools above the input, the emoji panel over it,
   images waiting as thumbnails, an image message without a bubble, the full one over the window. */
.chat-input { position: relative; }
.chat-tools { display: flex; gap: 2px; margin: -4px 0 0 -6px; }
.chat-tool { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 5px;
  background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.chat-tool:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.chat-tool:disabled { opacity: .4; cursor: default; }
.chat-tool svg { width: 20px; height: 20px; }
.chat-emoji { position: absolute; left: 8px; bottom: calc(100% + 6px); z-index: 30; width: 396px; max-width: calc(100% - 16px);
  max-height: 290px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18); }
.chat-emoji[hidden] { display: none; }
.chat-emoji-title { margin: 2px 4px 4px; color: var(--faint); font-size: 12px; }
.chat-emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, 36px); gap: 2px; margin-bottom: 6px; }
.chat-emoji-item { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 5px; background: none;
  font-size: 22px; line-height: 1; cursor: pointer; }
.chat-emoji-item:hover { background: var(--hover); }
.chat-pending { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 0 2px; }
.chat-pending[hidden] { display: none; }
.chat-pending-item { position: relative; width: 64px; height: 64px; }
.chat-pending-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); }
.chat-pending-remove { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 14px; line-height: 20px; cursor: pointer; }
.bubble.pic { padding: 0; background: none; border: 0; box-shadow: none; line-height: 0; }
.bubble.pic::before { display: none; }
.msg.mine .bubble.pic { background: none; border: 0; }
.chat-img { max-width: 100%; height: auto; border-radius: 5px; border: 1px solid var(--line); cursor: zoom-in; object-fit: cover; }
.bubble.gone { color: var(--faint); }
.chat-viewer { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .82); cursor: zoom-out; }
.chat-viewer img { max-width: 94vw; max-height: 94vh; object-fit: contain; }

/* A special avatar the administrator gave (server 2026-11-13): its colours come as variables from the
   server's data (app.js chatLooks), the shapes and effects are these. */
.msg .av.custom { position: relative; background: var(--av-bg, #5b6b82); color: var(--av-fg, #fff); font-weight: 700;
  box-shadow: var(--av-shadow, none); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.msg .av.custom.shape-round { border-radius: 50%; }
.msg .av.custom.shape-square { border-radius: 6px; }
.msg .av.custom.shape-leaf { border-radius: 4px 50%; }
.msg .av.custom.fx-shine { background-image: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .6) 50%, transparent 62%), var(--av-bg, none);
  background-size: 300% 100%, 100% 100%; background-repeat: no-repeat; }
.msg .av.custom.badged::after { content: attr(data-badge); position: absolute; right: -6px; bottom: -6px; min-width: 16px; height: 16px;
  padding: 0 2px; border-radius: 8px; background: var(--av-badge-bg, #f5b82e); color: var(--av-badge-fg, #fff); font-size: 10px;
  line-height: 16px; text-align: center; text-shadow: none; box-shadow: 0 0 0 2px var(--av-gap); }
/* badge_pos top: the badge as a crown above the avatar, tilted (room left above it for the first message). */
.msg .av.custom.badge-top { margin-top: 10px; }
.msg .av.custom.badge-top::after { right: auto; left: 50%; bottom: auto; top: -11px; min-width: 0; height: auto; padding: 0;
  margin-left: -8px; width: 16px; background: none; box-shadow: none; color: var(--av-badge-bg, #f5c542); font-size: 15px; line-height: 1;
  transform: rotate(-12deg); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
.msg .av.custom.fx-twinkle::after { animation: av-twinkle 1.8s ease-in-out infinite; }
.msg .av.custom.badge-top.fx-twinkle::after { animation-name: av-crown; }
@keyframes av-crown { 0%, 100% { transform: rotate(-12deg) scale(1); } 50% { transform: rotate(-4deg) scale(1.18); } }
.msg .tag-av { margin-left: 6px; padding: 0 5px; border-radius: 3px; background: #7b4fd6; color: #fff; font-size: 11px; font-weight: 600; }
@keyframes av-shine { 0%, 30% { background-position: 0% 0, 0 0; } 100% { background-position: 100% 0, 0 0; } }
@keyframes av-pulse { 0%, 100% { box-shadow: var(--av-shadow, none); }
  50% { box-shadow: var(--av-shadow, none), 0 0 18px 6px var(--av-glow, rgba(255, 255, 255, .6)); } }
@keyframes av-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes av-rainbow { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
@keyframes av-twinkle { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.25) rotate(18deg); } }
@media (prefers-reduced-motion: reduce) { .msg .av.custom, .msg .av.custom::after { animation: none !important; } }
