:root {
  --purple: #4B0082;
  --purple2: #6f2dbd;
  --purple-light: #f1ebf8;
  --bg: #f4f2f8;
  --card: #ffffff;
  --ink: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e0f0;
  --green: #177245;
  --yellow: #f9a825;
  --red: #d32f2f;
  --sidebar-w: 230px;
  --gold: #C9A84C;
  --gold-dark: #92600a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: var(--bg); color: var(--ink); min-height: 100vh; }

/* ── Top Nav ── */
.topnav {
  height: 64px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(75,0,130,0.06);
}
.topnav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.topnav-brand img { height: 36px; width: auto; }
.topnav-brand-text { display: flex; flex-direction: column; gap: 2px; }
.topnav-name { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; line-height: 1; }
.topnav-sub { font-size: 10px; font-weight: 500; color: var(--purple2); letter-spacing: 0.02em; line-height: 1; }

.topnav-vdivider { width: 1px; height: 28px; background: var(--border); margin: 0 20px; flex-shrink: 0; }

.topnav-panel-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--purple2); flex-shrink: 0; line-height: 1.3;
}

.topnav-pills { display: flex; align-items: stretch; height: 64px; }
.topnav-pills:has(.topnav-home-ctas) { margin-left: auto; }

/* Home-page logged-out CTAs (right-aligned in topnav) */
.topnav-home-ctas {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 8px;
}
.topnav-home-pill {
  background: transparent;
  color: var(--purple);
  border: 1.5px solid var(--purple);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.topnav-home-pill:hover { background: var(--purple-light); }
.topnav-home-pill.primary {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.topnav-home-pill.primary:hover { opacity: 0.9; background: var(--purple); }
@media (max-width: 600px) {
  .topnav-home-pill { padding: 7px 12px; font-size: 12px; }
  .topnav-home-ctas { gap: 6px; padding-right: 0; }
}

.topnav-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 0 16px; border: none; background: transparent;
  font-size: 14px; font-weight: 500; color: var(--muted);
  cursor: pointer; position: relative; white-space: nowrap;
  transition: color 0.15s;
}
.topnav-pill:hover { color: var(--purple); }
.topnav-pill.active { color: var(--purple); font-weight: 600; }
.topnav-pill.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 16px; right: 16px;
  height: 2.5px; background: var(--purple);
  border-radius: 2px 2px 0 0;
}
.topnav-pill svg { opacity: 0.55; flex-shrink: 0; }
.topnav-pill:hover svg, .topnav-pill.active svg { opacity: 1; }

.topnav-account { position: relative; margin-left: auto; flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.topnav-account-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--purple); color: #fff;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background 0.15s;
}
.topnav-account-btn:hover { background: var(--purple2); }

