:root {
  color-scheme: light;
  --forest: #073527;
  --forest-2: #0d4a38;
  --ink: #081d18;
  --muted: #6d6a61;
  --paper: #f7f3e9;
  --paper-2: #fffdf7;
  --line: rgba(8, 29, 24, 0.14);
  --line-strong: rgba(8, 29, 24, 0.28);
  --green-chip: #eef6e6;
  --blue-chip: #edf4fb;
  --brass: #c59b4b;
  --amber: #d89a00;
  --red: #b94431;
  --shadow: 0 16px 42px rgba(38, 31, 18, 0.11);
  --radius: 7px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 3%, rgba(197, 155, 75, 0.15), transparent 22%),
    linear-gradient(90deg, rgba(8, 29, 24, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(8, 29, 24, 0.03) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 72px 72px, 72px 72px, auto;
  font-size: 14px;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.v4-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(18px, 3vw, 52px);
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 233, 0.88);
  padding: 8px clamp(16px, 2.2vw, 30px);
  backdrop-filter: blur(18px);
}

.v4-brand,
.v4-nav,
.v4-actions {
  display: flex;
  align-items: center;
}

.v4-brand {
  gap: 12px;
  color: var(--forest);
  font-size: clamp(1.1rem, 1.65vw, 1.34rem);
}

.v4-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  color: #f5ddb0;
  background: var(--forest);
  box-shadow: 0 12px 22px rgba(7, 53, 39, 0.18);
}

.v4-brand-mark svg {
  width: 31px;
  height: 31px;
  stroke-width: 1.35;
}

.v4-nav {
  justify-content: center;
  gap: clamp(18px, 3vw, 48px);
}

.v4-nav a,
.v4-actions button,
.v4-actions > span {
  min-height: 34px;
  color: #111f1b;
  font-size: 0.84rem;
  font-weight: 820;
}

.v4-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 3px 13px;
}

.v4-nav a::after {
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 3px;
  background: var(--forest);
  content: "";
  opacity: 0;
}

.v4-nav a.active::after {
  opacity: 1;
}

.v4-nav svg,
.v4-actions svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.85;
}

.v4-actions {
  gap: 14px;
}

.v4-actions button {
  border: 1px solid transparent;
  background: transparent;
  padding: 0 4px;
}

.v4-actions button:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border-color: var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.62);
}

.v4-actions .v4-my-tournaments,
.v4-actions .v4-auth-trigger {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.9);
  color: var(--forest);
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 860;
  line-height: 1;
  text-decoration: none;
}

.v4-actions .v4-auth-trigger {
  border-color: rgba(7, 53, 39, 0.3);
  background: var(--forest);
  color: #fff9ea;
}

.v4-actions .v4-my-tournaments.active {
  border-color: rgba(7, 53, 39, 0.34);
  background: rgba(238, 246, 230, 0.92);
}

.v4-actions .v4-my-tournaments[hidden] {
  display: none;
}

.v4-actions .v4-my-tournaments svg,
.v4-actions .v4-auth-trigger svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.v4-language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
  min-height: 34px;
}

.v4-language-toggle button,
.v4-language-toggle a {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 0 4px;
  color: rgba(8, 29, 24, 0.52);
  font-size: 0.84rem;
  font-weight: 880;
  text-decoration: none;
}

.v4-language-toggle button.active,
.v4-language-toggle a.active {
  color: var(--forest);
}

.v4-language-toggle span {
  color: rgba(8, 29, 24, 0.35);
  font-weight: 760;
}

@media (max-width: 1180px) {
  .v4-topbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .v4-nav,
  .v4-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  body {
    font-size: 13px;
  }

  .v4-topbar {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    padding: 9px 10px;
  }

  .v4-brand {
    grid-column: 1;
  }

  .v4-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .v4-actions .v4-my-tournaments,
  .v4-actions .v4-auth-trigger {
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.78rem;
  }

  .v4-actions .v4-my-tournaments svg,
  .v4-actions .v4-auth-trigger svg {
    display: none;
  }

  .v4-nav {
    grid-column: 1 / -1;
  }

  .v4-nav,
  .v4-actions {
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    gap: 10px;
    overflow-x: visible;
  }
}

.club-shell,
.club-detail-shell {
  width: min(1900px, calc(100% - 56px));
  margin: 0 auto;
  padding: 20px 0 30px;
}

.club-federation-directory,
.club-method,
.club-related,
.club-federation-list {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.72);
  box-shadow: var(--shadow);
}

.club-federation-directory,
.club-method,
.club-related {
  margin-top: 18px;
  padding: clamp(20px, 2.4vw, 30px);
}

.club-federation-directory h2,
.club-method h2,
.club-related h2 {
  margin: 0;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
}

.club-federation-directory > p,
.club-method p {
  margin: 7px 0 17px;
  color: var(--muted);
}

