/* Deuce Goose — Join Journey
   Standalone onboarding wizard. Ported from the design handoff prototype.
   All design tokens are redefined on `body.jj-page` (not :root) so the rest of
   the app is untouched; the jj-* / dg-blob classes are unique to this page. */

body.jj-page {
  /* Prototype tokens — pinned here for pixel fidelity, scoped to this page only */
  --color-bg: #FFFBF5;
  --color-bg-alt: #FFF5EB;
  --color-card: #FFFFFF;
  --color-pink: #f277a6;
  --color-pink-dark: #c94d7a;
  --color-pink-pale: #fde8f2;
  --color-lime: #daffb0;
  --color-lime-dark: #9ed45a;
  --color-lime-pale: #f0ffe0;
  --color-text: #3b3631;
  --color-text-muted: #7a6a62;
  --color-ink-faint: #a89a90;
  --color-border: #f5d0e0;
  --color-border-warm: #E8DDD4;
  --color-success: #2F9E44;
  --color-warning: #f59f00;
  --color-danger: #e03131;

  --gradient-primary: linear-gradient(135deg, #f277a6 0%, #e63980 60%, #c94d7a 100%);
  --gradient-soft:    linear-gradient(135deg, #fde8f2 0%, #ffe8d6 50%, #fef9e7 100%);
  --shadow-card:     0 2px 6px rgba(0,0,0,0.05);
  --shadow-elevated: 0 18px 50px rgba(242,119,166,0.22), 0 4px 14px rgba(59,54,49,0.06);
  --shadow-button:   0 4px 16px rgba(242,119,166,0.30);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  --font-sans:  'Plus Jakarta Sans', system-ui, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-hand:  'Caveat', cursive;

  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(ellipse 48% 42% at 84% 14%, rgba(242,119,166,0.30) 0%, transparent 62%),
    radial-gradient(ellipse 38% 40% at 10% 52%, rgba(242,119,166,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 46% 50% at 6% 96%, rgba(255,170,110,0.26) 0%, transparent 60%),
    radial-gradient(ellipse 60% 55% at 96% 100%, rgba(190,240,150,0.34) 0%, transparent 60%),
    linear-gradient(135deg, #fff8f1 0%, #fdeef0 45%, #fceede 72%, #f4fae6 100%);
  background-attachment: fixed;
}

body.jj-page *,
body.jj-page *::before,
body.jj-page *::after { box-sizing: border-box; }

/* Floating decorative blobs for life on the page */
.dg-blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
  z-index: 0;
  opacity: 0.55;
  animation: dg-float 18s ease-in-out infinite;
}
.dg-blob--a { width: 220px; height: 220px; top: -60px; right: 6%;
  background: radial-gradient(circle at 35% 35%, rgba(242,119,166,0.35), rgba(242,119,166,0.05)); }
.dg-blob--b { width: 150px; height: 150px; top: 36%; left: 6%;
  background: radial-gradient(circle at 35% 35%, rgba(242,119,166,0.22), rgba(242,119,166,0.02)); animation-delay: -6s; }
.dg-blob--c { width: 260px; height: 260px; bottom: -90px; left: -40px;
  background: radial-gradient(circle at 40% 40%, rgba(255,170,110,0.30), rgba(255,170,110,0.02)); animation-delay: -10s; }
.dg-blob--d { width: 300px; height: 300px; bottom: -120px; right: -60px;
  background: radial-gradient(circle at 40% 40%, rgba(190,240,150,0.38), rgba(190,240,150,0.03)); animation-delay: -3s; }
@keyframes dg-float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(0, -22px); }
}

/* ── Stage ───────────────────────────────────────────── */
.jj-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 20px 64px;
}

/* Brand lockup above the card */
.jj-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 22px;
}
.jj-brand img.jj-logo { width: 84px; height: 84px; display: block; }

/* Brand badge (goose roundel, the brand's own emoji) */
.jj-badge {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: 2.5px solid #fff;
  box-shadow: 0 4px 14px rgba(242,119,166,0.42);
}
.jj-badge--sm { width: 46px; height: 46px; font-size: 23px; }
.jj-badge--lg {
  width: 92px; height: 92px; font-size: 46px;
  border-width: 4px;
  box-shadow: 0 10px 28px rgba(242,119,166,0.45);
}
.jj-brand .wordmark {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 23px;
  letter-spacing: -0.04em;
  color: var(--color-text);
}
.jj-brand .wordmark em { font-style: italic; font-weight: 300; color: var(--color-pink-dark); }

/* ── Card ────────────────────────────────────────────── */
.jj-card {
  width: 100%;
  max-width: 488px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-elevated);
  padding: 30px 34px 34px;
  position: relative;
  overflow: hidden;
}
.jj-card::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--gradient-primary);
  opacity: 0.9;
}

/* ── Progress ────────────────────────────────────────── */
.jj-progress { margin-bottom: 26px; }
.jj-progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 9px;
}
.jj-progress__step {
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--color-text-muted); white-space: nowrap;
}
.jj-progress__label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--color-pink-dark);
}