.topnav-dropdown {
  display: none; position: absolute;
  top: calc(100% + 10px); right: 0;
  background: #fff; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 190px; overflow: hidden;
  z-index: 300; border: 1px solid var(--border);
}
.topnav-dropdown.open { display: block; }
.topnav-dd-section { padding: 6px 0; }
.topnav-dd-section + .topnav-dd-section { border-top: 1px solid var(--border); }
.topnav-dd-item {
  display: block; width: 100%; padding: 10px 18px;
  border: none; background: transparent; text-align: left;
  font-size: 13.5px; color: var(--ink);
  cursor: pointer; transition: background 0.1s;
}
.topnav-dd-item:hover { background: var(--purple-light); }
.topnav-dd-item.back { color: var(--purple); font-weight: 600; }
.topnav-dd-item.danger { color: var(--red); }
.topnav-dd-item.danger:hover { background: #fdf2f2; }

/* ── Main content ── */
.main {
  padding: 88px 32px 60px;
  max-width: 100%;
}

/* ── Page title bar (was .topbar) ── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.topbar-title h1 { font-size: 24px; font-weight: 800; color: var(--ink); }
.topbar-title p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.code-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--purple-light);
  border: 1.5px solid var(--purple);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 800;
  color: var(--purple);
  font-size: 15px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.code-copy-btn {
  background: none; border: none; cursor: pointer;
  color: var(--purple); font-size: 12px; font-weight: 700;
  padding: 0; margin-left: 4px;
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 12px rgba(75,0,130,0.05);
  margin-bottom: 20px;
}
.card-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 12px;
}
.card h2 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--purple); }

/* ── Grids ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
@media(max-width:900px) { .grid2 { grid-template-columns: 1fr; } .grid4 { grid-template-columns: 1fr 1fr; } }

/* ── Section title ── */
.section-title {
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 14px; margin-top: 4px;
}

/* ── Stat pills ── */
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
.stat-pill {
  background: white; border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(75,0,130,0.05);
}
.stat-pill .s-label { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.stat-pill .s-value { font-size: 26px; font-weight: 900; color: var(--purple); line-height: 1.1; }
.stat-pill .s-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Playing cards ── */
.playing-cards { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.pp-card {
  width: 90px; height: 124px;
  border: 1.5px solid #ddd; border-radius: 12px;
  background: white; box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-weight: 900;
  gap: 2px; padding: 6px 4px;
}
.pp-card .p-rank { font-size: 24px; line-height: 1; }
.pp-card .p-suit { font-size: 32px; line-height: 1; }
.pp-card .p-word { font-size: 11px; font-weight: 700; text-align: center; color: var(--muted); line-height: 1.2; margin-top: 4px; }
.red { color: #c62828; } .black { color: #111; }

/* ── Bars ── */
.bar-row { display: grid; grid-template-columns: 110px 1fr 46px; gap: 10px; align-items: center; margin: 9px 0; }
.bar-label { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.bar-track { height: 20px; background: #f0edf7; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.3s; }
.bar-pct { font-size: 13px; font-weight: 800; text-align: right; }
.fill-s { background: #222; } .fill-d { background: #d32f2f; }
.fill-c { background: #555; } .fill-h { background: #e53935; }
.fill-black { background: #333; } .fill-red { background: #d32f2f; }
.fill-purple { background: var(--purple2); }

/* ── Stacked bar ── */
.stacked-bar { display: flex; height: 34px; border-radius: 999px; overflow: hidden; margin: 12px 0; }
.seg { display: flex; align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 12px; min-width: 24px; }

/* ── Quote / info boxes ── */
.quote-box { border-left: 4px solid var(--purple); background: #faf8ff; padding: 13px 15px; border-radius: 0 12px 12px 0; font-size: 15px; font-weight: 700; color: var(--purple); line-height: 1.4; margin: 12px 0; }
.good-box { border-left: 4px solid var(--green); background: #f0faf4; padding: 13px 15px; border-radius: 0 12px 12px 0; margin: 10px 0; }
.warn-box { border-left: 4px solid var(--yellow); background: #fffbf0; padding: 13px 15px; border-radius: 0 12px 12px 0; margin: 10px 0; }
.danger-box { border-left: 4px solid var(--red); background: #fff5f5; padding: 13px 15px; border-radius: 0 12px 12px 0; margin: 10px 0; }
.purple-box { border-left: 4px solid var(--purple); background: #faf8ff; padding: 13px 15px; border-radius: 0 12px 12px 0; margin: 10px 0; }
.alert-yellow { background: #fff3cd; border-left: 4px solid var(--yellow); border-radius: 0 10px 10px 0; padding: 12px; margin-top: 14px; font-size: 13px; }

/* ── Insight grid ── */
.insight-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; margin-bottom: 20px; }
.insight-box { border-left: 4px solid var(--purple); background: #faf8ff; border-radius: 0 12px 12px 0; padding: 15px; }
.insight-box h3 { color: var(--purple); font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.insight-box ul { padding-left: 16px; }
.insight-box li, .insight-box p { font-size: 13px; color: var(--ink); line-height: 1.55; }
.insight-box.green { border-left-color: var(--green); background: #f0faf4; }
.insight-box.green h3 { color: var(--green); }
.insight-box.red { border-left-color: var(--red); background: #fff5f5; }
.insight-box.red h3 { color: var(--red); }
.insight-box.yellow { border-left-color: var(--yellow); background: #fffbf0; }
.insight-box.yellow h3 { color: #92400e; }

/* ── Gap status dots ── */
.gap-dot { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; font-size: 11px; font-weight: 900; color: white; margin: auto; }
.dot-green { background: var(--green); }
.dot-yellow { background: var(--yellow); color: #332500; }
.dot-red { background: var(--red); }
.dot-purple { background: var(--purple2); }
.dot-gray { background: #bbb; color: #444; }

/* ── Table ── */
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; vertical-align: middle; }
th { background: var(--purple-light); color: var(--purple); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.heat td { text-align: center; }
.heat td:first-child { text-align: left; }
.click-row { cursor: pointer; }
.click-row:hover { background: #faf8ff; }
.team-link { color: var(--purple); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ── Legend ── */
.legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ── Primary perspective ── */
.primary-suit { font-size: 48px; line-height: 1; margin-bottom: 4px; }
.primary-label { font-size: 22px; font-weight: 900; }
.primary-theme { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 11px 14px; font-size: 15px; background: white; color: var(--ink);
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--purple2); }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--purple); color: white; border: none; border-radius: 10px; padding: 11px 20px; font-weight: 700; cursor: pointer; font-size: 14px; transition: background 0.15s; }
.btn:hover { background: var(--purple2); }
.btn.secondary { background: white; color: var(--purple); border: 1.5px solid var(--purple); }
.btn.secondary:hover { background: var(--purple-light); }
.btn.danger { background: #a61b2b; }
.btn.danger:hover { background: #c62828; }
.btn.light { background: var(--purple-light); color: var(--purple); }
.btn.light:hover { background: #e0d4f5; }
.btn.full { width: 100%; justify-content: center; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ── Messages ── */
.msg-error { color: #a61b2b; font-weight: 700; font-size: 14px; margin-top: 10px; }
.msg-success { color: var(--green); font-weight: 700; font-size: 14px; margin-top: 10px; }
.msg-loading { color: var(--muted); font-style: italic; font-size: 14px; margin-top: 10px; }

/* ── Save code banner ── */
.save-code-banner {
  background: #faf8ff; border: 1.5px solid var(--purple);
  border-radius: 12px; padding: 12px 18px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
}
.access-code { font-size: 20px; font-weight: 900; letter-spacing: 2px; color: var(--ink); flex-shrink: 0; }

/* Inline underlined action links in the code bar */
.result-action-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 14px; font-weight: 600; color: var(--purple);
  text-decoration: underline; text-underline-offset: 2px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; padding: 0; white-space: nowrap;
}
.result-action-link:hover { color: var(--purple2); }

/* ── Share modal ── */
.share-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(4px);
  z-index: 500; align-items: center; justify-content: center;
}
.share-modal-overlay.open { display: flex; }
.share-modal-box {
  background: #fff; border-radius: 20px; padding: 28px 24px;
  max-width: 380px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.2); text-align: center;
}
.share-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.share-modal-btn {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px;
  border-radius: 12px; border: 2px solid var(--border); background: #fff;
  cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 600;
  color: var(--ink); text-align: left; transition: border-color 0.15s, background 0.15s;
}
.share-modal-btn:hover { border-color: var(--purple); background: var(--purple-light); }
.share-modal-icon { font-size: 22px; width: 30px; text-align: center; flex-shrink: 0; }
.share-modal-label { display: flex; flex-direction: column; }
.share-modal-label span { font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 1px; }
.share-modal-cancel {
  margin-top: 14px; background: none; border: none; color: var(--muted);
  font-size: 14px; cursor: pointer; font-family: inherit;
}
.share-modal-cancel:hover { color: var(--ink); }
.share-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 22px;
  border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; transition: opacity 0.3s; pointer-events: none; z-index: 600;
}
.share-toast.show { opacity: 1; }

/* ── Refine box ── */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 10px; margin: 12px 0; }
.choice-grid .btn { width: 100%; justify-content: center; }
.suit-btn-s { background: #222; } .suit-btn-s:hover { background: #000; }
.suit-btn-d { background: #d32f2f; } .suit-btn-d:hover { background: #b71c1c; }
.suit-btn-c { background: #555; } .suit-btn-c:hover { background: #333; }
.suit-btn-h { background: #e53935; } .suit-btn-h:hover { background: #c62828; }

/* ── Combo section ── */
.combo-mini { font-size: 17px; font-weight: 900; color: var(--purple); margin-bottom: 8px; }

/* ── Hand symbols ── */
.hand-symbols { font-size: 24px; letter-spacing: 2px; font-weight: 900; }

/* ── Details/summary ── */
details.team-hands { background: white; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 18px; }
details.team-hands summary { cursor: pointer; padding: 18px 20px; color: var(--purple); font-weight: 800; font-size: 16px; }
.details-inner { padding: 0 20px 20px; }

/* ── Play/event mode ── */
body.playMode .topnav { display: none; }
body.playMode .main { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; }
.event-hero { background: linear-gradient(135deg,var(--purple),#1f102f); color: white; border-radius: 20px; padding: 28px; margin-bottom: 20px; box-shadow: 0 12px 30px rgba(31,16,47,.18); }
.event-hero h1 { margin: 0 0 8px; font-size: 28px; font-weight: 900; }
.event-hero p { margin: 0; opacity: .9; }

/* ── Recent banner ── */
.recent-banner { border-left: 4px solid var(--green); background: #f0faf4; border-radius: 0 12px 12px 0; padding: 14px 16px; margin-bottom: 16px; }
.recent-banner p { margin: 0 0 10px; font-size: 14px; }

/* ── Home page ── */
.hero { background: linear-gradient(135deg,#1a0a2e 0%,var(--purple) 60%,#6f2dbd 100%); color: white; padding: 56px 48px; position: relative; overflow: hidden; }
.hero::before { content: '♠♦♣♥'; position: absolute; top: -20px; right: 40px; font-size: 120px; opacity: 0.06; letter-spacing: 10px; line-height: 1; }
.hero-eyebrow { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: #C9A84C; margin-bottom: 14px; }
.hero h1 { font-size: 34px; font-weight: 900; line-height: 1.2; max-width: 580px; margin-bottom: 18px; }
.hero h1 span { color: #C9A84C; }
.hero p { font-size: 16px; opacity: 0.88; line-height: 1.6; max-width: 520px; margin-bottom: 28px; }
.hero-cards { display: flex; gap: 8px; margin-top: 36px; }
.hero-card { width: 50px; height: 70px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; }
.hero-card .hcr { font-size: 15px; }
.hero-card .hcs { font-size: 20px; line-height: 1; }
.hero-card.hc-red .hcs,.hero-card.hc-red .hcr { color: #ff8a80; }
.hero-card.hc-black .hcs,.hero-card.hc-black .hcr { color: white; }
.how-section { padding: 40px 48px; background: white; border-bottom: 1px solid var(--border); }
.how-section h2 { font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.how-section .sub { font-size: 15px; color: var(--muted); margin-bottom: 28px; }
.step-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.step { text-align: center; padding: 18px 14px; }
.step-num { width: 42px; height: 42px; background: var(--purple-light); color: var(--purple); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px; margin: 0 auto 12px; }
.step h3 { font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.dashboard-section { padding: 40px 48px; background: var(--bg); border-bottom: 1px solid var(--border); }
.dashboard-section h2 { font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.dashboard-section .sub { font-size: 15px; color: var(--muted); margin-bottom: 24px; }
.dashboard-section img { width: 100%; border-radius: 16px; box-shadow: 0 8px 40px rgba(75,0,130,0.15); border: 1px solid var(--border); }
.home-cta { padding: 48px; background: linear-gradient(135deg,#1a0a2e,var(--purple)); color: white; text-align: center; }
.home-cta h2 { font-size: 26px; font-weight: 900; margin-bottom: 10px; }
.home-cta p { font-size: 15px; opacity: 0.88; margin-bottom: 26px; max-width: 460px; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* ── Resources page ── */
.resources-content { padding: 32px; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 14px; box-shadow: 0 8px 30px rgba(75,0,130,0.12); }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; border-radius: 14px; }
.download-card { background: linear-gradient(135deg,var(--purple-light),white); border: 1.5px solid var(--purple); border-radius: 16px; padding: 22px; display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.download-icon { font-size: 48px; flex-shrink: 0; }
.download-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.download-card p { font-size: 14px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }
.product-card { background: white; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 2px 12px rgba(75,0,130,0.06); display: flex; flex-direction: column; }
.product-img { width: 100%; height: 260px; object-fit: contain; background: #f8f5ff; padding: 20px; }
.product-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.product-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--purple); margin-bottom: 8px; }
.product-body h3 { font-size: 18px; font-weight: 900; margin-bottom: 8px; line-height: 1.3; }
.product-body p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; flex: 1; }
.contact-banner { background: linear-gradient(135deg,#1a0a2e,var(--purple)); color: white; border-radius: 20px; padding: 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 8px; }
.contact-banner h2 { font-size: 20px; font-weight: 900; margin-bottom: 8px; }
.contact-banner p { font-size: 14px; opacity: 0.88; max-width: 460px; line-height: 1.6; }
.btn.gold { background: #C9A84C; color: #1a0a2e; }
.btn.gold:hover { background: #b8943e; }
.btn.large { padding: 13px 26px; font-size: 15px; border-radius: 12px; }

/* ── Entry path cards ── */
.entry-path-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 24px; max-width: 860px; }
.entry-path-card { background: white; border: 2px solid var(--border); border-radius: 14px; padding: 24px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; transition: all 0.15s; }
.entry-path-card .ep-icon { font-size: 34px; line-height: 1; display: flex; justify-content: center; align-items: center; }
.entry-path-card .ep-title { font-size: 15px; font-weight: 900; color: var(--ink); }
.entry-path-card .ep-desc { font-size: 13px; color: var(--muted); line-height: 1.55; flex: 1; }
.entry-path-card .ep-btn { width: 100%; padding: 10px 16px; border-radius: 9px; border: none; font-size: 13px; font-weight: 800; cursor: pointer; margin-top: 6px; }
.ep-btn-gold { background: #C9A84C; color: white; }
.ep-btn-purple { background: var(--purple2); color: white; }
.ep-btn-green { background: var(--green); color: white; }
.entry-path-card.active { border-color: var(--purple2); background: var(--purple-light); }
@media(max-width:600px) { .entry-path-row { grid-template-columns: 1fr; } }

/* ── Card picker ── */
.picker-section { display: none; }
.picker-section.visible { display: block; }
.picker-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; max-width: 860px; }
/* After a successful scan the manual entry panel collapses — show only the hand + submit. */
.picker-layout.manual-collapsed { grid-template-columns: 1fr; max-width: 520px; }
.picker-layout.manual-collapsed .picker-panel { display: none; }
.picker-edit-manual-link { display: inline-block; margin-top: 14px; background: none; border: none; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--purple); text-decoration: underline; cursor: pointer; }
.picker-edit-manual-link:hover { color: var(--purple2); }
.picker-panel { background: #1a0a2e; border-radius: 16px; padding: 22px; color: white; }
.picker-step-label { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.85); margin-bottom: 12px; }
/* 2x2 suit grid */
.picker-suit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.picker-suit-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 14px 10px; color: white; font-size: 12px; font-weight: 800; letter-spacing: 0.05em; cursor: pointer; transition: all 0.15s; }
.picker-suit-btn:hover { background: rgba(255,255,255,0.12); }
.picker-suit-btn.selected { background: var(--purple2); border-color: var(--purple2); }
.picker-suit-icon { font-size: 24px; }
.picker-suit-icon.red { color: #ef4444; }
.picker-suit-btn.selected .picker-suit-icon { color: white; }
.picker-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 16px 0; }
.picker-value-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; }
.picker-val-btn { background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.1); border-radius: 8px; color: white; font-size: 14px; font-weight: 800; padding: 10px 4px; cursor: pointer; transition: all 0.15s; text-align: center; }
.picker-val-btn:hover { background: rgba(255,255,255,0.15); }
.picker-val-btn.used { opacity: 0.25; cursor: not-allowed; }
.picker-val-btn.disabled { opacity: 0.3; cursor: not-allowed; }
.picker-hand-area { }
.picker-hand-title { font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.picker-hand-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.picker-hand-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; min-height: 110px; align-items: flex-start; }
.picker-card { width: 80px; height: 110px; border: 1.5px solid var(--border); border-radius: 12px; background: white; box-shadow: 0 3px 10px rgba(0,0,0,0.08); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; position: relative; cursor: pointer; transition: all 0.15s; }
.picker-card:hover { box-shadow: 0 4px 16px rgba(75,0,130,0.2); }
.picker-card .pc-rank { font-size: 20px; line-height: 1; }
.picker-card .pc-suit { font-size: 32px; line-height: 1; }
.picker-card .pc-remove { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; background: var(--red); color: white; border-radius: 50%; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.15s; }
.picker-card:hover .pc-remove { opacity: 1; }
.picker-slot { width: 80px; height: 110px; border: 2px dashed var(--border); border-radius: 12px; background: #f8f5ff; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 24px; }
.picker-status { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.picker-status b { color: var(--purple); }
@media(max-width:700px) {
  .picker-layout { grid-template-columns: 1fr; }
  .picker-hand-area { order: -1; }
  .picker-hand-cards { min-height: auto; }
  .picker-value-grid { grid-template-columns: repeat(5,1fr); }
}

/* ── Dealer page ── */
.dealer-content { padding: 32px; max-width: 1200px; margin: 0 auto; }

/* Client dealer cards are wider than guest cards (no sidebar constraint),
   so bump the word font max to stay proportionally the same size */
#dealerArea .gc-word span {
  font-size: clamp(13px, 2.8vw, 22px);
}
.dealer-cards { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin: 24px 0; }
.dealer-card-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.dealer-card {
  width: 100%;
  aspect-ratio: 2.5 / 3.5;
  border: 2.5px solid var(--border); border-radius: 16px;
  background: white; box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.18s; position: relative;
  overflow: hidden; user-select: none;
}
.dealer-card:hover { box-shadow: 0 6px 20px rgba(75,0,130,0.15); transform: translateY(-2px); }
.dealer-card.held {
  border-color: var(--purple); border-width: 3px;
  box-shadow: 0 6px 20px rgba(75,0,130,0.25);
  background: var(--purple-light);
}
/* Corner pips */
.dealer-card .dcorner {
  position: absolute; display: flex; flex-direction: column;
  align-items: center; gap: 1px; line-height: 1;
}
.dealer-card .dcorner.tl { top: 8px; left: 9px; }
.dealer-card .dcorner.br { bottom: 8px; right: 9px; transform: rotate(180deg); }
.dealer-card .dc-rank { font-size: clamp(14px, 2.6vw, 20px); font-weight: 800; line-height: 1; }
.dealer-card .dc-suit { font-size: clamp(11px, 2.1vw, 16px); line-height: 1; }
.dealer-card.red  .dc-rank, .dealer-card.red  .dc-suit { color: #C0392B; }
.dealer-card.black .dc-rank, .dealer-card.black .dc-suit { color: var(--ink); }
/* Center content */
.dealer-card .dcenter {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; padding: 0 8px; pointer-events: none;
}
.dealer-card .dc-suit-bg { font-size: clamp(36px, 7vw, 56px); line-height: 1; opacity: .1; }
.dealer-card.red  .dc-suit-bg { color: #C0392B; }
.dealer-card.black .dc-suit-bg { color: var(--ink); }
.dealer-card .dc-word {
  font-size: clamp(12px, 2.4vw, 17px);
  font-weight: 900; text-align: center;
  color: var(--ink); line-height: 1.2;
  text-transform: uppercase; letter-spacing: .3px;
  word-break: normal; hyphens: none;
}
/* Held badge */
.dealer-card .held-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--purple); color: white; font-size: 10px; font-weight: 900;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.08em;
  display: none;
}
.dealer-card.held .held-badge { display: block; }
.dealer-instructions { background: var(--purple-light); border-radius: 12px; padding: 14px 18px; font-size: 14px; color: var(--purple); font-weight: 600; margin-bottom: 8px; text-align: center; }
@media(max-width:700px) { .dealer-cards { gap: 8px; } .dealer-card .dc-word { font-size: 12px; } }

/* ── Contact page ── */
.contact-content { padding: 32px; max-width: 640px; }

/* ── Responsive ── */
@media(max-width:700px) {
  .how-section [style*="grid-template-columns:1fr 1fr"] { display: block !important; }
  .how-section [style*="grid-template-columns:1fr 1fr"] > div { margin-bottom: 24px; }
  .how-section [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: 1fr !important; }
}
/* ── Workplace Reflection ── */
.journey-card-grid { display:grid; grid-template-columns:1fr 240px; gap:24px; align-items:start; }
.journey-step { display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:10px; font-size:13px; font-weight:700; margin-bottom:8px; }
.journey-step.done { background:var(--green); color:white; }
.journey-step.pending { background:white; border:1px solid var(--border); color:var(--muted); }
.journey-step-num { width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:900; flex-shrink:0; }
.journey-step.done .journey-step-num { background:rgba(255,255,255,0.25); color:white; }
.journey-step.pending .journey-step-num { background:var(--purple-light); color:var(--purple); }
#reflectionModal { display:none; position:fixed; inset:0; background:rgba(26,10,46,.55); z-index:200; align-items:center; justify-content:center; padding:24px; }
#reflectionModal.open { display:flex; }
.rf-panel { position:relative; width:min(640px,100%); background:white; border-radius:18px; box-shadow:0 24px 80px rgba(0,0,0,.25); max-height:90vh; display:flex; flex-direction:column; overflow:hidden; }
.rf-close { position:absolute; top:14px; right:14px; z-index:2; width:34px; height:34px; display:flex; align-items:center; justify-content:center; border:none; border-radius:50%; background:transparent; color:var(--muted); cursor:pointer; padding:0; }
.rf-close:hover { background:var(--purple-light); color:var(--purple); }
.rf-head { flex:none; padding:26px 28px 14px; }
.rf-scroll { flex:1 1 auto; min-height:0; overflow-y:auto; padding:2px 28px 6px; }
.rf-foot { flex:none; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px 28px; border-top:1px solid #e8e4f0; background:#fff; }
.rf-options { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.rf-option { border:1.5px solid var(--border); border-radius:12px; padding:12px 14px; cursor:pointer; display:flex; gap:10px; align-items:flex-start; font-weight:700; font-size:14px; background:white; transition:all 0.15s; text-align:left; width:100%; color:var(--ink); }
.rf-option:hover:not(.rf-disabled) { border-color:var(--purple2); background:var(--purple-light); }
.rf-option.selected { border-color:var(--purple); background:var(--purple-light); color:var(--purple); }
.rf-option.rf-disabled { opacity:0.4; cursor:not-allowed; }
.rf-option.selected.rf-disabled { opacity:1; cursor:pointer; }
@media(max-width:700px) { .journey-card-grid { grid-template-columns:1fr; } .rf-options { grid-template-columns:1fr; } .rf-panel { border-radius:14px; } .rf-head { padding:20px 20px 12px; } .rf-scroll { padding:0 20px 4px; } .rf-foot { padding:14px 20px; } }

@media(max-width:768px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .pp-card { width: 72px; height: 100px; }
  .pp-card .p-rank { font-size: 18px; }
  .pp-card .p-suit { font-size: 24px; }
  .pp-card .p-word { font-size: 8px; }
  .hero { padding: 36px 24px; }
  .how-section,.dashboard-section,.home-cta { padding: 32px 24px; }
  .step-grid { grid-template-columns: 1fr 1fr; }
  .resources-content,.contact-content { padding: 20px; }
}

@media(max-width:600px) {
  .topnav { padding: 0 16px; }
  .topnav-sub { display: none; }
  .main { padding: 80px 16px 40px; }
}

/* ── AI Advisor Chat Panel ── */
#aiAdvisorBackdrop {
  position: fixed; inset: 0; background: rgba(26,10,46,0.35);
  z-index: 100; backdrop-filter: blur(2px);
}
#aiAdvisorPanel { display: none; }
#aiAdvisorPanel.open { display: block; }
#aiAdvisorInner {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 100vw;
  background: white; z-index: 101;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 40px rgba(75,0,130,0.18);
  border-left: 1px solid var(--border);
}
#aiAdvisorHeader {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg,#1a0a2e,var(--purple));
  color: white; flex-shrink: 0;
}
#aiAdvisorHeader .ah-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.7; margin-bottom: 2px; }
#aiAdvisorHeader .ah-title { font-size: 16px; font-weight: 900; }
#aiAdvisorCloseBtn {
  background: rgba(255,255,255,0.15); border: none; color: white;
  width: 32px; height: 32px; border-radius: 50%; font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; flex-shrink: 0;
}
#aiAdvisorCloseBtn:hover { background: rgba(255,255,255,0.25); }
#aiAdvisorMessages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.ai-msg { display: flex; flex-direction: column; gap: 4px; max-width: 88%; }
.ai-msg.user { align-self: flex-end; align-items: flex-end; }
.ai-msg.assistant { align-self: flex-start; align-items: flex-start; }
.ai-bubble {
  padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.55;
}
.ai-msg.user .ai-bubble { background: var(--purple); color: white; border-bottom-right-radius: 4px; }
.ai-msg.assistant .ai-bubble { background: #f4f2f8; color: var(--ink); border-bottom-left-radius: 4px; }
.ai-msg-label { font-size: 11px; font-weight: 700; color: var(--muted); padding: 0 4px; }
#aiAdvisorInputArea {
  padding: 14px 16px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: flex-end; flex-shrink: 0;
  background: white;
}
#aiAdvisorInputField {
  flex: 1; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 13px; font-size: 14px; font-family: inherit;
  resize: none; max-height: 120px; overflow-y: auto;
  transition: border-color 0.15s;
}
#aiAdvisorInputField:focus { outline: none; border-color: var(--purple2); }
#aiAdvisorSendBtn {
  background: var(--purple); color: white; border: none;
  border-radius: 10px; padding: 10px 16px; font-weight: 700;
  font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s; flex-shrink: 0;
}
#aiAdvisorSendBtn:hover { background: var(--purple2); }
#aiAdvisorSendBtn:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-typing { display: flex; gap: 5px; align-items: center; padding: 4px 0; }
.ai-typing span {
  width: 7px; height: 7px; background: var(--muted);
  border-radius: 50%; animation: aiDot 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiDot { 0%,80%,100%{transform:scale(0.6);opacity:0.4} 40%{transform:scale(1);opacity:1} }
#aiAdvisorSuggestions { padding: 0 16px 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.ai-suggestion-btn {
  background: var(--purple-light); color: var(--purple); border: 1px solid #d8cef0;
  border-radius: 999px; padding: 6px 13px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: background 0.15s; white-space: nowrap;
}
.ai-suggestion-btn:hover { background: #e0d4f5; }
@media(max-width:500px) { #aiAdvisorInner { width: 100vw; } }

/* ── Mobile optimizations (participant-first) ── */
@media(max-width:600px) {

  /* Nav — shrink panel label, keep pills usable */
  .topnav { height: 56px; }
  .topnav-brand img { height: 28px; }
  .topnav-name { font-size: 13px; }
  .topnav-vdivider { margin: 0 10px; }
  .topnav-panel-label { font-size: 10px; }
  .topnav-pill { padding: 0 10px; font-size: 13px; }
  .topnav-account-btn { width: 40px; height: 40px; }
  .main { padding: 76px 16px 40px; }

  /* Grid layouts — stack on mobile */
  .grid2 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }

  /* Forms — prevent iOS zoom (needs 16px) */
  .form-group input,
  .form-group select,
  .form-group textarea { font-size: 16px; padding: 13px 14px; }

  /* Buttons — larger tap targets */
  .btn { padding: 13px 20px; font-size: 14px; }
  .btn.large { padding: 15px 28px; }

  /* Entry form — stack company + team fields */
  #companyCode, #teamCode { min-width: 0 !important; }

  /* Entry path cards — already 1 column, just ensure button tap target */
  .entry-path-card .ep-btn { padding: 13px 16px; font-size: 14px; }

  /* Picker — already stacks at 700px, tighten value grid */
  .picker-value-grid { grid-template-columns: repeat(4,1fr); }
  .picker-val-btn { padding: 12px 4px; font-size: 13px; }
  .picker-suit-btn { padding: 16px 10px; }

  /* Playing cards — fit 5 in a row on 375px */
  .pp-card { width: 58px; height: 82px; }
  .pp-card .p-rank { font-size: 16px; }
  .pp-card .p-suit { font-size: 20px; }
  .pp-card .p-word { font-size: 7px; }

  /* Bar rows — narrower label */
  .bar-row { grid-template-columns: 80px 1fr 40px; }
  .bar-label { font-size: 12px; }
  .bar-pct { font-size: 12px; }

  /* Results page — primary suit */
  .primary-suit { font-size: 36px; }
  .primary-label { font-size: 18px; }

  /* Save code banner — stack vertically */
  .save-code-banner { flex-direction: column; align-items: flex-start; }
  .save-code-banner .access-code { font-size: 18px; }

  /* Dealer cards */
  .dealer-card { width: 84px; min-height: 110px; }
  .dealer-card .dc-word { font-size: 13px; }

  /* Home page */
  .hero { padding: 28px 16px; }
  .hero h1 { font-size: 24px; }
  .home-cta { padding: 28px 16px; }
  .step-grid { grid-template-columns: 1fr; }

  /* Tables — horizontal scroll on mobile */
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 480px; }
  th, td { font-size: 12px; padding: 8px 10px; }

  /* Reflection modal */
  .rf-options { grid-template-columns: 1fr; }
}

/* ── Help button ─────────────────────────────────────────────────────────── */
.topnav-help-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--purple); background: #fff;
  color: var(--purple); font-weight: 700; font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.topnav-help-btn:hover,
.topnav-help-btn.active { background: var(--purple); color: #fff; }

/* ── Help overlay ────────────────────────────────────────────────────────── */
.help-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  z-index: 299; opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.help-overlay.open { opacity: 1; pointer-events: all; }

/* ── Help drawer ─────────────────────────────────────────────────────────── */
.help-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 380px;
  background: #fff; z-index: 300;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}
.help-drawer.open { transform: translateX(0); }

.help-drawer-header {
  padding: 20px 20px 16px;
  background: var(--purple); color: #fff;
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-shrink: 0;
}
.help-drawer-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; opacity: 0.75; margin-bottom: 4px;
}
.help-drawer-title { font-size: 1.05rem; font-weight: 700; }
.help-drawer-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.4);
  background: transparent; color: #fff; font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-left: 12px; transition: background 0.15s;
}
.help-drawer-close:hover { background: rgba(255,255,255,0.15); }

.help-drawer-body { flex: 1; overflow-y: auto; padding: 20px; }

.help-section { margin-bottom: 24px; }
.help-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--purple);
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--purple-light);
}

.help-step-list { display: flex; flex-direction: column; gap: 10px; }
.help-step { display: flex; gap: 12px; align-items: flex-start; }
.help-step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--purple); color: #fff;
  font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
}
.help-step-body strong { font-size: 14px; color: #222; display: block; margin-bottom: 2px; }
.help-step-body p { font-size: 13px; color: #666; line-height: 1.45; }

.help-tip {
  background: var(--purple-light); border-left: 3px solid var(--purple2);
  border-radius: 0 8px 8px 0; padding: 10px 12px; margin-bottom: 8px;
  font-size: 13px; color: #333; line-height: 1.45;
}
.help-tip strong { color: var(--purple); }

.help-related-list { display: flex; flex-direction: column; gap: 6px; }
.help-related-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 8px; border: 1.5px solid #e8e0f5;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.help-related-item:hover { border-color: var(--purple2); background: var(--purple-light); }
.help-related-item strong { font-size: 14px; color: #222; display: block; }
.help-related-item span { font-size: 12px; color: #888; }
.help-related-arrow { color: var(--purple2); font-size: 14px; margin-left: 8px; }

@media (max-width: 480px) {
  .help-drawer { width: 100%; }
}

/* ── Client onboarding welcome overlay (mirrors the share-modal pattern) ── */
.cob-overlay {
  display: none; position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.cob-overlay.open { display: flex; }
.cob-box {
  position: relative; background: #fff; border-radius: 22px;
  padding: 30px 28px; max-width: 540px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 70px rgba(0,0,0,0.25);
}
.cob-close {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: var(--purple-light); color: var(--purple);
  border-radius: 10px; cursor: pointer;
}
.cob-close svg { width: 18px; height: 18px; }
.cob-close:hover { background: #e6dcf6; }
.cob-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--purple2); margin-bottom: 8px;
}
.cob-title { font-size: 24px; font-weight: 900; color: var(--ink); margin: 0 0 6px; line-height: 1.2; }
.cob-sub { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 0 0 22px; }
.cob-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.cob-item { display: flex; gap: 14px; align-items: flex-start; }
.cob-ic {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  background: var(--purple-light); color: var(--purple);
  display: flex; align-items: center; justify-content: center;
}
.cob-ic svg { width: 22px; height: 22px; }
.cob-item-text strong { display: block; font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 3px; }
.cob-item-text p { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0; }
.cob-guide {
  display: block; width: 100%; margin-top: 12px; background: none; border: none;
  color: var(--purple); font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.cob-guide:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   GUEST MODE  (?guest)
   ═══════════════════════════════════════════════════════════════ */

/* Hide nav pills in guest mode (keep panel label, divider, help button, and account dropdown) */
body.guestMode .topnav-pills,
body.guestMode #topnavNavDivider { display: none !important; }

/* Progress bar */
/* ── Guest welcome banner ── */
.guest-welcome-banner {
  background: #1a0848;
  border-bottom: 1px solid rgba(192,132,252,0.3);
  padding: 10px 48px 10px 24px;
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  font-size: 14px; color: rgba(255,255,255,0.85);
  position: relative;
}
.guest-welcome-banner strong { color: #fff; }
.guest-welcome-banner a {
  color: #fff; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: #c084fc; white-space: nowrap;
}
.guest-welcome-banner a:hover { text-decoration-color: #fff; }
.guest-welcome-dismiss {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 20px; cursor: pointer; line-height: 1; padding: 4px;
}
.guest-welcome-dismiss:hover { color: #fff; }

/* ── Guest hero header ── */
.guest-hero-header {
  background: linear-gradient(135deg, #2a1060 0%, #1a0848 100%);
  padding: 48px 40px 0;
}
.guest-hero-inner {
  display: flex; align-items: center; gap: 48px; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto;
}
.guest-hero-cards { flex-shrink: 0; width: clamp(180px, 26vw, 300px); }
.guest-hero-cards img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,0.5));
}
.guest-hero-copy { flex: 1; min-width: 260px; }
.guest-hero-copy h1 {
  font-size: clamp(26px, 4vw, 40px); font-weight: 900; color: #fff;
  margin: 0 0 16px; letter-spacing: -.5px; line-height: 1.1;
}
.guest-hero-copy h1 span { color: #c084fc; }
.guest-hero-copy p {
  font-size: clamp(14px, 1.7vw, 16px); color: rgba(255,255,255,0.82);
  line-height: 1.7; margin: 0 0 14px;
}
.guest-hero-copy strong { color: #fff; }
.guest-hero-tagline {
  font-size: clamp(13px, 1.4vw, 15px) !important;
  color: rgba(255,255,255,0.55) !important;
  border-left: 3px solid #c084fc; padding-left: 14px;
  margin: 0 !important;
}

/* Progress bar — now lives inside the dark hero */
.guest-progress-bar {
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 36px;
  background: transparent;
}
.guest-step {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 16px 8px;
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.4);
  letter-spacing: .3px; text-transform: uppercase;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.guest-step:last-child { border-right: none; }
.guest-step.active { background: transparent; color: #fff; }
.guest-step.done   { color: rgba(255,255,255,0.65); cursor: pointer; }
.guest-step.done:hover { color: #fff; }
.guest-step-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.5);
}
.guest-step.active .guest-step-num { background: #c084fc; color: #1a0848; }
.guest-step.done   .guest-step-num { background: #22c55e; color: #fff; }
@media (max-width: 380px) { .guest-step-label { display: none; } }

/* Attribution note at bottom of step 1 */
.guest-attribution {
  font-size: 13px; color: var(--muted); text-align: center;
  line-height: 1.65; margin: 28px auto 0; max-width: 680px;
}

/* Mobile hero adjustments */
@media (max-width: 700px) {
  .guest-hero-header { padding: 32px 20px 0; }
  .guest-hero-inner  { flex-direction: column; align-items: center; text-align: center; gap: 24px; }
  .guest-hero-tagline { border-left: none !important; padding-left: 0 !important;
                        border-top: 3px solid #c084fc; padding-top: 12px !important; }
  .guest-hero-cards { width: clamp(160px, 55vw, 240px); }
}

/* Screen container */
.guest-screen { display: none; }
.guest-screen.active { display: block; }

.guest-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

/* Intro */
.guest-intro { text-align: center; margin-bottom: 20px; }
.guest-intro h1 {
  font-size: clamp(22px, 4.5vw, 32px);
  font-weight: 900; color: var(--ink);
  letter-spacing: -.4px; margin-bottom: 12px;
}
.guest-intro h1 span { color: var(--purple); }

.how-it-works-box {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  text-align: left;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}
.how-it-works-box p { margin-bottom: 10px; }
.how-it-works-box p:last-child { margin-bottom: 0; }

/* "Read this first" emphasized variant */
.how-it-works-box.read-first {
  border-left: 4px solid var(--purple);
}
.read-first-heading {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--purple) !important;
  margin: 0 0 8px !important;
}

/* Counter: "You've seen X of 52 cards" — subtle slowdown nudge */
.guest-seen-counter {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: -12px 0 16px;
  font-style: italic;
  display: none;
}
.guest-tip {
  color: var(--purple);
  font-size: 13px;
  background: var(--purple-light);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 10px;
}

/* Cards row */
.guest-cards-row {
  display: flex; gap: 10px;
  /* flex-start so first card anchors left when row overflows */
  justify-content: flex-start;
  margin-bottom: 16px;
  align-items: flex-start;
  /* horizontal scroll on narrow viewports */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;       /* Firefox */
  padding-bottom: 4px;
}
.guest-cards-row::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.guest-card-slot {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  /* min-width prevents squishing; triggers scroll on mobile */
  min-width: 130px;
  scroll-snap-align: start;
}

/* Playing card */
.guest-play-card {
  width: 100%;
  aspect-ratio: 2.5 / 3.5;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 11px;
  box-shadow: 0 2px 8px rgba(75,0,130,.07);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  will-change: transform, filter;
  transform-origin: center center;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.guest-play-card.held {
  border-color: var(--purple);
  background: var(--purple-light);
  box-shadow: 0 0 0 3px var(--purple), 0 4px 16px rgba(75,0,130,.3);
  filter: brightness(1.05);
}

/* Tappable card — entire card is the hold/release control */
.guest-play-card.tappable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.guest-play-card.tappable:hover:not(.held) { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(75,0,130,.15); }
.guest-play-card.tappable:active { transform: scale(0.98); }
.guest-play-card.tappable:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

/* "✓ HELD" badge overlay — only visible when held */
.guest-play-card .held-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--purple); color: #fff;
  font-size: 10px; font-weight: 900; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(75,0,130,.4);
  pointer-events: none; opacity: 0;
  transform: scale(.85);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 2;
}
.guest-play-card.held .held-badge {
  opacity: 1;
  transform: scale(1);
}

/* Image-based card content (new — replaces CSS rendering) */
.guest-play-card .gcard-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Slot-machine cycling — blur the image while reel spins */
.guest-play-card.cycling .gcard-img {
  filter: blur(3.5px) brightness(0.85);
}

/* Slot-machine landing bounce */
@keyframes guestSlotLand {
  0%   { transform: translateY(-18%); opacity: 0.6; }
  70%  { transform: translateY(4%); }
  85%  { transform: translateY(-2%); }
  100% { transform: translateY(0);   opacity: 1; }
}
.guest-play-card.landing .gcard-img {
  animation: guestSlotLand 0.28s ease-out forwards;
}
.guest-play-card .gcorner {
  position: absolute; display: flex; flex-direction: column;
  align-items: center; gap: 1px; line-height: 1;
}
.guest-play-card .gcorner.tl { top: 7px;    left: 8px; }
.guest-play-card .gcorner.br { bottom: 7px; right: 8px; transform: rotate(180deg); }
.guest-play-card .gc-rank { font-size: clamp(13px, 2.6vw, 18px); font-weight: 800; line-height: 1; }
.guest-play-card .gc-suit { font-size: clamp(10px, 2vw, 14px); line-height: 1; }
.guest-play-card.red  .gc-rank, .guest-play-card.red  .gc-suit { color: #C0392B; }
.guest-play-card.black .gc-rank,.guest-play-card.black .gc-suit { color: var(--ink); }
/* suit symbol: faded background, perfectly centered */
.guest-play-card .gc-suit-bg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(42px, 9vw, 64px);
  line-height: 1; opacity: .09;
  pointer-events: none; z-index: 0;
}
.guest-play-card.red   .gc-suit-bg { color: #C0392B; }
.guest-play-card.black .gc-suit-bg { color: var(--ink); }
/* word: centered in the safe zone between corner pips */
.guest-play-card .gc-word {
  position: absolute; left: 0; right: 0;
  top: 44px; bottom: 44px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 8px; box-sizing: border-box;
  z-index: 1;
}
.guest-play-card .gc-word span {
  display: block; width: 100%;
  font-size: clamp(11px, 2.1vw, 17px);
  font-weight: 900; text-align: center;
  color: var(--ink); line-height: 1.2;
  text-transform: uppercase; letter-spacing: 0;
  overflow-wrap: break-word; word-break: normal;
  white-space: normal;
}

/* Landing bounce */
@keyframes guestLandBounce {
  0%   { transform: perspective(500px) rotateX(0deg) scale(1.07); }
  55%  { transform: perspective(500px) rotateX(0deg) scale(.97);  }
  100% { transform: perspective(500px) rotateX(0deg) scale(1);    }
}
.guest-play-card.landing { animation: guestLandBounce .3s ease-out forwards; }

/* Hold button */
.guest-hold-btn {
  width: 100%; height: 34px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: #fff; color: var(--muted);
  font-size: clamp(10px, 2vw, 13px);
  font-weight: 700; font-family: inherit;
  letter-spacing: .8px; text-transform: uppercase;
  cursor: pointer; transition: all .15s;
}
.guest-hold-btn:hover:not(:disabled) { border-color: var(--purple); color: var(--purple); }
.guest-hold-btn.held-btn { background: var(--purple); border-color: var(--purple); color: #fff; }
.guest-hold-btn:disabled { opacity: .35; cursor: default; }

/* Held dots */
.guest-held-dots {
  display: flex; justify-content: center; gap: 7px; margin-bottom: 14px;
}
.ghdot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border); transition: background .15s, transform .15s;
}
.ghdot.on   { background: var(--purple); transform: scale(1.3); }
.ghdot.full { background: var(--green);  transform: scale(1.3); }

/* Instruction box — block layout (NOT flex) so inline tags don't become
   separate flex items that wrap weirdly */
.guest-instr-box {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 12px; padding: 16px 20px;
  text-align: center; font-size: 14px; color: var(--ink);
  margin-bottom: 20px;
  line-height: 1.6; transition: border-color .2s, background .2s, color .2s;
}
.guest-instr-box.ready { border-color: var(--green); background: #f0faf5; color: #0e5c34; }

/* Action buttons — sit close to the cards for less mobile scrolling */
.guest-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 16px; }
.guest-deal-btn { min-width: 210px; }
.guest-deal-btn.dimmed { opacity: .3; pointer-events: none; }
.guest-next-btn { background: var(--green) !important; min-width: 210px; }
.guest-next-btn:hover { background: #0f6b3a !important; }

/* Mini cards on email screen */
/* ── Email gate (step 2) — two-column layout ── */
.guest-email-wrap {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 40px 28px;
}
.guest-email-cards-side  { display: flex; flex-direction: column; align-items: center; }
.guest-email-form-side   { max-width: 440px; width: 100%; }

.guest-email-headline {
  font-size: clamp(22px, 3vw, 30px); font-weight: 900;
  margin: 0 0 22px; text-align: center; color: var(--ink);
  letter-spacing: -.3px;
}
.guest-email-subtitle {
  color: var(--muted); font-size: 15px; line-height: 1.6;
  text-align: center; margin: 0 0 28px;
}
.guest-email-privacy {
  text-align: center; margin: 14px 0 0;
  font-size: 12px; color: var(--muted); line-height: 1.55;
}

/* Stack on mobile */
@media (max-width: 760px) {
  .guest-email-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 20px;
  }
  .guest-email-form-side { max-width: 100%; margin: 0 auto; }
}

/* Mini cards in step 2 — bigger now, with breathing room */
.guest-mini-cards {
  display: flex; gap: 12px; justify-content: center;
  margin: 0; flex-wrap: nowrap;
}
.guest-mini-card {
  width: clamp(72px, 9vw, 110px); aspect-ratio: 2.5 / 3.5;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 10px; box-shadow: 0 4px 14px rgba(75,0,130,.12);
  position: relative; display: flex; align-items: center;
  justify-content: center; overflow: hidden; flex-shrink: 0;
}
.guest-mini-card .gcard-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.guest-mini-card .gcorner { position: absolute; display: flex; flex-direction: column;
  align-items: center; line-height: 1; }
.guest-mini-card .gcorner.tl { top: 3px; left: 4px; }
.guest-mini-card .gcorner.br { bottom: 3px; right: 4px; transform: rotate(180deg); }
.guest-mini-card .gc-rank { font-size: 9px; font-weight: 800; }
.guest-mini-card .gc-suit { font-size: 8px; }
.guest-mini-card.red   .gc-rank, .guest-mini-card.red   .gc-suit { color: #C0392B; }
.guest-mini-card.black .gc-rank, .guest-mini-card.black .gc-suit { color: var(--ink); }
.guest-mini-card .gcenter { display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; padding: 0 3px; }
.guest-mini-card .gc-suit-bg { font-size: 18px; opacity: .1; }
.guest-mini-card.red   .gc-suit-bg { color: #C0392B; }
.guest-mini-card.black .gc-suit-bg { color: var(--ink); }
.guest-mini-card .gc-word { font-size: 6.5px; font-weight: 700; text-align: center;
  color: var(--ink); line-height: 1.2; text-transform: uppercase;
  letter-spacing: .2px; word-break: normal; hyphens: none; }

@media (max-width: 500px) {
  .guest-cards-row { gap: 6px; }
  .guest-hold-btn  { height: 30px; }
}

/* ══ Gifting Ceremony ══════════════════════════════════════════════════════ */

/* Gifter page — intro */
.gift-intro-hero {
  background: linear-gradient(135deg, #1a0a2e, var(--purple));
  border-radius: 20px; padding: 36px 28px; color: #fff;
  text-align: center; margin-bottom: 20px;
}
.gift-intro-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,0.15); margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
}
.gift-intro-hero h1 { font-size: 22px; font-weight: 900; margin-bottom: 12px; line-height: 1.3; }
.gift-intro-hero p  { font-size: 14px; opacity: 0.88; line-height: 1.7; max-width: 420px; margin: 0 auto; }

.gift-what-card { background: #fff; border-radius: 16px; padding: 20px 22px; border: 1px solid var(--border); margin-bottom: 24px; }
.gift-what-card h3 { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.gift-steps-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.gift-steps-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.gift-step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--purple-light); color: var(--purple); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }

/* Gifter page — step headers */
.gift-q-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple2); margin-bottom: 8px; }
.gift-q-title { font-size: 19px; font-weight: 900; color: var(--ink); line-height: 1.3; margin-bottom: 6px; }
.gift-q-help  { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }

/* Gifter page — card dealer (3 cards, larger) */
.gift-cards-row { display: flex; gap: 14px; justify-content: center; margin-bottom: 16px; }
.gift-cards-row .guest-card-slot { flex: 1; max-width: 160px; }

/* Gifter page — status + deal buttons */
.gift-instr-box { background: #fff; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 16px; font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; text-align: center; transition: all .2s; }
.gift-instr-box.ready { border-color: var(--green); background: #f0faf5; color: #0e5c34; }
.gift-dealer-btns { display: flex; gap: 10px; }
.gift-btn-deal { flex: 1; padding: 13px 18px; border-radius: 12px; background: #fff; color: var(--purple); border: 2px solid var(--purple); font-size: 15px; font-weight: 700; cursor: pointer; transition: all .15s; }
.gift-btn-deal:hover { background: var(--purple-light); }
.gift-btn-deal.dimmed { opacity: 0.35; pointer-events: none; }
.gift-btn-next-cards { flex: 1; padding: 13px 18px; border-radius: 12px; background: var(--green); color: #fff; border: none; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s; }
.gift-btn-next-cards:hover { background: #0e5c34; }

/* Gifter page — question options (2-col grid) */
.gift-selection-count { display: inline-flex; align-items: center; gap: 5px; background: var(--purple-light); color: var(--purple2); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; margin-bottom: 14px; transition: background .2s, color .2s; }
.gift-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.gift-option { padding: 10px 14px; border-radius: 50px; border: 1.5px solid var(--border); background: #fff; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; transition: all .15s; text-align: left; line-height: 1.4; }
.gift-option:hover { border-color: var(--purple2); color: var(--purple); background: var(--purple-light); }
.gift-option.selected { background: var(--purple); color: #fff; border-color: var(--purple); font-weight: 600; }

/* Gifter page — name field */
.gift-name-section { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 4px; margin-bottom: 20px; }
.gift-name-label { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; display: block; }
.gift-name-input { width: 100%; padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--border); font-size: 16px; color: var(--ink); outline: none; transition: border-color .15s; }
.gift-name-input:focus { border-color: var(--purple2); }
.gift-name-input::placeholder { color: var(--muted); }
.gift-anon-toggle { display: flex; align-items: center; gap: 8px; margin-top: 10px; cursor: pointer; width: fit-content; }
.gift-anon-toggle span { font-size: 13px; color: var(--muted); }
/* Anonymous-by-default name reveal */
.gift-anon-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--purple-light); border-radius: 12px; padding: 14px 16px; }
.gift-anon-state { display: flex; align-items: flex-start; gap: 11px; }
.gift-anon-state svg { width: 20px; height: 20px; color: var(--purple); flex-shrink: 0; margin-top: 1px; }
.gift-anon-title { font-size: 14px; font-weight: 800; color: var(--ink); }
.gift-anon-sub { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 1px; }
.gift-anon-add { flex-shrink: 0; background: #fff; border: 1.5px solid var(--purple); color: var(--purple); font-weight: 700; font-size: 13px; padding: 9px 14px; border-radius: 10px; cursor: pointer; font-family: inherit; white-space: nowrap; transition: background .15s, color .15s; }
.gift-anon-add:hover { background: var(--purple); color: #fff; }
.gift-anon-back { margin-top: 10px; background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; font-family: inherit; text-decoration: underline; }
.gift-anon-back:hover { color: var(--ink); }

/* Gifter page — nav */
.gift-nav { display: flex; gap: 10px; margin-top: 8px; }
.gift-btn-primary { flex: 1; padding: 14px 20px; border-radius: 14px; background: var(--purple); color: #fff; font-size: 15px; font-weight: 700; border: none; cursor: pointer; transition: background .15s; }
.gift-btn-primary:hover { background: var(--purple2); }
.gift-btn-back { padding: 14px 18px; border-radius: 14px; background: #fff; color: var(--muted); font-size: 14px; font-weight: 600; border: 1.5px solid var(--border); cursor: pointer; transition: all .15s; }
.gift-btn-back:hover { border-color: var(--purple2); color: var(--purple); }

/* Gifter page — confirmation */
.gift-confirm { background: linear-gradient(135deg, #0a2e1a, #177245); border-radius: 20px; padding: 36px 28px; text-align: center; color: #fff; margin-bottom: 16px; }
.gift-confirm-icon { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,0.2); margin: 0 auto 22px; display: flex; align-items: center; justify-content: center; }
.gift-confirm h2 { font-size: 24px; font-weight: 900; margin-bottom: 10px; }
.gift-confirm p  { font-size: 14px; opacity: 0.88; line-height: 1.7; max-width: 360px; margin: 0 auto; }
.gift-summary-card { background: #fff; border-radius: 14px; padding: 18px 20px; border: 1px solid var(--border); margin-bottom: 12px; }
.gift-summary-card h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple2); margin-bottom: 10px; }
.gift-summary-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.gift-summary-pill { padding: 5px 12px; border-radius: 20px; background: var(--purple-light); color: var(--purple); font-size: 13px; font-weight: 600; }

/* Recipient side — section dividers */
.section-divider { display: flex; align-items: center; gap: 12px; }
.section-divider-line { flex: 1; height: 1px; background: var(--border); }
.section-divider-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* Recipient side — Bonus Step banner card */
.gift-bonus-card { background: linear-gradient(135deg, #f9f6ff, var(--purple-light)); border-color: var(--purple2); }
.gift-bonus-collapsed { display: flex; align-items: center; gap: 16px; }
.gift-bonus-expanded {}

/* Recipient side — request card header (legacy) */
.gift-req-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.gift-req-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--purple-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

@media (max-width: 600px) {
  .gift-bonus-collapsed { flex-wrap: wrap; }
  .gift-bonus-collapsed button { width: 100%; justify-content: center; }
}

/* ── Check-in page ────────────────────────────────────────────────────────── */
/* Full-width, no nav, centered at 760px — same behaviour as playMode */
/* Checkin mode — show brand bar only, hide all nav elements except logo */
body.checkinMode #topnavPanelDivider,
body.checkinMode #topnavPanelLabel,
body.checkinMode #topnavNavDivider,
body.checkinMode #topnavPills,
body.checkinMode #topnavAccount { display: none !important; }
#checkin.pp-section { padding: 0; }
.ci-page { max-width: 760px; margin: 0 auto; padding: 88px 16px 60px; }

/* Step indicator */
.ci-step-indicator { display: flex; align-items: center; margin-bottom: 24px; }
.ci-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border); background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0;
}
.ci-step-dot.active { background: var(--purple); border-color: var(--purple); color: white; }
.ci-step-dot.done   { background: var(--green);  border-color: var(--green);  color: white; }
.ci-step-line { flex: 1; height: 2px; background: var(--border); }
.ci-step-line.done { background: var(--green); }

/* Week badge */
.ci-week-badge {
  display: inline-block; background: var(--purple); color: white;
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 16px;
}

/* Focus area display */
.ci-focus-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin-bottom: 8px; }
.ci-focus-display { font-size: 21px; font-weight: 800; color: var(--purple); line-height: 1.3; margin-bottom: 12px; }
.ci-focus-framing { font-size: 15px; color: var(--muted); line-height: 1.6; margin-bottom: 24px; }

/* Context strip — shows commitment label + text above steps 2 and 3 */
.ci-context-strip {
  background: var(--purple-light); border-radius: 8px;
  padding: 10px 14px; font-size: 13px; color: var(--purple);
  margin-bottom: 16px; line-height: 1.4;
}
.ci-context-strip strong { font-weight: 700; display: block; font-size: 16px; line-height: 1.4; }
.ci-context-label { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--purple2); margin-bottom: 6px; }

/* Info card below step 1 */
.ci-info-card {
  background: var(--purple-light); border-radius: 10px;
  padding: 14px 18px; font-size: 13px; color: var(--muted);
  line-height: 1.6; margin-top: 0;
}

/* Section headings */
.ci-section-q { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 6px; line-height: 1.3; }
.ci-section-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; }

/* Focus option selector (first-time only) */
.ci-focus-options { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 24px; }
.ci-focus-option {
  background: white; border: 2px solid var(--border); border-radius: 10px;
  padding: 16px 18px; text-align: left; cursor: pointer;
  transition: all 0.15s; width: 100%;
}
.ci-focus-option:hover { border-color: var(--purple); background: var(--purple-light); }
.ci-focus-option.selected { border-color: var(--purple); background: var(--purple-light); }
.ci-fo-suit { font-size: 15px; font-weight: 800; color: var(--purple); margin-bottom: 3px; }
.ci-fo-text { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.ci-fo-why  { font-size: 13px; color: var(--muted); line-height: 1.4; }
.ci-focus-option.selected .ci-fo-why { color: var(--purple2); }

/* Rating buttons */
.ci-rating-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 24px 0; }
.ci-rating-btn {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--border); background: white;
  font-size: 17px; font-weight: 700; color: var(--muted);
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.ci-rating-btn:hover { border-color: var(--purple2); color: var(--purple2); transform: scale(1.1); }
.ci-rating-btn.selected { background: var(--purple); border-color: var(--purple); color: white; transform: scale(1.15); }
.ci-rating-btn.low  { border-color: #ffcdd2; color: #c62828; }
.ci-rating-btn.mid  { border-color: #fff9c4; color: #f57f17; }
.ci-rating-btn.high { border-color: #c8e6c9; color: #2e7d32; }
.ci-rating-hint { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 0 4px; }

/* Acknowledgment box */
.ci-ack-box { border-radius: 10px; padding: 18px 20px; margin-bottom: 24px; font-size: 16px; font-weight: 500; line-height: 1.6; color: var(--ink); }
.ci-ack-box.high { background: linear-gradient(135deg,#e8f5e9,#f1ebf8); border-left: 4px solid var(--green); }
.ci-ack-box.mid  { background: linear-gradient(135deg,#fff8e1,#f1ebf8); border-left: 4px solid var(--yellow); }
.ci-ack-box.low  { background: linear-gradient(135deg,#fdecea,#f1ebf8); border-left: 4px solid var(--red); }

/* Support option buttons */
.ci-support-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.ci-support-btn {
  background: white; border: 2px solid var(--border); border-radius: 10px;
  padding: 14px 18px; text-align: left; cursor: pointer;
  transition: all 0.15s; font-size: 15px; font-weight: 600;
  color: var(--purple); display: flex; align-items: center; gap: 12px; width: 100%;
}
.ci-support-btn:hover  { border-color: var(--purple); background: var(--purple-light); }
.ci-support-btn.selected { border-color: var(--purple); background: var(--purple-light); }
.ci-support-icon { font-size: 22px; width: 28px; text-align: center; flex-shrink: 0; }
.ci-support-desc { font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.ci-skip-btn {
  background: none; border: none; color: var(--muted); font-size: 14px;
  cursor: pointer; padding: 10px 0; text-align: center; width: 100%;
  text-decoration: underline; text-underline-offset: 3px; font-family: inherit;
}
.ci-skip-btn:hover { color: var(--ink); }

/* Resource card */
.ci-resource-card { border-left: 4px solid var(--purple2); background: var(--purple-light); border-radius: 0 10px 10px 0; padding: 20px; margin-bottom: 24px; }
.ci-resource-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--purple2); text-transform: uppercase; margin-bottom: 10px; }
.ci-resource-card p { font-size: 15px; line-height: 1.7; color: var(--ink); }
.ci-checklist { list-style: none; }
.ci-checklist li { font-size: 15px; line-height: 1.6; color: var(--ink); padding: 6px 0; display: flex; align-items: flex-start; gap: 10px; }
.ci-checklist li::before { content: '○'; color: var(--purple2); font-size: 14px; margin-top: 3px; flex-shrink: 0; }
/* Structured micro-lesson (reframe → steps → notice) inside the resource card */
.ci-lesson-buildson { font-size: 13px; font-style: italic; color: var(--purple2); background: #fff; border-radius: 8px; padding: 9px 12px; margin-bottom: 14px; line-height: 1.5; }
.ci-lesson-section { margin-bottom: 16px; }
.ci-lesson-section:last-of-type { margin-bottom: 8px; }
.ci-lesson-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--purple2); text-transform: uppercase; margin-bottom: 6px; }
.ci-lesson-reframe { font-size: 15px; line-height: 1.7; color: var(--ink); }
.ci-lesson-action { font-size: 15px; line-height: 1.7; color: var(--ink); font-weight: 600; }
.ci-lesson-notice { font-size: 14px; line-height: 1.6; color: var(--ink); background: #fff; border-radius: 8px; padding: 11px 13px; margin-top: 4px; }
.ci-lesson-notice-label { font-weight: 700; color: var(--purple2); }
/* Reflection-page "first step" seed (opt-in micro-lesson) */
.rf-seed-opts { display: flex; flex-direction: column; gap: 8px; }
.rf-seed-opt { text-align: left; background: #fff; border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; font-family: inherit; transition: border-color .15s, background .15s; }
.rf-seed-opt:hover { border-color: var(--purple2); }
.rf-seed-opt.selected { border-color: var(--purple); background: var(--purple-light); }
.rf-seed-lesson { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; }
.rf-seed-section { margin-bottom: 14px; }
.rf-seed-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--purple2); text-transform: uppercase; margin-bottom: 5px; }
.rf-seed-section p { font-size: 15px; line-height: 1.7; color: var(--ink); margin: 0; }
.rf-seed-notice { font-size: 14px; line-height: 1.6; color: var(--ink); background: var(--purple-light); border-radius: 8px; padding: 11px 13px; }

/* Generating spinner */
.ci-generating { text-align: center; padding: 28px; color: var(--muted); font-size: 14px; }
.ci-spinner {
  width: 26px; height: 26px; border: 3px solid var(--border);
  border-top-color: var(--purple2); border-radius: 50%;
  animation: ci-spin 0.8s linear infinite; margin: 0 auto 12px;
}
@keyframes ci-spin { to { transform: rotate(360deg); } }

/* Error / gate centre states */
.ci-center-state { text-align: center; padding: 40px 20px; }
.ci-icon { font-size: 48px; margin-bottom: 16px; }
.ci-center-state h2 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.ci-center-state p  { font-size: 15px; color: var(--muted); line-height: 1.6; max-width: 340px; margin: 0 auto 24px; }

/* Confirmation */
.ci-confirmation { text-align: center; padding: 32px 20px; }
.ci-big-icon { font-size: 52px; margin-bottom: 16px; }
.ci-confirmation h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.ci-confirmation p  { font-size: 15px; color: var(--muted); line-height: 1.6; max-width: 320px; margin: 0 auto; }

/* Green button variant (used on confirmation CTA) */
.btn.btn-green { background: var(--green); }
.btn.btn-green:hover { background: #1a5c38; }

/* Return visit — trend chart and stats */
.ci-progress-row { display: flex; gap: 12px; margin-bottom: 20px; }
.ci-progress-stat { flex: 1; background: var(--purple-light); border-radius: 10px; padding: 14px; text-align: center; }
.ci-stat-num { font-size: 28px; font-weight: 800; color: var(--purple); }
.ci-stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ci-chart-container { position: relative; height: 180px; margin: 4px 0 16px; }
.ci-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Inline reflection survey */
.ci-rf-progress-wrap { margin-bottom: 16px; }
.ci-rf-progress-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin-bottom: 8px; }
.ci-rf-progress-bar { height: 4px; background: var(--border); border-radius: 2px; }
.ci-rf-progress-fill { height: 100%; background: var(--purple); border-radius: 2px; transition: width 0.3s ease; }
.ci-rf-options { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 24px; }
.ci-rf-option {
  border: 2px solid var(--border); border-radius: 8px; padding: 12px 16px;
  font-size: 14px; text-align: left; cursor: pointer; background: white;
  transition: border-color 0.12s, background 0.12s; color: var(--ink);
  width: 100%; font-family: inherit;
}
.ci-rf-option:hover { border-color: var(--purple2); }
.ci-rf-option.selected { border-color: var(--purple); background: var(--purple-light); color: var(--purple); font-weight: 600; }
.ci-rf-option.maxed { opacity: 0.4; cursor: not-allowed; }
.ci-rf-nav { display: flex; gap: 10px; }

@media (max-width: 480px) {
  .ci-rating-btn { width: 44px; height: 44px; font-size: 15px; }
  .ci-section-q  { font-size: 18px; }
  .ci-focus-display { font-size: 18px; }
}

/* ── Weekly check-in opt-in card ─────────────────────────────────────────── */
.optin-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(75,0,130,0.08);
  overflow: hidden;
}
.optin-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.optin-banner:hover { background: var(--purple-light); }
.optin-banner-left  { display: flex; align-items: center; gap: 14px; }
.optin-icon         { font-size: 28px; flex-shrink: 0; }
.optin-banner-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.optin-banner-text span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.optin-banner-cta {
  background: var(--purple);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.optin-banner-cta:hover { background: var(--purple2); }
.optin-manual-note {
  background: #fffbf0;
  border-top: 1px solid #f0e8cc;
  padding: 10px 24px;
  font-size: 12px;
  color: #8a7040;
}
.optin-form        { padding: 0 28px 24px; border-top: 1px solid #f0ebf8; }
.optin-form-row    { display: flex; gap: 12px; margin-bottom: 4px; }
.optin-field       { flex: 1; display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.optin-field label { font-size: 13px; font-weight: 600; color: var(--text); }
.optin-field input {
  border: 2px solid #e0d6f0;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.optin-field input:focus       { border-color: var(--purple2); }
.optin-field input::placeholder { color: #bbb; }
.optin-submit-row  { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.optin-cancel      { font-size: 14px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.optin-cancel:hover { color: var(--text); }
.optin-privacy {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--purple-light);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.optin-privacy strong { color: var(--purple); }
.optin-loading {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.optin-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #e0d6f0;
  border-top-color: var(--purple2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.optin-success {
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.optin-success-icon { font-size: 32px; flex-shrink: 0; }
.optin-success-text strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 4px;
}
.optin-success-text p { font-size: 14px; color: var(--muted); line-height: 1.5; }
@media (max-width: 520px) {
  .optin-form-row   { flex-direction: column; }
  .optin-banner     { flex-direction: column; align-items: flex-start; }
  .optin-banner-cta { width: 100%; text-align: center; }
}

/* ================================================================
   HOME PAGE REDESIGN (StoryBrand) — all classes prefixed `fdi-`
   ================================================================ */
:root {
  --fdi-purple-light: #f1ebf8;
  --fdi-green: #177245;
  --fdi-gold: #C9A84C;
  --fdi-gold-dark: #92600a;
}
#home .fdi-hero {
  background: linear-gradient(135deg, #1a0a2e 0%, var(--purple) 55%, #6f2dbd 100%);
  color: white;
  padding: 80px 48px 72px;
  position: relative;
  overflow: hidden;
}
#home .fdi-hero::before {
  content: '♠♦♣♥';
  position: absolute; top: -10px; right: 60px;
  font-size: 160px; opacity: 0.05; letter-spacing: 10px;
  line-height: 1; pointer-events: none;
}
#home .fdi-hero-inner {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto;
  gap: 60px; align-items: center;
}
#home .fdi-hero-eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--fdi-gold);
  margin-bottom: 20px; line-height: 1.5;
}
#home .fdi-hero h1 {
  font-size: 38px; font-weight: 900; line-height: 1.2;
  margin-bottom: 22px; color: white; max-width: none;
}
#home .fdi-hero h1 em { font-style: normal; color: var(--fdi-gold); }
#home .fdi-hero-sub {
  font-size: 17px; opacity: 0.88; line-height: 1.7;
  margin-bottom: 36px; max-width: 560px;
}
#home .fdi-hero-ctas {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
#home .fdi-btn-primary {
  background: var(--fdi-gold); color: #1a0a2e; border: none;
  padding: 14px 28px; border-radius: 10px;
  font-weight: 900; font-size: 15px; cursor: pointer;
  text-decoration: none; display: inline-block;
  transition: opacity 0.15s;
}
#home .fdi-btn-primary:hover { opacity: 0.9; }
#home .fdi-hero-cards-img {
  flex-shrink: 0; width: clamp(220px, 30vw, 360px);
  display: flex; align-items: center; justify-content: center;
}
#home .fdi-hero-cards-img img {
  width: 100%; filter: drop-shadow(0 16px 40px rgba(0,0,0,0.4));
}

#home .fdi-testimonial-strip {
  background: white; border-bottom: 1px solid var(--border);
  padding: 40px 48px; text-align: center;
}
#home .fdi-testimonial-quote {
  font-size: 20px; font-style: italic; color: var(--ink);
  line-height: 1.65; max-width: 720px; margin: 0 auto 18px;
  font-weight: 500;
}
#home .fdi-testimonial-quote::before { content: '\201C'; color: var(--fdi-gold); font-style: normal; font-weight: 900; }
#home .fdi-testimonial-quote::after  { content: '\201D'; color: var(--fdi-gold); font-style: normal; font-weight: 900; }
#home .fdi-testimonial-attr {
  font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted);
}
#home .fdi-testimonial-attr span { color: var(--purple); }

#home .fdi-proof-bar {
  background: white; border-bottom: 1px solid var(--border);
  padding: 18px 48px;
  display: flex; align-items: center; justify-content: center;
  gap: 48px; flex-wrap: wrap;
}
#home .fdi-proof-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
}
#home .fdi-proof-item strong { color: var(--ink); font-weight: 800; }
#home .fdi-proof-dot {
  width: 6px; height: 6px; background: var(--border); border-radius: 50%;
}

#home .fdi-who { background: white; padding: 64px 48px; border-bottom: 1px solid var(--border); }
#home .fdi-eyebrow {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--purple);
  text-align: center; margin-bottom: 12px;
}
#home .fdi-h2 {
  font-size: 30px; font-weight: 900; text-align: center;
  margin-bottom: 12px; color: var(--ink); line-height: 1.2;
}
#home .fdi-sub {
  font-size: 16px; color: var(--muted); text-align: center;
  max-width: 560px; margin: 0 auto 48px; line-height: 1.6;
}
#home .fdi-who-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; max-width: 960px; margin: 0 auto;
}
#home .fdi-who-card {
  background: var(--bg); border-radius: 16px;
  padding: 28px 22px; border: 1px solid var(--border);
}
#home .fdi-who-icon {
  width: 44px; height: 44px; background: var(--fdi-purple-light);
  border-radius: 12px; display: flex; align-items: center;
  justify-content: center; margin-bottom: 14px;
}
#home .fdi-who-icon svg { width: 22px; height: 22px; }
#home .fdi-who-title { font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
#home .fdi-who-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

#home .fdi-how { background: var(--bg); padding: 72px 48px; }
#home .fdi-step-badge {
  display: inline-block; background: var(--fdi-purple-light);
  color: var(--purple); font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 14px; border-radius: 999px; margin-bottom: 14px;
}
#home .fdi-step-badge.green { background: #eaf4ef; color: var(--fdi-green); }
#home .fdi-step-title {
  font-size: 22px; font-weight: 900; color: var(--ink);
  line-height: 1.3; margin-bottom: 12px;
}
#home .fdi-step-desc {
  font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 14px;
}
#home .fdi-step-note {
  font-size: 13px; color: var(--ink); background: var(--fdi-purple-light);
  border-left: 3px solid var(--purple); padding: 10px 14px;
  border-radius: 0 8px 8px 0; line-height: 1.6;
}
#home .fdi-check-list { list-style: none; margin: 0 0 20px; padding: 0; }
#home .fdi-check-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--ink); margin-bottom: 12px; line-height: 1.5;
}
#home .fdi-check-list li::before {
  content: '✓'; color: var(--fdi-green); font-weight: 900;
  flex-shrink: 0; margin-top: 1px;
}
#home .fdi-advisor {
  background: linear-gradient(135deg, #1a0a2e, var(--purple));
  border-radius: 14px; padding: 20px 22px; margin-bottom: 20px;
}
#home .fdi-advisor-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--fdi-gold);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
#home .fdi-advisor p {
  font-size: 14px; color: rgba(255,255,255,0.85);
  line-height: 1.6; margin: 0;
}

#home .fdi-guide { background: white; padding: 72px 48px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
#home .fdi-guide-inner {
  display: grid; grid-template-columns: 1fr auto;
  gap: 48px; align-items: center; max-width: 860px; margin: 0 auto;
}
#home .fdi-guide-photo {
  width: 160px; height: 160px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0; border: 4px solid var(--fdi-purple-light);
  box-shadow: 0 8px 24px rgba(75,0,130,0.15);
}
#home .fdi-guide-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
#home .fdi-guide-label {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--fdi-gold-dark); margin-bottom: 10px;
}
#home .fdi-guide-name { font-size: 26px; font-weight: 900; color: var(--ink); margin-bottom: 6px; }
#home .fdi-guide-title { font-size: 14px; font-weight: 600; color: var(--purple2, var(--purple)); margin-bottom: 16px; }
#home .fdi-guide-bio { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }
#home .fdi-guide-creds { display: flex; gap: 20px; flex-wrap: wrap; }
#home .fdi-guide-cred {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
#home .fdi-guide-cred svg { color: var(--purple); flex-shrink: 0; }

#home .fdi-insights { background: var(--bg); padding: 72px 48px; }
#home .fdi-insights-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; max-width: 960px; margin: 48px auto 0;
}
#home .fdi-insight-card {
  background: white; border-radius: 14px; padding: 22px; border: 1px solid var(--border);
}
#home .fdi-insight-icon { margin-bottom: 10px; display: flex; }
#home .fdi-insight-icon svg { width: 26px; height: 26px; }
#home .fdi-insight-title { font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
#home .fdi-insight-quote { font-size: 13px; color: var(--muted); line-height: 1.65; font-style: italic; }
#home .fdi-insight-quote::before { content: '\201C'; }
#home .fdi-insight-quote::after  { content: '\201D'; }

#home .fdi-path {
  background: white; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 48px; text-align: center;
}
#home .fdi-path-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
#home .fdi-path-links {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap; font-size: 13px;
}
#home .fdi-path-link {
  color: var(--purple); font-weight: 700;
  text-decoration: underline; cursor: pointer;
  background: none; border: none; padding: 0; font-size: 13px;
}
#home .fdi-path-divider { color: var(--border); font-weight: 300; font-size: 16px; }

#home .fdi-bottom {
  background: linear-gradient(135deg, #1a0a2e 0%, var(--purple) 60%, #6f2dbd 100%);
  color: white; padding: 80px 48px; text-align: center;
  position: relative; overflow: hidden;
}
#home .fdi-bottom::before {
  content: '♠♦♣♥'; position: absolute; bottom: -30px; left: 20px;
  font-size: 140px; opacity: 0.04; letter-spacing: 10px;
  line-height: 1; pointer-events: none;
}
#home .fdi-bottom h2 {
  font-size: 34px; font-weight: 900; line-height: 1.25;
  margin: 0 auto 16px; max-width: 640px; color: white;
}
#home .fdi-bottom p {
  font-size: 17px; opacity: 0.85; line-height: 1.65;
  max-width: 520px; margin: 0 auto 36px;
}
#home .fdi-bottom-btns {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; flex-wrap: wrap;
}
#home .fdi-btn-ghost {
  background: transparent; color: white;
  border: 2px solid rgba(255,255,255,0.4);
  padding: 13px 26px; border-radius: 10px;
  font-weight: 700; font-size: 15px; cursor: pointer;
  text-decoration: none; display: inline-block;
  transition: border-color 0.15s;
}
#home .fdi-btn-ghost:hover { border-color: rgba(255,255,255,0.8); }

@media (max-width: 760px) {
  #home .fdi-hero { padding: 48px 24px 56px; }
  #home .fdi-hero-inner { grid-template-columns: 1fr; gap: 32px; }
  #home .fdi-hero h1 { font-size: 26px; }
  #home .fdi-hero-cards-img { width: clamp(180px, 60vw, 280px); margin: 0 auto; }
  #home .fdi-testimonial-strip { padding: 32px 24px; }
  #home .fdi-testimonial-quote { font-size: 16px; }
  #home .fdi-who-grid { grid-template-columns: repeat(2, 1fr); }
  #home .fdi-insights-grid { grid-template-columns: 1fr; }
  #home .fdi-proof-bar { gap: 20px; padding: 18px 24px; }
  #home .fdi-who, #home .fdi-how, #home .fdi-insights, #home .fdi-guide { padding: 48px 24px; }
  #home .fdi-bottom { padding: 56px 24px; }
  #home .fdi-bottom h2 { font-size: 26px; }
  #home .fdi-path { padding: 20px 24px; }
  #home .fdi-guide-inner { grid-template-columns: 1fr; }
  #home .fdi-guide-photo { margin: 0 auto; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Refinement screen (client dealer only — #dealerRefArea)
   Shown after "This Is My Hand" so the user can swap in cards they missed.
   ═══════════════════════════════════════════════════════════════════════════ */

#dealerRefArea { padding-bottom: 40px; }

/* Step banner — numbered card with title + body */
#dealerRefArea .step-banner {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fff; border: 2px solid var(--border);
  border-radius: 14px; padding: 16px 20px;
  margin-bottom: 18px;
  transition: all .25s;
}
#dealerRefArea .step-banner.active {
  border-color: var(--purple);
  background: var(--purple-light);
  box-shadow: 0 4px 16px rgba(75,0,130,.12);
}
#dealerRefArea .step-banner.complete { opacity: .55; }
#dealerRefArea .step-num {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--border); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 16px;
}
#dealerRefArea .step-banner.active .step-num { background: var(--purple); color: #fff; }
#dealerRefArea .step-banner.complete .step-num { background: var(--green); color: #fff; }
#dealerRefArea .step-text { flex: 1; }
#dealerRefArea .step-title {
  font-size: 16px; font-weight: 800; color: var(--ink); margin: 0 0 4px;
}
#dealerRefArea .step-banner.active .step-title { color: var(--purple); }
#dealerRefArea .step-body {
  font-size: 14px; color: var(--muted); line-height: 1.55; margin: 0;
}
#dealerRefArea .step-banner.active .step-body { color: var(--ink); }

/* Row labels above each card row */
.ref-row-label {
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  margin: 14px 0 10px;
}

/* Card rows — horizontal scroll on mobile */
.ref-row {
  display: flex; gap: 14px;
  overflow-x: auto; padding: 8px 4px 14px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.ref-row::-webkit-scrollbar { display: none; }

.ref-slot {
  flex: 1 1 0; min-width: 130px;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
.ref-slot-label {
  font-size: 11px; color: var(--muted); font-weight: 700;
}
.ref-slot-label.empty { color: var(--purple); font-weight: 800; }

/* Individual card (image-based, like the dealer cards) */
#dealerRefArea .ref-card {
  width: 100%;
  aspect-ratio: 2.5/3.5;
  background: #fff; border: 2px solid var(--border);
  border-radius: 11px; overflow: hidden; position: relative;
  box-shadow: 0 2px 8px rgba(75,0,130,.07);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s, opacity .25s;
  -webkit-tap-highlight-color: transparent;
}
#dealerRefArea .ref-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
#dealerRefArea .ref-card:hover:not(.disabled):not(.consumed) {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(75,0,130,.15);
}
#dealerRefArea .ref-card.disabled {
  cursor: default; opacity: .35; filter: grayscale(.5);
}
#dealerRefArea .ref-card.consumed {
  opacity: 0; transform: scale(.5);
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}

/* Empty slot (when a hand card is tapped to swap out).
   Tappable — clicking it puts the original card back (undo). */
.ref-empty-slot {
  width: 100%;
  aspect-ratio: 2.5/3.5;
  border: 2px dashed var(--purple);
  border-radius: 11px;
  background: var(--purple-light);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--purple); font-weight: 800;
  text-align: center;
  padding: 8px; gap: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, transform .15s;
  animation: refEmptyPulse 1.8s ease-in-out infinite;
}
.ref-empty-slot:hover {
  background: #d4c3ee;
  transform: translateY(-1px);
}
.ref-empty-slot .ref-empty-arrow {
  font-size: 48px; line-height: 1;
  animation: refArrowDown 1.2s ease-in-out infinite;
}
.ref-empty-slot .ref-empty-text {
  font-size: 13px; letter-spacing: 0.05em;
  text-transform: uppercase;
}
@keyframes refEmptyPulse {
  0%, 100% { background: var(--purple-light); }
  50%      { background: #e0d4f5; }
}
@keyframes refArrowDown {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* Shimmer on candidate cards when Step 2 is active (waiting for tap) */
body.refStep2 #dealerRefCandidateRow .ref-card:not(.consumed):not(.disabled) {
  animation: refShimmerGlow 1.4s ease-in-out infinite;
  border-color: var(--purple);
}
@keyframes refShimmerGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(75,0,130,0), 0 2px 8px rgba(75,0,130,.1); }
  50%      { box-shadow: 0 0 0 4px rgba(75,0,130,.3), 0 6px 16px rgba(75,0,130,.25); }
}

/* Just-landed animation when a candidate becomes a hand card */
#dealerRefArea .ref-card.just-landed {
  animation: refJustLanded 0.45s ease-out;
}
@keyframes refJustLanded {
  0%   { transform: scale(.7) translateY(-30px); opacity: 0; }
  60%  { transform: scale(1.05) translateY(0);   opacity: 1; }
  100% { transform: scale(1)    translateY(0); }
}

/* Action buttons at the bottom */
.ref-actions {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; margin-top: 28px;
}
#dealerRefArea .btn-primary {
  background: var(--purple); color: #fff;
  border: none; border-radius: 12px;
  padding: 14px 32px; font-size: 16px; font-weight: 800;
  cursor: pointer; min-width: 280px;
  box-shadow: 0 4px 16px rgba(75,0,130,.3);
  transition: background .25s, box-shadow .25s;
  font-family: inherit;
}
#dealerRefArea .btn-primary:hover:not(:disabled) { background: var(--purple2); }
#dealerRefArea .btn-primary:disabled {
  background: var(--border); color: var(--muted);
  cursor: not-allowed; box-shadow: none;
}
/* Green ready state — celebrates completed swaps */
#dealerRefArea .btn-primary.ready {
  background: var(--green);
  box-shadow: 0 4px 16px rgba(23,114,69,.35);
}
#dealerRefArea .btn-primary.ready:hover:not(:disabled) { background: #0f6b3a; }

