:root {
  font:
    16px/1.55 "PingFang SC",
    "Microsoft Yahei",
    sans-serif;
  color: #292826;
  background: #f7f6f2;
  --red: #9e402d;
  --line: #d7d2c8;
  --soft: #eeeae1;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
header {
  border-bottom: 1px solid var(--line);
  padding: 14px max(calc((100% - 1120px) / 2), 5%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  white-space: nowrap;
  color: #5d5b55;
  font-size: 14px;
}
header a {
  font-size: 19px;
  color: #282723;
  font-weight: 750;
  text-decoration: none;
}
header a span {
  font-size: 13px;
  color: #777;
}
main {
  width: min(1120px, 90%);
  margin: auto;
  padding: 32px 0;
}
.title,
.section-head,
.session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.title > span,
.section-head > span,
.note,
.session {
  font-size: 14px;
  color: #615f58;
}
.tag {
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0;
}
h1,
h2,
h3 {
  font-family: "Songti SC", "STSong", serif;
  margin: 0;
  color: #282724;
}
h1 {
  font-size: clamp(34px, 4vw, 49px);
}
h2 {
  font-size: 27px;
  margin-bottom: 12px;
}
h3 {
  font-size: 21px;
}
p {
  margin: 8px 0 12px;
}
nav {
  display: flex;
  gap: 12px;
  margin: 20px 0 19px;
  border-bottom: 2px solid #393731;
}
button,
input,
select {
  font: inherit;
}
button {
  background: #fff;
  color: #38332d;
  border: 1px solid #a49c8d;
  border-radius: 4px;
  cursor: pointer;
  padding: 8px 15px;
}
button:hover {
  border-color: var(--red);
  color: var(--red);
}
button:focus-visible,
a:focus-visible,
input:focus,
select:focus {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
nav button {
  border: 0;
  background: none;
  border-radius: 0;
}
nav [aria-current] {
  background: #292825;
  color: white;
}
nav [aria-current]:hover {
  color: white;
}
.cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 27px;
}
article,
aside,
#board,
#trace,
#codes {
  background: white;
  padding: 24px;
  border: 1px solid var(--line);
}
aside {
  background: var(--soft);
  align-self: start;
}
aside dt {
  color: #655e53;
}
aside dd {
  margin: 0;
  font-weight: 650;
}
dl {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 6px;
}
hr {
  border: 0;
  border-top: 1px solid #c5bdae;
  margin: 18px 0;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: #59554e;
  margin-bottom: 12px;
}
input,
select {
  display: block;
  width: 100%;
  min-height: 43px;
  margin-top: 4px;
  border: 1px solid #bcb6aa;
  background: white;
  border-radius: 4px;
  padding: 7px 10px;
  color: #292826;
}
.bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.primary {
  background: var(--red);
  color: white;
  border-color: var(--red);
  font-weight: 650;
}
.primary:hover {
  color: white;
  background: #843322;
}
#message:not(:empty) {
  border-left: 4px solid var(--red);
  background: #f1e7dc;
  padding: 10px 14px;
  margin: 8px 0 15px;
}
.session {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 22px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.session span {
  margin-right: auto;
}
.session button {
  font-size: 14px;
}
#metrics {
  display: flex;
  gap: 36px;
  padding: 16px 0;
  margin: 12px 0;
  border-block: 1px solid var(--line);
}
#metrics strong {
  display: block;
  font:
    650 34px/1.05 Arial,
    sans-serif;
}
.tablewrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
}
th {
  color: #625c52;
  font-size: 14px;
}
td button,
.inline {
  color: var(--red);
  border: 0;
  background: transparent;
  padding: 2px;
  text-decoration: underline;
}
#lookup {
  display: flex;
  align-items: end;
  gap: 12px;
}
#lookup label {
  width: min(500px, 75%);
  margin-bottom: 0;
}
#history {
  margin-top: 20px;
}
details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
summary {
  cursor: pointer;
  font-weight: 650;
}
.log {
  margin: 8px 0;
  padding-left: 21px;
}
.log li {
  margin: 5px 0;
}
.muted {
  color: #655e53;
}
.alarm {
  color: #9c402c;
  font-weight: 700;
}
#qrlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
#qrlist button {
  display: grid;
  justify-items: center;
  gap: 4px;
}
#qrlist img {
  width: 105px;
  height: 105px;
}
#qrlist small {
  font-size: 14px;
}
@media (max-width: 720px) {
  main {
    width: 94%;
    padding-top: 16px;
  }
  .cols {
    display: block;
  }
  aside {
    margin-top: 14px;
  }
  article,
  aside,
  #board,
  #trace,
  #codes {
    padding: 16px;
  }
  nav {
    gap: 0;
  }
  nav button {
    padding: 10px 8px;
    flex: 1;
    font-size: 15px;
  }
  .title,
  .section-head {
    flex-wrap: wrap;
  }
  .title > span {
    font-size: 13px;
  }
  .session {
    justify-content: flex-start;
  }
  .session span {
    width: 100%;
  }
  #metrics {
    gap: 18px;
    justify-content: space-between;
  }
  .bar {
    gap: 8px;
  }
  .log li {
    font-size: 14px;
  }
  #qrlist {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media print {
  header,
  .title,
  nav,
  .session,
  #message,
  #print,
  main > section:not(#codes) {
    display: none !important;
  }
  #codes[hidden],
  #codes {
    display: block !important;
    border: none;
  }
  main {
    width: 100%;
    padding: 0;
  }
  #qrlist {
    grid-template-columns: repeat(4, 1fr);
  }
  #qrlist button {
    break-inside: avoid;
  }
}

.station-switch {
  display: flex;
  align-items: center;
}
.station-switch button {
  font-size: 14px;
}
