:root {
  color-scheme: light;
  --paper: #f1f1e5;
  --ink: #142e2a;
  --muted: #536861;
  --line: #d8dfd0;
  --lime: #dbf265;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(1110px, calc(100% - 48px)); margin-inline: auto; }
.hero {
  color: #f5f4e8;
  background:
    repeating-radial-gradient(ellipse at 92% 165%, transparent 0 35px, #b8dfbc22 36px 37px, transparent 38px 56px),
    linear-gradient(116deg,#102a28,#16423a);
  border-bottom: 5px solid var(--lime);
}
.masthead { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; border-bottom: 1px solid #c0dac342; }
.season, .connection { display: flex; align-items: center; gap: 11px; font-size: 13px; margin: 0; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--ink); background: var(--lime); font: italic 900 25px Georgia,serif; }
.lamp { width: 8px; height: 8px; border-radius: 50%; background: #aebdb8; }
.hero[data-online="true"] .lamp { background: var(--lime); box-shadow: 0 0 10px #ddf36780; }
.headline { padding-block: 40px 48px; }
.kicker { color: var(--lime); margin: 0 0 10px; font-size: 15px; letter-spacing: .17em; font-weight: 700; }
h1 { margin: 0; font-size: clamp(42px, 8vw, 91px); line-height: 1.06; letter-spacing: -.065em; font-weight: 900; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 278px; gap: 24px; align-items: start; padding-block: 30px 55px; }
.panel { background: #fafaf2; border: 1px solid var(--line); }
.panel-heading { min-height: 86px; padding: 20px 23px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
h2 { margin: 0 0 5px; font-size: 22px; letter-spacing: -.04em; }
.panel-heading p, .empty { margin: 0; font-size: 13px; color: var(--muted); }
.activity-link { display: none; color: var(--muted); font-size: 12px; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.rank-col, .score-col { width: 68px; }
.actions-col { width: 178px; }
thead { background: #e4eadd; color: #39554b; font-size: 12px; }
th { text-align: left; font-weight: 650; padding-block: 10px; }
th:first-child, td:first-child, th:nth-child(3), td:nth-child(3) { text-align: center; }
td { height: 69px; border-bottom: 1px solid var(--line); padding: 7px 0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f1f4e8; }
.rank, .points, .delta { font: 700 19px "SF Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
.rank { color: var(--muted); }
.rank span { display: inline-grid; min-width: 30px; min-height: 30px; place-items:center; }
.rank[data-lead="true"] span { background: var(--lime); color: var(--ink); }
.player { display: flex; gap: 12px; align-items: center; padding-right: 8px; font-weight: 700; overflow-wrap: anywhere; }
.player img { width: 46px; height: 46px; display: block; object-fit: cover; border-radius: 7px; background: #dce6d9; }
.actions { display:flex; gap: 6px; }
button { min-width: 43px; min-height: 41px; padding: 0 3px; border:1px solid #c6d3c6; background: #f0f5e9; color:var(--ink); font: 700 15px "SF Mono", Consolas,monospace; border-radius: 5px; cursor: pointer; }
button[data-delta="3"] { background: var(--lime); border-color: #bdcf60; }
button:hover, button:active { background: #d5e8bc; }
button:focus-visible, a:focus-visible { outline: 3px solid #007964; outline-offset: 2px; }
button:disabled { opacity: .55; cursor: wait; }
.activity { scroll-margin-top: 15px; }
.activity .panel-heading { border-bottom: 1px solid var(--line); }
.empty { padding: 23px; }
#changes { list-style: none; padding: 0; margin: 0; }
#changes li { display:flex; justify-content:space-between; align-items:center; gap:10px; padding: 13px 22px; border-bottom: 1px solid var(--line); font-size: 14px; }
#changes li:last-child { border: 0; }
#changes time { display:block; margin-top: 3px; color:var(--muted); font-size: 11px; }
.delta { color: #2e6650; }
.delta.negative { color: #a34a38; }
.notice:not(:empty) { position:fixed; z-index:1; bottom: 18px; left: 50%; transform:translateX(-50%); background:#102e2b; color:#fff; padding: 11px 18px; border-radius:5px; text-align:center; box-shadow:0 3px 15px #0003; width:max-content; max-width:calc(100% - 30px); }
@media (max-width: 800px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .activity-link { display: inline; }
}
@media (max-width: 500px) {
  .wrap { width: calc(100% - 20px); }
  .masthead, .headline { padding-inline: 7px; }
  .headline { padding-block: 30px 36px; }
  .layout { padding-top: 14px; gap: 14px; }
  .panel-heading { min-height: 72px; padding: 15px 12px; }
  .rank-col, .score-col { width: 42px; }
  .actions-col { width: 127px; }
  .actions { gap: 3px; }
  button { min-width: 37px; min-height: 42px; }
  .player { gap: 6px; font-size: 13px; }
  .player img { width: 33px; height: 33px; }
  .rank, .points { font-size: 16px; }
  td { height: 62px; }
}