#dealerRefArea .btn-secondary {
  background: none; color: var(--muted);
  border: none; font-size: 13px;
  cursor: pointer; text-decoration: underline;
  padding: 6px; font-family: inherit;
}
#dealerRefArea .btn-secondary:hover { color: var(--ink); }

@media (max-width: 700px) {
  #dealerRefArea .step-num { width: 32px; height: 32px; font-size: 14px; }
  #dealerRefArea .step-title { font-size: 15px; }
  #dealerRefArea .step-body { font-size: 13px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Guest thank-you screen (#guestScreenThanks)
   Shown after email submission. Results are delivered via email rather than
   rendered inline — this filters out fake/typo'd email addresses.
   ═══════════════════════════════════════════════════════════════════════════ */
.guest-thanks-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  text-align: center;
}
/* Envelope SVG icon — Feather-style line art, matches nav icon weight */
.guest-thanks-icon {
  width: 88px; height: 88px;
  margin: 0 auto 20px;
  color: var(--purple);
  display: flex; align-items: center; justify-content: center;
  animation: thanksIconBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.guest-thanks-icon svg {
  width: 100%; height: 100%;
}
@keyframes thanksIconBounce {
  0%   { transform: scale(0.3) rotate(-10deg); opacity: 0; }
  60%  { transform: scale(1.08) rotate(2deg);  opacity: 1; }
  100% { transform: scale(1)    rotate(0); }
}
.guest-thanks-headline {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 18px;
  letter-spacing: -.3px;
}
.guest-thanks-headline span {
  color: var(--purple);
}
.guest-thanks-body {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.6;
  margin: 0 0 14px;
}
.guest-thanks-body strong {
  color: var(--purple);
  word-break: break-all;
}
.guest-thanks-spam {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
  margin: 28px auto 0;
  padding: 16px 20px;
  background: var(--purple-light);
  border: 1.5px solid #d4c3ee;
  border-radius: 12px;
  max-width: 540px;
}
.guest-thanks-spam strong { color: var(--purple); }
.guest-thanks-spam p { margin: 0 0 8px; }
.guest-thanks-spam p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .guest-thanks-wrap { padding: 36px 18px 60px; }
  .guest-thanks-icon { width: 70px; height: 70px; }
}

