@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter/InterVariable-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/static/fonts/ibm-plex-sans/IBMPlexSans-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/static/fonts/ibm-plex-sans/IBMPlexSans-Variable-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/source-sans-3/SourceSans3-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/source-sans-3/SourceSans3-Variable-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --bg: #0f1115;
  --surface: #181b22;
  --surface-2: #21252e;
  --border: #2c313c;
  --text: #e7e9ee;
  --muted: #9aa1ad;
  --primary: #ed151a;        /* brand red (from the logo) */
  --primary-600: #c80f14;
  --accent: #ffb020;
  --ok: #2fbf71;
  --warn: #ffb020;
  --err: #ff5a52;
  --radius: 10px;
  --space: 16px;
  --font: "Inter", system-ui, sans-serif;
}

html[data-font="inter"] { --font: "Inter", system-ui, sans-serif; }
html[data-font="ibm_plex_sans"] { --font: "IBM Plex Sans", system-ui, sans-serif; }
html[data-font="source_sans_3"] { --font: "Source Sans 3", system-ui, sans-serif; }

.compact-fields { display:grid; grid-template-columns:minmax(12rem, 2fr) minmax(5rem, .7fr) minmax(9rem, 1fr); gap:.35rem; }
.location-grid input { min-width:0; }
.timetable-location + .timetable-location { margin-top:1.5rem; }
.timetable-location > h3 { margin-bottom:.65rem; }
@media (max-width: 800px) { .compact-fields { grid-template-columns:1fr; } }

* { box-sizing: border-box; }
html, body { margin: 0; }
button, input, select, textarea { font: inherit; }

