/* ── HERO ── */
.lb-hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 20px 56px;
  border-bottom: 1px solid var(--border);
  gap: 14px;
}
.lb-hero-icon {
  width: 52px; height: 52px;
  color: var(--accent);
  opacity: 0.9;
}
.lb-hero-icon svg { width: 100%; height: 100%; }
.lb-hero-title {
  font-family: var(--display);
  font-size: 52px;
  letter-spacing: 6px;
  color: var(--text);
  line-height: 1;
}
.lb-hero-sub {
  font-family: var(--body);
  font-size: 15px;
  color: var(--text-dim);
  max-width: 420px;
  line-height: 1.6;
}

/* ── PAGE BODY ── */
.lb-page {
  width: 100%;
  max-width: 860px;
  padding: 0 28px;
}

/* ── SECTION ── */
.lb-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.lb-section-last { border-bottom: none; }
.lb-section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--accent);
}
.lb-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ── JOIN BOX ── */
.lb-join-card {
  border: 1px solid var(--border);
  background: var(--surface-1);
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
}
.lb-join-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 28px 28px;
  flex: 1;
}
.lb-join-title {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--text);
  line-height: 1.1;
}
.lb-join-desc {
  font-family: var(--body);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 380px;
}
.lb-join-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
  min-width: 280px;
}
.lb-input-row {
  display: flex;
  gap: 8px;
  width: 100%;
}
.lb-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}
.lb-input::placeholder { color: var(--text-faint); }
.lb-input:focus { border-color: var(--accent); }
.lb-btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 9px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.lb-btn-primary:hover { opacity: 0.85; }
.lb-msg {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  min-height: 13px;
}
.lb-msg.ok  { color: var(--green); }
.lb-msg.err { color: var(--red); }

/* Joined state */
.lb-joined-card {
  border: 1px solid var(--border);
  background: var(--surface-1);
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
}
.lb-joined-accent {
  width: 4px;
  align-self: stretch;
  background: var(--accent);
  flex-shrink: 0;
}
.lb-joined-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
}
.lb-joined-icon {
  width: 36px; height: 36px;
  color: var(--accent);
  flex-shrink: 0;
}
.lb-joined-icon svg { width: 100%; height: 100%; }
.lb-joined-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.lb-joined-name {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--text);
  line-height: 1;
}
.lb-joined-meta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-faint);
}
.lb-btn-ghost {
  background: transparent;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.lb-btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }

/* ── LEADERBOARD TABLE ── */
.lb-table-head {
  display: grid;
  grid-template-columns: 56px 1fr 100px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-faint);
  padding: 0 20px 12px;
  border-bottom: 1px solid var(--border);
}
.lb-table-head span:last-child { text-align: right; }

.lb-table-body {
  border: 1px solid var(--border);
}

.lb-row {
  display: grid;
  grid-template-columns: 56px 1fr 100px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--surface-1); }
.lb-row.is-me {
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  padding-left: 17px;
}

.lb-rank {
  font-family: var(--display);
  font-size: 22px;
  color: var(--text-faint);
  line-height: 1;
}
.lb-row.top1 .lb-rank { color: var(--text); font-size: 26px; }
.lb-row.top2 .lb-rank { color: var(--text-dim); font-size: 24px; }
.lb-row.top3 .lb-rank { color: var(--text-dim); }

.lb-rank-icon {
  width: 22px; height: 22px;
  color: var(--accent);
}
.lb-rank-icon svg { width: 100%; height: 100%; }

.lb-nick-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.lb-nick {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-me-tag {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 1px 5px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lb-count-wrap {
  text-align: right;
}
.lb-count {
  font-family: var(--display);
  font-size: 22px;
  color: var(--text);
  line-height: 1;
}
.lb-count-unit {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--text-faint);
  display: block;
}

/* empty / loading */
.lb-state {
  padding: 56px 20px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-faint);
  border: 1px solid var(--border);
}
.lb-state-icon {
  width: 32px; height: 32px;
  color: var(--text-faint);
  margin: 0 auto 16px;
  opacity: 0.4;
}
.lb-state-icon svg { width: 100%; height: 100%; }

/* refresh button */
.lb-refresh-row {
  display: flex;
  justify-content: flex-end;
}
.lb-btn-refresh {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  padding: 7px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.lb-btn-refresh:hover { color: var(--text); border-color: var(--text-dim); }
.lb-btn-refresh svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .lb-join-card { flex-direction: column; }
  .lb-join-right {
    border-left: none;
    border-top: 1px solid var(--border);
    min-width: 0;
    width: 100%;
    padding: 20px;
  }
  .lb-join-left { padding: 24px 20px 16px; }
  .lb-hero-title { font-size: 38px; }
  .lb-page { padding: 0 16px; }
}
@media (max-width: 480px) {
  .lb-hero { padding: 44px 16px 40px; }
  .lb-section { padding: 32px 0; }
  .lb-row { padding: 14px 14px; }
  .lb-table-head { padding: 0 14px 10px; }
  .lb-joined-body { padding: 18px; gap: 16px; }
}
