:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f3f7fc;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f3f7fc;
}

button,
a {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e4eaf2;
  box-shadow: 0 2px 10px rgba(38, 60, 91, 0.04);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  width: min(680px, 100%);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #182234;
  font-size: 20px;
  font-weight: 750;
  white-space: nowrap;
}

.menu-mark {
  color: #5f6b7a;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.expires-badge {
  flex: 0 0 auto;
  border: 1px solid #f1df8b;
  border-radius: 7px;
  background: #fffced;
  color: #9a7617;
  font-size: 14px;
  line-height: 1;
  padding: 10px 12px;
  white-space: nowrap;
}

.page {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 28px 22px 48px;
}

.code-card {
  overflow: hidden;
  width: 100%;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(39, 64, 95, 0.06);
}

.code-heading {
  padding: 38px 24px 20px;
  text-align: center;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  background: #edf6ff;
  color: #1673b8;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 0 14px;
}

.code-heading h1 {
  margin: 18px 0 8px;
  color: #121a27;
  font-size: 30px;
  line-height: 1.25;
}

.code-heading p {
  margin: 0;
  color: #7c8796;
  font-size: 14px;
  line-height: 1.6;
}

.qr-stage {
  min-height: 360px;
  padding: 14px 28px 34px;
  display: grid;
  place-items: center;
  background: #fff;
}

#qrcode {
  width: min(320px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #fff;
}

#qrcode img,
#qrcode canvas {
  width: 100%;
  height: 100%;
  image-rendering: crisp-edges;
}

.group-name {
  width: 100%;
  min-height: 68px;
  padding: 16px 24px;
  display: grid;
  place-items: center;
  background: #1677e8;
  color: #fff;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.actions {
  padding: 24px 28px 28px;
  display: grid;
  gap: 14px;
  background: #fff;
}

.download-button {
  width: 100%;
  min-height: 52px;
  border: 1px solid #dce3ec;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #202a39;
  cursor: pointer;
  font-size: 16px;
}

.download-button span {
  font-size: 21px;
  line-height: 1;
}

.download-button:active {
  transform: translateY(1px);
}

.download-button:focus-visible {
  outline: 3px solid rgba(22, 119, 232, 0.22);
  outline-offset: 2px;
}

.notice-panel {
  margin-top: 22px;
  padding: 24px 26px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #f8fafc;
}

.notice-panel h2 {
  margin: 0 0 10px;
  color: #1e2938;
  font-size: 17px;
  line-height: 1.4;
}

.notice-panel p {
  margin: 0;
  color: #7a8696;
  font-size: 14px;
  line-height: 1.75;
}

.empty {
  min-height: 360px;
  padding: 56px 28px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: #fff;
  text-align: center;
}

.empty-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff4db;
  color: #a56a00;
  font-size: 24px;
  font-weight: 700;
}

.empty h1,
.empty p {
  margin: 0;
}

.empty h1 {
  font-size: 21px;
}

.empty p {
  color: #7b8796;
  font-size: 14px;
}

@media (max-width: 520px) {
  .topbar-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand-title {
    gap: 9px;
    font-size: 18px;
  }

  .expires-badge {
    padding: 9px 8px;
    font-size: 12px;
  }

  .page {
    padding: 20px 14px 36px;
  }

  .code-heading {
    padding: 30px 18px 18px;
  }

  .code-heading h1 {
    font-size: 27px;
  }

  .qr-stage {
    min-height: 0;
    padding: 12px 22px 30px;
  }

  .group-name {
    min-height: 62px;
    font-size: 18px;
  }

  .actions {
    padding: 20px 20px 24px;
  }
}

@media (max-width: 360px) {
  .code-heading h1 {
    font-size: 25px;
  }
}