/* ── New client dashboard (pulse redesign) — all scoped under #cdash ──────────
   Ported from dashboard-v8.html. Scoping prevents collisions with the app's own
   .card / .stat-pill / .legend / .section / .note etc. */
#cdash { color:#1a1a2e; }
#cdash .snapshot { display:flex; gap:12px; flex-wrap:wrap; margin:14px 0 22px; }
#cdash .stat-pill { background:#fff; border-radius:10px; padding:13px 18px; box-shadow:0 1px 3px rgba(0,0,0,0.06); min-width:150px; flex:1; }
#cdash .stat-label { font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:#999; font-weight:700; }
#cdash .stat-value { font-size:24px; font-weight:800; margin:3px 0 1px; color:#4B0082; }
#cdash .stat-value.suit { font-size:20px; }
#cdash .stat-value.red { color:#c0392b; }
#cdash .stat-sub { font-size:11px; color:#aaa; }

#cdash .big-question { font-size:11px; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:#888; margin-bottom:4px; }
#cdash .big-answer { font-size:24px; font-weight:800; margin-bottom:6px; line-height:1.3; }
#cdash .big-answer .not-yet { color:#c0392b; }
#cdash .big-note { font-size:12px; color:#999; margin-bottom:18px; }

#cdash .toggle-wrap { display:flex; background:#e8e6f0; border-radius:30px; padding:4px; margin-bottom:20px; width:fit-content; }
#cdash .toggle-btn { padding:8px 20px; border-radius:26px; font-size:13px; font-weight:600; cursor:pointer; border:none; background:transparent; color:#777; }
#cdash .toggle-btn.active { background:#fff; color:#1a1a2e; box-shadow:0 1px 4px rgba(0,0,0,0.12); }

