:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #16202f;
  --muted: #5f6b7a;
  --line: #d9e2ef;
  --blue: #255fdb;
  --blue-soft: #e9f0ff;
  --green: #087f5b;
  --green-soft: #e7f6ef;
  --amber: #9a5b05;
  --amber-soft: #fff3d9;
  --shadow: 0 18px 50px rgba(34, 45, 67, 0.09);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #eef4fb 0, #f7f9fc 360px, var(--bg) 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px clamp(16px, 5vw, 64px);
  background: rgba(244, 247, 251, 0.92);
  border-bottom: 1px solid rgba(217, 226, 239, 0.9);
  backdrop-filter: blur(14px);
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: var(--ink);
  flex: 0 0 auto;
  font-weight: 850;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

nav a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-invite-form {
  display: grid;
  grid-template-columns: auto minmax(260px, 520px) minmax(160px, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
}

.header-invite-form label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.header-invite-controls {
  min-width: 0;
  display: flex;
  gap: 8px;
}

.header-invite-form input {
  min-height: 38px;
}

.header-invite-form button {
  min-height: 38px;
  padding: 0 14px;
}

.header-invite-form .claim-feedback {
  min-height: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.github-link,
.language-toggle {
  min-width: 58px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--blue);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.github-link {
  text-decoration: none;
}

.github-link:hover,
.github-link:focus-visible,
.language-toggle:hover,
.language-toggle:focus-visible {
  background: var(--blue-soft);
  outline: none;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.hero {
  min-height: min(670px, calc(100vh - 82px));
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(310px, 0.76fr);
  align-items: stretch;
  gap: 20px;
}

.hero-copy,
.entry-panel,
.panel,
.steps article,
.safety {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 58px);
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button,
.header-invite-form button,
.inline-form button,
.invite-form button,
.admin-form button,
.table-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.primary,
.header-invite-form button,
.inline-form button,
.invite-form button,
.admin-form button {
  background: var(--blue);
  color: white;
}

.secondary {
  background: var(--blue-soft);
  color: var(--blue);
}

.entry-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3vw, 34px);
}

.entry-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.inline-form,
.invite-form,
.admin-form {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.inline-form label,
.invite-form label,
.admin-form label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.inline-form div,
.invite-form div {
  display: flex;
  gap: 10px;
}

.inline-form.is-busy button,
.header-invite-form.is-busy button,
.invite-form.is-busy button,
.admin-form.is-busy button,
.inline-form button:disabled,
.header-invite-form button:disabled,
.invite-form button:disabled,
.admin-form button:disabled,
.table-action:disabled {
  opacity: 0.72;
  cursor: wait;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: white;
  color: var(--ink);
  font: inherit;
}

input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(37, 95, 219, 0.16);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 56px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 44px;
  min-height: 36px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--blue-soft);
  color: var(--blue);
}

.password-toggle-eye {
  position: relative;
  width: 24px;
  height: 18px;
}

