:root {
  color-scheme: light dark;
  --bg: #f6f6f6;
  --panel: #ffffff;
  --ink: #111111;
  --muted: #5f5f5f;
  --line: #d8d8d8;
  --accent: #111111;
  --accent-pressed: #333333;
  --accent-soft: #eeeeee;
  --danger: #b00020;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

.shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.panel {
  width: 100%;
  padding: clamp(16px, 5vw, 42px) 0;
}

.brand-logo {
  width: clamp(116px, 28vw, 184px);
  height: auto;
  display: block;
  margin: 0 auto 28px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.invite-title {
  font-size: clamp(1.55rem, 5vw, 2.35rem);
}

.lead {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
  padding-top: 1.5rem;
  justify-content: center;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:active {
  background: var(--accent-pressed);
}

.pt-6 {
  margin-top: 1.5rem;
}

.button.secondary {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--line);
}

.code-card {
  margin-top: 28px;
  padding: 0;
}

.code-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.code {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: clamp(3rem, 14vw, 5.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.08em;
}

.status {
  min-height: 1.5em;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.status.error {
  color: var(--danger);
}

.support-link {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  opacity: 0.72;
}

.support-link:hover {
  opacity: 1;
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050505;
    --panel: #101010;
    --ink: #f4f4f4;
    --muted: #a9a9a9;
    --line: #303030;
    --accent: #f4f4f4;
    --accent-pressed: #d9d9d9;
    --accent-soft: #1c1c1c;
    --danger: #ff9a9a;
  }

  .button {
    color: #101010;
  }

  .button.secondary {
    color: var(--accent);
  }
}
