:root {
  color: #17332d;
  background: #f4f7f5;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  display: grid;
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background: #f4f7f5;
}

button, input, select, textarea { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }

.submit-shell {
  width: min(100%, 820px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
}

.submit-card {
  overflow: hidden;
  border: 1px solid #d8e2de;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(22, 58, 49, 0.08);
}

.intro {
  padding: 30px 34px 22px;
  border-bottom: 1px solid #e3eae7;
}
.intro h1 {
  margin: 0;
  color: #17332d;
  font-size: clamp(25px, 4vw, 31px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.link-state {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 24px 34px 0;
  padding: 12px 14px;
  border: 1px solid #efc3bb;
  border-radius: 12px;
  color: #8f3328;
  background: #fff3f0;
  font-size: 13px;
  line-height: 1.5;
}
.link-state[hidden] { display: none; }
.state-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 6px; border-radius: 999px; background: #c75445; box-shadow: 0 0 0 4px rgba(199, 84, 69, 0.12); }

form { display: grid; gap: 20px; padding: 26px 34px 34px; }
form[hidden], .result-card[hidden] { display: none; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 0.82fr); gap: 18px; }
.field-group { display: grid; gap: 9px; }
.field-group label, .field-label { color: #24463e; font-size: 14px; font-weight: 700; }
.week-readonly > strong { display: flex; align-items: center; min-height: 52px; padding: 0 14px; border: 1px solid #d8e2de; border-radius: 12px; color: #23463d; background: #f6f8f7; font-size: 15px; font-weight: 700; }

input[type="text"], select, textarea {
  width: 100%; border: 1px solid #c8d8d2; border-radius: 13px;
  color: #17332d; background: #fff; outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
input[type="text"], select { min-height: 52px; padding: 0 14px; }
textarea { min-height: 78px; padding: 13px 14px; resize: vertical; }
input[type="text"]:focus, select:focus, textarea:focus { border-color: #16745f; box-shadow: 0 0 0 4px rgba(22, 116, 95, 0.13); }

.dropzone {
  display: grid; min-height: 154px; place-items: center; align-content: center;
  gap: 7px; padding: 22px; border: 1.5px dashed #91b5aa; border-radius: 16px;
  color: #24574b; background: #f6faf8; cursor: pointer; text-align: center;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}
.dropzone:hover, .dropzone:focus-within, .dropzone.is-dragging { border-color: #0f6b58; background: #eaf6f1; transform: translateY(-1px); }
.dropzone strong { font-size: 16px; }
.dropzone > span:not(.upload-symbol) { color: #71827c; font-size: 12px; font-weight: 400; line-height: 1.5; }
.dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.upload-symbol { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; color: #fff; background: #176f5d; }
.upload-symbol svg { width: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }

.selection { border: 1px solid #dce6e2; border-radius: 14px; color: #71857e; background: #fbfcfc; }
.selection[hidden] { display: none; }
.selection-head { display: flex; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid #e2eae7; color: #31554c; font-size: 13px; }
.selection ul { max-height: 230px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.selection li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px; border-bottom: 1px solid #edf1ef; }
.selection li:last-child { border-bottom: 0; }
.file-meta { min-width: 0; }
.file-meta strong, .file-meta small { display: block; }
.file-meta strong { overflow: hidden; color: #2a4840; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.file-meta small { margin-top: 3px; color: #82928d; font-size: 11px; }

.selection button, .result-card button { flex: 0 0 auto; border: 0; border-radius: 9px; color: #12614f; background: #e7f3ef; cursor: pointer; }
.selection button { padding: 7px 9px; font-size: 12px; }
.submit-button {
  min-height: 54px; border: 0; border-radius: 13px; color: #fff;
  background: #176f5d;
  box-shadow: 0 8px 20px rgba(19, 94, 77, 0.18); cursor: pointer;
  font-weight: 700;
}
.submit-button:hover { filter: brightness(1.04); }
.submit-button:disabled { cursor: wait; opacity: 0.68; }
.selection button:focus-visible, .result-card button:focus-visible, .submit-button:focus-visible, .dropzone:focus-within { outline: 3px solid rgba(23, 126, 105, 0.28); outline-offset: 3px; }

.result-card {
  display: grid; grid-template-columns: auto 1fr; gap: 16px;
  margin: 28px 34px 34px; padding: 22px; border: 1px solid #b9daca;
  border-radius: 18px; background: #f0f8f4;
}
.result-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: white; background: #178269; font-size: 22px; font-weight: 800; }
.result-card h2 { margin: 2px 0 6px; font-size: 19px; }
.result-card p, .result-card small { margin: 0; line-height: 1.65; }
.result-card p { color: #31574d; font-size: 14px; }
.result-card small { display: block; margin-top: 7px; color: #667f78; font-size: 12px; }
.result-card button { grid-column: 2; justify-self: start; margin-top: 4px; padding: 9px 13px; font-weight: 700; }

@media (max-width: 680px) {
  body { background: #fff; }
  .submit-shell { width: 100%; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  .submit-card { min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .intro { padding: 24px 20px 18px; }
  .intro h1 { font-size: 25px; }
  .link-state { margin: 18px 20px 0; }
  form { gap: 18px; padding: 22px 20px 28px; }
  .form-row { grid-template-columns: 1fr; gap: 18px; }
  .dropzone { min-height: 136px; padding: 18px 14px; }
  .submit-button { min-height: 52px; }
  .result-card { margin: 22px 20px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
