:root {
  font: 16px/1.5 system-ui, "Microsoft YaHei", sans-serif;
  color: #172936;
  background: #f4f7f9;
  --accent: #086d9e;
  --line: #d8e1e8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #60b5da;
  outline-offset: 2px;
}
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner, .workspace { width: min(100% - 32px, 1040px); margin-inline: auto; }
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand { color: inherit; font-size: 1.125rem; font-weight: 720; text-decoration: none; }
.top-actions, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.top-actions { font-size: .9rem; }
.plain { border: 0; background: transparent; padding: 6px 0; color: var(--accent); }
.workspace { padding-block: 30px; }
.workspace.narrow { max-width: 440px; padding-top: 56px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: 1.65rem; line-height: 1.25; }
h2 { margin-bottom: 12px; font-size: 1.15rem; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-heading h1 { margin: 0; }
.card { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.form, .field { display: grid; gap: 9px; }
.form { gap: 12px; }
.form > .primary { justify-self: start; margin-top: 4px; }
.narrow .form > .primary { justify-self: stretch; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wide { grid-column: 1 / -1; }
label { font-weight: 610; }
input, textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  color: inherit;
  background: #fff;
  border: 1px solid #aabcca;
  border-radius: 6px;
}
input[readonly] { background: #f5f8fa; }
textarea { resize: vertical; }
small, .muted, .optional { color: #546777; font-size: .875rem; }
.optional { font-weight: 400; }
.muted { margin-bottom: 0; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 9px 14px;
  min-height: 42px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #aabcca;
  color: inherit;
  text-decoration: none;
  font-weight: 610;
  white-space: nowrap;
}
.button:hover { background: #eef4f7; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: #07577d; }
.notice { border-radius: 6px; padding: 10px 13px; margin-bottom: 16px; }
.error { background: #fff0ed; color: #982a1b; }
.success { background: #e9f7ef; color: #196743; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.mobile-share { display: none; }
.save-bar { display: flex; gap: 8px; }
.optional-fields summary { cursor: pointer; font-weight: 610; padding-block: 8px; }
.optional-fields .form { padding-block: 8px; }
.qr { scroll-margin-top: 12px; }
.qr img { display: block; margin: 0 auto 14px; max-width: 100%; height: auto; }
.qr .actions, .qr input { margin-bottom: 12px; }
.qr label { display: block; margin-bottom: 6px; }
.search { display: flex; align-items: center; gap: 8px; }
.search input { max-width: 360px; }
.items { list-style: none; padding: 0; margin: 14px 0 0; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.item-number { font-weight: 700; }
.item-description { font-size: .9rem; color: #546777; }
.item > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.item > .actions { flex-shrink: 0; }
.empty { color: #546777; padding-block: 26px 8px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding-top: 12px; }
.message { max-width: 490px; margin: 36px auto; }
.result-editor { padding-block: 14px; border-block: 1px solid var(--line); }
.result-editor h2 { margin-bottom: 4px; }
.result-rows { display: grid; gap: 8px; margin-block: 10px; }
.result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  background: #f4f8fa;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.result-row .field { font-size: .9rem; gap: 4px; }
.result-row input { font-size: 1rem; padding-inline: 8px; }
.remove-result { font-size: .875rem; min-width: 44px; min-height: 44px; }
.result-editor .button:disabled { opacity: .55; cursor: default; }

.public-page { background: #fff; min-height: 100vh; }
.report {
  --report-blue: #097eaf;
  --report-line: #e1e1e1;
  --sample-blue: #e6f4fa;
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right));
  color: #101010;
  font: 700 clamp(.875rem, 3.75vw, 1.35rem)/1.45 Arial, "Microsoft YaHei", sans-serif;
}
.report-heading { text-align: center; color: #fff; background: var(--report-blue); padding: 8px; }
.report-heading h1 { margin: 0; font-size: clamp(1rem, 4.3vw, 1.6rem); line-height: 1.35; overflow-wrap: anywhere; }
.report table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.report th, .report td { border: 2px solid var(--report-line); padding: .82em .4em; text-align: left; background: #fff; }
.report-details th { text-align: center; }
.detail-label-col { width: 22%; }
.result-value-col { width: 20%; }
.report td { white-space: pre-wrap; overflow-wrap: anywhere; }
.report-results { margin-top: -2px; }
.report-results caption {
  background: var(--sample-blue);
  padding: .25em .4em;
  border: 2px solid var(--report-line);
  border-bottom: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.report .report-results th, .report .report-results td { text-align: center; }
.report-explanation, .report-note {
  margin: 0;
  border: 2px solid var(--report-line);
  border-top: 0;
  text-align: center;
  padding: .65em .45em;
  overflow-wrap: anywhere;
}
.report-explanation, .report-note p { white-space: pre-wrap; }
.report-note { background: #fff; font-size: .95em; line-height: 1.65; }
.report-note p { margin: 0; }
.report-note p + p { margin-top: .25em; }
.report-note span {
  background: var(--report-blue);
  color: #fff;
  padding: .08em .15em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@media (max-width: 680px) {
  .top-inner, .workspace { width: auto; margin-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
  .top-inner { min-height: 56px; }
  .top-actions a, .top-actions .plain, .item .actions a { display: inline-flex; align-items: center; min-height: 44px; }
  .workspace { padding-block: 16px; }
  .workspace.narrow { padding-top: 30px; }
  .editor-layout, .fields { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 14px; }
  .field, .fields, .form { gap: 8px; }
  .admin-page input, .admin-page textarea, .admin-page .button { min-height: 44px; }
  .admin-page input, .admin-page textarea { scroll-margin-block: 16px 88px; }
  .search { flex-wrap: wrap; }
  .search input { flex: 1 1 155px; max-width: none; }
  .item { align-items: flex-start; flex-direction: column; gap: 0; padding-bottom: 4px; }
  .item .actions a { padding-inline: 6px; }
  .result-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; padding: 8px; }
  #add-result { width: 100%; }
  .optional-fields summary { min-height: 44px; }
  .editor-layout { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .save-bar {
    position: fixed;
    z-index: 2;
    inset: auto 0 0;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .save-bar .primary { flex: 1; }
  .mobile-share { display: inline-flex; }
  .qr .actions > a { flex: 1; }
  .detail-label-col { width: 33%; }
  .result-value-col { width: 28%; }
  .message { margin: 24px 16px; }
}
