:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --primary: #06c755;     /* LINE green */
  --primary-dark: #04a347;
  --secondary: #eef0f5;
  --border: #e5e7eb;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
}

.wrap { max-width: 480px; margin: 0 auto; padding: 16px; }

.hero { text-align: center; margin: 16px 0 20px; }
.hero h1 { font-size: 24px; margin: 0 0 6px; }
.hero .lead { color: var(--muted); margin: 0; font-size: 14px; }

.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card.hidden { display: none; }

.hello { font-weight: 600; margin: 0 0 16px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.stat {
  background: var(--secondary);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
}
.stat-value { font-size: 22px; font-weight: 700; color: var(--primary-dark); }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

.link-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.link-row { display: flex; gap: 6px; margin-bottom: 16px; }
.link-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  background: #fafbfc;
  min-width: 0;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
  background: var(--secondary);
  color: var(--text);
  width: auto;
  padding: 0 14px;
  font-size: 13px;
}

.reward-info { margin-top: 16px; font-size: 14px; }
.reward-info summary { cursor: pointer; color: var(--muted); }
.reward-info ul { margin: 8px 0; padding-left: 20px; }

.muted { color: var(--muted); font-size: 13px; }
.error-msg { color: #c0392b; font-weight: 600; margin: 0 0 8px; }

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 9;
}
.toast.hidden { display: none; }
