:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #111111;
  --muted: #737373;
  --border: #e7e5e4;
  --primary: #111111;
  --danger: #b91c1c;
  --success: #166534;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.9), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
}

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

.page {
  width: min(100%, 28rem);
  margin: 0 auto;
  padding: 1.25rem;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.topbar,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar {
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  letter-spacing: -0.05em;
}

.remaining {
  font-size: clamp(4rem, 26vw, 7rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.muted,
.hint {
  color: var(--muted);
}

.hint {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
}

.panel,
.hero-card,
.last-card {
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.panel {
  padding: 1.25rem;
}

.hero-card {
  padding: 1rem;
}

.last-card {
  margin-top: 1rem;
  padding: 1rem;
}

.claim-button,
.primary {
  width: 100%;
  border: 0;
  border-radius: 1.2rem;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-weight: 750;
}

.claim-button {
  min-height: 4.4rem;
  margin-top: 1rem;
  font-size: 1.15rem;
}

.primary {
  min-height: 3.25rem;
  font-size: 1rem;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  cursor: pointer;
}

.small {
  min-height: 2.2rem;
  padding: 0 0.85rem;
  font-size: 0.9rem;
}

.stack {
  display: grid;
  gap: 0.75rem;
}

label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: white;
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 0.9rem 1rem;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: #111111;
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
}

.notice {
  margin-top: 1rem;
  border-radius: 1rem;
  background: #f5f5f4;
  color: var(--text);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}

.notice-success {
  background: #dcfce7;
  color: var(--success);
}

.notice-error {
  background: #fee2e2;
  color: var(--danger);
}

pre,
.manual-copy {
  white-space: pre-wrap;
  word-break: break-word;
}

pre {
  margin: 0.75rem 0 0;
  border-radius: 1rem;
  background: #f5f5f4;
  padding: 1rem;
  font-family: inherit;
  font-size: 1rem;
}

.manual-copy {
  min-height: 7rem;
  margin-top: 0.75rem;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-nav a {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 360px) {
  .page {
    padding: 1rem;
  }

  .footer-nav {
    align-items: flex-start;
    flex-direction: column;
  }
}

