body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

@media (min-width: 600px) { body { padding-bottom: 0; } }
@media (min-width: 900px) { }

/* Card */
.card { background: var(--surface); border: 1px solid var(--border);
		border-radius: var(--radius); overflow: hidden; }
.card-header { background: var(--surface2); padding: .75rem 1rem;
			   border-bottom: 1px solid var(--border);
			   display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Filter pills */
.filter-group { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.filter-label { font-size: .75rem; color: var(--muted); margin-right: .2rem; }

/* Search */
.search-wrap { flex: 1; min-width: 160px; }
.search-input {
  width: 100%; font-size: .84rem; background: var(--surface2);
  border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: .35rem .7rem;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: none; border-color: var(--accent); }

/* Stats bar */
.stats-bar { padding: .4rem 1rem; font-size: .8rem; color: var(--muted); }

/* Clubs table */
.clubs-table { width: 100%; border-collapse: collapse; }
.clubs-table thead th {
  background: var(--surface2); color: var(--muted); font-size: .72rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: .55rem .75rem; text-align: left; white-space: nowrap;
}
.clubs-table tbody tr.club-row { border-bottom: 1px solid var(--border); cursor: pointer; }
.clubs-table tbody tr.club-row:last-child { border-bottom: none; }
.clubs-table tbody tr.club-row:hover { background: var(--surface2); }
.clubs-table td { padding: .55rem .75rem; font-size: .88rem; vertical-align: middle; }

.col-rank  { color: var(--muted); font-size: .8rem; width: 2.5rem; text-align: center; }
.col-name  { font-weight: 600; min-width: 180px; }
.col-count { color: var(--muted); font-size: .82rem; width: 70px; text-align: center; }
.col-cats  { }

.club-link { color: var(--text); text-decoration: none; }
.club-link:hover { color: var(--accent); text-decoration: underline; }

/* Chevron */
.chevron { color: var(--muted); font-size: .8rem; margin-left: .3rem;
		   display: inline-block; transition: transform .2s; }
.club-row[aria-expanded='true'] .chevron { transform: rotate(90deg); }

/* Category pills */
.cat-pill {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .72rem; font-weight: 600; padding: .12rem .4rem;
  border-radius: 999px; background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); margin-right: .25rem; margin-bottom: .15rem;
}
.cat-n { font-weight: 700; color: var(--text); font-size: .72rem; }

/* Detail row */
.detail-row { display: none; background: var(--surface2); }
.detail-row.open { display: table-row; }
.detail-row > td { padding: 0; border-bottom: 2px solid var(--border); }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table tbody tr { border-bottom: 1px solid var(--border); }
.detail-table tbody tr:last-child { border-bottom: none; }
.detail-table td { padding: .38rem .75rem; font-size: .84rem; }
.cat-header-row td { background: var(--surface3); color: var(--muted); font-size: .7rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .3rem .75rem; }
.dr-pos  { color: var(--muted); font-size: .78rem; width: 3rem; }
.dr-name { font-weight: 500; min-width: 140px; }
.dr-pts  { color: var(--muted); font-size: .82rem; width: 80px; text-align: right; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.empty-state { padding: 2rem; text-align: center; color: var(--muted); font-size: .9rem; }

@media (max-width: 700px) {
  .col-cats { display: none; }
  .clubs-table td, .clubs-table th { white-space: nowrap; }
}