:root {
  color-scheme: light;
  --red: #b91c22;
  --line: #c9a9aa;
  --rose: #fdf3f3;
  font-family: "Songti SC", SimSun, STSong, "Noto Serif CJK SC", serif;
  color: #271c1c;
  background: #f2efe9;
  line-height: 1.65;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 14px 12px 30px; }
.sheet { max-width: 640px; margin: auto; background: #fffdfa; border: 4px solid var(--red); padding: 6px; }
.sheet-inner { border: 1px solid var(--red); padding: 22px 16px; }
header { text-align: center; margin-bottom: 10px; color: var(--red); }
h1, header p { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: 2px; }
header p { letter-spacing: 4px; }
.demo { margin: 0 0 8px; text-align: center; font-size: 13px; color: #6c554c; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 15px; }
.group-col { width: 28px; }
.field-col { width: 84px; }
td, th { border: 1px solid var(--line); padding: 5px 8px; vertical-align: middle; }
th { background: var(--rose); }
.group { writing-mode: vertical-rl; text-align: center; color: var(--red); font-size: 13px; padding: 7px 4px; letter-spacing: 1px; }
.field { text-align: center; color: #583939; font-size: 13px; padding: 5px 2px; }
.required { color: var(--red); margin-right: 2px; }
input, select, button { font: inherit; }
input[type="text"], input[type="tel"], select {
  width: 100%; min-width: 0; border: 0; border-bottom: 1px dashed var(--line);
  border-radius: 0; background: transparent; color: inherit; padding: 6px 2px; font-size: 16px;
}
select:invalid, input::placeholder { color: #76696a; }
.choices { display: flex; gap: 6px; }
.choices label { position: relative; cursor: pointer; }
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choices span { display: block; padding: 3px 13px; border: 1px solid #dac6c7; border-radius: 3px; background: white; }
.choices input:checked + span { border-color: var(--red); color: var(--red); background: var(--rose); font-weight: 700; }
:focus-visible, .choices input:focus-visible + span { outline: 2px solid #7e1919; outline-offset: 2px; }
.muted, .declaration { font-size: 13px; color: #654d4e; }
.declaration p { margin: 4px 0; }
.declaration .date { margin-top: 8px; }
.consent { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; color: #9f191e; cursor: pointer; }
.consent input { margin: 3px 0 0; flex: 0 0 17px; width: 17px; height: 17px; accent-color: var(--red); }
button { width: 100%; margin-top: 20px; padding: 12px; border: 0; border-radius: 4px; background: var(--red); color: white; font-size: 18px; font-weight: 700; letter-spacing: 3px; cursor: pointer; }
button:disabled { background: #885c5e; cursor: wait; }
#message { color: var(--red); text-align: center; font-size: 14px; }
.complete { text-align: center; padding: 30px 10px; }
.complete h2 { color: var(--red); }
@media (max-width: 480px) {
  body { padding: 8px 6px 24px; }
  .sheet { border-width: 3px; padding: 3px; }
  .sheet-inner { padding: 16px 8px; }
  h1, header p { font-size: 18px; }
  .group-col { width: 23px; }
  .field-col { width: 72px; }
  td { padding: 4px 6px; }
  .group { font-size: 12px; padding-inline: 3px; }
}
