:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #33232a;
  background: #f7f1ec;
  --crimson: #97122a;
  --line: #e7d9d3;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.brand { background: #891124; color: #fff0d9; }
.brand-inner { width: min(100% - 34px, 490px); min-height: 68px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.brand img { display: block; height: auto; }
.brand span { font-size: 14px; font-weight: 650; }
main { width: min(100% - 34px, 490px); margin: 0 auto; padding: 28px 0 40px; }
h1 { margin: 0 0 19px; font-size: 29px; letter-spacing: .03em; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 5px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; background: #eee4df; }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: progress; }
.modes button { min-height: 42px; color: #6b4955; border: 0; border-radius: 8px; background: transparent; font-weight: 650; }
.modes button[aria-pressed="true"] { color: var(--crimson); background: #fff; box-shadow: 0 1px 4px #471b1922; }
form { padding: clamp(17px, 4vw, 23px); background: #fffdfb; border: 1px solid var(--line); border-radius: 15px; }
.field { display: grid; gap: 8px; font-weight: 680; }
.field input { display: block; min-height: 49px; width: 100%; padding: 10px 12px; border: 1px solid #ccbdb8; border-radius: 8px; background: #fff; color: inherit; font-size: 16px; font-weight: 500; }
.field input::placeholder { color: #806b70; }
#code { font-variant-numeric: tabular-nums; }
.hint { margin: 6px 0 17px; font-size: 13px; color: #716069; }
fieldset { padding: 0; margin: 0 0 18px; min-width: 0; border: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 680; }
.prizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.prizes label { display: flex; align-items: center; min-height: 42px; padding: 6px 9px; gap: 6px; border-radius: 8px; border: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.prizes label:has(:checked) { border-color: #b54659; color: #7c1023; background: #fceef0; }
.prizes input { accent-color: var(--crimson); margin: 0; }
button:focus-visible, input:focus-visible { outline: 2px solid #a83149; outline-offset: 2px; }
.submit { display: block; width: 100%; min-height: 48px; margin-top: 21px; color: #fff; background: var(--crimson); border: 0; border-radius: 9px; font-weight: 700; }
.submit:disabled { opacity: .6; }
.status { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; line-height: 1.5; font-size: 14px; }
.status[data-state="success"] { color: #205e3a; background: #eaf5ed; }
.status[data-state="error"] { color: #8c2036; background: #fbecef; }
