/* ============================================================
   Join + Lobby pages — shared stylesheet (ui-redesign/{join,lobby}.html)
   Reuses design tokens + .btn grammar from styles.css (foundation
   commit ff7d6b8). Only page-specific classes are defined here.
   ============================================================ */

.paper-card {
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.page-kicker {
  display: flex;
  align-items: center;
  margin: 0 0 0.5rem;
  color: var(--coral-dark);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.page-kicker::before {
  content: '';
  width: 18px;
  height: 3px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 99px;
  background: currentColor;
}

/* ── Join ──────────────────────────────────────────────────── */
.join-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 3rem) 1.5rem 4rem;
}
.join-card {
  max-width: 500px;
  width: 100%;
  padding: clamp(1.75rem, 5vw, 3.1rem);
  animation: scaleIn 0.4s var(--ease-spring);
}
.join-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  font-size: 1.6rem;
}
.join-title,
.lobby-destination {
  margin: 0.25rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--ink-deep);
}
.join-sub,
.lobby-sub { color: var(--muted); margin-bottom: 1.75rem; }

.join-card .form-group,
.join-card .field { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--ink);
}
.code-input {
  font-family: var(--mono);
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.join-card .btn { width: 100%; justify-content: center; }
.join-card .divider {
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px dashed var(--line-strong);
}

/* ── Lobby ─────────────────────────────────────────────────── */
.lobby-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 2rem) 1.5rem 4rem;
}
.lobby-card {
  max-width: 560px;
  width: 100%;
  padding: clamp(1.75rem, 5vw, 3rem);
  animation: fadeUp 0.5s var(--ease-out);
}

.trip-key-row {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  padding: 0.9375rem 1.0625rem;
  border-radius: 15px;
  background: var(--ink-deep);
  color: white;
  margin-bottom: 1.5rem;
}
.trip-key-row > div { flex: 1; }
.trip-key-label-sm {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.trip-key-val {
  font-family: var(--mono);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}
#lobby-copy-btn.btn {
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  box-shadow: 3px 3px 0 var(--ink);
}

.participants-list {
  display: grid;
  gap: 0.625rem;
  margin: 1.5rem 0;
}
.participant-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0.75rem;
  background: var(--white);
}
.participant-row.done { background: var(--mint-light); }
.participant-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink-deep);
  color: white;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}
.participant-name { font-weight: 600; color: var(--ink-deep); }
.participant-name small { color: var(--muted); font-weight: 600; }
.participant-status {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
}
.participant-status.waiting { color: var(--muted); }
.participant-status.done { color: #286343; font-weight: 700; }
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}
.participant-row.done .status-dot { background: #3b9c68; }
.participant-row:not(.done) .status-dot { animation: pulse 1.5s infinite; }

.lobby-waiting-msg {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  animation: fadeIn 0.5s ease;
}
.lobby-pulse-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--sky);
  margin: 0 auto 1rem;
  animation: ringPulse 1.8s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.15); opacity: 1; }
}

.lobby-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}
.lobby-links a { color: var(--muted); text-decoration: underline; }
.lobby-links a:hover { color: var(--coral-dark); }

@media (max-width: 620px) {
  .participant-row { grid-template-columns: 38px 1fr; }
  .participant-status { grid-column: 2; }
}