/* Dots style (baked in) */
.jj-dots { display: flex; gap: 7px; }
.jj-dots__d {
  flex: 1; height: 6px; border-radius: 99px;
  background: var(--color-pink-pale);
  transition: background 0.35s ease;
}
.jj-dots__d.is-done { background: var(--color-pink); }
.jj-dots__d.is-active { background: var(--gradient-primary); }

/* ── Step content ────────────────────────────────────── */
.jj-step { animation: jj-enter 0.42s cubic-bezier(0.34, 1.1, 0.64, 1) both; }
@keyframes jj-enter {
  from { transform: translateY(11px); }
  to   { transform: translateY(0); }
}

.jj-kicker {
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--color-pink-dark);
  margin-bottom: 10px; white-space: nowrap;
  display: flex; align-items: center; gap: 7px;
}
.jj-headline {
  font-family: var(--font-serif); font-weight: 900;
  font-size: 31px; line-height: 1.1; letter-spacing: -0.035em;
  margin: 0 0 13px;
}
.jj-headline em { font-style: italic; font-weight: 300; color: var(--color-pink-dark); }
.jj-tag {
  font-family: var(--font-serif); font-style: italic; font-weight: 300;
  font-size: 16px; color: var(--color-text-muted);
  margin: 0 0 22px; line-height: 1.35;
}

/* ── Fields ──────────────────────────────────────────── */
.jj-field { margin-bottom: 16px; }
.jj-field__label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--color-text-muted);
  margin-bottom: 7px;
}

.jj-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px; font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.jj-input::placeholder { color: var(--color-ink-faint); font-weight: 500; }
.jj-input:focus {
  border-color: var(--color-pink);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(242,119,166,0.13);
}
.jj-input.is-error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 4px rgba(224,49,49,0.10);
}
.jj-input.is-ok {
  border-color: var(--color-success);
}

/* Code input — big, spaced, monospace-ish */
.jj-input--code {
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 15px;
}
.jj-input--code::placeholder { letter-spacing: 0.12em; font-family: var(--font-sans); font-weight: 700; font-size: 16px; }

.jj-shake { animation: jj-shake 0.42s cubic-bezier(.36,.07,.19,.97); }
@keyframes jj-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* Input with trailing affix (eye toggle, status) */
.jj-input-wrap { position: relative; }
.jj-input-wrap .jj-input { padding-right: 46px; }
.jj-affix {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 4px;
}
.jj-eye {
  border: none; background: transparent; cursor: pointer;
  font-size: 17px; padding: 6px 8px; border-radius: 8px; line-height: 1;
  color: var(--color-text-muted);
  box-shadow: none; min-height: 0;
}
.jj-eye:hover { background: var(--color-pink-pale); }
.jj-status-icon { font-size: 15px; padding-right: 8px; line-height: 1; }

/* Field message (error / ok / hint) */
.jj-msg {
  font-size: 12.5px; font-weight: 600;
  margin-top: 8px; line-height: 1.4;
  display: flex; align-items: flex-start; gap: 6px;
}
.jj-msg--error { color: var(--color-danger); }
.jj-msg--ok    { color: var(--color-success); }
.jj-msg--hint  { color: var(--color-text-muted); font-weight: 500; }

/* Password strength */
.jj-strength { display: flex; gap: 5px; margin-top: 10px; }
.jj-strength__seg {
  flex: 1; height: 5px; border-radius: 99px; background: var(--color-pink-pale);
  transition: background 0.25s;
}
.jj-strength__lab {
  font-size: 11px; font-weight: 700; margin-top: 7px;
  letter-spacing: 0.3px;
}

/* ── Buttons ─────────────────────────────────────────── */
.jj-actions { margin-top: 24px; }
.jj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%;
  font-family: var(--font-sans); font-weight: 800; font-size: 15.5px;
  padding: 15px 22px; border-radius: var(--radius-md);
  border: none; cursor: pointer; text-decoration: none;
  transition: transform 0.16s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.16s, opacity 0.16s;
}
.jj-btn--primary {
  background: var(--gradient-primary); color: #fff;
  box-shadow: var(--shadow-button);
}
.jj-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(242,119,166,0.5); }
.jj-btn--primary:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
  box-shadow: none;
}
.jj-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 700;
  color: var(--color-text-muted); padding: 12px 4px 0;
  box-shadow: none; min-height: 0;
  white-space: nowrap;
}
.jj-back:hover { color: var(--color-text); }

.jj-footnote {
  text-align: center; margin-top: 18px;
  font-size: 13px; color: var(--color-text-muted); font-weight: 500;
}
.jj-footnote a, .jj-link {
  color: var(--color-pink-dark); font-weight: 700; text-decoration: none; cursor: pointer;
}
.jj-footnote a:hover, .jj-link:hover { text-decoration: underline; }