/* Subtle, dark, rounded scrollbars that blend into the page. */
* { scrollbar-width: thin; scrollbar-color: #2b3038 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b3038; border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3a4150; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; }
.muted { color: var(--muted); font-size: .9rem; }

.topbar {
  display: flex; align-items: center; gap: 36px;
  padding: 14px 26px; background: #000; border-bottom: 1px solid #1a1a1a;
  position: sticky; top: 0; z-index: 10;
}
.brand { display: inline-flex; align-items: center; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand span { color: var(--primary); }
.brand-logo { height: 45px; width: auto; display: block; }
.clubbrand { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.clubbrand-logo { height: 20px; width: auto; max-width: 120px; object-fit: contain; display: block; }
.clubbrand-name { color: var(--muted); font-weight: 600; font-size: .72rem; letter-spacing: .05em;
  text-transform: uppercase; line-height: 1; }
.topbar .mainmenu { display: flex; align-items: center; gap: 32px;
  margin-left: clamp(40px, 6vw, 120px); }
.mainmenu a { color: #cfd3da; font-weight: 600; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em;
  padding: 6px 2px; border-bottom: 2px solid transparent; }
.mainmenu a:hover { color: #fff; }
.mainmenu a.active { color: #fff; border-bottom-color: var(--primary); }
.topbar-right { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
@media (max-width: 760px) {
  .topbar {
    align-items: flex-start; gap: 8px 14px; flex-wrap: wrap;
    padding: 8px 12px 9px;
  }
  .topbar .brandcol { align-items: flex-start; gap: 0; }
  .brand-logo { height: 30px; }
  .topbar .brand-clubname { max-width: 150px; text-align: left; font-size: .68rem; line-height: 1.1; }
  .topbar .mainmenu {
    order: 3; flex: 1 0 100%; display: flex; gap: 18px;
    margin: 2px 0 0; overflow-x: auto; padding-bottom: 2px;
    scrollbar-width: none;
  }
  .topbar .mainmenu::-webkit-scrollbar { display: none; }
  .mainmenu a { font-size: .82rem; padding: 5px 1px; white-space: nowrap; }
  .club-tablogo { height: 30px; max-width: 92px; }
  .topbar-right { padding-top: 1px; }
  .usermenu-trigger .um-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
  .usermenu-trigger .um-role { font-size: .66rem; }
}
.who { color: var(--muted); font-size: .9rem; }

/* Top-right user menu (name + role, click for dropdown) */
[x-cloak] { display: none !important; }
.usermenu { position: relative; }
.usermenu-trigger { display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  background: none; border: 0; cursor: pointer; padding: 4px 2px; line-height: 1.1; }
.usermenu-trigger .um-name { color: #fff; font-weight: 600; font-size: .95rem; }
.usermenu-trigger .um-role { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
.usermenu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); display: flex; flex-direction: column; }
.usermenu-pop a, .usermenu-pop button { display: block; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 7px; background: none; border: 0; cursor: pointer;
  color: var(--text); font-size: .92rem; font-weight: 500; }
.usermenu-pop a:hover, .usermenu-pop button:hover { background: rgba(255,255,255,.06); }
.usermenu-language { display: grid; gap: 4px; padding: 7px 12px 9px; color: var(--muted); font-size: .75rem; }
.usermenu-language select { width: 100%; margin: 0; padding: 6px 8px; color: var(--text); background: var(--surface-2); }
.topbar-language { width: auto; min-width: 94px; margin: 0 8px 0 0; padding: 7px 9px; color: var(--text); background: var(--surface); }
.settings-form { max-width: 760px; }
.field-help { display: block; margin-top: 5px; color: var(--muted); font-size: .82rem; font-weight: 400; }
.font-preview { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); font-size: 1.15rem; font-weight: 600; }

/* Filter + actions on one row above a table */
.table-bar { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; }
.table-bar .tabsearch { margin: 0; }
.table-bar .spacer { flex: 1; }
.inline-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: .9rem; }
.inline-check input { width: auto; margin: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

/* Birthday: day / month / year (locale-independent, no calendar year-scrolling) */
.date-fields { display: flex; gap: 8px; }
.date-fields input[name="birth_d"] { width: 5.5em; }
.date-fields input[name="birth_y"] { width: 6.5em; }
.date-fields select { flex: 1; min-width: 8em; }
.inline { display: inline; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px 64px; }
.footer { text-align: right; padding: 4px; background: #000;
  border-top: 1px solid #1a1a1a; color: var(--muted); font-size: .75rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.footer .sep { margin: 0 8px; opacity: .6; }

/* App shell (all pages except the landing): header + footer stay fixed in the
   viewport, the content area in between scrolls. Keeps the footer pinned to the
   bottom even when a page (e.g. a short table) has little content. */
body:not(.landing-page) { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body:not(.landing-page) > .topbar,
body:not(.landing-page) > .footer { flex: 0 0 auto; }
/* width:100% is required: as a flex item the container otherwise shrinks to its
   content width instead of filling the row. With max-width:1100px it still centers. */
body:not(.landing-page) > main.container { flex: 1 1 auto; min-height: 0; overflow-y: auto; width: 100%; }

/* Superadmin view: use the full page width for the wide listing tables */
body.admin-view > main.container,
body.wide > main.container,
body.members-view > main.container { max-width: none; padding-left: 26px; padding-right: 26px; }

/* Tabbed detail page (e.g. event management) */
.event-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.event-head h1 { margin: 0; }
.status-form { margin: 0; }
.status-select { width: auto; min-width: 150px; margin: 0; }
.selectable-row { cursor: pointer; }
.selectable-row:hover td { background: var(--surface); }
.row-checkbox { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.selectable-row td:first-child { width: 42px; text-align: center; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 18px 0 0; flex-wrap: wrap; }
.tabs a { color: var(--muted); border-bottom: 2px solid transparent; padding: 10px 18px; font-weight: 600; font-size: .95rem; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--primary); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  font-weight: 600; padding: 10px 18px; cursor: pointer; font-size: .95rem; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--primary); }
.tabs .tab-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 4px 0 5px 14px; }
.tabs .tab-actions .btn { border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 12px;
  font-size: .9rem; font-weight: 600; white-space: nowrap; }
.tabs .tab-actions .btn-white { background: #fff; border-color: #fff; color: #1b2230; }
.tabs .tab-actions .btn-white:hover { background: #e6e9ef; border-color: #e6e9ef; color: #1b2230; }
.tabs .tab-actions .btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.tabs .tab-actions .btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.tab-panel { padding: 22px 0; }
.tab-panel h2 { font-size: 1.1rem; margin: 0 0 4px; }
.tab-panel section + section { margin-top: 32px; }

/* Inline form with controls laid out side by side (never full-width single boxes) */
.evt-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 12px 0 18px; }
.evt-form label { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.evt-form label > input,
.evt-form label > select { width: auto; min-width: 190px; margin-top: 0; }
.evt-form .narrow > input { min-width: 0; width: 120px; }
.evt-form button { margin-bottom: 1px; }
.ring-list { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 6px 0 0; }
.ring-list li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: .9rem; }

/* Sub-tabs inside the Tournaments tab: one pill per tournament + a "+" to add a new one */
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 0; }
.subtabs button { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px 8px 0 0;
  color: var(--muted); font-weight: 600; padding: 8px 16px; cursor: pointer; font-size: .9rem; }
.subtabs button:hover { color: var(--text); }
.subtabs button.active { color: var(--text); border-bottom-color: var(--surface); background: var(--surface); }
.subtabs .subtab-add { font-size: 1.1rem; line-height: 1; padding: 6px 14px; }
.subtab-panel { border: 1px solid var(--border); border-radius: 0 8px 8px 8px; padding: 18px; }

/* Read-only key/value list (tournament details) */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* Checkbox chip groups (tournament weight/age classes) */
.units { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px 12px; margin: 0 0 14px; }
.units legend { padding: 0 6px; color: var(--muted); font-size: .85rem; }
.unit-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(110px, .7fr) minmax(110px, .7fr) auto;
  align-items: end; gap: 12px; margin-bottom: 8px; }
.unit-row .btn-sm { margin-bottom: 2px; white-space: nowrap; }
.unit-chip { display: inline-block; background: #1c1c1c; border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 8px; margin: 2px 6px 2px 0; font-size: .82rem; white-space: nowrap; }
.course-units { margin: 4px 0; }
.chips { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; }
.chips legend { padding: 0 6px; color: var(--muted); font-size: .85rem; }
.chips .chip { display: inline-flex; align-items: center; gap: 5px; margin: 3px 10px 3px 0; font-weight: 500; }
.chips .chip > input { width: auto; margin: 0; }

/* Invitation email composer */
.invite-compose { max-width: 640px; margin-top: 18px; }
.invite-compose > label { display: block; margin: 0 0 12px; }
.invite-compose textarea { width: 100%; }
.invite-compose .grow > input { min-width: 260px; }
/* Member avatars (list + form) */
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: inline-block; vertical-align: middle; }
.avatar-ph { background: var(--surface-2); color: var(--muted); text-align: center; line-height: 34px; font-weight: 600; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(255,255,255,.08); }
.status-dot-active { background: #22c55e; }
.status-dot-paused { background: #f59e0b; }
.status-dot-left { background: #ef4444; }
.danger-text { color: var(--err); font-weight: 700; }
#mem-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
#mem-bar > * { flex: 0 0 auto; }
#mem-bar .tabsearch { width: min(320px, 30vw); }
#members-table { min-width: 1600px; }
.column-picker { position: relative; }
.column-picker > summary { list-style: none; white-space: nowrap; }
.column-picker > summary::-webkit-details-marker { display: none; }
.column-picker-menu { position: absolute; z-index: 25; top: calc(100% + 6px); left: 0; width: max-content;
  min-width: 210px; max-height: 360px; overflow-y: auto; padding: 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 28px rgba(0,0,0,.45); }
.column-picker-option { display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 7px; font-size: .84rem; }
.column-picker-option input { width: auto; margin: 0; }

/* Members grid (photo cards, details on hover) */
.member-grid { display: none; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; margin-top: 12px; }
body.members-grid .member-grid { display: grid; }
body.members-grid #members-table, body.members-grid #mem-bar .tabsearch { display: none; }
.mg-card { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; }
.mg-photo { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.mg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-photo .mg-ph { font-size: 2.2rem; color: var(--muted); font-weight: 700; }
.mg-hover { position: absolute; inset: 0; background: rgba(10, 12, 16, .82); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 8px; text-align: center; font-size: .8rem; opacity: 0; transition: opacity .15s ease; }
.mg-photo:hover .mg-hover { opacity: 1; }
.mg-name { margin-top: 7px; font-weight: 600; font-size: .9rem; text-align: center;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-field { display: flex; align-items: center; gap: 12px; }
.photo-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }

.member-summary { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; align-items: start; margin: 18px 0 28px; }
.member-photo-panel { position: sticky; top: 88px; }
.member-photo-large { width: 150px; height: 150px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); display: block; }
.member-photo-large.avatar-ph { line-height: 150px; font-size: 3rem; }
.member-photo-edit { display: grid; gap: 5px; width: 150px; margin-top: 10px; color: var(--muted); font-size: .8rem; }
.member-photo-edit input { width: 100%; margin: 0; font-size: .78rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 18px 26px; }
.detail-grid h3 { margin: 0 0 8px; font-size: 1rem; }
.kv-list { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 5px 14px; margin: 0; }
.kv-list dt { color: var(--muted); font-size: .86rem; }
.kv-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
#member-edit-form .kv-list { align-items: center; gap: 8px 14px; }
#member-edit-form .kv-list input,
#member-edit-form .kv-list select { width: 100%; min-width: 0; margin: 0; padding: 6px 8px; }
#member-edit-form textarea { width: 100%; }
.member-edit-actions { justify-content: flex-start; margin: 20px 0 28px; }
.sport-list { display: grid; gap: 8px; max-width: 720px; margin-bottom: 18px; }
.sport-row { display: grid; grid-template-columns: minmax(130px, 1fr) repeat(4, 64px) auto auto; gap: 8px; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.sport-row-head { background: transparent; border: 0; padding: 0 10px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.sport-row label { margin: 0; font-size: .82rem; color: var(--muted); }
.sport-row input { margin: 0; width: 100%; min-width: 0; }
.assignment-list { display: grid; gap: 8px; max-width: 760px; }
.assignment-row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.assignment-row p { margin: 4px 0 0; }
@media (max-width: 840px) {
  .member-summary { grid-template-columns: 1fr; }
  .member-photo-panel { position: static; }
  .detail-grid { grid-template-columns: 1fr; }
  .sport-list { max-width: none; }
  .sport-row { grid-template-columns: minmax(95px, 1fr) repeat(4, minmax(44px, 56px)); }
  .sport-row > .btn { grid-column: auto / span 2; }
  .sport-row-head { display: none; }
  .assignment-row { align-items: flex-start; flex-direction: column; }
}

/* Printable member credentials (cut-out cards) */
.cred-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cred-card { border: 1px dashed var(--border); border-radius: 8px; padding: 12px 14px; break-inside: avoid; }
.cred-card .cred-club { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.cred-card .cred-name { font-weight: 700; font-size: 1.05rem; }
.cred-card .cred-addr { color: var(--muted); font-size: .9rem; margin-bottom: 6px; }
.cred-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 6px 0 0; }
.cred-card dt { color: var(--muted); font-size: .8rem; }
.cred-card .cred-link { word-break: break-all; font-size: .82rem; }
@media print {
  .no-print, header, footer, .topbar { display: none !important; }
  body, main, .container { background: #fff !important; color: #000 !important; }
  .cred-card { border-color: #999; }
}

/* Courses / timetable / price list */
.block { margin: 0 0 32px; }
.block > h2 { margin: 0 0 12px; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox > input { width: auto; }
.timetable { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.tt-day { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px; min-height: 80px; }
.tt-day h4 { margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.tt-slot { background: var(--surface); border-radius: 6px; padding: 5px 7px; margin-bottom: 6px; font-size: .85rem; }
.tt-slot .tt-time { display: block; color: var(--accent, #ed151a); font-weight: 600; margin: 0 0 2px; white-space: nowrap; }
.tt-slot .tt-name { display: block; font-weight: 600; }
.tt-slot .tt-loc { display: block; color: var(--muted); font-size: .78rem; }
.offer-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.offer-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: var(--surface-2); }
.offer-card .offer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.offer-card .offer-name { font-weight: 700; font-size: 1.05rem; }
.offer-card .offer-price { font-weight: 700; white-space: nowrap; }
.offer-card .offer-courses-head { margin: 8px 0 2px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.offer-card .offer-courses { margin: 2px 0 12px; padding-left: 18px; }
@media (max-width: 900px) { .timetable { grid-template-columns: repeat(2, 1fr); } }
/* Courses table: full width, one line per course (no wrapping cells) */
.table-courses { width: 100%; }
.table-courses th, .table-courses td { white-space: nowrap; }
.table-courses .unit-chip { margin-bottom: 0; }

/* Public club homepage */
.club-hero { padding: 8px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.club-hero h1 { margin: 0 0 6px; }
.club-about { white-space: pre-wrap; max-width: 760px; }
.club-home-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(220px, .95fr); gap: 18px; align-items: stretch; }
.club-home-layout.club-home-single { display: block; }
.club-home-copy { min-height: 260px; border-radius: 8px; padding: 22px 24px; background-position: center;
  background-size: cover; border: 1px solid var(--border); }
.club-home-single .club-home-copy { max-width: 760px; }
.club-home-media { margin: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.club-home-media img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; display: block; }
.club-home-media figcaption { padding: 8px 10px; color: var(--muted); font-size: .85rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.gallery img { width: 100%; height: 150px; object-fit: cover; display: block; }
.gallery figcaption { padding: 6px 8px; font-size: .82rem; color: var(--muted); }
.gallery figure form { padding: 6px 8px; }
.public-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.public-forms .card { padding: 18px; }
.club-contact { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 8px; }
@media (max-width: 760px) {
  body.club-public .club-tabs {
    order: 3; flex: 1 0 100%; gap: 16px;
    margin: 2px 0 0; padding-bottom: 2px;
    scrollbar-width: none;
  }
  body.club-public .club-tabs::-webkit-scrollbar { display: none; }
  body.club-public .club-tabs button { font-size: .82rem; padding: 5px 1px; }
  .club-home-layout { display: block; }
  .club-home-copy { min-height: 0; }
  .club-home-media { margin-top: 14px; }
  .club-home-media img { height: auto; min-height: 0; }
}

/* Public club homepage — fight.sport wordmark pinned top-left with the club name centered below it;
   the club tabs (with the club logo before Home) live in the topbar where the main nav usually is. */
body.club-public .mainmenu, body.club-public .topbar-right .clubbrand { display: none; }
body.club-public > main.container { overflow: hidden; padding: 18px 20px 0; }
.brandcol { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.brand-clubname { color: #fff; font-weight: 600; font-size: .8rem; letter-spacing: .04em; text-align: center; }
.club-tabs { display: flex; align-items: center; gap: 26px; margin-left: clamp(24px, 4vw, 70px); overflow-x: auto; }
.club-tablogo { height: 46px; width: auto; max-width: 120px; object-fit: contain; display: block; }
.club-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: #cfd3da;
  font-weight: 600; font-size: 1.15rem; padding: 8px 2px; cursor: pointer; white-space: nowrap; }
.club-tabs button:hover { color: #fff; }
.club-tabs button.active { color: #fff; border-bottom-color: var(--primary); }
.club-page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.club-hero-title { margin: 0 0 12px; font-size: 1.6rem; }
.club-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  font-weight: 600; padding: 10px 16px; cursor: pointer; font-size: .95rem; white-space: nowrap; }
.club-tabs button:hover { color: var(--text); }
.club-tabs button.active { color: var(--text); border-bottom-color: var(--primary); }
.club-panels { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 22px 2px 40px; }
.club-panel { max-width: 820px; }
.club-subhead { margin: 28px 0 12px; }
.trainer-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.trainer-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.trainer-name { font-weight: 700; }
.trainer-courses { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: .9rem; }
.news-carousel { max-width: 760px; }
.news-carousel-head { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 0 0 10px; }
.news-count { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.news-nav { display: inline-flex; gap: 6px; }
.news-arrow { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 1.35rem; line-height: 1; }
.news-arrow:hover:not(:disabled) { border-color: var(--muted); }
.news-arrow:disabled { opacity: .35; cursor: default; }
.news-list { display: flex; gap: 0; max-width: 760px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: none; }
.news-list::-webkit-scrollbar { display: none; }
.news-item { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; flex: 0 0 100%; scroll-snap-align: start; min-width: 0; }
.news-poster { width: 180px; max-height: 240px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.news-title { margin: 0 0 2px; }
.news-body p { margin: 8px 0 0; }
.news-form { max-width: 560px; display: flex; flex-direction: column; gap: 10px; margin: 6px 0 18px; }
.news-admin { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.news-admin-item { display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.news-admin-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.news-admin-main { flex: 1; min-width: 0; }
.news-admin-main p { margin: 4px 0 0; }
.course-list { display: flex; flex-direction: column; gap: 12px; }
.course-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.course-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.course-name { font-weight: 700; }
.training-shell { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: 22px; align-items: start; }
.training-side { position: sticky; top: 92px; max-height: calc(100dvh - 160px); overflow-y: auto;
  border-right: 1px solid var(--border); padding-right: 16px; }
.compact-tabs { margin-bottom: 12px; }
.filter-stack { display: grid; gap: 8px; margin-bottom: 16px; }
.filter-stack input, .filter-stack select { margin: 0; width: 100%; }
.training-tabs { align-items: center; }
.training-tabs .tab-check { margin: 0 4px 0 14px; align-self: center; }
.training-tabs .tree-filter { margin: 4px 8px; align-self: center; width: min(220px, 32%); }
.training-tabs .spacer { flex: 1; }
.training-tabs .btn { align-self: center; }
.tree-controls { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.tree-controls .spacer { flex: 1; }
/* Exercise image uploads */
.field-block { display: flex; flex-direction: column; gap: 8px; }
.field-block .field-label { color: var(--muted); font-size: .82rem; }
.img-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.img-thumb { position: relative; width: 90px; height: 90px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-remove { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.img-remove:hover { background: rgba(200, 0, 0, .85); }
/* Club data import / export */
.transfer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 14px; }
.transfer-grid .card { border: 1px solid var(--border); border-radius: 10px; padding: 18px; background: var(--surface-2); }
.transfer-grid .card h3 { margin: 0 0 8px; }
.transfer-import { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.import-summary { margin: 8px 0 0; padding-left: 18px; font-size: .88rem; }
.plan-scope + .plan-scope { margin-top: 6px; }
.plan-scope .scope-label { margin: 0 0 6px; color: var(--muted); font-size: .72rem;
  font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.plan-tree.club-only .plan-scope-library { display: none; }
.plan-tree { display: grid; gap: 14px; }
.plan-tree-section { display: grid; gap: 6px; }
.plan-tree-root { width: 100%; text-align: left; background: transparent; border: 0; color: var(--text);
  font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; padding: 5px 4px; }
.plan-tree-dropzone { min-height: 22px; border-radius: 8px; }
.plan-tree-list, .plan-tree-list ul { list-style: none; margin: 0; padding-left: 14px; }
.plan-tree-list { padding-left: 0; }
.plan-tree-item { margin: 4px 0; }
.plan-node { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: 7px; padding: 5px 8px; cursor: default; }
.plan-node[draggable="true"] { cursor: grab; }
.plan-node a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-weight: 600; }
.plan-node:hover, .plan-node.active, .plan-node.drop-target { background: var(--surface-2); border-color: var(--border); }
.plan-node:hover a, .plan-node.active a { color: var(--text); }
.plan-node.drop-target { outline: 1px solid var(--primary); }
.plan-node-meta { color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; background: transparent; color: var(--primary); padding: 0; cursor: pointer; font: inherit; }
.training-block-form { align-items: end; border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.training-block-form select[multiple] { min-width: 220px; }
.tree-menu { position: fixed; z-index: 80; min-width: 180px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 5px; box-shadow: 0 12px 28px rgba(0,0,0,.45); }
.tree-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent;
  color: var(--text); border-radius: 6px; padding: 8px 10px; cursor: pointer; }
.tree-menu button:hover { background: var(--surface-2); }
.tree-menu button.danger { color: var(--err); }
.hidden-form { display: none; }
.training-editor { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 12px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid label { margin: 0; }
@media (max-width: 860px) {
  .training-shell { grid-template-columns: 1fr; }
  .training-side { position: static; max-height: none; border-right: 0; padding-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
  .form-grid { grid-template-columns: 1fr; }
}
.public-form { max-width: 460px; display: flex; flex-direction: column; gap: 10px; }
.public-form label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.public-form input, .public-form select, .public-form textarea { width: 100%; }
.trial-box { margin-top: 18px; max-width: 500px; }
.club-contact-lines a { margin-right: 16px; }
@media (max-width: 640px) {
  .news-item { display: block; padding: 12px; }
  .news-poster { width: 100%; max-height: none; aspect-ratio: 16 / 10; margin-bottom: 12px; }
}

.notice { padding: 8px 12px; border-radius: 8px; margin: 8px 0; }
.notice.ok { background: rgba(40,160,90,.15); border: 1px solid rgba(40,160,90,.45); }
.notice.error { background: rgba(200,40,40,.15); border: 1px solid rgba(200,40,40,.45); }
#clubs-grid { margin: 12px 0; }

/* ---- Landing page: fit header + content + footer into the viewport, never scroll ---- */
body.landing-page { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.landing-page .topbar,
body.landing-page .footer { flex: 0 0 auto; }
body.landing-page > main.container { flex: 1 1 auto; min-height: 0; max-width: none;
  margin: 0; padding: 0; display: flex; }
body.landing-page { background: #000; user-select: none; -webkit-user-select: none; }
body.landing-page .landing { flex: 1 1 auto; min-height: 0; width: 100%; margin: 0;
  display: flex; flex-direction: column; justify-content: space-between; color: #e9ecf2;
  gap: clamp(8px, 2.2vh, 26px); padding: clamp(16px, 4vh, 52px) 20px; overflow: hidden;
  border-bottom: none;
  /* Black page; a grey band sits where the animation runs. Two layers:
     (1) a radial dome anchored to the carousel centre gives a strongly arched TOP whose
         height tracks the image height (--band-ry from JS);
     (2) a linear layer paints flat black from just below the fighters' feet
         (--carousel-bottom from JS) so the BOTTOM edge is straight, not curved. */
  background:
    /* inverted (black) dome below the images: carves the bottom edge into an upward arch
       and keeps the fade outside (below) the images */
    radial-gradient(100% var(--band-ry, 30%) at 50% calc(var(--carousel-bottom, 64%) + 34%),
      #000 0%, #000 26%, rgba(0,0,0,0) 78%),
    /* lit grey dome, centred lower so the images sit inside the light */
    radial-gradient(100% var(--band-ry, 30%) at 50% calc(var(--carousel-center, 50%) + 26%),
      rgb(150,156,162) 0%, rgb(66,70,76) 50%, rgba(0,0,0,0) 80%),
    #000; }
body.landing-page .landing-title { color: #f3f5f8; }
body.landing-page .landing-eyebrow { color: #cdd2da; }
body.landing-page .landing-sub { color: #b7bdc7; }
body.landing-page .lineup { width: 100%; margin: 0; }

.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: 1.9rem; margin: 0 0 24px; }
.prose h2 { font-size: 1.2rem; margin: 32px 0 8px; color: var(--text); }
.prose p { color: var(--muted); margin: 0 0 12px; }
.prose ul { color: var(--muted); margin: 0 0 12px; padding-left: 20px; }
.prose li { margin: 4px 0; }
.prose a { color: var(--accent); }

.hero { padding: 40px 0; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin: 0 0 12px; }
.hero p { color: var(--muted); max-width: 60ch; }

section { margin: 28px 0; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; }
.card + .card { margin-top: 18px; }

.btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 9px 14px; border-radius: var(--radius); font-size: .95rem; font-weight: 600; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }

label { display: block; margin: 12px 0; font-size: .9rem; color: var(--muted); }
input, select, textarea { width: 100%; margin-top: 4px; padding: 9px 11px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary); }

.auth-card { max-width: 380px; margin: 8vh auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }

.alert { padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.alert-error { background: rgba(255,90,82,.15); border: 1px solid var(--err); color: #ffd4d1; }
.alert-ok { background: rgba(47,191,113,.15); border: 1px solid var(--ok); color: #c7f3da; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
tr:hover td { background: var(--surface); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.toolbar .spacer { flex: 1; }
.badge { font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); }

/* Inline checkbox label (roles etc.) — overrides the full-width form input defaults. */
.chk { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 4px 0; color: var(--text); font-size: .9rem; }
.chk input { width: auto; margin: 0; }
.role-form { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 0; }
.editrow td { vertical-align: top; }
.editrow input[type="text"], .editrow input[type="email"], .editrow input:not([type]) { margin-top: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.roles-field { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px 6px; margin: 14px 0; }
.roles-field legend { color: var(--muted); font-size: .85rem; padding: 0 6px; }
.btn-sm { padding: 5px 10px; font-size: .82rem; }
.dash-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 20px 0; }
.dash-tile { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; }
.dash-tile:hover { border-color: var(--primary); color: var(--text); }
.dash-tile strong { display: block; font-size: 1.1rem; }
.dash-tile span { color: var(--muted); font-size: .85rem; }
.metric-tile { min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-tile strong { font-size: 2rem; line-height: 1; }
.club-logo-link { display: inline-flex; align-items: center; border-bottom: 0 !important; padding: 0 !important; }
.profile-panel { max-width: 760px; }

/* Lightbox modal (Alpine-driven) */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  width: min(720px, 100%); padding: 20px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.modal hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.form-grid { display: grid; gap: 10px 14px; grid-template-columns: 1fr 1fr; margin: 12px 0; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.form-grid .span-2 { grid-column: 1 / -1; }
.slug-field { display: flex; align-items: stretch; }
.slug-field .slug-prefix { display: flex; align-items: center; padding: 0 8px; background: var(--surface-2);
  border: 1px solid var(--border); border-right: none; border-radius: 8px 0 0 8px; color: var(--muted); white-space: nowrap; }
.slug-field input { border-radius: 0 8px 8px 0; flex: 1; min-width: 0; }
.small { font-size: .8rem; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* White button variant (e.g. Import clubs, Edit) */
.btn-white { background: #fff; border-color: #fff; color: #1b2230; }
.btn-white:hover { background: #e6e9ef; border-color: #e6e9ef; color: #1b2230; }

/* Impersonation banner */
/* Impersonation: highlight the user menu in brand red instead of a banner */
.usermenu-trigger.impersonating { background: var(--primary); border-radius: 8px; padding: 4px 10px; }
.usermenu-trigger.impersonating .um-name,
.usermenu-trigger.impersonating .um-role { color: #fff; }

/* ---------- Searchable tables / Tabulator (dark theme to match the page) ---------- */
.native-grid { margin-top: 8px; }
.native-grid th.sortable { cursor: pointer; user-select: none; }
.native-grid th.sortable:hover { color: var(--text); }
.native-grid th[data-sort-dir="asc"]::after { content: " ▲"; color: var(--muted); font-size: .72rem; }
.native-grid th[data-sort-dir="desc"]::after { content: " ▼"; color: var(--muted); font-size: .72rem; }
.tabwrap { margin: 16px 0; width: 100%; }
.tabwrap .tabulator { width: 100% !important; }
.tabsearch {
  width: min(320px, 100%); margin: 0 0 10px; padding: 8px 12px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
}
.tabsearch:focus { outline: none; border-color: var(--primary); }

.tabulator {
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .92rem; color: var(--text);
}
.tabulator .tabulator-header {
  background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--muted);
}
.tabulator .tabulator-header .tabulator-col {
  background: var(--surface-2); border-right: 1px solid var(--border);
}
.tabulator .tabulator-header .tabulator-col .tabulator-col-title {
  color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
}
.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { background: var(--surface); }
.tabulator .tabulator-col .tabulator-col-sorter .tabulator-arrow { border-bottom-color: var(--muted); }
.tabulator .tabulator-col[aria-sort="ascending"] .tabulator-arrow { border-bottom-color: var(--primary); }
.tabulator .tabulator-col[aria-sort="descending"] .tabulator-arrow { border-top-color: var(--primary); }

.tabulator .tabulator-header .tabulator-header-filter input {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 8px;
}
.tabulator .tabulator-header .tabulator-header-filter input:focus { outline: none; border-color: var(--primary); }

.tabulator .tabulator-tableholder .tabulator-table { background: transparent; color: var(--text); }
/* Tabulator ships `.tabulator-row{background:#f3f3f3!important}`, so we need !important to win. */
.tabulator .tabulator-row { background: var(--bg) !important; border-bottom: 1px solid var(--border); color: var(--text); }
.tabulator .tabulator-row.tabulator-row-even { background: var(--surface) !important; }
.tabulator .tabulator-row:hover { background: var(--surface-2) !important; }
.tabulator .tabulator-row .tabulator-cell {
  border-right: 1px solid var(--border); padding: 8px 10px; vertical-align: middle;
}
.tabulator .tabulator-row .tabulator-cell a { color: var(--text); }
.tabulator .tabulator-row .tabulator-cell a:hover { color: var(--accent); }
/* keep inline forms tidy inside cells */
.tabulator .tabulator-cell form { margin: 0; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tabulator .tabulator-cell form.inline { display: inline-flex; }
.tabulator .tabulator-cell select,
.tabulator .tabulator-cell input { width: auto; margin: 0; }

.tabulator .tabulator-footer {
  background: var(--surface-2); border-top: 1px solid var(--border); color: var(--muted);
}
.tabulator .tabulator-footer .tabulator-page {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px;
}
.tabulator .tabulator-footer .tabulator-page.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tabulator .tabulator-footer .tabulator-page:hover:not(.active) { background: var(--surface-2); }
.tabulator .tabulator-footer .tabulator-page[disabled] { opacity: .4; }
.tabulator .tabulator-placeholder { color: var(--muted); }
.tabulator .tabulator-placeholder .tabulator-placeholder-contents { color: var(--muted); }

/* Live big-screen view */
.bigscreen { background: #000; color: #fff; min-height: 100vh; }
.bigscreen .ring { font-size: clamp(1.5rem, 5vw, 4rem); }
.countdown { font-variant-numeric: tabular-nums; font-weight: 800; }

/* ---------- Landing + sport carousel ---------- */
.btn-lg { padding: 12px 22px; font-size: 1.02rem; border-radius: 12px; }

.landing {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: -24px;            /* eat the container's top padding */
  padding: 52px 20px 64px;
  text-align: center;
  color: #1b2230;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(226,59,46,.12), transparent 62%),
    radial-gradient(700px 380px at 88% 8%, rgba(16,160,170,.12), transparent 60%),
    linear-gradient(165deg, #f5f7fa 0%, #e7eaf0 44%, #d2d8e2 100%);
  border-bottom: 1px solid var(--border);
}
.landing-inner { max-width: 1040px; margin: 0 auto; }
.landing-eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; font-weight: 700;
  color: #0e9aa6; margin: 0 0 10px;
}
.landing-title {
  font-size: clamp(2rem, 6vw, 3.8rem); font-weight: 900; letter-spacing: -.03em;
  margin: 0 0 10px; color: #141925;
}
.landing-title span { color: var(--primary); }
.landing-sub { color: #475264; max-width: 60ch; margin: 0 auto;
  font-size: clamp(1rem, 2.2vw, 1.18rem); }

/* Full-width sport conveyor: squares scroll left->right, size = f(x) (perspective).
   Geometry (position + scale) is driven entirely from JS in carousel.js. */
.lineup {
  width: calc(100% + 40px);     /* cancel the .landing horizontal padding */
  margin: 26px -20px 0;
  overflow: hidden;
}
.stage { position: relative; width: 100%; min-height: 18.25vw; }
.slide {
  position: absolute; left: 0; bottom: 0; margin: 0;
  transform-origin: bottom center; will-change: transform;
  contain: layout paint;          /* keep style/paint work scoped to each tile */
  /* width/height (the reference square) are set in JS */
}
.film { position: absolute; inset: 0; overflow: hidden; }
/* Sprite strip = 4 frames side by side; stepped translate runs entirely on the GPU. */
.strip {
  position: absolute; top: 0; left: 0; height: 100%; width: 400%;
  background-repeat: no-repeat; background-size: 100% 100%;
  animation: filmstrip 2s steps(4) infinite;
  will-change: transform;
}
@keyframes filmstrip { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .strip { animation: none; } }

.landing-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.btn-on-light { background: #fff; border-color: rgba(20,28,45,.16); color: #1b2230; }
.btn-on-light:hover { border-color: #0e9aa6; color: #0e9aa6; }

@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
}
.table-filter-form,.pagination{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap}
.pagination{margin-top:1rem}

/* Fight-card editor and presentation */
.fightcard-toolbar { align-items: end; }
.fightcard-toolbar label.inline-check { flex-direction: row; align-items: center; gap: 6px; margin-left: 8px; }
.fightcard-toolbar label.inline-check > input { width: auto; min-width: 0; margin: 0; }
.fightcard-action-form { display: flex; align-items: center; gap: 14px; margin-left: 2px; }
.fightcard-table-wrap { overflow-x: auto; }
.fightcard-table { min-width: 1080px; }
.fightcard-table .drag-col { width: 34px; }
.fightcard-table td { vertical-align: middle; padding-top: 4px; padding-bottom: 4px; }
.drag-handle { cursor: grab; user-select: none; font-size: 1.35rem; color: var(--muted); text-align: center; }
.fight-row-dragging { opacity: .35; }
.fight-row-locked { background: color-mix(in srgb, #d4af37 11%, var(--surface)); box-shadow: inset 4px 0 #d4af37; }
.fight-table-fighter { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(190px, auto); grid-template-rows: auto auto; column-gap: 14px; row-gap: 1px; align-items: center; min-width: 340px; line-height: 1.2; }
.fight-table-fighter strong { grid-column: 1; grid-row: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fight-table-fighter small { grid-column: 1; grid-row: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.fight-table-fighter span { grid-column: 2; color: var(--muted); font-size: .76rem; white-space: nowrap; }
.fight-table-fighter span:first-of-type { grid-row: 1; }.fight-table-fighter span:last-of-type { grid-row: 2; }
.fightcard-row-actions { min-width: max-content; min-height: 100%; flex-wrap: nowrap; align-items: center; align-content: center; white-space: nowrap; }
.fight-lock { border: 1px solid #d4af37; border-radius: 999px; background: rgba(212,175,55,.13); padding: 5px 8px; cursor: pointer; }
.fight-unlocked { filter: grayscale(1); opacity: .5; padding: 5px 8px; }
.fightcard-grid { display: none; grid-template-columns: repeat(auto-fill, minmax(300px, 390px)); justify-content: start; gap: 20px; margin-top: 18px; }
.fightcard-view-grid .fightcard-table-wrap { display: none; }
.fightcard-view-grid .fightcard-grid { display: grid; }
.fightcard-grid-item { display: block; padding: 0; border: 0; border-radius: 18px; background: transparent; color: inherit; cursor: zoom-in; box-shadow: 0 14px 34px rgba(0,0,0,.22); transition: transform .18s ease, box-shadow .18s ease; overflow: hidden; }
.fightcard-grid-item:hover { transform: translateY(-4px); box-shadow: 0 20px 42px rgba(0,0,0,.32); }
.fightcard-grid-item .visual-fight-card { width: 100%; min-height: 0; }
.fightcard-grid-item .visual-fight-card header { grid-template-columns: minmax(0, 1fr) auto; min-height: 29px; padding: 5px 9px; font-size: .56rem; }
.fightcard-grid-item .visual-fight-card header span { display: none; }
.fightcard-grid-item .visual-fight-card header strong { overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.fightcard-grid-item .visual-fight-card header em { padding-left: 8px; }
.fightcard-grid-item .vfc-matchup { padding: 3px 2%; }
.fightcard-grid-item .vfc-photo { width: clamp(58px, 5vw, 68px); border-width: 2px; box-shadow: 0 4px 14px #000; font-size: 2rem; }
.fightcard-grid-item .vfc-athlete h3 { margin-top: 3px; font-size: clamp(.65rem, 1vw, .85rem); }
.fightcard-grid-item .vfc-athlete p { margin: 1px 0 2px; font-size: clamp(.43rem, .65vw, .56rem); }
.fightcard-grid-item .vfc-athlete dl { gap: 4px; }
.fightcard-grid-item .vfc-athlete dt { font-size: .4rem; }
.fightcard-grid-item .vfc-athlete dd { font-size: .5rem; }
.fightcard-grid-item .vfc-vs { font-size: 1.35rem; }
.fightcard-grid-item .visual-fight-card footer { padding: 3px 7px; font-size: .44rem; }

.visual-fight-card { --card-gold: #e8c45d; position: relative; isolation: isolate; aspect-ratio: 16/9; min-height: 260px; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; color: #fff; background: radial-gradient(circle at 50% 35%, #293241 0, #121722 35%, #05070b 76%); border: 1px solid rgba(232,196,93,.55); font-family: Inter, system-ui, sans-serif; }
.visual-fight-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .3; background-image: repeating-linear-gradient(120deg, transparent 0 34px, rgba(255,255,255,.05) 35px 36px), linear-gradient(90deg, rgba(180,20,35,.2), transparent 40% 60%, rgba(25,80,190,.2)); }
.vfc-glow { position: absolute; z-index: -1; width: 45%; aspect-ratio: 1; top: 20%; border-radius: 50%; filter: blur(55px); opacity: .36; }
.vfc-glow-red { left: -18%; background: #d42136; }.vfc-glow-blue { right: -18%; background: #256ee8; }
.visual-fight-card header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 16px; border-bottom: 1px solid rgba(232,196,93,.35); background: rgba(0,0,0,.42); text-transform: uppercase; letter-spacing: .09em; font-size: clamp(.55rem, 1.4vw, .78rem); }
.visual-fight-card header strong { color: var(--card-gold); text-align: center; }.visual-fight-card header em { justify-self: end; font-style: normal; }
.vfc-matchup { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; min-height: 0; padding: 8px 2.5%; }
.vfc-athlete { min-width: 0; display: grid; justify-items: center; align-content: center; }
.vfc-photo { width: clamp(74px, 14vw, 155px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: var(--card-gold); font-size: clamp(2.1rem, 7vw, 5rem); font-weight: 900; background: linear-gradient(145deg,#232a36,#080a0e); border: 3px solid var(--card-gold); box-shadow: 0 8px 28px #000; }
.vfc-red .vfc-photo { border-right-color: #a91d2f; }.vfc-blue .vfc-photo { border-left-color: #2467d8; }
.vfc-photo img { width: 100%; height: 100%; object-fit: cover; }
.vfc-athlete h3 { max-width: 100%; margin: 7px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--card-gold); font-size: clamp(.9rem, 2.5vw, 1.65rem); line-height: 1; text-transform: uppercase; letter-spacing: .025em; text-shadow: -1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000,0 2px 8px #000; }
.vfc-athlete p { max-width: 92%; margin: 4px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cbd0d8; font-size: clamp(.52rem, 1.3vw, .75rem); }
.vfc-athlete dl { display: flex; gap: clamp(4px,1.3vw,13px); margin: 0; }.vfc-athlete dl div { display: grid; justify-items: center; }.vfc-athlete dt { color: #8f98a6; font-size: clamp(.45rem,1vw,.62rem); text-transform: uppercase; }.vfc-athlete dd { margin: 0; font-size: clamp(.58rem,1.25vw,.78rem); font-weight: 750; }
.vfc-vs { color: var(--card-gold); font: italic 900 clamp(1.5rem,5vw,3.5rem)/1 Georgia,serif; text-shadow: 0 2px 0 #000,0 0 16px rgba(232,196,93,.65); transform: skew(-8deg); }
.visual-fight-card footer { padding: 7px 12px; text-align: center; border-top: 1px solid rgba(232,196,93,.25); background: rgba(0,0,0,.48); color: #aab1bd; font-size: clamp(.52rem,1.2vw,.7rem); text-transform: uppercase; letter-spacing: .12em; }
.fightcard-dialog { width: min(96vw, 1180px); max-width: none; padding: 0; border: 0; border-radius: 18px; background: #05070b; box-shadow: 0 35px 100px #000; overflow: visible; }
.fightcard-dialog::backdrop { background: rgba(0,0,0,.86); backdrop-filter: blur(5px); }
.fightcard-dialog-close { position: absolute; z-index: 5; right: 10px; top: 10px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #777; background: #111; color: #fff; font-size: 1.5rem; cursor: pointer; }
.visual-fight-card-modal { width: 100%; min-height: 0; }
.visual-fight-card-modal header { padding-right: 62px; }
@media (max-width: 700px) {
  .fightcard-grid { grid-template-columns: 1fr; }
  .fightcard-dialog { width: 98vw; }.visual-fight-card { min-height: 220px; }.vfc-athlete dl { gap: 5px; }
  .visual-fight-card header span { display: none; }.visual-fight-card header { grid-template-columns: 1fr auto; }.visual-fight-card header strong { text-align: left; }
}

/* --- Accessibility & prose helpers ------------------------------------------------------- */

/* Off-screen but reachable by screen readers and, for the skip link, by keyboard focus. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px;
  transition: top .15s ease-in-out;
}
.skip-link:focus { top: 8px; }

/* Free-text fields entered by club admins are stored raw, so honour their line breaks.
   (Deliberately not named .prose — that class already sets the legal pages' page layout.) */
.preserve-lines { white-space: pre-line; }

/* Keyboard focus must stay visible everywhere, including on elements that reset outlines. */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