#cdash .legend { background:#fff; border-radius:10px; padding:14px 16px; margin-bottom:24px; font-size:12px; box-shadow:0 1px 3px rgba(0,0,0,0.06); }
#cdash .legend-row { display:flex; flex-wrap:wrap; gap:8px 20px; }
#cdash .legend-item { display:flex; align-items:center; gap:7px; color:#555; margin-bottom:0; }
#cdash .legend-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
#cdash .dot-red { background:#e05252; } #cdash .dot-yellow { background:#e09a30; } #cdash .dot-green { background:#3aaa72; } #cdash .dot-nd { background:#c9c6d6; }

#cdash .view { display:none; } #cdash .view.active { display:block; }
#cdash .bucket-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; align-items:start; }
#cdash .bucket-grid .section { margin-bottom:0; }
#cdash .section { margin-bottom:24px; }
#cdash .bucket-header { border-top:2px solid transparent; padding-top:10px; margin-bottom:10px; }
#cdash .bucket-title { font-size:14px; font-weight:700; } #cdash .bucket-sub { font-size:11px; color:#aaa; margin-top:1px; }
#cdash .bucket-red .bucket-header { border-top-color:#e05252; } #cdash .bucket-red .bucket-title { color:#c0392b; }
#cdash .bucket-yellow .bucket-header { border-top-color:#e09a30; } #cdash .bucket-yellow .bucket-title { color:#b07a10; }
#cdash .bucket-green .bucket-header { border-top-color:#3aaa72; } #cdash .bucket-green .bucket-title { color:#2e8c5a; }
#cdash .bucket-nd .bucket-header { border-top-color:#c9c6d6; } #cdash .bucket-nd .bucket-title { color:#8a85a0; }
#cdash .bucket-empty { font-size:12px; color:#bbb; font-style:italic; padding:2px 0; }