.club-federation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.club-federation-grid a {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 243, 232, 0.66);
  padding: 13px 15px;
  color: var(--forest);
}

.club-federation-grid a:hover,
.club-federation-grid a:focus-visible {
  border-color: var(--forest);
  transform: translateY(-1px);
}

.club-federation-grid span,
.club-related span {
  color: var(--muted);
  font-size: 0.76rem;
}

.club-related a {
  color: var(--forest);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.club-related ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.club-related li {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-left: 3px solid var(--forest);
  padding: 8px 12px;
}

.club-federation-shell .club-detail-stats {
  grid-template-columns: repeat(3, 1fr);
}

.club-federation-list {
  overflow: hidden;
  margin-top: 18px;
}

.club-federation-list .club-table {
  min-width: 640px;
}

@media (max-width: 720px) {
  .club-federation-directory,
  .club-method,
  .club-related {
    padding: 18px;
  }

  .club-federation-shell .club-detail-stats {
    grid-template-columns: 1fr;
  }
}

.club-intro h1,
.club-detail-hero h1,
.club-preview h2,
.club-player-card h2 {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
}

.club-intro h1 {
  margin: 0;
  font-size: clamp(1.65rem, 2.55vw, 2.65rem);
  line-height: 1.05;
}

.club-intro p {
  max-width: 1000px;
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.club-controls {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(220px, 290px) minmax(220px, 300px) auto;
  gap: 14px;
}

.club-search,
.club-select,
.club-reset {
  min-height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.78);
}

.club-search,
.club-select {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 0 17px;
}

.club-search svg,
.club-select svg,
.club-reset svg,
.club-filter-buttons svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

.club-search input,
.club-select select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 720;
}

.club-search input::placeholder {
  color: rgba(8, 29, 24, 0.52);
}

.club-search:focus-within,
.club-select:focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(7, 53, 39, 0.1);
}

.club-search kbd {
  min-width: 29px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 253, 247, 0.7);
  color: var(--muted);
  padding: 3px 8px;
  text-align: center;
}

.club-select select {
  appearance: auto;
  cursor: pointer;
}

.club-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  color: var(--ink);
  font-weight: 850;
}

.club-reset:hover,
.club-reset:focus-visible {
  border-color: var(--forest);
  color: var(--forest);
}

.club-quickbar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 14px 0;
}

.club-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.club-filter-buttons button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.7);
  color: var(--ink);
  padding: 0 14px;
  font-size: 0.84rem;
  font-weight: 830;
}

.club-filter-buttons button[aria-pressed="true"] {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff9ea;
}

.club-counts {
  margin: 0 0 0 auto;
  color: var(--ink);
  font-size: 0.85rem;
}

.club-counts strong {
  font-size: 0.98rem;
}

.club-counts span {
  margin-left: 8px;
  color: var(--muted);
}

.club-workspace {
  display: grid;
  grid-template-columns: minmax(620px, 1.7fr) minmax(360px, 0.9fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.72);
  box-shadow: var(--shadow);
}

.club-results {
  min-width: 0;
  border-right: 1px solid var(--line-strong);
}

.club-table-scroll,
.club-player-scroll {
  overflow-x: auto;
}

.club-table,
.club-player-table {
  width: 100%;
  border-collapse: collapse;
}

.club-table {
  min-width: 700px;
}

.club-table th,
.club-table td,
.club-player-table th,
.club-player-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 15px;
  text-align: left;
  vertical-align: middle;
}

.club-table thead th,
.club-player-table thead th {
  background: rgba(255, 253, 247, 0.95);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.club-table th:nth-child(n + 3),
.club-table td:nth-child(n + 3),
.club-player-table th:nth-child(n + 3),
.club-player-table td:nth-child(n + 3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.club-table tbody tr {
  cursor: pointer;
  transition: background 140ms ease;
}

.club-table tbody tr:hover,
.club-table tbody tr:focus-within,
.club-table tbody tr.selected {
  background: rgba(226, 238, 219, 0.64);
}

.club-table a {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--forest);
  font-weight: 880;
}

.club-monogram {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--forest);
  color: #f5ddb0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.club-federation {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.club-federation span {
  color: var(--muted);
  font-size: 0.75rem;
}

.club-empty {
  height: 260px;
  color: var(--muted);
  text-align: center !important;
}

.club-preview {
  min-width: 0;
  padding: clamp(20px, 2vw, 32px);
}

.club-preview-empty {
  display: grid;
  min-height: 330px;
  place-items: center;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.club-preview-head p,
.club-detail-kicker,
.club-player-card header p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.club-preview h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.1;
}

.club-preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.club-preview-stats strong,
.club-detail-stats strong {
  display: block;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1;
}

.club-preview-stats span,
.club-detail-stats span {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 760;
}

.club-preview h3 {
  margin: 0 0 9px;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.club-top-players {
  margin: 0;
  padding: 0;
  list-style: none;
}

.club-top-players li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 0.83rem;
}

