:root {
  --ink: #211b27;
  --muted: #716b75;
  --paper: #f8f7f4;
  --card: #ffffff;
  --line: #e5e0e6;
  --purple: #5b2375;
  --purple-dark: #431956;
  --purple-soft: #f3edf6;
  --green: #286b55;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; background: var(--paper); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header,
.shell,
.site-footer {
  width: min(720px, calc(100% - 36px));
  margin-inline: auto;
}

.site-header { padding: 28px 0 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--purple);
  font-family: ui-serif, "Songti SC", STSong, serif;
  font-weight: 700;
}
.brand strong,
.brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .08em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.page-intro { padding: 38px 0 26px; }
.page-intro h1 {
  margin: 0;
  font-family: ui-serif, "Songti SC", STSong, serif;
  font-size: clamp(36px, 7vw, 48px);
  line-height: 1.15;
  letter-spacing: -.04em;
}
.page-intro p { max-width: 580px; margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.75; }

.card { border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 12px 38px rgba(46, 29, 51, .06); }
.form-card { padding: 30px; }
.form-stack { display: grid; gap: 19px; }
label > span,
legend { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 650; }
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
input { min-height: 46px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; line-height: 1.55; }
input:focus,
textarea:focus { border-color: #9566a9; box-shadow: 0 0 0 3px rgba(91, 35, 117, .09); }
input:disabled,
textarea:disabled { color: #999; background: #f4f2f4; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span {
  display: grid;
  min-height: 46px;
  margin: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: white;
  cursor: pointer;
}
.segmented input:focus-visible + span { box-shadow: 0 0 0 3px rgba(91, 35, 117, .09); }
.segmented input:checked + span { border-color: var(--purple); color: var(--purple); background: var(--purple-soft); }

.capture-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.capture-box {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 11px;
  min-height: 166px;
  align-content: start;
  padding: 17px;
  border: 1px dashed #cbbfce;
  border-radius: 16px;
  background: #fcfbfc;
}
.capture-box.captured { border-style: solid; border-color: #a8cdbf; background: #f6fbf9; }
.capture-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--purple); background: var(--purple-soft); font-size: 20px; }
.capture-box h2 { margin: 1px 0 5px; font-size: 15px; }
.capture-box p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.capture-box .secondary-button { grid-column: 1 / -1; align-self: end; margin-top: 10px; }
.evidence-box { cursor: pointer; }
.evidence-box input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.evidence-box img { grid-column: 1 / -1; width: 100%; max-height: 200px; border-radius: 10px; object-fit: cover; }

.primary-button,
.secondary-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  font-weight: 680;
  cursor: pointer;
}
.primary-button { min-height: 48px; padding: 0 19px; color: white; background: var(--purple); }
.primary-button:hover { background: var(--purple-dark); }
.secondary-button { min-height: 42px; padding: 0 15px; border: 1px solid #d5c9da; color: var(--purple); background: white; }
.secondary-button:hover { background: var(--purple-soft); }
.small-button { min-height: 38px; padding: 0 13px; color: white; background: var(--purple); font-size: 13px; }
.primary-button:disabled,
.secondary-button:disabled,
.small-button:disabled { opacity: .45; cursor: not-allowed; }
.button-link { width: fit-content; text-decoration: none; }
.text-button { padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.text-button:hover { color: var(--purple); }

.consent-row { display: grid; grid-template-columns: 19px 1fr; gap: 9px; align-items: start; color: var(--muted); font-size: 12px; line-height: 1.55; }
.consent-row input { width: 17px; min-height: 17px; margin: 2px 0 0; }
.consent-row span { margin: 0; font-weight: 400; }
.inline-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.message { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #eccbd0; border-radius: 12px; color: #69333c; background: #f9e9eb; font-size: 14px; }
.message.success { border-color: #c8e4d8; color: #1d624c; background: #eaf5f0; }

.limit-card { margin-top: 16px; padding: 24px; border: 1px solid #e7d7b5; border-radius: 16px; background: #fffaf0; }
.limit-card h2 { margin: 0; font-size: 19px; }
.limit-card p { margin: 8px 0 18px; color: var(--muted); font-size: 14px; line-height: 1.65; }

.site-footer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 36px;
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.site-footer p { margin: 0; }
.admin-toggle { padding: 2px; border: 0; color: #aaa4ac; background: transparent; font-size: 13px; line-height: 1; cursor: pointer; }
.admin-toggle:hover,
.admin-toggle[aria-expanded="true"] { color: var(--purple); }
.admin-panel { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 2; width: min(360px, 100%); padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 12px 34px rgba(46, 29, 51, .12); }
.admin-login-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.admin-login-form input { min-height: 38px; font-size: 13px; }
.admin-dashboard { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 620px) {
  .site-header,
  .shell,
  .site-footer { width: min(100% - 26px, 720px); }
  .site-header { padding-top: 18px; }
  .page-intro { padding: 26px 0 20px; }
  .page-intro h1 { font-size: 38px; }
  .form-card { padding: 20px; border-radius: 17px; }
  .two-columns,
  .capture-grid { grid-template-columns: 1fr; }
  .capture-box { min-height: 150px; }
  .admin-panel { left: 0; right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
