:root {
  color-scheme: light;
  font-family: "DM Sans", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #322b20;
  background: #faf6ed;
  --line: #ded6c7;
  --muted: #655d50;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; min-height: 100vh; }
.masthead { border-bottom: 1px solid var(--line); }
.brand { max-width: 1160px; margin: auto; padding: 18px clamp(20px, 5vw, 64px); display: flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 760; }
.brand b { font-size: 17px; }
.monogram { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px 10px 10px 2px; background: #f1b947; color: #372c19; font-size: 20px; font-weight: 850; }
main { width: min(100%, 540px); margin: 0 auto; padding: clamp(36px, 8vh, 78px) 20px 56px; }
h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -.045em; margin: 0 0 22px; line-height: 1.2; }
.card { background: #fffcf6; border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 5vw, 30px); box-shadow: 0 7px 28px #55452c09; }
.switcher { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #f1ebdf; }
button, input, a { font: inherit; }
button, .primary { cursor: pointer; }
.switcher button { flex: 1; border: 0; color: var(--muted); background: transparent; border-radius: 9px; padding: 10px 6px; font-size: 15px; font-weight: 650; }
.switcher button[aria-pressed="true"] { color: #36280e; background: #fffdf8; box-shadow: 0 1px 4px #5a421629; }
.intro { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 20px 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
label { display: block; font-size: 14px; font-weight: 650; line-height: 1.5; margin-bottom: 7px; }
input:not([type="checkbox"]) { width: 100%; min-width: 0; height: 46px; padding: 0 12px; border: 1px solid #bdb3a2; border-radius: 8px; background: #fff; color: #29251e; font-size: 16px; }
input::placeholder { color: #827767; }
:focus-visible { outline: 3px solid #805e1d; outline-offset: 2px; }
input:focus-visible { border-color: #805e1d; outline-offset: 1px; }
input + label, .row + label, #inviteSection, .row { margin-top: 17px; }
small { display: block; color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 6px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.remember { display: flex; align-items: center; gap: 9px; font-weight: 400; color: var(--muted); cursor: pointer; padding: 4px 0; }
.remember input { width: 17px; height: 17px; margin: 0; accent-color: #82601d; }
.primary { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin-top: 22px; padding: 13px 18px; border: 0; border-radius: 9px; color: #30220a; background: #edb342; text-decoration: none; font-size: 16px; font-weight: 700; }
.primary:hover { background: #e4a52a; }
.primary span { font-weight: 500; }
button:disabled, fieldset:disabled button { opacity: .6; cursor: default; }
#status { margin: 16px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
#status.error { color: #993a23; }
.secondary { color: #6e4e17; background: transparent; border: 1px solid var(--line); border-radius: 7px; padding: 8px 12px; margin-top: 12px; }
.quota { font-size: 14px; color: #5e491e; padding: 9px 12px; border-left: 3px solid #edb342; background: #f8f0dd; border-radius: 2px; }
h2 { font-size: 23px; margin: 22px 0 0; }
.code-summary { padding: 13px 15px; background: #f3eee3; border-radius: 8px; }
.code-summary span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.code-summary strong { overflow-wrap: anywhere; }
.support { margin-top: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.support a { color: inherit; text-underline-offset: 3px; }
@media (max-width: 430px) {
  .brand { padding: 13px 20px; }
  main { padding: 32px 16px; }
  .row { grid-template-columns: 1fr; }
}