#cdash .card { background:#fff; border-radius:10px; padding:13px 16px; margin-bottom:8px; border-left:4px solid transparent; box-shadow:0 1px 3px rgba(0,0,0,0.06); cursor:pointer; }
#cdash .card-top { display:flex; align-items:flex-start; justify-content:space-between; }
#cdash .card.border-red { border-left-color:#e05252; } #cdash .card.border-yellow { border-left-color:#e09a30; } #cdash .card.border-green { border-left-color:#3aaa72; } #cdash .card.border-nd { border-left-color:#c9c6d6; cursor:default; }
#cdash .card-left { flex:1; } #cdash .card-name { font-size:15px; font-weight:600; margin-bottom:3px; }
#cdash .card-needs { font-size:12px; color:#666; } #cdash .card-needs strong { color:#333; }
#cdash .card-right { display:flex; flex-direction:column; align-items:flex-end; gap:5px; margin-left:16px; }

#cdash .action-badge { font-size:10px; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; padding:3px 8px; border-radius:20px; white-space:nowrap; }
#cdash .badge-fix { background:#fdecea; color:#c0392b; } #cdash .badge-monitor { background:#fef6e4; color:#b07a10; } #cdash .badge-ok { background:#e8f8f1; color:#2e8c5a; } #cdash .badge-nd { background:#efeef4; color:#8a85a0; }
#cdash .arrow { color:#6c63b0; font-size:15px; }
#cdash .score { font-size:11px; color:#aaa; }
#cdash .trend-row { display:flex; align-items:center; gap:6px; }
#cdash .trend-chip { font-size:12px; font-weight:600; } #cdash .trend-down { color:#c0392b; } #cdash .trend-up { color:#2e8c5a; } #cdash .trend-flat { color:#aaa; font-weight:500; }
/* Trajectory over time */
#cdash .pd-card-traj { display:flex; align-items:center; gap:10px; margin-top:9px; flex-wrap:wrap; }
#cdash .pd-spark { flex:none; display:block; }
#cdash .pd-stale { font-size:11.5px; color:#999; font-weight:500; }
#cdash .pd-traj-block { margin:4px 0 16px; }
#cdash .pd-traj-title { font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:0.05em; color:#888; margin-bottom:8px; }
#cdash .pd-traj-wrap { position:relative; height:180px; background:#fff; border:1px solid #ece8f3; border-radius:12px; padding:10px 12px; }

