:root {
  color: #1d2420;
  background: #f5f4ef;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
}

* { box-sizing: border-box; }

/* Progress and result areas are revealed only by the page script. */
[hidden] { display: none !important; }

body { margin: 0; min-width: 320px; }

.page-shell {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 28px;
}

.hero { margin-bottom: 18px; }

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 7vw, 50px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.05;
}

h2 { font-size: 22px; font-weight: 500; }

.intro { margin-bottom: 0; color: #5e6660; font-size: 16px; line-height: 1.65; }

.overview {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 3px solid #71856a;
  background: #ebeee7;
}

.overview p { margin: 0; color: #4f5c51; font-size: 14px; line-height: 1.65; }

.review-card, .result {
  border: 1px solid #d9ddd4;
  border-radius: 3px;
  background: #fffefa;
  box-shadow: 0 15px 40px rgba(47, 58, 47, .07);
}

.review-card { padding: 24px; }
.review-card h2 { margin-bottom: 18px; }

form { display: grid; gap: 16px; }

.field-title { display: block; margin-bottom: 8px; font-size: 16px; font-weight: 700; }

.file-field, .code-field { display: block; }

.file-field {
  min-height: 154px;
  padding: 20px;
  border: 1.5px dashed #859780;
  border-radius: 3px;
  text-align: center;
  cursor: pointer;
}

.file-plus { display: block; margin-bottom: 4px; color: #58704d; font: 32px/1 Arial, sans-serif; }
.file-name { color: #6b746d; font-size: 14px; }

input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

input[type="text"] {
  width: 100%;
  padding: 14px;
  border: 1px solid #bfc7bc;
  border-radius: 2px;
  background: #fff;
  color: inherit;
  font: inherit;
  outline: none;
}

input[type="text"]:focus, .file-field:focus-within { border-color: #58704d; box-shadow: 0 0 0 3px rgba(88,112,77,.12); }

button {
  padding: 16px 20px;
  border: 0;
  border-radius: 2px;
  background: #344c37;
  color: white;
  cursor: pointer;
  font: 700 16px/1 Arial, sans-serif;
}

button:hover:not(:disabled) { background: #263b29; }
button:disabled { cursor: wait; opacity: .6; }

.privacy-note { margin: 16px 0 0; color: #7a817b; font-size: 12px; line-height: 1.55; }

.disclaimer {
  margin-top: 18px;
  padding: 15px 18px;
  border: 1px solid #ded7c9;
  background: #fbf8f1;
}

.disclaimer h2 { margin-bottom: 7px; font-size: 16px; }
.disclaimer p { margin-bottom: 5px; color: #665f54; font-size: 12px; line-height: 1.55; }
.disclaimer p:last-child { margin-bottom: 0; }

.site-footer {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  color: #7a817b;
  font: 13px/1.6 Arial, sans-serif;
}

.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #405b44; text-decoration: underline; }

.progress { display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; margin: 24px 0; padding: 24px 16px; text-align: center; }
.progress p { margin: 0; }
#progress-title { font-size: 18px; font-weight: 700; }
#progress-detail { margin-top: 5px; color: #69716b; font-size: 15px; line-height: 1.65; }

.spinner { display: none; width: 28px; height: 28px; border: 3px solid #c7cec4; border-top-color: #405b44; border-radius: 50%; animation: spin .8s linear infinite; }
.progress.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.result { margin-top: 32px; padding: 34px; }
.result-heading { border-bottom: 1px solid #e2e4df; margin-bottom: 24px; }
.result-heading h2 { margin-bottom: 18px; }

pre { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; color: #303631; font: 15px/1.9 "Noto Serif SC", "Songti SC", SimSun, serif; }

@media (max-width: 560px) {
  .page-shell { width: min(100% - 28px, 720px); padding-top: 26px; }
  .review-card, .result { padding: 20px; }
  .file-field { min-height: 142px; }
}
