/* ── Reset & base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary:   #06c755;   /* LINE green */
  --color-primary-h: #05b04c;
  --color-danger:    #e53e3e;
  --color-text:      #2d3748;
  --color-hint:      #718096;
  --color-border:    #e2e8f0;
  --color-bg:        #f7fafc;
  --radius:          12px;
  --shadow:          0 2px 12px rgba(0,0,0,.08);
  --font:            -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                     "Helvetica Neue", Arial, sans-serif;
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

/* ── Layout ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 480px;
  padding: 24px 16px 40px;
}

/* ── Header ────────────────────────────────────────────── */
.header { text-align: center; margin-bottom: 32px; }
.header__title { font-size: 1.5rem; font-weight: 700; color: var(--color-primary); }

/* ── Steps ─────────────────────────────────────────────── */
.step { animation: fadeIn .25s ease; }
.step.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hint text ─────────────────────────────────────────── */
.hint {
  font-size: .95rem;
  color: var(--color-hint);
  margin-bottom: 20px;
  line-height: 1.6;
}
.hint--small { font-size: .8rem; margin-top: -14px; margin-bottom: 20px; }
.hint strong { color: var(--color-text); }

/* ── Form ──────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color .15s;
  outline: none;
  -webkit-appearance: none;
}

.form-group input:focus { border-color: var(--color-primary); }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  margin-top: 8px;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover { background: var(--color-primary-h); }
.btn--primary:disabled { opacity: .55; cursor: not-allowed; }

.btn--ghost {
  background: transparent;
  color: var(--color-hint);
  border: 1.5px solid var(--color-border);
  margin-top: 10px;
}
.btn--ghost:hover { background: var(--color-border); }

/* ── Error messages ────────────────────────────────────── */
.error-msg {
  font-size: .85rem;
  color: var(--color-danger);
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #fff5f5;
  border-radius: 8px;
  border-left: 3px solid var(--color-danger);
}
.error-msg.hidden { display: none; }

/* ── Spinner ───────────────────────────────────────────── */
.spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 40px auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Success ───────────────────────────────────────────── */
.success-icon {
  width: 72px; height: 72px;
  background: var(--color-primary);
  color: #fff;
  font-size: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px auto 20px;
}
.success-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ── Error screen ──────────────────────────────────────── */
.error-icon {
  width: 72px; height: 72px;
  background: var(--color-danger);
  color: #fff;
  font-size: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px auto 20px;
}

/* ── Responsive ────────────────────────────────────────── */
@media (min-width: 480px) {
  .container {
    margin-top: 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 36px 32px 48px;
  }
}

/* ── App views (v0.2.0) ─────────────────────────────────── */
.header.hidden { display: none; }

.app-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
}
.app-nav__title { font-size: 1.1rem; font-weight: 700; color: var(--color-text); }
.app-nav__btn {
  background: none;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.app-nav__btn:hover { background: rgba(6,199,85,.08); }

/* ── Store card ──────────────────────────────────────────── */
.store-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.store-card__banner {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #06c755 0%, #05b04c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.65);
  font-size: .875rem;
  letter-spacing: .08em;
}
.store-card__body { padding: 16px 18px; }
.store-card__name { font-size: 1.15rem; font-weight: 700; color: var(--color-text); margin-bottom: 10px; }
.store-card__meta { font-size: .875rem; color: var(--color-hint); line-height: 1.8; }

/* ── Member card ─────────────────────────────────────────── */
.member-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  margin-bottom: 24px;
}
.member-card__avatar {
  width: 72px; height: 72px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
}
.member-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.member-field:last-child { border-bottom: none; }
.member-label { font-size: .85rem; font-weight: 600; color: var(--color-hint); min-width: 60px; }
.member-value { font-size: .95rem; color: var(--color-text); word-break: break-all; text-align: right; }

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(45,55,72,.9);
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: .9rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 100;
  white-space: nowrap;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