/* ── League select ───────────────────────────────────── */
.jj-leagues { display: flex; flex-direction: column; gap: 9px; }
.jj-league {
  display: flex; align-items: center; gap: 13px;
  text-align: left; width: 100%;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 13px 15px;
  cursor: pointer;
  box-shadow: none;            /* neutralise the app's global button skin */
  min-height: 0;
  position: relative; overflow: hidden;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.16s;
}
/* Beat the app's `button:hover { color:#fff }` so card text stays legible */
.jj-league:hover, .jj-radio:hover { color: var(--color-text); }
.jj-league:hover:not(.is-soon) { transform: translateY(-1px); }
.jj-league::after {
  content: attr(data-emoji);
  position: absolute; right: -10px; bottom: -22px;
  font-size: 78px; opacity: 0; transform: rotate(-14deg);
  transition: opacity 0.25s; pointer-events: none;
}
.jj-league.is-selected {
  border-color: var(--la, var(--color-pink));
  background: #fff;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--la, var(--color-pink)) 22%, transparent);
}
.jj-league.is-selected::after { opacity: 0.10; }
.jj-league.is-soon { opacity: 0.62; cursor: not-allowed; }

.jj-league__emoji {
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 25px; line-height: 1;
  background: color-mix(in srgb, var(--la, var(--color-pink)) 14%, #fff);
  position: relative; z-index: 1;
}
.jj-league__body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.jj-league__name {
  font-family: var(--font-serif); font-weight: 900; font-size: 17px;
  letter-spacing: -0.02em; line-height: 1.1; color: var(--color-text);
  display: flex; align-items: center; gap: 8px;
}
.jj-league__tag {
  font-family: var(--font-serif); font-style: italic; font-weight: 300;
  font-size: 13px; color: var(--color-text-muted); margin-top: 1px;
}
.jj-league__meta {
  font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--color-ink-faint);
  margin-top: 5px;
}
.jj-league__check {
  width: 26px; height: 26px; flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: transparent;
  background: #fff;
  transition: all 0.2s; position: relative; z-index: 1;
}
.jj-league.is-selected .jj-league__check {
  background: var(--la, var(--color-pink)); border-color: var(--la, var(--color-pink));
  color: #fff;
}
.jj-soon-pill {
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.6px;
  text-transform: uppercase;
  background: var(--color-bg-alt); color: var(--color-text-muted);
  padding: 3px 8px; border-radius: 99px;
}

.jj-selected-count {
  font-size: 12px; font-weight: 700; color: var(--color-text-muted);
  margin-top: 14px; text-align: center;
}
.jj-empty {
  font-size: 13px; color: var(--color-text-muted); text-align: center;
  padding: 18px 6px; line-height: 1.4;
}

/* ── Default league (radio) ──────────────────────────── */
.jj-radio {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 13px 15px; cursor: pointer;
  box-shadow: none; min-height: 0;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.jj-radio.is-selected {
  border-color: var(--la, var(--color-pink)); background: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--la, var(--color-pink)) 18%, transparent);
}
.jj-radio__dot {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.jj-radio.is-selected .jj-radio__dot { border-color: var(--la, var(--color-pink)); }
.jj-radio.is-selected .jj-radio__dot::after {
  content: ''; width: 11px; height: 11px; border-radius: 50%;
  background: var(--la, var(--color-pink));
}
.jj-radio__emoji { font-size: 22px; }
.jj-radio__name { font-weight: 700; font-size: 14.5px; color: var(--color-text); }
.jj-radio__sub { font-size: 11px; color: var(--color-text-muted); margin-top: 1px; }

/* ── Summary / welcome ───────────────────────────────── */
.jj-welcome { text-align: center; }
.jj-welcome__roundel {
  margin: 4px auto 18px;
  animation: jj-pop 0.6s cubic-bezier(0.34, 1.5, 0.5, 1) both;
}
.jj-welcome__logo { width: 100px; height: 100px; display: block; }
@keyframes jj-pop {
  0% { transform: scale(0.55) rotate(-12deg); }
  60% { transform: scale(1.08) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}
.jj-summary {
  background: var(--gradient-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 6px 18px;
  margin: 22px 0 4px;
  text-align: left;
}
.jj-summary__row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(242,119,166,0.18);
}
.jj-summary__row:last-child { border-bottom: none; }
.jj-summary__row--leagues { flex-direction: column; align-items: flex-start; gap: 11px; }
.jj-summary__v--wrap { justify-content: flex-start; width: 100%; flex-wrap: wrap; }
.jj-summary__k {
  font-size: 10px; font-weight: 800; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--color-text-muted);
}
.jj-summary__v {
  font-weight: 700; font-size: 14.5px; text-align: right;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end;
}
.jj-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: 99px; padding: 3px 9px;
}
.jj-chip--default {
  background: var(--color-pink-dark); color: #fff; border-color: var(--color-pink-dark);
}

/* Review pane / small screens */
@media (max-width: 540px) {
  .jj-card { padding: 26px 20px 28px; }
  .jj-headline { font-size: 27px; }
}
