@font-face {
  font-family: "Yuchao PingFang SC";
  src: url("./fonts/PingFangSC-Ultralight.woff2") format("woff2");
  font-style: normal;
  font-weight: 100;
  font-display: swap;
}

@font-face {
  font-family: "Yuchao PingFang SC";
  src: url("./fonts/PingFangSC-Thin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200;
  font-display: swap;
}

@font-face {
  font-family: "Yuchao PingFang SC";
  src: url("./fonts/PingFangSC-Light.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Yuchao PingFang SC";
  src: url("./fonts/PingFangSC-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Yuchao PingFang SC";
  src: url("./fonts/PingFangSC-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Yuchao PingFang SC";
  src: url("./fonts/PingFangSC-Semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}

.group-modal {
  --color-canvas-white: #fff;
  --color-ash: #e5e5e5;
  --color-smoke: #d4d4d4;
  --color-pebble: #c8c8c8;
  --color-charcoal: #171717;
  --color-graphite: #262626;
  --color-fog: #737373;
  --color-silver: #a3a3a3;
  --font-ui: "Yuchao PingFang SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-button: 8px;
  --radius-large: 16px;
  --shadow-subtle: rgb(0 0 0 / 5%) 0 1px 2px;
  color: var(--color-charcoal);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

@scope (.group-modal) {
:root {
  --color-canvas-white: #fff;
  --color-ash: #e5e5e5;
  --color-smoke: #d4d4d4;
  --color-pebble: #c8c8c8;
  --color-charcoal: #171717;
  --color-graphite: #262626;
  --color-fog: #737373;
  --color-silver: #a3a3a3;
  --font-ui: "Yuchao PingFang SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-button: 8px;
  --radius-large: 16px;
  --shadow-subtle: rgb(0 0 0 / 5%) 0 1px 2px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--color-charcoal);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

body.login-modal-open {
  overflow: hidden;
}

h2,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 3px;
}

.demo-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background-image:
    linear-gradient(to right, rgb(229 229 229 / 36%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(229 229 229 / 22%) 1px, transparent 1px);
  background-size: 64px 64px;
}

.btn,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-button);
  background: var(--color-canvas-white);
  box-shadow: var(--shadow-subtle);
  color: var(--color-charcoal);
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.btn {
  padding: 0 16px;
}

.btn:hover,
.icon-button:hover {
  border-color: var(--color-pebble);
  transform: translateY(-1px);
}

.btn-dark {
  border-color: #000;
  background: #000;
  color: #fff;
}

.btn-dark:hover {
  background: #171717;
  color: #fff;
}

.icon-button {
  width: 38px;
  padding: 0;
}

:scope {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: grid;
  padding: 24px;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

:scope.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(255 255 255 / 78%), rgb(255 255 255 / 90%)),
    rgb(255 255 255 / 82%);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  backdrop-filter: blur(22px) saturate(1.15);
}

.login-backdrop::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(229 229 229 / 36%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(229 229 229 / 22%) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  content: "";
  -webkit-mask-image: radial-gradient(circle at 50% 28%, rgb(0 0 0 / 55%), transparent 72%);
  mask-image: radial-gradient(circle at 50% 28%, rgb(0 0 0 / 55%), transparent 72%);
  pointer-events: none;
}

.group-panel {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 32px));
  max-height: min(88vh, 720px);
  padding: 28px;
  overflow-y: auto;
  border: 1px solid #d9d9d9;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgb(0 0 0 / 10%);
  overscroll-behavior: contain;
  transform: translateY(14px) scale(.982);
  transition: transform 200ms ease;
}

:scope.is-open .group-panel {
  transform: translateY(0) scale(1);
}

.login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  min-height: 34px;
  background: rgb(255 255 255 / 82%);
}

.login-close svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.group-head,
.group-flow-card,
.group-form {
  position: relative;
  z-index: 1;
}

.group-head {
  display: grid;
  gap: 5px;
  margin-bottom: 24px;
  padding-right: 48px;
}

.group-head h2 {
  color: var(--color-charcoal);
  font-size: 30px;
  font-weight: 430;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.group-head p {
  max-width: none;
  color: var(--color-fog);
  font-size: 14px;
  line-height: 1.6;
}

.group-form {
  display: grid;
  gap: 12px;
}

.group-flow-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dedede;
  border-radius: 14px;
  background: #fff;
}

.group-flow-stage {
  min-width: 0;
  padding: 18px;
}

.group-flow-stage-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.group-flow-stage-head > span {
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}

.group-flow-stage-head > strong {
  color: #171717;
  font-size: 18px;
  font-weight: 500;
}

.group-flow-stage > p {
  min-height: 20px;
  margin: 8px 0 14px;
  color: #777;
  font-size: 14px;
  line-height: 1.55;
}

.group-flow-divider {
  display: block;
  width: auto;
  height: 1px;
  background: #e5e5e5;
}

.group-flow-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  background: #fafafa;
}

.group-flow-code-row > code {
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  color: #202020;
  font-family: var(--font-ui);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .025em;
  line-height: 44px;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: text;
}

.group-flow-code-row > button {
  align-self: stretch;
  min-width: 58px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid #dedede;
  background: #fff;
  color: #333;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.group-flow-code-row > button:hover {
  background: #f5f5f5;
}

.group-xiaoyu-button {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  border-color: #171717;
  background: #171717;
  color: #fff;
  font-weight: 500;
  text-align: center;
}

.group-xiaoyu-button:hover {
  border-color: #000;
  background: #000;
}

.group-flow-stage-confirm input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgb(212 212 212 / 92%);
  border-radius: 9px;
  outline: none;
  background: #fff;
  box-shadow: rgb(0 0 0 / 2%) 0 1px 1px inset;
  color: var(--color-charcoal);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  user-select: text;
}

.group-flow-stage-confirm input::placeholder {
  color: var(--color-silver);
}

.group-flow-stage-confirm input:focus {
  border-color: rgb(37 99 235 / 55%);
  box-shadow: rgb(37 99 235 / 10%) 0 0 0 4px;
}

.group-flow-stage-confirm input[aria-invalid="true"] {
  border-color: rgb(220 38 38 / 55%);
  box-shadow: rgb(220 38 38 / 10%) 0 0 0 4px;
}

.login-error,
.group-status {
  margin: 0;
  padding: 0 2px;
  font-size: 12px;
  line-height: 1.5;
}

.login-error {
  color: #dc2626;
}

.group-status {
  color: #777;
}

.group-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 10px;
}

.group-submit,
.group-actions .group-secondary {
  min-height: 46px;
}

.group-secondary {
  min-width: 112px;
  background: rgb(255 255 255 / 76%);
}

[hidden] {
  display: none !important;
}

@media (min-width: 760px) {
  .group-flow-card {
    grid-template-columns: minmax(0, 1.12fr) 1px minmax(0, .88fr) 1px minmax(0, 1fr);
  }

  .group-flow-divider {
    width: 1px;
    height: auto;
  }
}

@media (max-width: 759px) {
  :scope {
    padding: 12px;
  }

  .group-panel {
    max-height: calc(100vh - 24px);
    padding: 22px;
  }

  .group-head {
    margin-bottom: 18px;
  }

  .group-head h2 {
    font-size: 26px;
  }

  .group-flow-stage > p {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .group-actions {
    grid-template-columns: 1fr;
  }

  .group-secondary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  :scope,
  .group-panel,
  .btn,
  .icon-button {
    transition: none;
  }
}

}
