:root {
  color-scheme: light;
  --page: #f6f8f7;
  --panel: #fff;
  --text: #192923;
  --muted: #50635b;
  --accent: #126449;
  --tint: #e7f5ed;
  --border: #d5e1db;
  font-family: Inter, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.55;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); }
button { font: inherit; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-frame { width: min(100% - 32px, 490px); margin-inline: auto; }
.site-header { background: var(--panel); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; padding-block: 13px; font-weight: 700; }
.brand-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: var(--accent); color: white; }
.brand-icon svg { width: 20px; height: 20px; }
main { padding-block: 28px 24px; }
h1 { margin: 0 0 18px; font-size: 1.65rem; line-height: 1.25; }
.group-list { display: flex; gap: 5px; }
.group-button {
  display: grid;
  justify-items: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 66px;
  align-content: center;
  gap: 5px;
  padding: 6px 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}
.group-button[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); color: var(--accent); }
.group-button span { font: 650 .69rem/1.2 "IBM Plex Mono", ui-monospace, monospace; white-space: nowrap; }
.group-icon { width: 19px; height: 19px; }
.group-panel { margin-top: 14px; padding: 20px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); text-align: center; }
.group-panel h2 { margin: 0 0 12px; font: 700 1.18rem/1.35 "IBM Plex Mono", ui-monospace, monospace; }
.qr-frame { display: grid; place-items: center; width: min(100%, 272px); margin-inline: auto; aspect-ratio: 1; background: white; color: var(--muted); font-size: .9rem; }
.qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.scan-help { margin: 10px 0 0; color: var(--muted); font-size: .88rem; }
.status { min-height: 46px; padding: 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); color: var(--muted); }
.retry { min-height: 44px; margin-top: 12px; padding: 6px 16px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: white; cursor: pointer; }
.site-footer { padding-block: 4px 20px; color: var(--muted); font-size: .83rem; }
.site-footer summary { display: list-item; width: fit-content; padding-block: 5px; cursor: pointer; }
.site-footer p { margin: 6px 0; }

@media (max-width: 355px) {
  .site-frame { width: calc(100% - 20px); }
  .group-list { gap: 4px; }
  .group-button span { font-size: .64rem; }
}
