:root {
  --bg: #0f1b2d;
  --bg-elevated: #172338;
  --surface: #1e2c45;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --text-muted: #9aa7bd;
  --primary: #3ecf8e;
  --primary-press: #2fb277;
  --primary-ink: #0c1a0e;
  --danger: #ff6b6b;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 40px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand-logo {
  display: block;
  border-radius: 10px;
}

.brand-name {
  font-size: 18px;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card.home {
  text-align: center;
  padding: 40px 28px;
  gap: 24px;
}

.title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.title-lg {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.body {
  font-size: 15px;
  margin: 0;
  color: var(--text);
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 13px;
}

.group-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: 999px;
  align-self: flex-start;
  max-width: 100%;
}

.group-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.group-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.15s ease, opacity 0.15s ease;
}

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

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
}

.btn-primary:hover {
  background: var(--primary-press);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.desktop-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
}

.qr-wrap {
  background: #ffffff;
  padding: 14px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-wrap svg,
.qr-wrap canvas,
.qr-wrap img {
  display: block;
  width: 200px;
  height: 200px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-badges-center {
  justify-content: center;
}

.store-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: 8px 16px;
  min-width: 148px;
  min-height: 52px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.2;
}

.store-badge-top {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.store-badge-bottom {
  font-size: 17px;
  font-weight: 600;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 0;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.footer {
  margin-top: auto;
  padding-top: 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-link {
  text-decoration: none;
  color: inherit;
}

.footer-link:hover {
  text-decoration: underline;
}

[hidden] {
  display: none !important;
}

@media (max-width: 380px) {
  .title-lg {
    font-size: 24px;
  }
  .title {
    font-size: 20px;
  }
}
