.entry-dialog {
  --ed-ink: #163e34;
  --ed-muted: #596a5f;
  --ed-border: #d0d8ca;
  --ed-paper: #fffef8;
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(540px,calc(100vw - 32px));
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid #c9d3c2;
  border-radius: 22px;
  box-shadow: 0 18px 80px #12352944;
  color: var(--ed-ink);
  background: var(--ed-paper);
  font: 400 16px/1.55 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
}

.entry-dialog::backdrop {
  background: rgb(11 37 30 / 48%);
}

.entry-dialog *, .entry-dialog *::before,.entry-dialog *::after {
  box-sizing: border-box;
}

.entry-dialog [hidden] {
  display: none!important;
}

.entry-dialog .ed-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 44px);
  margin: 0;
}

.entry-dialog .ed-head,.entry-dialog .ed-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.entry-dialog .ed-head {
  padding: 24px 28px 17px;
  border-bottom: 1px solid #dfe4d9;
}

.entry-dialog .ed-head h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.055em;
}

.entry-dialog .ed-eyebrow {
  font-size: 12px;
  letter-spacing: .09em;
  color: var(--ed-muted);
  margin-bottom: 3px;
}

.entry-dialog .ed-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px 28px 8px;
}

.entry-dialog button {
  cursor: pointer;
  font: inherit;
  color: var(--ed-ink);
}

.entry-dialog button:disabled {
  cursor: default;
  opacity: .58;
}

.entry-dialog .ed-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ed-border);
  background: #f4f5eb;
  border-radius: 50%;
}

.entry-dialog .ed-icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.entry-dialog button:focus-visible,.entry-dialog input:focus-visible,.entry-dialog select:focus-visible,.entry-dialog textarea:focus-visible {
  outline: 3px solid #6c974f;
  outline-offset: 2px;
}

.entry-dialog .ed-kinds {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 4px;
  background: #f0f2e7;
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.entry-dialog .ed-kinds button {
  min-height: 43px;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 15px;
  font-weight: 650;
}

.entry-dialog .ed-kinds button[aria-pressed=true] {
  background: #17473a;
  color: white;
}

.entry-dialog fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
}

.entry-dialog .ed-field {
  display: block;
  margin: 0 0 15px;
  font-size: 15px;
  font-weight: 650;
}

.entry-dialog .ed-field small {
  color: var(--ed-muted);
  font-size: 12px;
  font-weight: 400;
}

.entry-dialog :is(input:not([type=file]),select,textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 6px 0 0;
  min-height: 46px;
  padding: 9px 12px;
  font-family: inherit;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ed-ink);
  border: 1px solid var(--ed-border);
  border-radius: 10px;
  background: white;
}

.entry-dialog textarea {
  resize: vertical;
  min-height: 72px;
}

.entry-dialog :is(input,textarea)::placeholder {
  color: #788579;
  font-weight: 400;
  opacity: 1;
}

.entry-dialog .ed-reading {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 0 15px 0 0;
  border: 1px solid var(--ed-border);
  border-radius: 10px;
  background: #fff;
}

.entry-dialog .ed-reading input {
  margin: 0;
  border: 0;
  flex: 1;
  font-size: 26px;
  font-weight: 600;
  min-height: 51px;
  padding-block: 4px;
}

.entry-dialog .ed-reading span {
  font-size: 14px;
  font-weight: 500;
  color: var(--ed-muted);
}

.entry-dialog .ed-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.entry-dialog .ed-photo-box {
  padding: 12px;
  margin-top: 6px;
  border: 1px dashed #abbba4;
  background: #f4f5eb;
  border-radius: 12px;
}

.entry-dialog .ed-preview {
  display: block;
  width: 100%;
  max-height: 152px;
  object-fit: contain;
  margin-bottom: 10px;
  border-radius: 6px;
}

.entry-dialog .ed-photo-actions,.entry-dialog .ed-candidates {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.entry-dialog .ed-secondary,.entry-dialog .ed-recognize,.entry-dialog .ed-candidates button,.entry-dialog .ed-danger,.entry-dialog .ed-plain,.entry-dialog .ed-delete {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--ed-border);
  border-radius: 9px;
  padding: 5px 12px;
  background: white;
  font-size: 14px;
  font-weight: 600;
}

.entry-dialog .ed-plain,.entry-dialog .ed-delete {
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-dialog .ed-recognize {
  margin-top: 11px;
  color: #204c33;
  background: #e2eeb4;
  border-color: #c9d99a;
}

.entry-dialog .ed-photo-status {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 450;
  color: var(--ed-muted);
}

.entry-dialog .ed-candidates {
  margin-top: 8px;
}

.entry-dialog .ed-candidates button {
  min-height: 38px;
  border-radius: 20px;
}

.entry-dialog .ed-alert,.entry-dialog .ed-safety,.entry-dialog .ed-verify {
  border-radius: 10px;
  margin: 7px 0 14px;
  padding: 12px 15px;
  background: #fff0e8;
  color: #753820;
  font-size: 14px;
}

.entry-dialog .ed-verify strong,.entry-dialog .ed-verify span {
  display: block;
}

.entry-dialog .ed-verify>div {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.entry-dialog .ed-danger {
  background: #873e29;
  color: white;
  border: 0;
}

.entry-dialog .ed-footer {
  justify-content: flex-end;
  gap: 16px;
  padding: 14px 28px 19px;
  border-top: 1px solid #dfe4d9;
  background: var(--ed-paper);
}

.entry-dialog .ed-delete {
  color: #823b28;
  margin-right: auto;
  padding-inline: 0;
}

.entry-dialog .ed-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 25px;
  border-radius: 24px;
  border: 0;
  background: #154436;
  color: white;
  font-weight: 650;
}

@media (max-width:600px) {
  .entry-dialog {
    inset: auto 0 0;
    width: 100%;
    max-height: 94dvh;
    margin: 0;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .entry-dialog .ed-form {
    max-height: calc(94dvh - env(safe-area-inset-bottom) - 2px);
  }
  .entry-dialog .ed-head {
    padding: 17px 19px 13px;
  }
  .entry-dialog .ed-scroll {
    padding: 17px 19px 6px;
  }
  .entry-dialog .ed-footer {
    padding: 12px 19px;
  }
  .entry-dialog .ed-save {
    min-width: 140px;
  }
}