#cdash .spread-flag { margin-top:7px; display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:600; padding:3px 9px; border-radius:20px; border:1px solid transparent; }
#cdash .spread-moderate { background:#fff8e6; border-color:#f0c060; color:#a07010; }
#cdash .spread-strong { background:#fdecea; border-color:#f0a0a0; color:#a02020; }
#cdash .spread-wide { background:#f1f0f7; border-color:#cfcad9; color:#6b6580; }
#cdash .spread-flag .dot { font-size:10px; }

#cdash .factor-row { background:#fff; border-radius:10px; padding:14px 16px; margin-bottom:8px; box-shadow:0 1px 3px rgba(0,0,0,0.06); border-left:4px solid transparent; cursor:pointer; }
#cdash .factor-row.border-red { border-left-color:#e05252; } #cdash .factor-row.border-yellow { border-left-color:#e09a30; } #cdash .factor-row.border-green { border-left-color:#3aaa72; } #cdash .factor-row.border-nd { border-left-color:#c9c6d6; cursor:default; }
#cdash .factor-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
#cdash .factor-name { font-size:15px; font-weight:600; }
#cdash .factor-right { display:flex; flex-direction:column; align-items:flex-end; gap:4px; }
#cdash .factor-desc { font-size:12px; color:#666; margin-bottom:8px; }
#cdash .factor-where { font-size:12px; color:#666; } #cdash .factor-where b { color:#333; }

#cdash .explore { margin-top:26px; } #cdash .explore a { color:#6c63b0; font-weight:600; font-size:13px; text-decoration:none; cursor:pointer; }
#cdash .note { font-size:12px; color:#999; margin-top:36px; padding-top:16px; border-top:1px dashed #ddd; line-height:1.7; max-width:1000px; }

/* drill pages */
#cdash #cdTeamDetail, #cdash #cdFactorDetail { max-width:680px; }
#cdash .dt-back { background:none; border:none; color:#6c63b0; font-weight:600; font-size:13px; cursor:pointer; padding:0; margin-bottom:14px; }
#cdash .dt-name { font-size:23px; font-weight:800; letter-spacing:-0.01em; }
#cdash .dt-q { font-size:13px; color:#888; margin:3px 0 18px; }
#cdash .dt-factor { background:#fff; border-radius:10px; padding:13px 16px; margin-bottom:10px; border-left:4px solid transparent; box-shadow:0 1px 3px rgba(0,0,0,0.06); }
#cdash .dt-factor.border-red { border-left-color:#e05252; } #cdash .dt-factor.border-yellow { border-left-color:#e09a30; } #cdash .dt-factor.border-green { border-left-color:#3aaa72; }
#cdash .dt-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:5px; }
#cdash .dt-fname { font-size:15px; font-weight:600; } #cdash .dt-meta { font-size:11px; color:#999; font-weight:600; }
#cdash .dt-action { font-size:13px; font-weight:700; color:#333; margin:3px 0 7px; }
#cdash .pick-list { display:flex; flex-direction:column; gap:4px; }
#cdash .pick-item { font-size:12px; color:#666; line-height:1.45; } #cdash .pick-pct { font-weight:700; color:#333; margin-left:4px; }
#cdash .split { border-radius:8px; padding:10px 12px; margin-top:9px; font-size:12.5px; line-height:1.55; }
#cdash .split.mod { background:#fff8e6; border:1px solid #f0c060; color:#7a5a10; }
#cdash .split.strong { background:#fdecea; border:1px solid #f0a0a0; color:#9a2020; }
#cdash .split.wide { background:#f1f0f7; border:1px solid #cfcad9; color:#5a556b; }
#cdash .dt-convo { background:#efeef7; border-radius:8px; padding:12px 14px; font-size:12.5px; color:#555; margin-top:14px; line-height:1.5; } #cdash .dt-convo b { color:#333; }
#cdash .fd-section { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:#999; font-weight:700; margin:18px 0 8px; }
#cdash .fd-card { background:#fff; border-radius:10px; padding:14px 16px; box-shadow:0 1px 3px rgba(0,0,0,0.06); }
#cdash .sym-key { font-size:11px; color:#999; margin:0 0 8px; }
#cdash .move-step { font-size:12.5px; color:#555; line-height:1.5; margin-bottom:8px; padding-left:14px; position:relative; }
#cdash .move-step::before { content:"→"; position:absolute; left:0; color:#6c63b0; font-weight:700; }
#cdash .move-step b { color:#222; }

