:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #302019;
  background: #f8f4ef;
  --ink: #302019;
  --muted: #745d53;
  --wine: #7d2229;
  --line: #dccbc2;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 680px; margin: auto; padding: 24px 16px 48px; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.eyebrow { margin: 0 0 6px; color: var(--wine); font-size: .85rem; font-weight: 700; }
h1 { font-size: clamp(1.65rem, 5vw, 2.1rem); margin: 0; line-height: 1.2; }
h2 { font-size: 1.17rem; margin: 0 0 14px; }
p { line-height: 1.55; }
.panel { background: #fffdfa; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
label { display: block; font-weight: 650; }
form { display: grid; gap: 10px; }
input { width: 100%; min-width: 0; min-height: 45px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font: inherit; }
input:focus-visible, button:focus-visible, a:focus-visible { outline-offset: 3px; outline: 2px solid var(--wine); }
form > button { margin-top: 4px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--wine); border-radius: 8px; padding: 8px 14px; color: #fff; background: var(--wine); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; }
button:disabled { opacity: .55; cursor: wait; }
.quiet { background: transparent; color: var(--wine); border-color: var(--line); }
.actions, .section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.actions input { flex: 1 1 170px; }
.section-head { justify-content: space-between; }
.section-head h2 { margin: 0; }
.muted, .message { color: var(--muted); font-size: .91rem; }
.message { margin: 0; }
.message:empty { display: none; }
.error { color: #891e24; }
.notice, .result { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.result input { margin-top: 9px; }
.qr { display: block; width: min(100%, 232px); height: auto; margin: 14px auto 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.records { margin: 16px 0 0; padding: 0; list-style: none; }
.records li { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.records p { margin: 4px 0 8px; }
.records a:not(.button) { color: var(--wine); overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }

.service-status { margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; border: 1px solid #d7b989; background: #fff4dd; color: #51370d; }
.service-status p { margin: 4px 0 0; }
.service-status[data-kind="error"] { background: #fff0ef; border-color: #dcb2af; color: #70242b; }
.service-status[data-kind="ok"] { background: #eef8f1; border-color: #a8c4ad; color: #264b31; }
