:root {
  font-family:
    system-ui,
    -apple-system,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #183d37;
  background: #f4f7f5;
  line-height: 1.65;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px max(24px, calc((100vw - 1180px) / 2));
  background: white;
  border-bottom: 1px solid #dae5df;
  flex-wrap: wrap;
}
.brand {
  text-decoration: none;
  color: #175947;
  font-size: 23px;
  font-weight: 800;
  white-space: nowrap;
}
.brand span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  color: #637c73;
}
nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
main {
  max-width: 1180px;
  margin: 30px auto;
  padding: 0 24px 80px;
}
h1 {
  font-size: 30px;
  line-height: 1.3;
  margin: 0 0 12px;
}
h2 {
  font-size: 21px;
  margin: 0 0 18px;
}
h3 {
  margin: 8px 0;
  font-size: 17px;
}
p {
  margin: 8px 0;
}
.muted,
small {
  color: #6a8077;
}
.hero {
  background: #155846;
  color: #fff;
  padding: 46px;
  border-radius: 20px;
  margin-bottom: 24px;
}
.hero .muted {
  color: #c3d8ce;
}
.hero h1 {
  font-size: 38px;
  max-width: 760px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.card {
  background: white;
  border: 1px solid #dce7e0;
  border-radius: 14px;
  padding: 24px;
  margin: 18px 0;
  box-shadow: 0 5px 18px #193e3510;
}
.grid > .card {
  margin: 0;
}
.row,
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 12px;
}
.steps {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.steps span {
  background: #e5eee8;
  border-radius: 24px;
  padding: 7px 15px;
  font-size: 13px;
}
.steps span.active {
  background: #155846;
  color: white;
}
button,
.button {
  border: 0;
  border-radius: 8px;
  background: #19644e;
  color: white;
  display: inline-block;
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
}
button:hover,
.button:hover {
  filter: brightness(0.92);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: #e6eee8;
  color: #284e40;
}
.danger {
  background: #fbebe9;
  color: #a4362c;
}
input,
textarea,
select {
  width: 100%;
  padding: 11px;
  border: 1px solid #cbdad0;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: #183d37;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 10px 0 6px;
}
label input[type="checkbox"],
label input[type="radio"] {
  width: auto;
  margin-right: 8px;
}
form .row > * {
  flex: 1;
}
.metric {
  font-size: 28px;
  font-weight: 800;
  color: #176248;
}
.badge {
  font-size: 12px;
  border-radius: 20px;
  background: #e7f1e9;
  padding: 4px 10px;
  display: inline-block;
}
.warning {
  background: #fff5df;
  color: #815900;
  padding: 13px;
  border-radius: 8px;
  margin: 14px 0;
}
.error {
  background: #ffeded;
  color: #9b3226;
  padding: 13px;
  border-radius: 8px;
}
.content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.85;
}
.list {
  border-bottom: 1px solid #e3ebe5;
  padding: 16px 0;
}
.list:last-child {
  border: 0;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
td,
th {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e3ebe5;
  white-space: nowrap;
}
th {
  color: #678073;
}
#notice {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #183d37;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  max-width: 90vw;
  z-index: 30;
  display: none;
}
dialog {
  width: min(760px, 94vw);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid #cbdad0;
  border-radius: 16px;
  padding: 25px;
}
dialog::backdrop {
  background: #12251a80;
}
dialog button {
  margin-top: 12px;
}
.source {
  background: #f3f7f4;
  border-left: 3px solid #94bfa6;
  padding: 10px;
  margin: 8px 0;
  font-size: 13px;
  white-space: pre-wrap;
}
.sign-pad {
  display: block;
  width: 100%;
  height: 180px;
  border: 1px dashed #7b9f8c;
  border-radius: 8px;
  background: white;
  touch-action: none;
}
.option {
  display: flex;
  align-items: center;
  padding: 10px;
  border: 1px solid #dce7e0;
  border-radius: 8px;
  margin: 8px 0;
  cursor: pointer;
}
.option input {
  width: auto;
  margin-right: 12px;
}
img.qr {
  width: 150px;
  height: 150px;
}
details {
  padding: 12px 0;
}
summary {
  cursor: pointer;
}
a {
  color: #176248;
}
#timer {
  position: sticky;
  top: 8px;
  background: #155846;
  color: white;
  padding: 12px;
  border-radius: 8px;
  z-index: 5;
}
.progress-note {
  font-size: 13px;
  color: #5c7866;
}
@media (max-width: 650px) {
  header {
    padding: 16px 20px;
  }
  main {
    padding: 0 16px;
    margin-top: 24px;
  }
  h1 {
    font-size: 26px;
  }
  .hero {
    padding: 28px;
  }
  .hero h1 {
    font-size: 30px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 19px;
  }
  .steps {
    gap: 6px;
  }
  .steps span {
    padding: 5px 9px;
    font-size: 12px;
  }
  nav button {
    padding: 8px;
    font-size: 12px;
  }
  .actions button {
    flex: 1;
  }
  dialog {
    padding: 18px;
  }
}