#cdash .team-bars { display:flex; flex-direction:column; gap:5px; }
#cdash .team-bar-row { display:flex; align-items:center; gap:8px; }
#cdash .team-bar-row.clickable { cursor:pointer; padding:4px 5px; border-radius:6px; margin:1px 0; }
#cdash .team-bar-row.clickable:hover { background:#f6f5fb; }
#cdash .team-bar-label { font-size:11px; color:#777; width:80px; flex-shrink:0; }
#cdash .bar-track { flex:1; height:7px; background:#eee; border-radius:4px; overflow:hidden; }
#cdash .bar-fill { height:100%; border-radius:4px; }
#cdash .bar-red { background:#e05252; } #cdash .bar-yellow { background:#e09a30; } #cdash .bar-green { background:#3aaa72; } #cdash .bar-nd { background:#cfcad9; }
#cdash .bar-score { font-size:11px; color:#888; width:28px; text-align:right; flex-shrink:0; }
#cdash .bar-spread { font-size:10px; font-weight:700; width:14px; text-align:center; flex-shrink:0; }
#cdash .bar-spread.moderate { color:#e09a30; } #cdash .bar-spread.strong { color:#e05252; } #cdash .bar-spread.wide { color:#9a93ad; }

/* priority layer — "where to start" focus lines on the team cards + drill */
#cdash .card { padding:15px 18px; }                 /* a touch more room for the steps */
#cdash .cd-focus { font-size:13px; color:#444; margin-top:8px; line-height:1.5; }
#cdash .cd-focus b { color:#1a1a2e; }
#cdash .cd-focus-verb { font-weight:700; }
#cdash .cd-focus-score { font-size:11px; color:#999; font-weight:600; }
#cdash .cd-focus-sec { color:#888; margin-top:2px; }
#cdash .cd-focus-sec b { color:#555; }
#cdash .card.border-red .cd-focus-primary .cd-focus-verb { color:#c0392b; }
#cdash .card.border-yellow .cd-focus-primary .cd-focus-verb { color:#b07a10; }
#cdash .card.border-green .cd-focus-primary .cd-focus-verb { color:#2e8c5a; }
/* the "Your next step" banner at the top of a team drill */
#cdash .dt-next { margin:0 0 16px; padding:11px 14px; border-radius:9px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:#999; }
#cdash .dt-next .cd-focus { text-transform:none; letter-spacing:0; font-weight:400; margin-top:5px; font-size:14px; }
#cdash .dt-next-red { background:#fdecea; } #cdash .dt-next-red .cd-focus-verb { color:#c0392b; }
#cdash .dt-next-yellow { background:#fef6e4; } #cdash .dt-next-yellow .cd-focus-verb { color:#b07a10; }
#cdash .dt-next-green { background:#e8f8f1; } #cdash .dt-next-green .cd-focus-verb { color:#2e8c5a; }

@media (max-width:860px){ #cdash .bucket-grid { grid-template-columns:1fr; } }

/* Contact-form honeypot: kept off-screen (NOT display:none, so naive bots still fill it). Real users never see or tab to it. */
.hp-wrap { position:absolute !important; left:-9999px !important; top:auto; width:1px; height:1px; overflow:hidden; }

/* ── Individual results — highlights-first, responsive (all classes prefixed .ir-) ── */
.ir{max-width:560px;margin:0 auto;}
@media(min-width:760px){ .ir{max-width:1000px;} }
.ir-topbar{display:flex;align-items:center;justify-content:space-between;gap:10px 20px;flex-wrap:wrap;margin-bottom:16px;}
.ir-brand{font-size:13px;font-weight:800;letter-spacing:.02em;color:var(--purple);flex-shrink:0;}
.ir-brand span{color:var(--muted);font-weight:600;}
.ir-savebar{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;}
.ir-savelabel{font-size:12px;color:var(--muted);font-weight:600;}
.ir-card{background:#fff;border-radius:16px;padding:18px;box-shadow:0 1px 3px rgba(0,0,0,.06);margin-bottom:14px;}
.ir-eyebrow{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);}

/* the two insight cards sit side-by-side on desktop, stack on mobile */
.ir-insight-grid{display:grid;grid-template-columns:1fr;gap:14px;align-items:start;}
@media(min-width:760px){ .ir-insight-grid{grid-template-columns:1fr 1fr;} }
.ir-steps{font-size:13.5px;color:var(--muted);line-height:1.6;padding-left:18px;margin:4px 0 0;}
.ir-steps li{margin-bottom:4px;}

/* hero */
.ir-hero{background:linear-gradient(150deg,#241048,var(--purple));color:#fff;padding:24px 22px;}
.ir-hero-inner{display:flex;flex-direction:column;align-items:center;text-align:center;gap:18px;}
@media(min-width:760px){ .ir-hero-inner{flex-direction:row;text-align:left;gap:30px;align-items:center;} .ir-hero-text{flex:1;} }
.ir-hand{display:flex;gap:7px;justify-content:center;flex-shrink:0;flex-wrap:wrap;}
.ir-hand .pp-card{box-shadow:0 2px 8px rgba(0,0,0,.3);}
.ir-hero-suit{font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;opacity:.8;}
.ir-hero-name{font-size:36px;font-weight:900;letter-spacing:-.02em;margin:2px 0 4px;display:flex;align-items:center;gap:10px;justify-content:center;}
@media(min-width:760px){ .ir-hero-name{justify-content:flex-start;} }
.ir-hero-theme{font-size:15px;opacity:.9;margin-bottom:14px;}
.ir-badge{display:inline-block;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.28);border-radius:30px;padding:5px 14px;font-size:13px;font-weight:700;}
.ir-badge b{color:var(--gold);}
.ir-hero-line{font-size:13.5px;opacity:.86;margin-top:14px;line-height:1.55;}
.ir-hero-q{font-style:italic;opacity:.78;font-size:13px;margin-top:8px;line-height:1.5;}
.ir-more-hero{margin-top:14px;color:#fff;opacity:.85;}

/* expandable highlight cards — the explicit "Get the details" button is the only control */
.ir-ex{transition:box-shadow .15s;}
.ir-details{display:inline-flex;align-items:center;gap:6px;margin-top:14px;background:var(--purple-light);color:var(--purple);border:none;border-radius:9px;padding:9px 16px;font-size:13px;font-weight:800;cursor:pointer;}
.ir-details:hover{background:#e7defa;}
.ir-details svg{transition:transform .2s;}
.ir-ex.open .ir-details svg{transform:rotate(180deg);}
.ir-hero .ir-details{background:rgba(255,255,255,.15);color:#fff;border:1px solid rgba(255,255,255,.3);}
.ir-hero .ir-details:hover{background:rgba(255,255,255,.25);}
.ir-lbl-open{display:none;} .ir-ex.open .ir-lbl-shut{display:none;} .ir-ex.open .ir-lbl-open{display:inline;}
.ir-drill{display:none;margin-top:14px;padding-top:14px;border-top:1px dashed var(--border);}
.ir-ex.open .ir-drill{display:block;}
.ir-hero .ir-drill{border-top-color:rgba(255,255,255,.25);}
.ir-drill-light{background:#fff;color:var(--ink);border-radius:12px;padding:14px;}

/* strengths */
.ir-strengths{margin-top:2px;}
.ir-strength{display:flex;align-items:flex-start;gap:10px;padding:9px 0;border-bottom:1px solid var(--border);}
.ir-strength:last-child{border-bottom:none;}
.ir-dot{width:8px;height:8px;border-radius:50%;background:var(--purple);margin-top:6px;flex-shrink:0;}
.ir-strength p{font-size:14.5px;font-weight:600;color:var(--ink);margin:0;}

/* the gap */
.ir-gap{border-left:4px solid var(--gold);background:#fdfaf2;}
.ir-gap-headline{font-size:15px;font-weight:800;margin-top:8px;line-height:1.4;}
.ir-gap-quote{font-style:italic;color:var(--gold-dark);font-weight:600;font-size:13.5px;margin-top:10px;line-height:1.5;}

/* action cards */
.ir-act{display:flex;align-items:center;gap:14px;}
.ir-act-ic{width:42px;height:42px;border-radius:11px;background:var(--purple-light);color:var(--purple);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.ir-act-body{flex:1;}
.ir-act-title{font-size:15.5px;font-weight:800;color:var(--ink);}
.ir-act-sub{font-size:12.5px;color:var(--muted);margin-top:1px;line-height:1.4;}
.ir-btn{display:block;width:100%;text-align:center;background:var(--purple);color:#fff;border:none;border-radius:11px;padding:13px;font-size:15px;font-weight:800;cursor:pointer;margin-top:14px;text-decoration:none;}
.ir-btn.ghost{background:#fff;color:var(--purple);border:1.5px solid var(--purple);}
.ir-btn-inline{width:auto;margin-top:0;padding:10px 18px;font-size:14px;flex-shrink:0;}
.ir-code-row{margin-top:12px;}
.ir-code{display:inline-block;font-family:ui-monospace,monospace;font-size:17px;font-weight:800;letter-spacing:.1em;color:var(--purple);background:var(--purple-light);border-radius:8px;padding:6px 14px;}
.ir-save-links{display:flex;gap:14px;margin-top:12px;flex-wrap:wrap;}
.ir-link{background:none;border:none;padding:0;cursor:pointer;font-size:12.5px;color:var(--purple);font-weight:700;text-decoration:none;display:inline-flex;align-items:center;gap:5px;}

/* drill content */
.ir-fp-h{font-size:14px;font-weight:800;margin:10px 0 6px;color:var(--ink);}
.ir-fp-h:first-child{margin-top:0;}
.ir-fp-sub{font-weight:500;color:var(--muted);font-size:12px;}
.ir-fp-p{font-size:13.5px;color:var(--muted);line-height:1.6;margin-bottom:8px;}
.ir-twocol{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:6px;}
.ir-mini{background:#faf9fc;border:1px solid var(--border);border-radius:12px;padding:12px;}
.ir-mini h4{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:6px;}
.ir-mini ul{font-size:13px;color:var(--muted);line-height:1.65;padding-left:16px;margin:0;}

.ir-more-bottom{text-align:center;margin-top:8px;margin-bottom:16px;}
.ir-more-bottom button{background:none;border:1.5px solid var(--border);border-radius:30px;color:var(--purple);font-weight:800;font-size:14px;cursor:pointer;padding:11px 22px;display:inline-flex;align-items:center;gap:8px;}

/* ── Entry email gate + confirmation (entry-email.js) ───────────────────────── */
.ee-wrap{max-width:480px;margin:0 auto;}
.ee-wrap.ee-wrap-wide{max-width:580px;}
.ee-card{background:#fff;border:1px solid var(--border);border-radius:20px;padding:28px 24px;box-shadow:0 10px 30px -18px rgba(40,16,70,.35);text-align:center;}
.ee-icon,.ee-ok{width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 14px;}
.ee-icon{background:var(--purple-light);color:var(--purple);}
.ee-ok{background:rgba(23,114,69,.12);color:var(--green);}
.ee-title{font-size:21px;font-weight:800;color:#17162E;margin:0 0 6px;}
.ee-sub{font-size:15px;color:var(--muted);line-height:1.5;margin:0 0 20px;}
.ee-label{display:block;text-align:left;font-size:13px;font-weight:700;color:#17162E;margin:0 0 6px;}
.ee-input{width:100%;height:52px;border:1px solid var(--border);border-radius:14px;padding:0 14px;font-size:15px;color:#17162E;background:#fff;margin:0 0 16px;box-sizing:border-box;}
.ee-input:focus{outline:none;border-color:var(--purple);box-shadow:0 0 0 3px rgba(75,0,130,.12);}
.ee-msg{min-height:18px;font-size:13px;color:var(--red);text-align:left;margin:-6px 0 8px;}
.ee-privacy{display:flex;gap:10px;text-align:left;background:var(--purple-light);border-radius:14px;padding:13px 14px;margin:4px 0 20px;}
.ee-privacy svg{flex:0 0 auto;color:var(--purple);margin-top:1px;}
.ee-privacy p{font-size:12.5px;color:var(--purple);line-height:1.5;margin:0;}
.ee-codechip{display:inline-flex;align-items:center;gap:8px;background:var(--purple-light);border:1px solid var(--border);border-radius:10px;padding:8px 14px;}
.ee-codechip span{font-size:12px;color:var(--muted);}
.ee-codechip b{font-size:14px;letter-spacing:.08em;color:var(--purple);}
.ee-codehint{font-size:11.5px;color:var(--muted);margin:6px 0 18px;}
.ee-hero{margin:0 0 18px;}
.ee-hero .ir-hero-inner{flex-direction:column !important;text-align:center;gap:16px;}
.ee-hero .ir-hero-name{justify-content:center;}
.ee-challenge{background:rgba(23,114,69,.10);border-radius:12px;padding:11px 14px;font-size:13px;color:var(--green);line-height:1.5;margin:0 0 16px;}
