/* Lotus Hub — light, professional theme drawn from the logo:
   crimson red (primary), golden yellow (accent), clean white surfaces.
   Light mode only, by design — no dark-mode overrides. */
:root {
  --bg: #faf8f6;          /* warm off-white page */
  --card: #ffffff;        /* card surface */
  --ink: #201a1a;         /* warm near-black text */
  --muted: #756c69;       /* secondary text */
  --line: #ece4e0;        /* hairline borders */
  --line-strong: #ddd2cc;

  --brand: #c01f2c;       /* logo crimson — primary actions */
  --brand-hover: #a5182a; /* darker red for press/hover */
  --brand-ink: #ffffff;
  --brand-soft: #fbeaea;  /* faint red wash */

  --accent: #f5b301;      /* logo gold — highlights */
  --accent-soft: #fef3d4; /* soft yellow surface */
  --accent-ink: #855400;  /* readable amber text */

  --danger: #c01f2c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(32, 20, 20, 0.05), 0 6px 16px rgba(32, 20, 20, 0.06);
  --shadow-sm: 0 1px 2px rgba(32, 20, 20, 0.06);
}

* { box-sizing: border-box; }
/* The `hidden` attribute must always win over element display rules
   (e.g. .tabs/.profile-icon-btn set display:flex, which would otherwise
   override [hidden] and leave signed-out controls visible). */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 560px; margin: 0 auto; padding: 0 16px 96px; }

/* ---- header ---- */
.app-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(250, 248, 246, 0.9);
  backdrop-filter: saturate(1.2) blur(8px);
  padding-top: 16px;
  border-bottom: 1px solid transparent;
}
.brand { display: flex; align-items: center; justify-content: space-between; }
.brand-actions { display: flex; align-items: center; gap: 10px; }

/* yellow pickleball + host button (top-right) */
.host-btn {
  width: 40px; height: 40px; flex: 0 0 40px; padding: 0; border: 0;
  background: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.08s;
  filter: drop-shadow(0 1px 2px rgba(32, 20, 20, 0.15));
}
.host-btn:hover { transform: scale(1.06); }
.host-btn:active { transform: translateY(1px); }
.host-btn svg { display: block; }

