:root {
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #223733;
  background: #f4f7f6;
  font-synthesis: none;
  --teal: #08796d;
  --border: #dde6e2;
  --muted: #788780;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  text-decoration: none;
  color: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #5eb9aa;
  outline-offset: 3px;
}
i,
[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  flex-shrink: 0;
}
svg {
  display: block;
  width: 20px;
  height: 20px;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
.wrap {
  width: min(1200px, calc(100% - 80px));
  margin: auto;
}
header {
  background: white;
  border-bottom: 1px solid var(--border);
}
.top {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0.5px;
}
.brandmark {
  width: 39px;
  height: 39px;
  color: white;
  background: #09786d;
  border-radius: 12px;
}
.brandmark svg {
  width: 28px;
  height: 28px;
}
.brandline {
  width: 1px;
  height: 17px;
  background: #d6dfdb;
}
.subbrand {
  color: #73817c;
  font-size: 14px;
}
.top nav {
  display: flex;
  align-self: stretch;
  margin-left: 32px;
  gap: 30px;
}
.top nav a {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
  font-size: 14px;
  color: #62736d;
  font-weight: 600;
}
.top nav a.active {
  color: var(--teal);
}
.top nav a.active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--teal);
  border-radius: 2px;
}
.top nav svg,
.today svg {
  width: 17px;
  height: 17px;
}
.today {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64766f;
  font-size: 13px;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 26px 0 22px;
  border-radius: 17px;
  background: linear-gradient(112deg, #134e4b 0%, #14635a 56%, #4b8c76 100%);
  color: white;
  min-height: 167px;
  display: flex;
  align-items: center;
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.herotext {
  padding: 22px 34px;
}
.herolabel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #95cfb865;
  border-radius: 20px;
  background: #c7eee310;
  font-size: 11px;
  color: #ddf2e6;
  padding: 3px 9px;
  letter-spacing: 1px;
}
.herolabel svg {
  width: 13px;
  height: 13px;
}
h1 {
  font-size: clamp(29px, 3vw, 40px);
  letter-spacing: 1px;
  line-height: 1.3;
  margin: 10px 0 6px;
}
.hero p {
  font-size: 14px;
  color: #d1e5da;
  letter-spacing: 0.4px;
  margin: 0;
}
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 3px 12px #193e2f04;
  overflow: hidden;
}
.cardheading,
.headtitle,
.rowtitle,
.formtitle,
.actions,
.actions > div {
  display: flex;
  align-items: center;
}
.cardheading,
.rowtitle,
.actions {
  justify-content: space-between;
}
.cardheading {
  padding: 20px 24px;
}
.headtitle {
  gap: 10px;
}
.headingicon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e5f3ed;
  color: var(--teal);
}
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: 19px;
  letter-spacing: 0.4px;
}
h3 {
  font-size: 16px;
}
.steptag {
  font-size: 12px;
  color: #43786a;
  background: #f0f6f2;
  border-radius: 7px;
  padding: 5px 10px;
  font-variant-numeric: tabular-nums;
}
.steps {
  display: flex;
  margin: 0 24px 0;
  position: relative;
  padding: 0 0 17px;
  gap: 5px;
  border-bottom: 1px solid #e7ede9;
}
.step {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  font-size: 13px;
  color: #7c8882;
  white-space: nowrap;
  padding: 7px 0;
}
.step:not(:last-child):after {
  content: "";
  height: 1px;
  flex: 1;
  margin: 0 7px;
  background: #dee6e1;
}
.step:last-child {
  flex: 0;
}
.step span {
  color: #74837b;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #f0f3f0;
  font-size: 12px;
  font-weight: 650;
}
.step.current,
.step.past {
  color: var(--teal);
  font-weight: 650;
}
.step.current span {
  background: var(--teal);
  color: white;
  box-shadow: 0 0 0 3px #e4f1eb;
}
.step.past span {
  background: #dcefe5;
  color: var(--teal);
}
.formbody {
  padding: 22px 24px 25px;
}
.formtitle {
  gap: 9px;
  margin-bottom: 20px;
}
.bar {
  width: 4px;
  height: 16px;
  background: #168679;
  border-radius: 4px;
}
.requirednote {
  margin-left: auto;
  color: #7c8881;
  font-size: 12px;
}
b {
  color: #c56550;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 19px 20px;
}
.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field.wide {
  grid-column: 1/-1;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.field label b {
  margin-left: 4px;
}
.control {
  position: relative;
  display: flex;
  align-items: center;
}
.control input,
.control select,
.control textarea,
.search input {
  width: 100%;
  min-width: 0;
  outline: 0;
  color: #263b34;
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  font-size: 14px;
  line-height: 20px;
  height: 43px;
  transition: border-color 0.15s;
}
.control input:focus,
.control select:focus,
.control textarea:focus,
.search input:focus {
  border-color: #138a7c;
  box-shadow: 0 0 0 3px #0c807014;
}
.control input::placeholder,
.control textarea::placeholder,
.search input::placeholder,
.control select:invalid {
  color: #939d97;
}
.control select {
  appearance: none;
  padding-right: 33px;
}
.control i {
  color: #8b9b92;
  pointer-events: none;
}
.control .leading {
  position: absolute;
  left: 12px;
}
.leading svg,
.trailing svg {
  width: 16px;
  height: 16px;
}
.leading + input {
  padding-left: 36px;
}
.control .trailing {
  position: absolute;
  right: 12px;
}
.control textarea {
  height: 92px;
  resize: vertical;
}
.actions {
  padding: 17px 24px;
  background: #fafcfb;
  border-top: 1px solid #e5ebe7;
  gap: 8px;
}
.actions > div {
  gap: 8px;
}
.primary,
.secondary,
.locbtn,
.prev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13px;
  min-height: 39px;
}
.primary {
  color: white;
  background: var(--teal);
}
.primary:hover {
  background: #06695e;
}
.secondary {
  background: white;
  border: 1px solid #d6e0d9;
  color: #54665d;
}
.actions svg,
.album svg,
.locbtn svg {
  width: 16px;
  height: 16px;
}
.fieldwork {
  display: grid;
  gap: 16px;
}
.fieldwork .cardheading {
  padding: 18px 20px 15px;
  border-bottom: 1px solid #e6ece8;
}
.fieldwork h2 {
  font-size: 17px;
}
.fieldwork .headingicon {
  width: 30px;
  height: 30px;
}
.fieldwork .headingicon svg {
  width: 18px;
}
.collectbody {
  padding: 17px 20px 19px;
}
.rowtitle h3 {
  font-size: 14px;
}
.rowtitle > span {
  font-size: 12px;
  color: #839087;
}
.upload {
  border: 1px dashed #98c5b6;
  background: #f3f9f5;
  border-radius: 10px;
  margin-top: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 13px 0 9px;
}
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  color: #276e5e;
}
.camerabubble {
  width: 46px;
  height: 43px;
  border-radius: 13px;
  background: #dcefe4;
  margin-bottom: 3px;
}
.camerabubble svg {
  width: 25px;
  height: 25px;
}
.drop strong {
  font-size: 14px;
}
.drop small,
.toolrow small {
  font-size: 12px;
  color: #829088;
}
.album {
  display: flex;
  gap: 5px;
  align-items: center;
  color: #528574;
  font-size: 12px;
  padding: 7px 12px 3px;
}
.album svg {
  width: 13px;
  height: 13px;
}
.geoblock {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e6ece8;
}
.status {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  background: #f1f3ef;
  border-radius: 12px;
  padding: 2px 8px;
}
.status:before {
  content: "";
  width: 6px;
  height: 6px;
  background: #98a398;
  border-radius: 50%;
}
.status.located:before {
  background: var(--teal);
}
.locbtn {
  width: 100%;
  margin-top: 10px;
  background: #edf6f0;
  color: var(--teal);
  border: 1px solid #cce3d6;
}
.msg,
#coords {
  font-size: 12px;
  color: #687b70;
  line-height: 1.6;
}
.msg:not(:empty),
#coords:not(:empty) {
  margin-top: 8px;
}
.toolrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 20px;
  padding: 14px 0;
}
.toolrow + .toolrow {
  border-top: 1px solid #edf0ed;
}
.toolicon {
  color: #73867c;
  background: #f0f4f0;
  border-radius: 10px;
  width: 36px;
  height: 36px;
}
.toolrow strong,
.toolrow small {
  display: block;
}
.toolrow strong {
  font-size: 14px;
  margin-bottom: 3px;
}
.soon {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 1px;
  background: #f4f5f2;
  color: #869187;
  padding: 3px 7px;
  border-radius: 5px;
}
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #87968c;
  font-size: 11px;
  margin: 23px 0;
}
.footerlogo svg {
  width: 16px;
  height: 16px;
}
#photos:not(:empty) {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.thumb {
  position: relative;
}
.thumb button:first-child {
  display: block;
  padding: 0;
}
.thumb img {
  width: 66px;
  height: 66px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.remove {
  position: absolute;
  right: 0;
  top: 0;
  background: #233e36cf;
  color: white;
  border-radius: 0 8px;
  font-size: 16px;
  line-height: 18px;
}
.recordbody {
  padding: 0 24px 22px;
}
.search {
  display: flex;
  position: relative;
  align-items: center;
  max-width: 450px;
}
.search i {
  position: absolute;
  left: 12px;
  color: #829389;
}
.search input {
  padding-left: 40px;
}
.entry {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.entry small {
  display: block;
  margin-top: 5px;
  color: #75857c;
}
.entry > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.entry i:last-child {
  margin-left: auto;
}
.empty {
  text-align: center;
  color: #778980;
  padding: 36px 0;
}
.empty i {
  display: flex;
  margin: 0 auto 9px;
}
.tag {
  display: inline-block;
  font-size: 11px;
  color: #497663;
  background: #e9f3eb;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #173e35;
  color: white;
  max-width: 90vw;
  padding: 11px 18px;
  border-radius: 10px;
  z-index: 5;
  font-size: 13px;
  box-shadow: 0 5px 24px #193d3326;
}
#toast:empty,
[hidden] {
  display: none !important;
}
dialog {
  border: 0;
  padding: 24px;
  border-radius: 14px;
  max-width: min(90vw, 640px);
  color: #234137;
}
dialog::backdrop {
  background: #122a23aa;
}
#preview {
  padding: 8px;
  min-width: 54px;
  min-height: 54px;
}
#preview img {
  display: block;
  margin: auto;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
}
#closePreview {
  position: absolute;
  right: 12px;
  top: 12px;
  background: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 21px;
}
#confirm p {
  margin: 14px 0 20px;
}
#confirm div {
  display: flex;
  gap: 10px;
}
.prev {
  padding: 10px;
  color: #526c60;
}
.error input,
.error select {
  border-color: #b34b3e;
}
.fieldError {
  font-size: 12px;
  color: #ab4739;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.wrap {
  width: calc(100% - 28px);
}
.top {
  gap: 7px;
  height: 59px;
}
.brand {
  font-size: 17px;
  gap: 7px;
}
.brandmark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.brandmark svg {
  width: 23px;
}
.brandline,
.subbrand,
.today {
  display: none;
}
.top nav {
  margin-left: auto;
  gap: 16px;
}
.top nav a {
  font-size: 12px;
  gap: 4px;
}
.top nav svg {
  width: 15px;
}
.hero {
  margin: 14px 0;
  min-height: 136px;
  border-radius: 13px;
}
.herotext {
  padding: 18px;
}
.hero p {
  font-size: 12px;
  max-width: 225px;
  line-height: 1.6;
}
.hero canvas {
  opacity: 0.84;
}
.steps {
  margin: 0 16px;
}
.step {
  gap: 5px;
}
.step span {
  width: 22px;
  height: 22px;
}
.formbody {
  padding: 18px 16px 20px;
}
.fields {
  gap: 15px 12px;
}
.field label {
  font-size: 13px;
}
.control input,
.control select,
.control textarea {
  font-size: 16px;
}
.actions {
  padding: 13px 16px;
}
.cardheading {
  padding: 16px;
}
.steptag {
  font-size: 11px;
}
h2 {
  font-size: 17px;
}
.formtitle {
  margin-bottom: 16px;
}
.fieldwork {
  gap: 14px;
}
.hero h1 {
  font-size: 28px;
}
.card {
  border-radius: 12px;
}
.toolrow {
  padding: 12px 0;
}
.recordbody {
  padding: 0 16px 18px;
}
.herolabel {
  font-size: 10px;
}
.today {
  display: none;
}
footer {
  font-size: 10px;
}
.step {
  flex: 1;
  justify-content: center;
}
.step:last-child {
  flex: 1;
}
.step:not(:last-child):after {
  display: none;
}
.steps {
  margin-left: 10px;
  margin-right: 10px;
}
.step {
  font-size: 12px;
  gap: 4px;
}
@media (max-width: 365px) {
  .step {
    font-size: 11px;
  }
  .step span {
    width: 18px;
    height: 18px;
  }
  .wrap {
    width: calc(100% - 20px);
  }
  .steps {
    margin: 0 12px;
  }
  .actions {
    padding: 12px;
  }
  .actions button {
    padding: 9px 10px;
  }
  .top nav {
    gap: 10px;
  }
}
@media (max-width: 375px) {
  .step {
    font-size: 11px;
    gap: 3px;
  }
  .step span {
    width: 19px;
    height: 19px;
  }
}