.password-toggle-eye::before,
.password-toggle-eye::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.password-toggle-eye::before {
  width: 21px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.password-toggle-eye::after {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.password-toggle.is-visible .password-toggle-eye::after {
  width: 22px;
  height: 2px;
  background: var(--blue);
  border-radius: 999px;
  transform: translate(-50%, -50%) rotate(-35deg);
}

.claim-feedback {
  min-height: 20px;
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
}

.claim-feedback[data-tone="error"] {
  color: #b42318;
}

.claim-feedback[data-tone="success"] {
  color: var(--green);
}

.claim-feedback[data-tone="info"] {
  color: var(--muted);
}

.admin-main {
  width: min(1240px, calc(100% - 32px));
}

.admin-hero {
  min-height: 230px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(28px, 5vw, 54px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-hero h1 {
  font-size: 46px;
}

.admin-hero .lede {
  max-width: 720px;
}

.admin-panel {
  margin-top: 18px;
}

.admin-workspace {
  display: grid;
  gap: 18px;
}

.admin-form {
  max-width: 560px;
}

.create-form {
  max-width: 760px;
}

.create-form button {
  justify-self: start;
}

.admin-feedback {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.admin-feedback[data-tone="error"] {
  color: #b42318;
}

.admin-feedback[data-tone="success"] {
  color: var(--green);
}

.admin-feedback[data-tone="info"] {
  color: var(--muted);
}

.admin-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.admin-note {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.admin-table {
  min-width: 1120px;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.admin-status.active {
  background: var(--green-soft);
  color: var(--green);
}

.admin-status.disabled {
  background: #eef2f7;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-action {
  min-height: 34px;
  padding: 0 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
}

.flow {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(92px, 0.45fr) minmax(150px, 1fr) minmax(92px, 0.45fr) minmax(150px, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.flow-node {
  min-height: 170px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.flow-node p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.flow-link {
  position: relative;
  min-height: 52px;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.flow-link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 2px solid var(--blue);
}

.flow-link::after {
  content: "";
  position: absolute;
  right: 0;
  top: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--blue);
  border-right: 2px solid var(--blue);
  transform: rotate(45deg);
}

.flow-link span {
  position: relative;
  z-index: 1;
  padding: 4px 7px;
  background: var(--blue-soft);
  border: 1px solid #cbdafd;
  border-radius: 999px;
}

.iphone-shell {
  width: 82px;
  height: 146px;
  padding: 10px 8px;
  background: #17202f;
  border-radius: 24px;
  box-shadow: inset 0 0 0 2px #2f3b4c;
}

.speaker {
  width: 30px;
  height: 4px;
  margin: 0 auto 9px;
  background: #475569;
  border-radius: 999px;
}

.screen {
  height: 112px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px;
  background: linear-gradient(160deg, #f8fbff, #dbeafe);
  border-radius: 16px;
  color: var(--ink);
  text-align: center;
}

.screen span {
  font-size: 12px;
  color: var(--muted);
}

.screen strong {
  font-size: 14px;
}

.proxy-tower {
  width: 88px;
  height: 116px;
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #17304d;
  border-radius: 8px;
}

.proxy-tower span {
  display: block;
  border-radius: 6px;
  background: #d8ecff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.cert-card {
  width: 92px;
  height: 116px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  background: #fffaf0;
  border: 2px solid #f1c56b;
  border-radius: 8px;
}

.cert-card span {
  height: 8px;
  background: #d09a2d;
  border-radius: 999px;
}

.cert-card span:nth-child(2) {
  width: 70%;
}

.cert-card b {
  width: 34px;
  height: 34px;
  margin-top: 12px;
  justify-self: center;
  border: 4px solid var(--green);
  border-radius: 50%;
}

.section {
  margin-top: 34px;
  scroll-margin-top: 150px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head > p:not(.eyebrow) {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.status-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.status-headline h2 {
  min-width: 0;
}

.button.is-busy {
  opacity: 0.72;
  cursor: wait;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.steps article {
  min-height: 0;
  padding: 20px;
}

.steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.step-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.step-list li + li {
  margin-top: 8px;
}

.step-list strong {
  color: var(--ink);
  font-weight: 850;
}

.step-number {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 16px;
  background: var(--blue);
  color: white;
  border-radius: 50%;
  font-weight: 900;
}

.status-section {
  display: grid;
  gap: 16px;
}

.invite-form {
  max-width: 720px;
  margin-top: 0;
}

.proxy-panel {
  display: grid;
  gap: 18px;
}

.proxy-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.proxy-panel-head .panel-kicker {
  margin-bottom: 8px;
}

.proxy-panel-head h3 {
  margin-bottom: 0;
}

.proxy-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.proxy-grid dt {
  font-size: 13px;
  font-weight: 850;
}

.proxy-grid dd {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.proxy-grid dd a {
  overflow-wrap: anywhere;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 20px;
  box-shadow: none;
}

.events-panel {
  grid-column: 1 / -1;
}

.panel-note {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

dl {
  display: grid;
  grid-template-columns: minmax(92px, 150px) minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

dt {
  color: var(--muted);
}

dd {
  min-width: 0;
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.check-state {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.check-state.yes {
  background: var(--green-soft);
  color: var(--green);
}

.check-state.no {
  background: var(--amber-soft);
  color: var(--amber);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

td {
  overflow-wrap: anywhere;
}

.safety {
  padding: 24px;
  box-shadow: none;
}

.safety ul {
  margin: 0;
  padding-left: 22px;
}

.safety li {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 980px) {
  .hero,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .flow {
    grid-template-columns: 1fr;
  }

  .flow-link {
    min-height: 46px;
  }

  .flow-link::before {
    left: 50%;
    right: auto;
    top: 0;
    bottom: 0;
    border-top: 0;
    border-left: 2px solid var(--blue);
  }

  .flow-link::after {
    right: calc(50% - 5px);
    top: auto;
    bottom: 0;
    transform: rotate(135deg);
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proxy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: stretch;
  }

  .topbar-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  nav {
    flex: 1;
    justify-content: space-between;
  }

  .topbar-actions nav {
    flex: 1 1 100%;
  }

  .github-link {
    flex: 0 0 auto;
  }

  .language-toggle {
    flex: 0 0 auto;
  }

  .header-invite-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .header-invite-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .header-invite-form button {
    width: auto;
  }

  main {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .hero-copy,
  .entry-panel,
  .panel,
  .steps article,
  .safety {
    border-radius: 8px;
  }

  .quick-actions,
  .inline-form div,
  .invite-form div {
    flex-direction: column;
  }

  .button,
  .inline-form button,
  .invite-form button,
  .admin-form button {
    width: 100%;
  }

  .admin-form .password-toggle {
    width: 44px;
  }

  .admin-hero,
  .admin-list-head,
  .status-headline {
    align-items: stretch;
    flex-direction: column;
  }

  .create-form button {
    justify-self: stretch;
  }

  .proxy-panel-head {
    flex-direction: column;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .steps article {
    min-height: auto;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 26px;
  }

  dl {
    grid-template-columns: 1fr;
  }

  .section {
    scroll-margin-top: 210px;
  }
}

/* Guided public flow redesign */
.topbar {
  padding: 0;
  background: rgba(247, 250, 253, 0.94);
}

.topbar-shell {
  width: min(1240px, calc(100% - 32px));
  display: grid;
  gap: 10px;
  margin: 0 auto;
  padding: 12px 0;
}

.topbar-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
}

.brand::before {
  content: "";
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--blue), #08a38f);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(8, 163, 143, 0.1);
}

nav {
  min-width: 0;
}

.topbar-actions {
  min-width: 0;
  justify-content: flex-end;
}

.topbar-actions nav {
  padding: 5px;
  background: #edf3fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topbar-actions nav a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 10px;
}

.topbar-actions nav a:hover,
.topbar-actions nav a:focus-visible {
  background: white;
  color: var(--blue);
  outline: none;
}

.header-invite-form {
  grid-template-columns: auto minmax(280px, 460px) minmax(180px, 1fr);
  align-items: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.header-invite-controls input {
  background: #f8fbff;
}

.header-invite-form .claim-feedback {
  font-size: 13px;
}

.app-shell {
  width: min(1240px, calc(100% - 32px));
  padding-top: 24px;
}

.hero {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: stretch;
}

.hero-copy {
  min-height: 310px;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 255, 0.96)),
    linear-gradient(90deg, rgba(37, 95, 219, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 163, 143, 0.08) 1px, transparent 1px);
  background-size: auto, 30px 30px, 30px 30px;
}

.hero-copy h1 {
  max-width: 760px;
}

.entry-panel {
  justify-content: space-between;
}

.entry-panel .button {
  align-self: flex-start;
  margin-top: 18px;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.guide-main {
  min-width: 0;
}

.wizard-section {
  margin-top: 0;
}

.wizard-section .section-head {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.step-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.step-tab {
  width: 100%;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.step-tab:hover,
.step-tab:focus-visible {
  border-color: rgba(37, 95, 219, 0.45);
  outline: 3px solid rgba(37, 95, 219, 0.12);
}

.step-tab.is-active {
  background: #ffffff;
  border-color: rgba(37, 95, 219, 0.65);
  box-shadow: 0 14px 34px rgba(37, 95, 219, 0.12);
}

.step-tab.is-complete {
  border-color: rgba(8, 127, 91, 0.35);
}

.step-tab.is-complete .step-index {
  background: var(--green);
}

.step-index {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  font-weight: 900;
}

.step-tab strong,
.step-tab small {
  display: block;
}

.step-tab strong {
  font-size: 14px;
  line-height: 1.25;
}

.step-tab small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wizard-card-deck {
  display: grid;
}

.wizard-card {
  min-height: 420px;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.wizard-card.is-complete {
  border-top-color: var(--green);
}

.wizard-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.wizard-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.wizard-card-head .step-number {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 8px;
}

.wizard-card .step-list {
  padding-left: 24px;
  font-size: 16px;
}

.task-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  background: #f3f8ff;
  border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0;
}

.task-note.accent {
  background: #eefbf7;
  border-left-color: var(--green);
}

.task-note strong {
  font-size: 15px;
}

.task-note span {
  color: var(--muted);
  line-height: 1.65;
}

.invite-gate-card {
  border-top-color: #08a38f;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98)),
    linear-gradient(90deg, rgba(37, 95, 219, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 163, 143, 0.06) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
}

.invite-gate-card-content {
  display: grid;
  gap: 16px;
}

.invite-gate-brief {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.invite-gate-brief p {
  font-size: 16px;
}

.invite-limits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.invite-limits li {
  min-height: 70px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-left: 4px solid #d09a2d;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.invite-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 12px;
}

.invite-method-option {
  position: relative;
  min-width: 0;
  min-height: 142px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  border: 1px solid rgba(130, 151, 182, 0.48);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(22, 32, 47, 0.07);
}

.invite-method-option:hover,
.invite-method-option:focus-visible,
.invite-method-option.is-selected {
  border-color: rgba(37, 95, 219, 0.64);
  outline: none;
  box-shadow:
    0 18px 44px rgba(37, 95, 219, 0.14),
    inset 0 0 0 1px rgba(37, 95, 219, 0.08);
}

.invite-method-option.is-recommended {
  border-color: rgba(8, 127, 91, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 251, 247, 0.98));
}

.invite-method-option.is-recommended:hover,
.invite-method-option.is-recommended:focus-visible,
.invite-method-option.is-recommended.is-selected {
  border-color: rgba(8, 127, 91, 0.64);
  box-shadow:
    0 18px 44px rgba(8, 127, 91, 0.14),
    inset 0 0 0 1px rgba(8, 127, 91, 0.08);
}

.invite-method-option > span:last-child {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
}

.invite-method-option strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.method-recommend {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  background: var(--green);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.invite-method-detail-list {
  display: grid;
}

.invite-method-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(130, 151, 182, 0.44);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(22, 32, 47, 0.08);
}

.invite-detail-copy {
  display: grid;
  gap: 8px;
}

.invite-detail-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.18;
}

.invite-detail-copy p:not(.method-label) {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.invite-method {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(130, 151, 182, 0.42);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(22, 32, 47, 0.07);
}

.invite-method.is-primary {
  border-color: rgba(37, 95, 219, 0.42);
  box-shadow: 0 16px 38px rgba(37, 95, 219, 0.12);
}

.invite-method-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.method-index {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  background: #edf3fb;
  border: 1px solid rgba(37, 95, 219, 0.2);
  border-radius: 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.invite-method.is-primary .method-index {
  background: var(--blue);
  color: #fff;
}

.method-label {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.invite-method h2,
.invite-method h4 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.invite-method > p {
  font-size: 14px;
  line-height: 1.65;
}

.support-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.support-badges span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.support-badges.is-supported span {
  background: var(--green-soft);
  border-color: rgba(8, 127, 91, 0.18);
  color: var(--green);
}

.invite-method-media {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.invite-method-media img {
  width: 86px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.invite-method-media p,
.method-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invite-actions .button {
  flex: 1 1 150px;
  min-height: 42px;
  padding-inline: 12px;
  white-space: normal;
  text-align: center;
}

.xianyu-link-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.xianyu-link-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.xianyu-link-box a,
.xianyu-link-box code {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.xianyu-link-box a {
  text-decoration: none;
}

.xianyu-link-box a:hover,
.xianyu-link-box a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  outline: none;
}

.invite-manual-note {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.invite-manual-note strong,
.invite-manual-note span {
  grid-column: 1;
}

.invite-manual-note .button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.step-complete-button {
  justify-self: start;
  min-width: 180px;
  margin-top: 6px;
}

.status-sidebar {
  position: sticky;
  top: 124px;
  z-index: 12;
  align-self: start;
  max-height: calc(100vh - 140px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.status-drawer-toggle {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  background: #f8fbff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.status-drawer-toggle:focus-visible {
  outline: 3px solid rgba(37, 95, 219, 0.24);
  outline-offset: -3px;
}

.status-dock-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 900;
}

.status-dock-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.status-drawer-toggle strong {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
  text-align: right;
}

.status-drawer-cue {
  display: none;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(37, 95, 219, 0.22);
  border-radius: 50%;
  background: var(--blue-soft);
  position: relative;
}

.status-drawer-cue::before {
  content: "";
  position: absolute;
  top: 53%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--blue);
  border-right: 2px solid var(--blue);
  transform: translate(-50%, -35%) rotate(-45deg);
  transition: transform 160ms ease;
}

.status-sidebar.is-expanded .status-drawer-cue {
  background: #fff;
}

.status-sidebar.is-expanded .status-drawer-cue::before {
  transform: translate(-50%, -65%) rotate(135deg);
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--amber-soft);
}

.status-sidebar.has-token .status-dot {
  background: var(--blue);
  box-shadow: 0 0 0 5px var(--blue-soft);
}

.status-sidebar.is-connected .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 5px var(--green-soft);
}

.status-drawer-body {
  max-height: calc(100vh - 200px);
  overflow: auto;
}

.status-section {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.status-section .section-head {
  margin: 0;
}

.status-section .section-head > p:not(.eyebrow) {
  font-size: 13px;
  line-height: 1.55;
}

.status-headline h2 {
  font-size: 24px;
}

.status-section .dashboard {
  grid-template-columns: 1fr;
  gap: 12px;
}

.status-section .panel {
  padding: 14px;
}

.status-section .events-panel {
  grid-column: auto;
}

.status-section dl {
  grid-template-columns: minmax(88px, 118px) minmax(0, 1fr);
  gap: 8px 10px;
  font-size: 13px;
}

.status-section .proxy-grid {
  grid-template-columns: 1fr;
}

.status-section .proxy-grid dd {
  min-height: 38px;
}

.status-section table {
  min-width: 580px;
  font-size: 13px;
}

@media (max-width: 980px) {
  .topbar-main {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .header-invite-form {
    grid-template-columns: 1fr;
  }

  .header-invite-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .step-rail {
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .status-sidebar {
    top: 132px;
    max-height: none;
  }
}

@media (max-width: 680px) {
  body {
    padding-bottom: 92px;
  }

  .topbar-shell,
  .app-shell {
    width: min(100% - 24px, 1240px);
  }

  .topbar-shell {
    gap: 8px;
  }

  .topbar-main {
    gap: 8px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
  }

  .topbar-actions nav {
    width: auto;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .github-link,
  .language-toggle {
    min-width: 0;
    padding: 0 9px;
    flex: 0 0 auto;
  }

  .header-invite-form {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding: 8px;
  }

  .header-invite-controls {
    grid-template-columns: minmax(0, 1fr) minmax(74px, auto);
  }

  .header-invite-form .claim-feedback {
    grid-column: 1 / -1;
    font-size: 12px;
  }

  .hero-copy,
  .entry-panel {
    padding: 22px;
    justify-content: flex-start;
  }

  .hero-copy {
    min-height: 0;
  }

  .lede {
    font-size: 16px;
  }

  .entry-panel .button,
  .step-complete-button {
    width: 100%;
  }

  .wizard-section .section-head {
    padding: 18px;
  }

  .step-rail {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .step-tab {
    min-height: 62px;
  }

  .wizard-card {
    min-height: 0;
    padding: 20px;
  }

  .wizard-card p,
  .wizard-card .step-list {
    font-size: 15px;
  }

  .status-sidebar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    z-index: 30;
    max-height: calc(100vh - 120px);
    box-shadow: 0 18px 50px rgba(19, 35, 63, 0.18);
    backdrop-filter: blur(16px);
  }

  .status-drawer-toggle {
    min-height: 56px;
  }

  .status-drawer-cue {
    display: inline-flex;
  }

  .status-drawer-body {
    display: none;
    max-height: calc(100vh - 206px);
  }

  .status-sidebar.is-expanded .status-drawer-body {
    display: block;
  }

  .status-section {
    padding: 12px;
  }

  .status-headline {
    gap: 10px;
  }

  .status-headline .button {
    width: 100%;
  }

  .status-section dl {
    grid-template-columns: 1fr;
  }

  .section {
    scroll-margin-top: 228px;
  }

  .public-page .status-sidebar {
    border-color: rgba(130, 151, 182, 0.44);
    background: rgba(255, 255, 255, 0.9);
  }

  .public-page .status-sidebar:not(.is-expanded)::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -8px;
    width: 44px;
    height: 4px;
    border-radius: 8px;
    background: rgba(95, 107, 122, 0.28);
    box-shadow: 0 6px 18px rgba(22, 32, 47, 0.18);
    transform: translateX(-50%);
  }

  .public-page .status-sidebar:not(.is-expanded) .status-drawer-toggle {
    min-height: 64px;
    border-bottom: 0;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(238, 245, 255, 0.97));
  }

  .public-page .status-sidebar:not(.is-expanded) .status-dock-meta strong {
    color: var(--blue);
    font-weight: 900;
  }

  .public-page .status-sidebar:not(.is-expanded) .status-drawer-cue {
    box-shadow:
      inset 0 0 0 4px rgba(255, 255, 255, 0.72),
      0 8px 18px rgba(37, 95, 219, 0.16);
  }

  .public-page .status-sidebar.is-expanded .status-drawer-toggle {
    border-bottom: 1px solid var(--line);
    background: #f8fbff;
  }
}

/* Full-screen guided flow refinement */
.public-page {
  --topbar-offset: 166px;
  overflow: hidden;
  padding-bottom: 0;
}

.public-page .topbar-shell {
  width: min(1280px, calc(100% - 28px));
}

.invite-floating-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.public-page .app-shell {
  width: min(1280px, calc(100% - 28px));
  height: calc(100svh - var(--topbar-offset));
  padding: 12px 0;
  overflow: hidden;
}

.invite-gate-screen {
  min-height: calc(100svh - var(--topbar-offset));
  height: 100%;
  overflow: auto;
}

.invite-gate-shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.invite-gate-hero {
  display: grid;
  gap: 12px;
  padding: 22px 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.96)),
    linear-gradient(90deg, rgba(37, 95, 219, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 163, 143, 0.08) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.invite-gate-hero h1 {
  max-width: 960px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.04;
}

.invite-gate-lede {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.invite-gate-panel {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding-bottom: 4px;
}

.public-page.is-invite-unlocked .invite-gate-screen {
  display: none;
}

.public-page.is-invite-unlocked .guide-layout {
  display: grid;
}

.public-page .guide-layout {
  height: 100%;
  min-height: 0;
  margin-top: 0;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
}

.public-page .guide-main,
.public-page .wizard-section {
  min-height: 0;
  height: 100%;
}

.public-page .wizard-section {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  margin-top: 0;
}

.workspace-intro {
  min-height: 0;
  padding: 14px 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(238, 247, 255, 0.95)),
    linear-gradient(90deg, rgba(37, 95, 219, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 163, 143, 0.08) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.workspace-intro h1 {
  max-width: 920px;
  font-size: clamp(30px, 3.2vw, 40px);
}

.workspace-intro .lede {
  display: -webkit-box;
  max-width: 980px;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.public-page .wizard-section .section-head {
  display: none;
}

.public-page .wizard-section .section-head h2 {
  font-size: 26px;
}

.public-page .wizard-section .section-head > p:not(.eyebrow) {
  max-width: none;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.55;
}

.public-page .step-rail {
  grid-template-columns: repeat(5, minmax(124px, 1fr));
  margin: 0;
}

.public-page .step-tab {
  min-height: 58px;
  padding: 8px;
}

.public-page .step-tab strong {
  font-size: 13px;
}

.public-page .step-tab small {
  margin-top: 2px;
}

.public-page .wizard-card-deck {
  min-height: 0;
  height: 100%;
}

.public-page .wizard-card {
  height: 100%;
  min-height: 0;
  overflow: auto;
  align-content: start;
}

.public-page .safety-compact {
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  box-shadow: none;
}

.public-page .safety-compact .section-head {
  margin-bottom: 8px;
  padding: 0;
  background: transparent;
  border: 0;
}

.public-page .safety-compact h2 {
  font-size: 18px;
}

.public-page .safety-compact ul {
  max-height: 130px;
  overflow: auto;
}

.public-page .safety-compact li {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.55;
}

.public-page .status-sidebar {
  top: calc(var(--topbar-offset) + 12px);
  max-height: calc(100svh - var(--topbar-offset) - 24px);
}

@media (max-width: 980px) {
  .public-page {
    --topbar-offset: 132px;
  }

  .public-page .guide-layout {
    grid-template-columns: 1fr;
  }

  .invite-gate-hero h1 {
    font-size: clamp(34px, 7vw, 48px);
  }

  .public-page .status-sidebar {
    top: auto;
  }
}

@media (max-width: 680px) {
  .public-page {
    --topbar-offset: 124px;
  }

  .public-page .topbar-shell {
    width: min(100% - 20px, 1280px);
    gap: 7px;
    padding: 8px 0;
  }

  .public-page .topbar-main {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .public-page .topbar-actions {
    display: flex;
    justify-content: flex-end;
  }

  .public-page .topbar-actions nav {
    display: none;
  }

  .public-page .github-link,
  .public-page .language-toggle {
    min-height: 32px;
    min-width: 54px;
  }

  .public-page .header-invite-form {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    padding: 7px;
  }

  .public-page .header-invite-form label,
  .public-page .invite-floating-note {
    display: none;
  }

  .public-page .header-invite-form input,
  .public-page .header-invite-form button {
    min-height: 40px;
  }

  .public-page .header-invite-controls {
    display: contents;
  }

  .public-page .app-shell {
    width: min(100% - 20px, 1280px);
    padding: 10px 0 74px;
  }

  .invite-gate-screen {
    min-height: calc(100svh - var(--topbar-offset) - 84px);
  }

  .invite-gate-shell {
    gap: 10px;
  }

  .invite-gate-hero {
    gap: 8px;
    padding: 16px;
  }

  .invite-gate-hero h1 {
    font-size: 34px;
  }

  .invite-gate-lede {
    display: -webkit-box;
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .invite-gate-panel {
    gap: 10px;
    padding-bottom: 8px;
  }

  .public-page .wizard-section {
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 8px;
  }

  .workspace-intro {
    padding: 14px 16px;
  }

  .workspace-intro h1 {
    font-size: 28px;
    line-height: 1.08;
  }

  .workspace-intro .lede {
    display: -webkit-box;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .public-page .wizard-section .section-head {
    display: none;
  }

  .public-page .step-rail {
    grid-template-columns: repeat(5, minmax(48px, 1fr));
    gap: 6px;
  }

  .public-page .step-tab {
    min-height: 42px;
    justify-content: center;
    padding: 5px;
  }

  .public-page .step-tab > span:last-child {
    display: none;
  }

  .public-page .step-index {
    width: 30px;
    height: 30px;
  }

  .public-page .wizard-card {
    padding: 18px 18px 74px;
  }

  .invite-gate-brief {
    padding: 14px;
  }

  .invite-limits {
    grid-template-columns: 1fr;
  }

  .invite-limits li {
    min-height: 0;
  }

  .invite-methods {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .invite-method-option {
    min-height: 92px;
    padding: 14px;
  }

  .invite-method-option strong {
    font-size: 20px;
  }

  .invite-method-option > span:last-child {
    font-size: 13px;
  }

  .method-recommend {
    top: 10px;
    right: 10px;
  }

  .invite-method-detail {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .invite-detail-copy h2 {
    font-size: 21px;
  }

  .invite-method {
    padding: 14px;
  }

  .invite-method-media {
    align-items: flex-start;
  }

  .invite-method-media img {
    width: 72px;
  }

  .invite-manual-note {
    grid-template-columns: 1fr;
  }

  .invite-manual-note strong,
  .invite-manual-note span,
  .invite-manual-note .button {
    grid-column: auto;
    grid-row: auto;
  }

  .public-page .step-complete-button {
    position: sticky;
    bottom: 0;
    z-index: 3;
    box-shadow: 0 -12px 24px rgba(255, 255, 255, 0.92);
  }

  .public-page .wizard-card-head .step-number {
    width: 38px;
    height: 38px;
  }

  .public-page .safety-compact ul {
    max-height: 116px;
  }
}

/* Isolated invite acquisition flow */
.invite-gate-shell {
  display: block;
}

.invite-view {
  min-height: 100%;
}

.invite-choice-view {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
}

.invite-choice-view[hidden],
.invite-method-page[hidden] {
  display: none !important;
}

.invite-choice-hint,
.invite-scope-note {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.55;
}

.invite-choice-hint {
  padding-inline: 4px;
  font-size: 14px;
}

.invite-scope-note {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(130, 151, 182, 0.34);
  border-radius: 8px;
  font-size: 13px;
}

.invite-choice-view .invite-methods {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
}

.invite-choice-view .invite-method-option {
  min-height: clamp(178px, 25svh, 260px);
  padding: clamp(18px, 2.4vw, 28px);
}

.invite-choice-view .invite-method-option strong {
  margin-top: 4px;
  font-size: clamp(22px, 2.5vw, 32px);
}

.invite-method-page {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.method-page-header {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.method-back-button {
  flex: 0 0 auto;
}

.method-page-header .method-recommend {
  position: static;
  min-height: 32px;
  border-radius: 8px;
}

.method-page-header .support-badges {
  justify-content: flex-end;
}

.invite-method-page-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(420px, 1fr);
  gap: clamp(14px, 2vw, 22px);
  align-items: start;
  overflow: auto;
}

.method-page-copy {
  display: grid;
  gap: 12px;
  padding: clamp(20px, 3vw, 34px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 255, 0.94));
  border: 1px solid rgba(130, 151, 182, 0.36);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(22, 32, 47, 0.08);
}

.method-page-copy h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
}

.method-page-copy p:not(.method-label) {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.7;
}

.method-page-card,
.qr-scan-panel {
  min-width: 0;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(130, 151, 182, 0.42);
  border-radius: 8px;
  box-shadow: 0 20px 54px rgba(22, 32, 47, 0.1);
}

.method-page-card {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 2.4vw, 28px);
}

.method-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.method-page-actions .button {
  flex: 1 1 180px;
  min-height: 48px;
  white-space: normal;
  text-align: center;
}

.qr-scan-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(210px, 0.48fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  padding: clamp(12px, 1.6vw, 18px);
}

.qr-image-button {
  min-height: min(64svh, 720px);
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(130, 151, 182, 0.42);
  border-radius: 8px;
  padding: clamp(8px, 1.2vw, 14px);
  background: #ffffff;
  cursor: zoom-in;
}

.qr-image-button:hover,
.qr-image-button:focus-visible {
  border-color: rgba(37, 95, 219, 0.62);
  outline: 3px solid rgba(37, 95, 219, 0.16);
}

.qr-scan-image {
  width: 100%;
  height: 100%;
  max-height: min(68svh, 760px);
  object-fit: contain;
  border-radius: 6px;
}

.qr-panel-copy {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 6px 4px;
}

.qr-panel-copy h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.15;
}

.qr-panel-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.65;
}

.qr-actions {
  display: grid;
  gap: 8px;
  align-self: end;
}

.qr-actions .button {
  min-height: 46px;
  width: 100%;
}

.qr-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}

.qr-preview-modal[hidden] {
  display: none !important;
}

.qr-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.62);
  backdrop-filter: blur(10px);
}

.qr-preview-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100svh - 36px);
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: clamp(14px, 2vw, 22px);
  background: #ffffff;
  border: 1px solid rgba(217, 226, 239, 0.9);
  border-radius: 8px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
}

.qr-preview-close {
  justify-self: end;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.qr-preview-dialog h2 {
  font-size: 24px;
}

.qr-preview-dialog img {
  width: 100%;
  max-height: min(72svh, 760px);
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr-preview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.has-qr-preview {
  overflow: hidden;
}

@media (max-width: 980px) {
  .invite-choice-view .invite-methods {
    grid-template-columns: 1fr;
  }

  .invite-choice-view .invite-method-option {
    min-height: 112px;
  }

  .invite-method-page-body {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .qr-scan-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .qr-image-button {
    grid-row: auto;
  }

  .qr-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .invite-choice-view {
    gap: 10px;
  }

  .invite-choice-hint {
    font-size: 13px;
  }

  .invite-scope-note {
    font-size: 12px;
    line-height: 1.45;
  }

  .method-page-header {
    min-height: 44px;
  }

  .method-page-header .support-badges {
    display: none;
  }

  .method-back-button {
    min-height: 40px;
    width: auto;
  }

  .method-page-copy {
    gap: 8px;
    padding: 14px 16px;
  }

  .method-page-copy h2 {
    font-size: 26px;
    line-height: 1.12;
  }

  .method-page-copy p:not(.method-label) {
    font-size: 14px;
    line-height: 1.5;
  }

  .qr-scan-panel {
    gap: 10px;
    padding: 10px;
  }

  .qr-image-button {
    min-height: min(58svh, 620px);
  }

  .qr-actions,
  .qr-preview-actions {
    grid-template-columns: 1fr;
  }

  .method-page-actions {
    display: grid;
  }
}

/* Simpler Alipay/free method pages */
.simple-method-page .method-page-header {
  max-width: 680px;
  width: 100%;
  justify-self: center;
}

.simple-method-page .method-page-header .support-badges {
  display: none;
}

.simple-method-page .invite-method-page-body {
  grid-template-columns: minmax(0, 680px);
  justify-content: center;
  align-content: start;
  gap: 12px;
}

.simple-method-page .method-page-copy,
.simple-method-page .qr-scan-panel {
  box-shadow: none;
}

.simple-method-page .method-page-copy {
  gap: 8px;
  padding: 0 2px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.simple-method-page .method-page-copy h2 {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
}

.simple-method-page .method-page-copy p:not(.method-label) {
  max-width: 620px;
  font-size: 15px;
  line-height: 1.55;
}

.simple-method-page .qr-scan-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 10px;
  background: #fff;
}

.simple-method-page .qr-image-button {
  min-height: auto;
  padding: 8px;
}

.simple-method-page .qr-scan-image {
  max-height: min(58svh, 620px);
}

.simple-method-page .qr-panel-copy {
  padding: 0 2px;
}

.simple-method-page .qr-panel-copy h2 {
  font-size: 18px;
}

.simple-method-page .qr-panel-copy p {
  font-size: 13px;
  line-height: 1.45;
}

.simple-method-page .qr-actions,
.simple-method-page .method-page-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.simple-method-page .method-page-actions {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 10px;
  background: #ffffff;
  border: 1px solid rgba(130, 151, 182, 0.36);
  border-radius: 8px;
}

.simple-method-page .qr-actions .button,
.simple-method-page .method-page-actions .button {
  min-height: 44px;
}

@media (max-width: 680px) {
  .simple-method-page .method-page-copy h2 {
    font-size: 24px;
  }

  .simple-method-page .qr-actions,
  .simple-method-page .method-page-actions {
    grid-template-columns: 1fr;
  }

  .simple-method-page .method-page-actions {
    padding: 8px;
  }
}
