:root {
  --bg: #f8f7fc;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #4a4a6a;
  --accent: #7c3aed;
  --accent-light: #ede9fe;
  --border: #e2e0ef;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(26, 26, 46, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

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

a:hover {
  text-decoration-thickness: 2px;
}

.site-header {
  text-align: center;
  padding: 2rem 1.25rem 1.5rem;
  background: linear-gradient(160deg, var(--accent-light) 0%, var(--bg) 70%);
}

.site-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.camp-label {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
  font-weight: 700;
}

.section-lead {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.join-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.qr-wrap {
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

#qr-canvas {
  display: block;
}

.url-wrap {
  width: 100%;
  text-align: center;
}

.url-label {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.site-url {
  margin: 0 0 1rem;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", monospace;
  font-size: 0.8125rem;
  word-break: break-all;
  line-height: 1.4;
  padding: 0.75rem;
  background: var(--accent-light);
  border-radius: 8px;
}

.btn {
  display: inline-block;
  min-height: 48px;
  min-width: 120px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.98);
}

.protocol-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.protocol-steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.25rem 2.75rem;
}

.protocol-steps li:last-child {
  padding-bottom: 0;
}

.protocol-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 50%;
}

.protocol-steps strong {
  display: block;
  margin-bottom: 0.15rem;
}

.protocol-steps span {
  color: var(--text-muted);
  font-size: 0.9375rem;
}


.why-grid {
  display: grid;
  gap: 0.875rem;
}

.why-card {
  padding: 1rem 1.125rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.why-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.why-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.learn-more {
  margin: 1.25rem 0 0;
  font-weight: 600;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: start;
}

.steps li {
  counter-increment: start;
  position: relative;
  padding: 0 0 1.5rem 2.75rem;
}

.steps li:last-child {
  padding-bottom: 0;
}

.steps li::before {
  content: counter(start);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}

.steps strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.0625rem;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
}

.invite-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.625rem 1rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 8px;
  text-decoration: none;
}

.invite-link:hover {
  background: #ddd6fe;
}

.signer-grid {
  display: grid;
  gap: 0.75rem;
}

.signer-card {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  color: inherit;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.signer-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12);
}

.signer-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
}

.signer-logo-fallback {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--border);
}

.signer-body {
  min-width: 0;
  flex: 1;
}

.signer-platform {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.signer-name {
  display: block;
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: 0.2rem;
}

.signer-description {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.app-category {
  margin-bottom: 1.5rem;
}

.app-category:last-child {
  margin-bottom: 0;
}

.app-category-title {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.app-grid {
  display: grid;
  gap: 0.75rem;
}

.app-card {
  display: block;
  padding: 1rem 1.125rem;
  min-height: 48px;
  color: inherit;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.app-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.app-card-inner--logotype {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.app-logotype {
  display: block;
  width: auto;
  height: 2rem;
  max-width: 10rem;
  object-fit: contain;
  object-position: left center;
}

.app-card--logotype .app-description {
  margin-top: 0;
}

.app-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
}

.app-logo-fallback {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--border);
}

.app-body {
  min-width: 0;
  flex: 1;
}

.app-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12);
}

.app-name {
  display: block;
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: 0.25rem;
}

.app-description {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.app-url {
  display: block;
  font-size: 0.8125rem;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", monospace;
  color: var(--accent);
}

.site-footer {
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0 0 0.5rem;
}

@media (min-width: 540px) {
  .join-layout {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
  }

  .url-wrap {
    flex: 1;
    text-align: left;
    max-width: 360px;
  }

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

  .why-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

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

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

@media (min-width: 720px) {
  .site-header h1 {
    font-size: 2.5rem;
  }

  .card {
    padding: 2rem;
  }
}