.club-top-players li span:first-child {
  color: var(--muted);
}

.club-top-players li strong {
  font-variant-numeric: tabular-nums;
}

.club-full-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  border-radius: var(--radius);
  background: var(--forest);
  color: #fff9ea;
  font-size: 0.86rem;
  font-weight: 880;
}

.club-preview-source {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.club-pagination {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 8px 14px;
  color: var(--muted);
  font-size: 0.8rem;
}

.club-pagination button,
.club-pagination a,
.club-pagination > span[aria-disabled] {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 253, 247, 0.84);
  color: var(--forest);
  padding: 7px 13px;
  font-weight: 820;
}

.club-pagination button:disabled,
.club-pagination a[aria-disabled],
.club-pagination > span[aria-disabled] {
  opacity: 0.45;
}

.club-scope-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.club-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.8rem;
}

.club-breadcrumb a,
.club-back-link {
  color: var(--forest);
  font-weight: 820;
}

.club-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: end;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 22px;
}

.club-detail-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 3.2rem);
  line-height: 1.03;
}

.club-detail-hero > div > p:last-child {
  max-width: 900px;
  margin: 11px 0 0;
  color: var(--muted);
}

.club-detail-source {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.club-detail-source strong {
  color: var(--ink);
}

.club-detail-source em {
  color: var(--red);
  font-style: normal;
  font-weight: 750;
}

.club-detail-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 20px 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--line);
}

.club-detail-stats article {
  min-height: 95px;
  background: rgba(255, 253, 247, 0.86);
  padding: 19px;
}

.club-player-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.72);
  box-shadow: var(--shadow);
}

.club-player-card > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.club-player-card h2 {
  margin: 0;
  font-size: 1.45rem;
}

.club-player-card header > span {
  max-width: 520px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: right;
}

.club-player-table {
  min-width: 900px;
}

.club-player-table td:nth-child(2) {
  min-width: 230px;
}

.club-player-table td:nth-child(2) span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.club-player-table a {
  color: var(--forest);
  font-weight: 820;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.club-back-link {
  display: inline-flex;
  margin-top: 18px;
}

@media (max-width: 1080px) {
  .club-controls {
    grid-template-columns: minmax(300px, 1fr) repeat(2, minmax(190px, 240px));
  }

  .club-reset {
    grid-column: 1 / -1;
    min-height: 42px;
  }

  .club-workspace {
    grid-template-columns: minmax(540px, 1.5fr) minmax(320px, 0.8fr);
  }
}

@media (max-width: 900px) {
  .club-shell,
  .club-detail-shell {
    width: min(100% - 28px, 760px);
  }

  .club-controls {
    grid-template-columns: 1fr 1fr;
  }

  .club-search {
    grid-column: 1 / -1;
  }

  .club-workspace {
    display: block;
  }

  .club-results {
    border-right: 0;
  }

  .club-preview {
    display: none;
  }

  .club-detail-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .v4-topbar {
    grid-template-columns: 1fr;
  }

  .v4-brand,
  .v4-nav,
  .v4-actions {
    grid-column: 1;
    justify-content: flex-start;
  }

  .club-controls {
    grid-template-columns: 1fr;
  }

  .club-search,
  .club-reset {
    grid-column: auto;
  }

  .club-quickbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .club-counts {
    margin-left: 0;
  }

  .club-counts span {
    display: block;
    margin: 3px 0 0;
  }

  .club-table {
    min-width: 0;
    table-layout: fixed;
  }

  .club-table th,
  .club-table td {
    padding: 12px 9px;
  }

  .club-table th:nth-child(2),
  .club-table td:nth-child(2),
  .club-table th:nth-child(5),
  .club-table td:nth-child(5) {
    display: none;
  }

  .club-table th:nth-child(3),
  .club-table td:nth-child(3) {
    width: 48px;
  }

  .club-table th:nth-child(4),
  .club-table td:nth-child(4) {
    width: 62px;
  }

  .club-federation-list .club-table {
    min-width: 0;
    table-layout: fixed;
  }

  .club-federation-list .club-table th:nth-child(2),
  .club-federation-list .club-table td:nth-child(2) {
    display: table-cell;
    width: 48px;
  }

  .club-federation-list .club-table th:nth-child(3),
  .club-federation-list .club-table td:nth-child(3),
  .club-federation-list .club-table th:nth-child(4),
  .club-federation-list .club-table td:nth-child(4) {
    width: 58px;
  }

  .club-table a {
    gap: 8px;
  }

  .club-monogram {
    width: 30px;
    height: 30px;
  }

  .club-detail-hero {
    display: block;
  }

  .club-detail-source {
    align-items: flex-start;
    margin-top: 18px;
  }

  .club-detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .club-player-card > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .club-player-card header > span {
    text-align: left;
  }
}