html {
  background: #e8eeeb;
}
body {
  max-width: 440px;
  min-height: 100dvh;
  margin-inline: auto;
  background: #f4f7f6;
}
.fields {
  grid-template-columns: minmax(0, 1fr);
}
.field label {
  font-size: 14px;
}
.control input,
.control select {
  height: 46px;
}
.actions {
  position: fixed;
  z-index: 3;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 440px);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: white;
  box-shadow: 0 -3px 14px #24423809;
}
.actions button,
.locbtn,
.album,
.step {
  min-height: 44px;
}
body:has(#survey:not([hidden])) {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
.fieldwork {
  padding: 0 15px 16px;
}
.fieldwork .card {
  box-shadow: none;
}
#toast {
  bottom: calc(78px + env(safe-area-inset-bottom));
}
.field input,
.field textarea {
  scroll-margin-bottom: 90px;
}

/* Stack step numbers over their labels to fit all five stops on a phone. */
.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0 12px 14px;
  padding-bottom: 12px;
}
.step {
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 4px 0;
}
.visit-audio {
  margin: 0 20px 18px;
  padding-top: 16px;
  border-top: 1px solid #e6ece8;
}
.audio-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 11px;
}
.audio-actions button {
  padding: 9px 5px;
  min-height: 44px;
}
.audio-actions svg {
  width: 16px;
  height: 16px;
}
#recordAudio.recording {
  background: #9b4137;
}
.audio-item {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e6ece8;
}
.audio-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  font-size: 13px;
}
.audio-item strong {
  overflow-wrap: anywhere;
  min-width: 0;
}
.audio-item button {
  flex-shrink: 0;
  min-height: 40px;
  color: #915447;
}
.audio-item audio {
  display: block;
  width: 100%;
  height: 38px;
}
#assessVisit {
  margin-left: auto;
  flex-shrink: 0;
}
.assessment {
  margin: 0 20px 16px;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.assessment:has(#assessmentStatus:empty):has(#assessmentResult:empty):has(
    #clipSummaries:empty
  ) {
  display: none;
}
.assessment h4 {
  margin: 12px 0 4px;
}
.assessment p {
  margin: 4px 0;
  white-space: pre-wrap;
}
.assessment ul {
  padding-left: 1.4em;
  margin: 4px 0;
}
.assessment details,
.assessment small,
#assessmentStatus {
  color: #53685e;
}
.assessment summary {
  cursor: pointer;
}
#assessmentResult:not(:empty),
#clipSummaries:not(:empty) {
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 6px;
}
.urgent {
  background: #fff0ec;
  color: #922b1e;
  padding: 10px 12px;
  border-left: 3px solid #b43a26;
}
[data-level="红色"] {
  color: #a32925;
}
[data-level="橙色"] {
  color: #994408;
}
[data-level="黄色"] {
  color: #785b0b;
}
[data-level="绿色"] {
  color: #09685a;
}