/* instagram link button (top-right) */
.ig-btn {
  width: 40px; height: 40px; flex: 0 0 40px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: #fff; color: var(--brand); cursor: pointer; text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.ig-btn:hover { border-color: var(--brand); background: var(--brand-soft); }

/* profile icon button (top-right) */
.profile-icon-btn {
  width: 40px; height: 40px; flex: 0 0 40px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: #fff; color: var(--brand); cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.profile-icon-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.profile-icon-btn.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.wordmark {
  font-size: 1.9rem; font-weight: 800; letter-spacing: -0.01em; margin: 0;
  display: flex; align-items: center; gap: 10px; color: var(--brand);
}
.brand-logo { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; box-shadow: var(--shadow-sm); }

/* bottom navigation bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  margin: 0 auto; max-width: 560px;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 12px rgba(32, 20, 20, 0.06);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 0; background: none; color: var(--muted);
  font-weight: 700; font-size: 0.63rem; padding: 4px 1px; cursor: pointer;
  transition: color 0.15s; min-width: 0;
}
.tab .tab-lbl { white-space: nowrap; }
.tab .tab-ico {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 24px; border-radius: 999px; font-size: 1.2rem; line-height: 1;
  transition: background 0.15s;
}
.tab.active { color: var(--brand); }
.tab.active .tab-lbl { font-weight: 800; }
.tab.active .tab-ico { background: var(--brand-soft); }

main { margin-top: 18px; }
.stack > * + * { margin-top: 14px; }
.view-head h2 { margin: 0 0 2px; }

/* ---- cards & text ---- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
h2 { font-size: 1.18rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 10px; }
h3 { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.muted { color: var(--muted); font-size: 0.88rem; margin: 4px 0; }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.row { display: flex; gap: 12px; }
.row .field { flex: 1; }
input, select, textarea {
  font: inherit; padding: 11px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.45; width: 100%; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23756c69' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input::placeholder, textarea::placeholder { color: #b3aaa6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input:disabled { background: #f2eeeb; color: var(--muted); cursor: not-allowed; }

/* profile photo hero */
.profile-hero { display: flex; justify-content: center; padding: 2px 0 10px; }
.avatar-preview {
  position: relative;
  width: 104px; height: 104px; flex: 0 0 104px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.3rem; font-weight: 800;
  border: 2px solid var(--line-strong);
}
.avatar-preview .avatar-initial { font-size: 2.3rem; font-weight: 800; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar-edit {
  position: absolute; left: 2px; bottom: 2px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: background 0.15s;
}
.avatar-edit:hover { background: var(--brand-hover); }

/* heritage flag badge at ~5 o'clock on avatars */
.av-flag {
  position: absolute; right: -3px; bottom: -3px; z-index: 2;
  background: #fff; border-radius: 4px; padding: 0 1px;
  font-size: 10px; line-height: 15px; height: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(32, 20, 20, 0.3);
}
.avatar-preview .av-flag { right: 3px; bottom: 3px; font-size: 20px; line-height: 27px; height: 27px; border-radius: 7px; padding: 0 3px; }
.podium-avatar .av-flag { font-size: 12px; line-height: 17px; height: 17px; }
/* tappable flag badge on the edit avatar */
.av-flag-edit { cursor: pointer; border: 1.5px solid var(--brand); box-shadow: 0 1px 3px rgba(32,20,20,0.3); }
.av-flag-edit:hover { background: var(--brand-soft); }

/* annotation bubble pointing at the flag */
.flag-hint {
  position: relative; align-self: center; max-width: 250px; margin-top: 6px;
  background: var(--ink); color: #fff; border: 0; cursor: pointer;
  font-size: 0.76rem; font-weight: 600; line-height: 1.3; padding: 9px 13px; border-radius: 12px;
  text-align: center;
}
.flag-hint::before {
  content: ""; position: absolute; top: -6px; right: 30px;
  border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-bottom: 7px solid var(--ink);
}

/* flag picker modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 70; background: rgba(20, 12, 12, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-sheet {
  background: #fff; width: 100%; max-width: 560px; max-height: 80vh;
  border-radius: 18px 18px 0 0; padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column;
}
.fp-search {
  width: 100%; margin-bottom: 12px; padding: 11px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit;
}
.fp-grid { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.fp-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 6px;
  cursor: pointer; text-align: center;
}
.fp-item:hover { border-color: var(--brand); background: var(--brand-soft); }
.fp-item.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.fp-emoji { font-size: 1.6rem; line-height: 1; }
.fp-name { font-size: 0.68rem; color: var(--muted); font-weight: 600; line-height: 1.15; }

/* live identity preview under avatar */
.profile-hero { flex-direction: column; align-items: center; gap: 8px; }
.identity-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; color: var(--brand); }
.identity-name.is-empty { color: #c3bab6; font-weight: 700; }
.identity-dupr { font-size: 1.05rem; font-weight: 800; color: var(--brand); }
.identity-dupr.is-muted { color: var(--muted); font-weight: 700; font-size: 0.84rem; }
.identity-dupr .self-rated { color: var(--muted); font-weight: 600; font-size: 0.72rem; }
.identity-skill {
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.02em;
  color: var(--accent-ink); background: var(--accent-soft); border: 1px solid #f3e2ad;
  padding: 3px 11px; border-radius: 999px;
}

/* segmented skill control */
.segmented {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.seg {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  font-weight: 700; font-size: 0.86rem; padding: 9px 6px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.seg:hover { color: var(--ink); }
.seg.active { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }

/* profile title in brand red */
.profile-card h2 { color: var(--brand); }

/* inline save status */
.save-status { margin: -4px 0 2px; font-size: 0.86rem; font-weight: 600; }
.save-status.ok { color: #1a7f43; }
.save-status.err { color: var(--danger); }

/* sign-out button (bottom of profile) */
.btn-signout {
  width: 100%; border: 1.5px solid var(--line-strong); background: #fff;
  color: var(--danger); font-weight: 700; padding: 12px; border-radius: 11px;
  transition: background 0.15s, border-color 0.15s;
}
.btn-signout:hover { background: var(--brand-soft); border-color: var(--danger); }

/* leading-icon inputs */
.input-wrap { position: relative; }
.input-wrap .lead {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 1rem; line-height: 1; pointer-events: none;
}
input.has-icon { padding-left: 40px; }

/* DUPR section header + status chip */
.dupr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dupr-head h3 { margin: 0; }
.chip { font-size: 0.72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.chip-muted { background: #fff; color: var(--muted); border: 1px solid var(--line-strong); }
.chip-ok { background: #e7f6ec; color: #1a7f43; border: 1px solid #b7e3c6; }
.chip-warn { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid #f3e2ad; }

/* ---- buttons ---- */
button { font: inherit; cursor: pointer; }
.btn-primary {
  width: 100%; border: 0; background: var(--brand); color: var(--brand-ink);
  font-weight: 700; padding: 12px; border-radius: 11px; transition: background 0.15s, transform 0.05s;
}
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.55; }
.btn-primary.is-joined {
  background: #fff; color: var(--danger); border: 1.5px solid var(--line-strong);
}
.btn-primary.is-joined:hover { border-color: var(--danger); background: var(--brand-soft); }

.btn-ghost {
  border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink);
  font-weight: 600; padding: 10px 14px; border-radius: var(--radius-sm); transition: border-color 0.15s, background 0.15s;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost.full, .btn-google.full { width: 100%; }

.btn-google {
  width: 100%; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink);
  font-weight: 600; padding: 11px; border-radius: 11px;
}
.btn-google:hover { border-color: var(--brand); }

.divider { display: flex; align-items: center; text-align: center; color: var(--muted); font-size: 0.8rem; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--line); }
.divider span { padding: 0 10px; }

.auth-card .only-signup { display: none; }
.auth-card.is-signup .only-signup { display: inline; }

/* ---- setup banner ---- */
.banner {
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid #f3e2ad; padding: 12px 14px; border-radius: 12px;
  font-size: 0.86rem; margin-top: 14px;
}
.banner code { background: rgba(133, 84, 0, 0.12); padding: 1px 5px; border-radius: 5px; }

.empty {
  text-align: center; color: var(--muted); padding: 40px 20px;
  background: var(--card); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}

/* ---- session cards ---- */
.session-card { border-top: 3px solid var(--brand); }
.session-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pill {
  background: var(--accent-soft); color: var(--accent-ink); font-size: 0.72rem;
  font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid #f3e2ad;
}
.session-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 0.84rem; margin: 12px 0; }
.session-actions { display: flex; gap: 10px; }
.session-actions .btn-ghost { flex: 0 0 auto; }
.session-actions .btn-primary { flex: 1; }
.roster { list-style: none; margin: 6px 0 12px; padding: 6px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.roster li { padding: 8px 0; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
.roster li:last-child { border-bottom: 0; }
.roster-item { display: flex; align-items: center; gap: 10px; }
.roster-avatar {
  position: relative;
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 800;
}
.roster-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.roster-name { flex: 1; font-weight: 600; }
.roster-skill {
  font-size: 0.68rem; font-weight: 800; color: var(--accent-ink);
  background: var(--accent-soft); border: 1px solid #f3e2ad; padding: 2px 8px; border-radius: 999px;
}
.roster-rating { font-size: 0.82rem; font-weight: 700; color: var(--muted); }

.dupr-box {
  margin-top: 4px; padding: 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.dupr-box .field:last-of-type { margin-bottom: 12px; }
.dupr-box .muted { margin-top: 0; }

/* coaching cards */
.coach-card { display: flex; align-items: center; gap: 14px; border-top: 3px solid var(--accent); }
.coach-card > div:not(.coach-icon) { flex: 1; }
.coach-card h3 { margin: 0 0 2px; }
.coach-card .muted { margin: 0; }
.coach-icon {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: var(--radius-sm);
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.coach-card .pill { align-self: flex-start; }
.coach-card.is-clickable { cursor: pointer; transition: box-shadow 0.15s, transform 0.05s; }
.coach-card.is-clickable:hover { box-shadow: 0 2px 4px rgba(32,20,20,0.08), 0 10px 22px rgba(32,20,20,0.09); }
.coach-card.is-clickable:active { transform: translateY(1px); }
.chevron { margin-left: auto; font-size: 1.6rem; color: var(--muted); line-height: 1; }

/* profile settings gear + slide-in drawer */
.profile-topbar { display: flex; justify-content: flex-start; }
.gear-btn {
  width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff; color: var(--brand);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.gear-btn:hover { border-color: var(--brand); background: var(--brand-soft); }

.drawer-overlay {
  position: fixed; inset: 0; background: rgba(20, 12, 12, 0.4); z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; left: 0; height: 100%; width: min(82%, 320px);
  background: #fff; z-index: 61; box-shadow: 6px 0 24px rgba(32, 20, 20, 0.18);
  transform: translateX(-100%); transition: transform 0.22s ease;
  display: flex; flex-direction: column; padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.drawer-head h3 { margin: 0; }
.drawer-close { border: 0; background: none; font-size: 1.2rem; color: var(--muted); cursor: pointer; line-height: 1; padding: 4px; }
.drawer-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 0; background: none; padding: 12px 8px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; color: var(--ink); cursor: pointer;
}
.drawer-item:hover { background: var(--bg); }
.drawer-item-danger { color: var(--danger); }

/* back link */
.link-back {
  display: inline-block; border: 0; background: transparent; color: var(--brand);
  font-weight: 700; font-size: 0.9rem; padding: 0 0 6px; cursor: pointer;
}

/* coach directory list */
.coach-list-item { display: flex; align-items: center; gap: 14px; cursor: pointer; transition: box-shadow 0.15s; }
.coach-list-item:hover { box-shadow: 0 2px 4px rgba(32,20,20,0.08), 0 10px 22px rgba(32,20,20,0.09); }
.coach-list-avatar {
  position: relative;
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800;
}
.coach-list-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.coach-list-body { flex: 1; min-width: 0; }
.coach-list-body h3 { margin: 0 0 4px; }
.coach-list-body .pill { display: inline-block; margin-bottom: 4px; }
.coach-list-body .muted { margin: 2px 0 0; }

/* coach detail meta rows + bio */
.meta-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.meta-label { color: var(--muted); font-weight: 700; font-size: 0.82rem; }
.meta-val { text-align: right; font-weight: 600; }
.coach-bio { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.coach-bio h3 { margin: 0 0 6px; }
.coach-bio p { margin: 0; line-height: 1.5; }

/* ---- Connect: leaderboard ---- */
.podium-card { padding: 20px 12px 0; overflow: hidden; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.podium-col { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.podium-crown { font-size: 1.2rem; line-height: 1; margin-bottom: 2px; }
.podium-avatar {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: var(--brand);
  background: var(--brand-soft); border: 3px solid var(--line-strong);
}
.podium-col.gold .podium-avatar { width: 68px; height: 68px; font-size: 1.7rem; border-color: #eab308; }
.podium-col.silver .podium-avatar { border-color: #9ca3af; }
.podium-col.bronze .podium-avatar { border-color: #b45309; }
.podium-medal { font-size: 1.1rem; margin-top: 4px; }
.podium-name { font-size: 0.78rem; font-weight: 700; margin-top: 2px; line-height: 1.2; }
.podium-dupr { font-size: 0.82rem; font-weight: 800; color: var(--brand); margin-bottom: 8px; }
.podium-stand {
  width: 100%; border-radius: 10px 10px 0 0;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 8px;
  color: #fff; font-weight: 800;
}
.podium-col.gold .podium-stand { height: 78px; background: linear-gradient(180deg, #fbbf24, #d97706); }
.podium-col.silver .podium-stand { height: 56px; background: linear-gradient(180deg, #cbd5e1, #94a3b8); }
.podium-col.bronze .podium-stand { height: 40px; background: linear-gradient(180deg, #d8a25e, #b45309); }
.podium-rank { font-size: 1.2rem; }

.lb-list { padding: 6px 14px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: 0; }
.lb-rank { width: 22px; text-align: center; font-weight: 800; color: var(--muted); flex: 0 0 22px; }
.lb-avatar {
  position: relative;
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem;
}
.lb-name { flex: 1; font-weight: 600; min-width: 0; }
.lb-dupr { font-weight: 800; color: var(--brand); }

/* leaderboard filter */
.rank-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rank-head h2 { margin: 0 0 2px; }
.menu-wrap { position: relative; flex: 0 0 auto; }
.filter-btn {
  width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff; color: var(--brand);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.filter-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.filter-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 25;
  min-width: 170px; padding: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.filter-menu-label { font-size: 0.72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 10px 4px; }
.filter-item {
  display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left;
  border: 0; background: transparent; color: var(--ink); font-weight: 600; font-size: 0.92rem;
  padding: 10px 10px; border-radius: 8px; cursor: pointer;
}
.filter-item:hover { background: var(--bg); }
.filter-item.selected { color: var(--brand); }
.filter-item.selected::after { content: "✓"; font-weight: 800; }

.lotus-note {
  background: var(--accent-soft); color: var(--accent-ink); border: 1px solid #f3e2ad;
  border-radius: 12px; padding: 12px 14px; font-size: 0.86rem; line-height: 1.4;
}

/* ---- Connect: find players ---- */
.connect-card { display: flex; align-items: center; gap: 12px; }
.connect-avatar {
  position: relative;
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.connect-body { flex: 1; min-width: 0; }
.connect-body h3 { margin: 0 0 2px; font-size: 1rem; }
.connect-body .muted { margin: 0; }
.btn-connect {
  flex: 0 0 auto; border: 0; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 0.85rem; padding: 8px 14px; border-radius: 999px; cursor: pointer;
}
.btn-connect:hover { background: var(--brand-hover); }
.btn-connect.is-requested { background: #fff; color: var(--muted); border: 1px solid var(--line-strong); }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 999px;
  font-size: 0.86rem; box-shadow: 0 8px 24px rgba(32, 20, 20, 0.25); z-index: 50; max-width: 90%;
}
