:root {
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: #182c29;
  background: #eef3ef;
  color-scheme: light;
  font-size: 15px;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #165a4a; font-weight: 650; text-underline-offset: .22em; }
button, input, select { font: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 41px;
  padding: 7px 14px; font-weight: 650; background: white; color: #174b40;
  border: 1px solid #afc5ba; border-radius: 7px; white-space: nowrap; text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { background: #e9f2ec; }
.primary { color: white; background: #165648; border-color: #165648; }
.primary:hover { background: #104739; }
.quiet { background: transparent; }
.danger { color: #9c2e3d; border-color: #d6b5bb; }
:focus-visible { outline: 3px solid #4a8d79; outline-offset: 3px; }
input:not([type=checkbox]), select {
  width: 100%; min-height: 41px; padding: 7px 10px; background: white; color: #152e27;
  border: 1px solid #b8cbc0; border-radius: 7px;
}
label { display: grid; gap: 5px; font-weight: 650; }
.demo { padding: 5px 16px; text-align: center; background: #f1e3ba; color: #584313; font-size: .83rem; }
.signin { min-height: 87vh; display: grid; place-items: center; padding: 24px 16px; }
.login {
  width: min(100%, 406px); padding: 32px; background: white;
  border: 1px solid #d3e0d8; border-radius: 14px; box-shadow: 0 16px 45px #103b2912;
}
.login h1 { font-size: 2rem; margin: 0 0 20px; }
.login .primary { margin-top: 4px; width: 100%; }
.overline { color: #2e6e5d; font-weight: 750; margin: 0 0 4px; }
.stack { display: grid; align-items: start; gap: 13px; }
.stack > button { justify-self: start; }
.shell { width: min(1280px, 100% - 48px); margin-inline: auto; }
.top { background: #163b31; color: white; }
.topinner, .profile { display: flex; gap: 14px; align-items: center; }
.topinner { justify-content: space-between; min-height: 66px; }
.brand { font-size: 1.15rem; font-weight: 750; }
.profile button { min-height: 34px; padding: 4px 11px; color: white; background: transparent; border-color: #6c9182; }
.profile button:hover { background: #315c4d; }
.layout { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; margin-block: 28px; align-items: start; }
nav { display: grid; gap: 5px; }
nav a { padding: 10px 12px; border-radius: 7px; color: #385b50; text-decoration: none; }
nav a:hover { background: #e3ede6; }
nav a[aria-current] { background: #d9e8df; color: #154b3e; font-weight: 750; }
.content { padding: clamp(16px, 3vw, 28px); border: 1px solid #d3e0d8; border-radius: 12px; background: #fff; min-width: 0; }
h1 { margin: 0 0 16px; line-height: 1.25; font-size: clamp(1.45rem, 2.7vw, 1.9rem); }
.support { margin: 0 0 16px; color: #496259; }
.search { max-width: 540px; margin: 0 0 18px; }
.fieldline { display: flex; gap: 8px; margin-top: 5px; }
.fieldline input { min-width: 0; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 11px; text-align: left; border-bottom: 1px solid #e3ebe6; vertical-align: top; }
th { background: #eef5f0; color: #37594c; font-weight: 750; }
td { overflow-wrap: anywhere; }
td:first-child, th:first-child { white-space: nowrap; }
td .recordlink { display: inline-block; margin-top: 5px; }
.player-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.player-actions .recordlink { margin-top: 0; }
.player-cards { white-space: nowrap; }
.card-balance { display: inline-block; white-space: nowrap; font-variant-numeric: tabular-nums; }
.player-mobile-label { display: none; }
.text-control { background: transparent; border: 0; padding: 0; min-height: 0; text-decoration: underline; text-underline-offset: .22em; }
summary { color: #165a4a; font-weight: 700; cursor: pointer; }
.adjust { margin: 8px 0; min-width: 175px; }
.pagination { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 14px; }
.empty { margin: 0; padding: 16px; background: #f4f7f4; border-radius: 8px; color: #4c665c; }
.notice, .error { margin: 0 0 15px; padding: 10px 12px; border-radius: 7px; background: #e7f2ea; color: #235640; }
.error { background: #f9e9eb; color: #91243a; }
.signed { font-weight: 750; }
.positive { color: #17634d; }
.negative { color: #a23546; }
.scores { display: grid; gap: 3px; list-style: none; margin: 0; padding: 0; max-width: 265px; }
.scores li { display: flex; justify-content: space-between; gap: 10px; }
.add { margin-bottom: 15px; padding: 12px; border: 1px solid #b7d0c2; border-radius: 8px; background: #f3f8f4; }
.manage { max-width: 460px; margin-top: 11px; }
.split, .checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 13px; }
.checks label { display: flex; align-items: flex-start; gap: 6px; font-weight: 450; }
fieldset { min-width: 0; margin: 0; border: 1px solid #cfded5; border-radius: 7px; }
legend { font-weight: 650; }
.accounts { display: grid; gap: 10px; }
.account { border: 1px solid #d3e0d8; border-radius: 8px; padding: 11px; }
.account summary strong { color: #173e32; }
.accountbody { display: grid; gap: 14px; margin: 10px 0 0; }
.muted, .status { color: #4b6a5d; font-size: .9rem; font-weight: 500; }
.status { margin-left: .5em; }
@media (max-width: 740px) {
  .shell { width: calc(100% - 24px); }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-block: 13px; }
  nav { display: flex; flex-wrap: wrap; }
  nav a { padding: 7px 9px; }
  th, td { padding: 8px; }
  .player-table, .player-table tbody { display: block; }
  .player-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
    white-space: nowrap;
  }
  .player-table tbody tr {
    display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content;
    grid-template-areas: "id name cards" "registered registered registered" "actions actions actions";
    align-items: start; gap: 3px 8px; padding: 10px 0; border-bottom: 1px solid #d3e0d8;
  }
  .player-table td { min-width: 0; padding: 0; border-bottom: 0; }
  .player-id { grid-area: id; font-variant-numeric: tabular-nums; }
  .player-name { grid-area: name; font-weight: 700; }
  .player-registered { grid-area: registered; color: #496259; font-size: .87rem; overflow-wrap: normal; }
  .player-cards { grid-area: cards; text-align: right; }
  .player-controls { grid-area: actions; }
  .player-mobile-label { display: inline; color: #496259; font-size: .84rem; }
  .player-actions { align-items: flex-start; gap: 0 10px; }
  .player-actions .recordlink, .player-actions .text-control, .player-actions summary {
    min-height: 44px; padding-block: 10px; white-space: nowrap;
  }
  .player-actions .adjust { min-width: 0; width: min(240px, 100%); }
  .player-actions input:not([type=checkbox]) { font-size: 16px; }
}
@media (max-width: 380px) {
  .checks, .split { grid-template-columns: minmax(0, 1fr); }
}
