:root {
  color-scheme: light;
  --ink: #172923;
  --muted: #50635b;
  --accent: #235e4e;
  --accent-hover: #174a3c;
  --line: #d5e1d9;
  --surface: #fff;
  --background: #edf3ef;
  --danger: #942e2b;
  --shadow: 0 14px 40px #1d433812;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--background); }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
button, input, textarea, select { font: inherit; }

.landing-page {
  --ink: #142c22;
  --muted: #52685c;
  --accent: #1b6148;
  --accent-hover: #144e3a;
  --line: #dce7df;
  min-height: 100vh;
  background: radial-gradient(ellipse at center top, #dfeee4, #f4f7f4 620px);
}
.public-shell { width: min(756px, 100%); margin: 0 auto; padding: 48px 24px 56px; }
.intro {
  overflow: hidden;
  border-radius: 26px;
  color: #f6fbf8;
  background: linear-gradient(130deg, #153e30, #1d503e 65%, #28634b);
  box-shadow: 0 12px 32px #14392c22;
}
.hero-image {
  display: block;
  width: 100%;
  max-height: 470px;
  max-height: min(55svh, 470px);
  object-fit: contain;
  background: #153e30;
}
.intro-inner { position: relative; isolation: isolate; overflow: hidden; padding: 36px 38px 40px; }
.intro-inner::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 295px;
  aspect-ratio: 1;
  top: -175px;
  right: -100px;
  border: 1px solid #c8f3d94c;
  border-radius: 50%;
  box-shadow: 0 0 0 24px #c8f3d919, 0 0 0 52px #c8f3d912, 0 0 0 82px #c8f3d908;
  pointer-events: none;
}
.intro h1 { font-size: clamp(1.9rem, 6.8vw, 2.7rem); font-weight: 750; line-height: 1.18; }
.description { max-width: 48ch; margin-top: 13px; color: #e1eee7; line-height: 1.65; white-space: pre-wrap; }
.intro .intro-action { margin-top: 23px; min-height: 46px; padding-inline: 20px; color: #184433; background: #eff9ef; }
.intro-action:hover { background: #dcf2df; }
.intro-action:focus-visible { outline-color: #d8efdf; }
.intro-action span { font-size: 1.07em; line-height: 1; }
.form-mark {
  display: inline-flex;
  flex-direction: column;
  flex: 0 0 auto;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  padding-inline-start: 9px;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  border: 1px solid currentColor;
  color: #ecf7f0;
}
.form-mark i { display: block; width: 15px; height: 2px; border-radius: 2px; background: currentColor; }
.form-mark i:last-child { width: 10px; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.public-panel { margin-top: 19px; padding: 27px 32px 31px; min-height: 100px; border-radius: 22px; }
.public-panel-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 21px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.public-panel-heading h2 { scroll-margin-top: 17px; }
.public-panel-heading .field-hint { margin: 0; }
.field-hint, .muted { color: var(--muted); font-size: .9rem; }
.field-hint { margin-bottom: 16px; }
.required { color: #a03c30; }
.question { margin: 0; min-width: 0; padding: 0; border: 0; }
.question + .question { margin-top: 22px; }
.question-label { display: block; padding: 0; margin-bottom: 8px; font-weight: 650; overflow-wrap: anywhere; }
input:not([type=radio]):not([type=checkbox]), textarea, select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #b8c9bf;
  border-radius: 8px;
  background-color: #fcfefd;
  color: var(--ink);
}
textarea { resize: vertical; }
input[type=radio], input[type=checkbox] { width: 18px; height: 18px; flex-shrink: 0; margin: 0; accent-color: var(--accent); }
:focus-visible { outline: 2px solid #2a7760; outline-offset: 3px; }
.choices, .stack { display: grid; gap: 13px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.choice span { overflow-wrap: anywhere; }
.choice:has(input:checked) { border-color: #75a692; background: #edf7f0; }

button, .button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
button:disabled { opacity: .5; cursor: default; }
.primary { color: white; background: var(--accent); }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.secondary { color: var(--ink); background: white; border-color: var(--line); }
.secondary:hover:not(:disabled) { background: #eff6f0; }
.small { min-height: 34px; padding: 5px 9px; font-size: .85rem; }
.danger { color: var(--danger); }
.public-panel :is(input:not([type=radio]):not([type=checkbox]), textarea, select) { min-height: 48px; border-color: #c6d7cb; border-radius: 11px; background: #f8fbf8; }
.public-panel .choice { border-radius: 11px; }
.public-submit { width: 100%; margin-top: 25px; min-height: 52px; border-radius: 11px; }
.public-submit span { font-size: 1.15rem; }
.message { color: var(--danger); font-size: .9rem; overflow-wrap: anywhere; }
.message-ok { color: var(--accent); }
.public-panel .message { margin-top: 16px; }
.success { padding: 20px 0; text-align: center; }
.success-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 100%; background: #e4f1e9; color: var(--accent); font-size: 1.45rem; }
.success h2 { margin: 10px 0 5px; }

.admin-shell { width: min(870px, 100%); margin: 0 auto; padding: 31px 18px 40px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 1.45rem; }
.brand .form-mark { color: #fff; background: var(--accent); border-color: var(--accent); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.login-panel { max-width: 440px; margin-inline: auto; padding: 24px; }
.login-panel h2 { margin-bottom: 16px; }
.login-panel label, .editor-panel label, .field-editor label { display: block; font-weight: 650; font-size: .92rem; }
.login-panel label input, .editor-panel label :is(input, textarea), .field-editor label :is(input:not([type=checkbox]), select, textarea) { margin-top: 6px; font-weight: 400; }
.login-panel .field-hint { margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid #c9dad0; margin-bottom: 16px; }
.tabs button { position: relative; background: transparent; color: var(--muted); padding-inline: 12px; }
.tabs button[aria-pressed=true] { color: var(--accent); }
.tabs button[aria-pressed=true]::after { content: ""; position: absolute; bottom: -2px; height: 3px; border-radius: 3px; inset-inline: 8px; background: var(--accent); }
#dashboard-message { margin-bottom: 14px; }
.editor-panel, .field-editor { padding: 18px 21px; }
.editor-questions { margin-top: 18px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.field-editor-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, .52fr); gap: 12px; }
.field-editor > label { margin-top: 12px; }
.field-editor .inline-check { display: flex; align-items: center; gap: 8px; min-height: 37px; }
.save-bar { position: sticky; bottom: 0; margin-top: 13px; padding: 12px 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end; background: var(--background); }
.save-bar button { flex-shrink: 0; }
#records-message { margin-bottom: 13px; }
.record { border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; }
.record summary { cursor: pointer; }
.record summary time { margin-inline-start: 9px; }
.record dl { margin: 11px 0 0; border-top: 1px solid var(--line); padding-top: 9px; }
.record dt { font-weight: 650; overflow-wrap: anywhere; }
.record dd { margin: 2px 0 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.page-buttons { justify-content: flex-end; margin-top: 12px; }

@media (max-width: 520px) {
  .public-shell { padding: 0 0 34px; }
  .intro { border-radius: 0 0 23px 23px; }
  .intro-inner { padding: 25px 22px 28px; }
  .public-panel { margin: 13px 12px 0; padding: 20px 17px 24px; border-radius: 17px; }
  .admin-shell { padding: 20px 12px; }
  .editor-panel, .field-editor, .login-panel { padding-inline: 15px; }
  .field-editor-row { grid-template-columns: minmax(0, 1fr); }
}
