*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: #e8e8ec;
  background: #12141a;
}

.header {
  padding: 1rem 1rem 0.5rem;
  border-bottom: 1px solid #2a2e3a;
}

.title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: #9aa0b0;
}

.subtitle code {
  font-size: 0.8em;
  padding: 0.1em 0.35em;
  background: #2a2e3a;
  border-radius: 4px;
}

.main {
  padding: 0.45rem 1rem 2rem;
  max-width: 36rem;
  margin: 0 auto;
}

.events {
  display: flex;
  flex-direction: column;
  gap: var(--mm-cm-card-gap, 0.65rem);
}

.event-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.event-card:active {
  background: #252936;
}

.event-card:focus-visible {
  outline: 2px solid #5b8cff;
  outline-offset: 2px;
}

.event-card-thumb {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #2a2e3a;
}

.mm-event-thumb-placeholder {
  width: 4.5rem;
  height: 4.5rem;
  box-sizing: border-box;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px dashed #4a5568;
  background: repeating-linear-gradient(
    -45deg,
    #22262f,
    #22262f 4px,
    #1c1f28 4px,
    #1c1f28 8px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.mm-event-thumb-placeholder svg {
  opacity: 0.85;
}

.event-card-body {
  min-width: 0;
  flex: 1;
}

.event-card-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #f2f2f6;
}

.event-card-meta {
  margin: 0;
  font-size: 0.8125rem;
  color: #9aa0b0;
}

.event-card-id {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.result {
  margin-top: 1.25rem;
}

.result-heading {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #c4c8d4;
}

.result-body {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  background: #0c0e12;
  border: 1px solid #2a2e3a;
  border-radius: 8px;
  color: #b8f5c8;
  min-height: 4rem;
}

.result-body.is-error {
  color: #ffb4b4;
}

/* Shared app navigation & messages */
.mm-nav {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.mm-nav-link {
  color: #7aa8ff;
  text-decoration: none;
}

.mm-nav-link:hover {
  text-decoration: underline;
}

.mm-nav-sep {
  margin: 0 0.35rem;
  color: #6b7280;
}

.mm-status {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: #9aa0b0;
}

.mm-status--error {
  color: #ffb4b4;
}

#mm-events-status:empty {
  display: none;
}

.mm-muted {
  margin: 0;
  font-size: 0.875rem;
  color: #9aa0b0;
}

.mm-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.mm-alert--error {
  background: #2a1a1a;
  border: 1px solid #5c2a2a;
  color: #ffb4b4;
}

.is-hidden {
  display: none !important;
}

/* Event list row: two links (thumb + text block) */
.mm-event-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  width: 100%;
}

.mm-event-row__media {
  flex-shrink: 0;
  line-height: 0;
}

/* API lane hints: starting-list (red) → schedules (yellow) → fights (green) */
.mm-event-row__lanes {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  flex-shrink: 0;
  align-self: stretch;
  padding-left: 0.15rem;
}

.mm-event-lane-slot {
  width: 11px;
  height: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mm-event-lane {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.mm-event-lane--starting.mm-event-lane--filled {
  background: #ef4444;
}

.mm-event-lane--starting.mm-event-lane--outline {
  border: 2px solid #ef4444;
  background: transparent;
}

.mm-event-lane--schedules.mm-event-lane--filled {
  background: #eab308;
}

.mm-event-lane--schedules.mm-event-lane--outline {
  border: 2px solid #eab308;
  background: transparent;
}

.mm-event-lane--fights.mm-event-lane--filled {
  background: #22c55e;
}

.mm-event-lane--fights.mm-event-lane--outline {
  border: 2px solid #22c55e;
  background: transparent;
}

/* HTTP / network error (distinct from empty successful response) */
.mm-event-lane--error {
  position: relative;
  background: transparent !important;
  border-width: 2px;
  border-style: solid;
  box-sizing: border-box;
}

.mm-event-lane--starting.mm-event-lane--error {
  border-color: #ef4444;
  color: #ef4444;
}

.mm-event-lane--schedules.mm-event-lane--error {
  border-color: #eab308;
  color: #eab308;
}

.mm-event-lane--fights.mm-event-lane--error {
  border-color: #22c55e;
  color: #22c55e;
}

.mm-event-lane--error::before,
.mm-event-lane--error::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 1.5px;
  background: currentColor;
  transform-origin: center;
  border-radius: 0.5px;
}

.mm-event-lane--error::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mm-event-lane--error::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mm-event-title-link {
  text-decoration: none;
  color: #f2f2f6;
}

.mm-event-title-link:hover {
  text-decoration: underline;
}

/* Event cards — jak lista /pl/events (data, rejestracja, miejsce, typy) */
.mm-ev-date {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.mm-ev-date__label {
  color: #9aa0b0;
}

.mm-ev-date__value {
  color: #e2e8f0;
  font-weight: 500;
}

.mm-ev-reg {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.28rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.mm-ev-reg strong {
  font-weight: 700;
}

.mm-ev-reg--ongoing {
  color: #48bb78;
}

.mm-ev-reg--ongoing::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  animation: mm-ev-pulse 1.2s ease-in-out infinite;
}

.mm-ev-reg--start {
  color: #63b3ed;
}

.mm-ev-reg--end {
  color: #68d391;
}

.mm-ev-reg--closed {
  color: #ecc94b;
}

@keyframes mm-ev-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.mm-ev-place {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0.3rem 0.4rem;
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #a0aec0;
}

.mm-ev-place__pin {
  display: block;
  flex-shrink: 0;
  opacity: 0.9;
}

.mm-ev-place__flag {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.mm-ev-place__city {
  flex: 1 1 0;
  min-width: 0;
  color: #cbd5e0;
  overflow-wrap: break-word;
}

.mm-ev-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.35rem;
  margin: 0.45rem 0 0;
}

.mm-ev-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: #1a202c;
}

.mm-ev-tag--BjjGi {
  background: #38a169;
  color: #f0fff4;
}

.mm-ev-tag--BjjNoGi {
  background: #9ae6b4;
  color: #1c4532;
}

.mm-ev-tag--Grappling {
  background: #ecc94b;
  color: #1a202c;
}

.mm-ev-tag--MMA {
  background: #d6bcfa;
  color: #322659;
}

.mm-ev-tag--ADCC {
  background: #e53e3e;
  color: #fff5f5;
}

.mm-ev-tag--Sambo {
  background: #feb2b2;
  color: #742a2a;
}

.mm-ev-tag--SubmissionOnly {
  background: #2c5282;
  color: #ebf8ff;
}

.mm-ev-tag--Boxing {
  background: #805ad5;
  color: #faf5ff;
}

.mm-ev-tag--Judo {
  background: #f7fafc;
  color: #1a202c;
  border: 1px solid #718096;
}

.mm-ev-tag--CombatJuJutsu {
  background: #1a1a1a;
  color: #f7fafc;
  border: 1px solid #4a5568;
}

.mm-ev-tag--Kickboxing {
  background: #fc8181;
  color: #3b0a0a;
}

.mm-ev-tag--Wrestling {
  background: #3182ce;
  color: #ebf8ff;
}

.mm-ev-tag--MuayThai {
  background: #b7791f;
  color: #1a1004;
}

.mm-ev-tag--Taekwondo {
  background: #718096;
  color: #f7fafc;
}

.mm-ev-tag--default {
  background: #4a5568;
  color: #edf2f7;
}

/* Current matches — shared vertical rhythm (tabs ↔ filter row reference gap) */
#mm-cm-content {
  --mm-cm-stack-gap: 0.5rem;
  --mm-cm-card-gap: 0.65rem;
}

/* Main card lists — events, fights, schedule categories */
.mm-cm-events-list,
.mm-fights,
.mm-hg-list {
  gap: var(--mm-cm-card-gap);
}

.header.mm-cm-page-header + .main {
  --mm-cm-stack-gap: 0.5rem;
  padding-top: var(--mm-cm-stack-gap);
}

/* Gap below header event card (same rhythm as tabs → filter); avoid doubling with .main padding */
.header.mm-cm-page-header:has(.mm-cm-header-card-wrap:not(.is-hidden)) + .main {
  padding-top: 0;
}

.mm-cm-header-card-wrap:not(.is-hidden) {
  margin-bottom: var(--mm-cm-stack-gap);
}

/* Current matches — trzy zakładki (Events / Fights / Harmonogram) */
.mm-cm-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 var(--mm-cm-stack-gap);
}

/* ~25% / 50% / 25% — środkowa zakładka Fights szersza */
.mm-cm-tab:not(.mm-cm-tab--fights) {
  flex: 1 1 0;
}

.mm-cm-tab--fights {
  flex: 2 1 0;
}

.mm-cm-tab--fights .mm-cm-tab__label {
  text-align: center;
}

/* HTTP /fights fetch in progress — top-right, out of text flow */
.mm-cm-tab__refresh {
  position: absolute;
  top: 0.25rem;
  right: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.9rem;
  height: 0.9rem;
  line-height: 0;
  color: inherit;
  opacity: 0.9;
  pointer-events: none;
}

.mm-cm-tab__refresh[hidden] {
  display: none;
}

.mm-cm-tab-refresh-ic {
  display: block;
  animation: mm-cm-refresh-spin 0.7s linear infinite;
}

@keyframes mm-cm-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

/* WSS proxy — small status dot, bottom-right (diameter ≈ 4px vs ~9px event lane dots) */
.mm-cm-tab__wss {
  position: absolute;
  right: 0.18rem;
  bottom: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.4rem;
  height: 0.4rem;
  pointer-events: none;
}

.mm-cm-tab__wss[hidden] {
  display: none;
}

.mm-cm-tab__wss-dot {
  display: block;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  box-sizing: border-box;
  flex-shrink: 0;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

/* WSS URL not configured */
.mm-cm-tab__wss-dot--na {
  background: #64748b;
  border: 1px solid #64748b;
  opacity: 0.7;
}

.mm-cm-tab__wss-dot--offline {
  background: #dc2626;
  border: 1px solid #dc2626;
}

.mm-cm-tab__wss-dot--connecting {
  background: #f97316;
  border: 1px solid #f97316;
  animation: mm-cm-wss-pulse-conn 0.9s ease-in-out infinite;
}

@keyframes mm-cm-wss-pulse-conn {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.mm-cm-tab__wss-dot--open {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
}

/* neutral flash for any WSS traffic (throttled in JS) */
.mm-cm-tab__wss-dot--ping {
  animation: mm-cm-wss-ping 0.18s ease-out;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
  filter: brightness(1.35);
}

@keyframes mm-cm-wss-ping {
  0% {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.mm-cm-tab__label {
  display: block;
  min-width: 0;
}

.mm-cm-tab {
  min-width: 0;
  padding: 0.5rem 0.6rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #a8b8d8;
  text-align: center;
  background: #252a38;
  border: 1px solid #3d4a66;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease,
    filter 0.1s ease,
    box-shadow 0.1s ease;
}

/* Fights: room for TR refresh + BR WSS; must follow base .mm-cm-tab so padding is not reset */
.mm-cm-tab.mm-cm-tab--fights {
  position: relative;
  padding: 0.5rem 1.15rem 0.5rem 0.75rem;
}

.mm-cm-tab:hover {
  color: #e8e8ec;
  background: #2a3248;
  border-color: #4a5a7a;
}

.mm-cm-tab[aria-selected="true"] {
  color: #e8f4ff;
  background: #2a3248;
  border-color: #5b8cff;
  box-shadow: 0 0 0 1px rgba(91, 140, 255, 0.35);
}

.mm-cm-tab:active:not(:disabled) {
  transform: scale(0.985);
  filter: brightness(0.9);
}

.mm-cm-tab:focus-visible {
  outline: 2px solid #5b8cff;
  outline-offset: 2px;
}

.mm-cm-tab.mm-cm-tab--disabled,
.mm-cm-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  color: #6b7280;
  border-color: #2d3548;
  box-shadow: none;
}

.mm-cm-tab.mm-cm-tab--disabled:hover,
.mm-cm-tab:disabled:hover {
  background: #252a38;
  border-color: #2d3548;
  color: #6b7280;
}

/* Current-matches: same column as .main (36rem), not full viewport */
.header.mm-cm-page-header {
  --mm-cm-stack-gap: 0.5rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
  border-bottom: none;
  padding: 0.35rem 1rem 0;
}

.header.mm-cm-page-header .mm-cm-header-nav {
  margin-bottom: 0.25rem;
}

.mm-cm-header-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
}

.mm-cm-header-nav .mm-nav-link {
  line-height: 1.45;
}

.mm-cm-header-nav__home,
.mm-cm-header-nav__help,
.mm-cm-header-nav__share,
.mm-cm-header-nav__qr {
  flex: 0 0 auto;
}

.mm-cm-header-nav__home,
.mm-cm-header-nav__help,
.mm-cm-header-nav__share,
.mm-cm-header-nav__qr {
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: inherit;
  line-height: 1.45;
  color: #7aa8ff;
  background: transparent;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  min-height: 0;
  width: auto;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.mm-cm-header-nav__home:hover,
.mm-cm-header-nav__help:hover,
.mm-cm-header-nav__share:hover,
.mm-cm-header-nav__qr:hover {
  color: #7aa8ff;
  text-decoration: underline;
  background: transparent;
}

.mm-cm-header-nav__home:active,
.mm-cm-header-nav__home:focus,
.mm-cm-header-nav__help:active,
.mm-cm-header-nav__help:focus,
.mm-cm-header-nav__share:active,
.mm-cm-header-nav__share:focus,
.mm-cm-header-nav__qr:active,
.mm-cm-header-nav__qr:focus {
  background: transparent;
  background-color: transparent;
}

.mm-cm-header-nav__home:focus-visible,
.mm-cm-header-nav__help:focus-visible,
.mm-cm-header-nav__share:focus-visible,
.mm-cm-header-nav__qr:focus-visible {
  outline: 2px solid #5b8cff;
  outline-offset: 2px;
  border-radius: 2px;
}

.mm-cm-header-orig-link {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.45;
  vertical-align: middle;
}

.mm-cm-header-context {
  margin-top: 0.1rem;
  width: 100%;
  box-sizing: border-box;
}

.mm-cm-header-prompt {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #9aa0b0;
}

.mm-cm-header-card-wrap {
  margin: 0;
}

.mm-cm-header-card-root {
  margin: 0;
}

.event-card.mm-event-row--display-only,
.mm-event-row.mm-event-row--display-only {
  cursor: default;
}

.event-card.mm-event-row--display-only:active,
.mm-event-row.mm-event-row--display-only:active {
  background: #1c1f28;
}

.event-card.mm-event-row--display-only:focus-visible,
.mm-event-row.mm-event-row--display-only:focus-visible {
  outline: none;
}

/* Header active event: thumb + title + date (same row markup as list) + lane dots */
.mm-event-row.mm-event-row--header-compact {
  align-items: center;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.mm-event-row.mm-event-row--header-compact .event-card-title {
  margin-bottom: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.mm-event-row.mm-event-row--header-compact .mm-event-row__lanes {
  align-self: center;
}

/* ~30% smaller thumb than list cards (4.5rem → 3.15rem) */
.mm-event-row.mm-event-row--header-compact .event-card-thumb,
.mm-event-row.mm-event-row--header-compact .mm-event-thumb-placeholder {
  width: 3.15rem;
  height: 3.15rem;
}

.mm-event-row.mm-event-row--header-compact .mm-event-thumb-placeholder svg {
  width: 16px;
  height: 16px;
}

.mm-event-row.mm-event-row--header-clear-slug {
  cursor: pointer;
}

.mm-event-row.mm-event-row--display-only.mm-event-row--header-clear-slug:hover {
  border-color: #4a5570;
}

.mm-event-row.mm-event-row--display-only.mm-event-row--header-clear-slug:active {
  background: #252936;
}

.mm-event-row.mm-event-row--display-only.mm-event-row--header-clear-slug:focus-visible {
  outline: 2px solid #5b8cff;
  outline-offset: 2px;
}

.mm-event-row--selected {
  outline: 2px solid #5b8cff;
  outline-offset: 1px;
  border-color: #5b8cff;
}

.mm-event-row--filtered-out {
  display: none !important;
}

.mm-cm-tabpanel-placeholder {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  max-width: 36rem;
}

/* Current matches — harmonogram (kafelki) */
.mm-cm-harmonogram-root {
  min-height: 2rem;
}

.mm-hg-list {
  display: flex;
  flex-direction: column;
}

.mm-hg-day-heading {
  margin: 0;
  padding: 0.4rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #e2e8f0;
  background: linear-gradient(90deg, #1a365d 0%, #2c5282 55%, transparent 100%);
  border-left: 3px solid #63b3ed;
  border-radius: 6px;
}

.mm-hg-card {
  border: 1px solid #2d3748;
  border-radius: 10px;
  overflow: hidden;
  background: #2d3748;
}

.mm-hg-card__meta {
  padding: 0.5rem 0.65rem 0.45rem;
  border-bottom: 1px solid #1a202c;
  background: linear-gradient(180deg, #354456 0%, #2d3748 100%);
}

.mm-hg-card__category {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.mm-hg-card__sub {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: #a0aec0;
  line-height: 1.4;
}

.mm-hg-card__athletes {
  padding: 0.45rem 0.65rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mm-hg-card__athlete {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #e8e8ec;
}

.mm-hg-card__athlete-name {
  font-weight: 600;
}

.mm-hg-card__athlete-club {
  font-weight: 400;
  color: #90cdf4;
  opacity: 0.95;
}

/* Current matches — lista walk */
.mm-cm-toolbar {
  margin: 0 0 var(--mm-cm-stack-gap, 0.5rem);
  font-size: 0.8125rem;
}

.mm-fights {
  display: flex;
  flex-direction: column;
}

.mm-fight {
  border: 1px solid #1a202c;
  border-radius: 10px;
  overflow: hidden;
  background: #2d3748;
}

.mm-fight__topbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem 0;
  padding: 0.45rem 0.65rem 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.mm-fight__topbar-row1 {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  /* column-gap: space between #/time/badges | race | pin+mat */
  gap: 0.4rem 0.45rem;
}

.mm-fight__topbar-mid {
  display: flex;
  max-width: 100%;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  color: #fff;
}

.mm-fight__topbar-wss {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
}

.mm-fight__wss-race {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 0.1rem;
}

/* Keep layout size when WSS not yet active (no jump on first message) */
.mm-fight__wss-race[hidden] {
  display: inline-flex !important;
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.mm-fight__wss-flag {
  display: block;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mm-fight__wss-timer {
  display: flex;
  box-sizing: border-box;
  min-width: 3rem;
  min-height: 1.4rem;
  padding: 0.2rem 0.4rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  background: #000;
  line-height: 1.1;
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #f1f5f9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  text-align: center;
  white-space: nowrap;
}

.mm-fight__topbar-row2 {
  min-width: 0;
}

/* Flag+timer sit just left of pin; spacing from row1 column-gap */
.mm-fight__topbar-right {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  color: #a0aec0;
  font-size: 0.8125rem;
}

.mm-fight__mat-pin {
  display: block;
  flex-shrink: 0;
  opacity: 0.95;
}

.mm-fight__mat-label {
  white-space: nowrap;
}

.mm-fight__fight-num {
  font-weight: 700;
  color: #fff;
}

.mm-fight__top-time {
  font-weight: 600;
  color: #fff;
}

.mm-fight__top-category {
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.8rem;
  line-height: 1.3;
  word-wrap: break-word;
}

.mm-fight__rb {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
}

.mm-fight__rb--round {
  background: #276749;
  color: #f0fff4;
}

/* API roundName: quarter_final / semi_final / final */
.mm-fight__rb--quarter {
  background: #2f855a;
  color: #f0fff4;
  text-transform: none;
  font-weight: 700;
}

.mm-fight__rb--semi {
  background: #2b6cb0;
  color: #ebf8ff;
  text-transform: none;
  font-weight: 700;
}

/* publicFight.bracketType 2 — three-competitor repechage (3CR on martialmatch.com) */
.mm-fight__rb--3cr {
  background: #5b3ea8;
  color: #f3edff;
}

/* Round robin (bracketType 4) */
.mm-fight__rb--rr {
  background: #2f855a;
  color: #f0fff4;
}

.mm-fight__rb--final {
  background: #9b2c2c;
  color: #fff5f5;
  text-transform: none;
  font-weight: 700;
}

.mm-fight__rb--third {
  background: #b7791f;
  color: #fffaf0;
}

.mm-fight__rb--neutral {
  background: #4a5568;
  color: #e2e8f0;
  text-transform: none;
  font-weight: 600;
  font-size: 0.6875rem;
}

/* fightQueueStatuses: 1 — wezwanie / na macie */
.mm-fight__topbar--called {
  background: #744210;
  color: #faf089;
}

.mm-fight__topbar--called .mm-fight__top-category,
.mm-fight__topbar--called .mm-fight__mat-label {
  color: #f6e05e;
}

.mm-fight__topbar--called .mm-fight__topbar-right {
  color: #faf089;
}

/* fightQueueStatuses: 2 — walka trwa */
.mm-fight__topbar--active {
  background: #276749;
  color: #f0fff4;
}

.mm-fight__topbar--active .mm-fight__top-category,
.mm-fight__topbar--active .mm-fight__mat-label {
  color: #c6f6d5;
}

.mm-fight__topbar--active .mm-fight__topbar-right {
  color: #c6f6d5;
}

.mm-fight__topbar--active .mm-fight__rb--round {
  background: #22543d;
  color: #f0fff4;
}

.mm-fight__topbar--active .mm-fight__rb--quarter {
  background: #1c4532;
  color: #f0fff4;
}

.mm-fight__topbar--active .mm-fight__rb--semi {
  background: #2c5282;
  color: #ebf8ff;
}

.mm-fight__topbar--active .mm-fight__rb--final {
  background: #822727;
  color: #fff5f5;
}

.mm-fight__topbar--active .mm-fight__rb--rr {
  background: #1c4532;
  color: #f0fff4;
}

.mm-fight__topbar--active .mm-fight__rb--3cr {
  background: #44337a;
  color: #faf5ff;
}

.mm-fight__topbar--active .mm-fight__rb--neutral {
  background: #22543d;
  color: #e6fffa;
}

/* zaplanowane w kolejce */
.mm-fight__topbar--scheduled {
  background: #2d3748;
  color: #a0aec0;
}

.mm-fight__topbar--scheduled .mm-fight__fight-num,
.mm-fight__topbar--scheduled .mm-fight__top-time {
  color: #fff;
}

.mm-fight__topbar--scheduled .mm-fight__top-category {
  color: #e2e8f0;
}

.mm-fight__body {
  margin: 0;
  padding: 0;
  background: #2d3748;
  border-top: 1px solid #4a5568;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.15);
}

.mm-fight__athlete {
  display: flex;
  min-height: 3rem;
  align-items: stretch;
  border-top: none;
}

.mm-fight__athlete + .mm-fight__athlete {
  border-top: 1px solid #4a5568;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mm-fight__corner {
  width: 4px;
  flex-shrink: 0;
}

.mm-fight__athlete--blue .mm-fight__corner {
  background: #3182ce;
}

.mm-fight__athlete--red .mm-fight__corner {
  background: #e53e3e;
}

/* WSS score tiles: earned (green), attempt/advantage (yellow), penalty (red). */
.mm-fight__wss-pair {
  display: flex;
  box-sizing: border-box;
  flex-shrink: 0;
  align-items: center;
  align-self: stretch;
  gap: 0.3rem;
  margin: 0.35rem 0.4rem 0.35rem 0;
}

.mm-fight__wss-pair[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.mm-fight__wss-tile {
  display: flex;
  box-sizing: border-box;
  min-width: 2.15rem;
  max-width: 2.75rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  line-height: 1.1;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mm-fight__wss-tile--earned {
  color: #f0fff4;
  background: #276749;
}

.mm-fight__wss-tile--attempt {
  color: #fffbea;
  background: #b7791f;
}

.mm-fight__wss-tile--pen {
  color: #fff5f5;
  background: #9b2c2c;
}

.mm-fight__athlete-main {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.2rem 0.55rem 0.5rem;
}

.mm-fight__athlete-line1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mm-fight__flag {
  font-size: 1.05rem;
  line-height: 1;
}

.mm-fight__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.mm-fight__name--placeholder {
  font-weight: 600;
  font-style: italic;
}

.mm-fight__club {
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: #90cdf4;
  line-height: 1.35;
  opacity: 0.92;
}

/* Current matches — filtr uczestników (starting-lists) */
.mm-cm-filter {
  margin-top: 0;
  margin-bottom: var(--mm-cm-stack-gap);
}

.mm-cm-events-toolbar {
  margin-bottom: var(--mm-cm-stack-gap);
}

.mm-cm-filter.is-open:not(.is-hidden) {
  display: flex;
  flex-direction: column;
  gap: var(--mm-cm-stack-gap);
}

.mm-cm-filter.is-open:not(.is-hidden) .mm-cm-events-toolbar {
  margin-bottom: 0;
}

.mm-cm-filter.is-open:not(.is-hidden) .mm-filter-panel:not(.is-hidden) {
  margin-top: 0;
}

.mm-cm-events-toolbar__actions {
  display: flex;
  min-width: 0;
  align-items: stretch;
}

.mm-cm-events-toolbar__actions > .mm-change-active-event-btn,
.mm-cm-events-toolbar__actions > .mm-filter-main-btn {
  flex: 1;
  width: 100%;
  min-width: 0;
}

.mm-change-active-event-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  color: #e8e8ec;
  background: #2a3248;
  border: 1px solid #3d4a66;
  border-radius: 8px;
  cursor: pointer;
  min-height: 2.75rem;
  box-sizing: border-box;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.mm-change-active-event-btn:hover {
  background: #343d56;
}

.mm-change-active-event-btn:active {
  background: #343d56;
}

.mm-change-active-event-btn:focus-visible {
  outline: 2px solid #5b8cff;
  outline-offset: 2px;
}

.mm-filter-main-btn--tab-fights {
  width: 100%;
}

.mm-filter-main-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e8e8ec;
  background: #2a3248;
  border: 1px solid #3d4a66;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mm-filter-main-btn__label {
  min-width: 0;
  text-align: left;
}

.mm-filter-main-btn__chevron {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: #a8b8d8;
  transition: transform 0.2s ease;
}

.mm-cm-filter.is-open .mm-filter-main-btn__chevron {
  transform: rotate(180deg);
}

.mm-filter-main-btn__chevron-svg {
  display: block;
}

.mm-filter-main-btn:active {
  background: #343d56;
}

.mm-filter-main-btn:focus-visible {
  outline: 2px solid #5b8cff;
  outline-offset: 2px;
}

.mm-filter-main-btn.mm-filter-main-btn--compact {
  width: 100%;
  max-width: 100%;
  min-height: 2.75rem;
  box-sizing: border-box;
  justify-content: space-between;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.mm-filter-panel:not(.is-hidden) {
  display: flex;
  flex-direction: column;
  gap: var(--mm-cm-stack-gap);
  margin-top: var(--mm-cm-stack-gap);
}

.mm-filter-panel-body {
  display: flex;
  flex-direction: column;
  gap: var(--mm-cm-stack-gap);
  min-width: 0;
}

.mm-filter-panel .mm-filter-scroll {
  margin-top: 0;
}

.mm-filter-panel-status {
  margin: 0;
  font-size: 0.8125rem;
}

.mm-filter-panel-status:empty {
  display: none;
}

.mm-filter-panel-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #a0aec0;
}

.mm-filter-panel-hint.is-hidden {
  display: none;
}

/* Events tab: while all starting lists load, only progress + hint (no list / apply). */
.mm-cm-filter.mm-cm-filter--aggregate-loading .mm-filter-panel-body {
  display: none !important;
}

.mm-cm-filter.mm-cm-filter--aggregate-loading .mm-filter-mobile-bar {
  display: none !important;
}

.mm-filter-search-wrap {
  margin: 0;
}

.mm-filter-search-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  padding: 0.45rem 0.6rem;
  font: inherit;
  /* 16px avoids iOS WebKit auto-zoom on focus (all browsers on iPhone). */
  font-size: 16px;
  color: #e8e8ec;
  background: #1a1d26;
  border: 1px solid #3d4a66;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}

.mm-filter-search-input::placeholder {
  color: #7a8499;
}

.mm-filter-search-input:focus {
  outline: none;
  border-color: #5b8cff;
  box-shadow: 0 0 0 1px rgba(91, 140, 255, 0.35);
}

.mm-filter-search-input:focus-visible {
  outline: 2px solid #5b8cff;
  outline-offset: 2px;
}

.mm-filter-club-jump-wrap {
  position: relative;
  z-index: 5;
  margin: 0;
}

.mm-filter-toolbar-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.28rem;
  width: 100%;
}

.mm-filter-toolbar-row__club {
  flex: 0 0 auto;
  min-width: 0;
}

.mm-filter-toolbar-row__club.is-hidden {
  display: none;
}

.mm-filter-only-favorites {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 2.125rem;
  padding: 0.35rem 0.4rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #c4d0e8;
  line-height: 1.2;
  background: #252a38;
  border: 1px solid #3d4a66;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mm-filter-only-favorites input {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #5ecf8f;
}

.mm-filter-only-favorites__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-filter-only-favorites__text--short {
  display: none;
}

.mm-filter-only-selected {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 2.125rem;
  padding: 0.35rem 0.4rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #c4d0e8;
  line-height: 1.2;
  background: #252a38;
  border: 1px solid #3d4a66;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mm-filter-only-selected input {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #5ecf8f;
}

.mm-filter-only-selected__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-filter-only-selected__text--short {
  display: none;
}

@media (max-width: 360px) {
  .mm-filter-only-favorites__text--long {
    display: none;
  }

  .mm-filter-only-favorites__text--short {
    display: inline;
  }

  .mm-filter-only-selected__text--long {
    display: none;
  }

  .mm-filter-only-selected__text--short {
    display: inline;
  }
}

.mm-filter-club-jump {
  position: relative;
  min-width: 0;
  width: auto;
}

.mm-filter-club-jump__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  width: auto;
  max-width: 100%;
  padding: 0.35rem 0.4rem;
  min-height: 2.125rem;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #c4efd8;
  text-align: left;
  background: #1e3028;
  border: 1px solid #356b52;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mm-filter-club-jump__toggle-label {
  min-width: 0;
}

.mm-filter-club-jump__chevron {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: #9ed9b8;
  transition: transform 0.2s ease;
}

.mm-filter-club-jump.is-open .mm-filter-club-jump__chevron {
  transform: rotate(180deg);
}

.mm-filter-club-jump__chevron-svg {
  display: block;
}

.mm-filter-club-jump__toggle:active {
  background: #263d32;
}

.mm-filter-club-jump__toggle:focus-visible {
  outline: 2px solid #5ecf8f;
  outline-offset: 2px;
}

.mm-filter-club-jump__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 25;
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  max-height: min(40vh, 14rem);
  overflow-y: auto;
  background: #1e3028;
  border: 3px solid #3d8f62;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(80, 200, 130, 0.25),
    0 10px 28px rgba(0, 0, 0, 0.45);
}

.mm-filter-club-jump__option {
  margin: 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #d8f0e4;
  cursor: pointer;
  border-bottom: 1px solid #2d5c45;
}

.mm-filter-club-jump__option:last-child {
  border-bottom: none;
}

.mm-filter-club-jump__option:active {
  background: #263d32;
}

.mm-filter-only-empty-hint {
  margin: 0;
  padding: 0.5rem 0.6rem 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.mm-filter-scroll {
  max-height: min(70vh, 28rem);
  overflow-y: auto;
  border: 3px solid #2a2e3a;
  border-radius: 10px;
  background: #161922;
}

.mm-filter-sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.5rem 0.6rem;
  background: linear-gradient(180deg, #161922 85%, transparent);
}

.mm-filter-actions-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: stretch;
  width: 100%;
}

.mm-filter-actions-row > .mm-filter-apply-btn,
.mm-filter-actions-row > .mm-filter-clear-action-btn {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}

.mm-filter-clear-action-btn {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e8e8ec;
  text-align: center;
  line-height: 1.2;
  background: #3d4a66;
  border: 1px solid #5a6a8a;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mm-filter-clear-action-btn:active {
  background: #4a5878;
}

.mm-filter-clear-action-btn:focus-visible {
  outline: 2px solid #5b8cff;
  outline-offset: 2px;
}

/* Mobile (Galaxy-class): jedna Apply przyklejona do dołu viewport — patrz .mm-filter-mobile-bar */
@media (max-width: 40rem) {
  .mm-filter-sticky--desktop {
    display: none;
  }

  .mm-filter-panel:not(.is-hidden) .mm-filter-scroll {
    max-height: min(58dvh, calc(100dvh - 13rem));
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .mm-filter-panel:not(.is-hidden) .mm-filter-list-root {
    /* miejsce pod fixed bar + safe area (ok. wysokość przycisku + paddingi paska) */
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }

  .mm-filter-mobile-bar:not(.is-hidden) {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    padding: 0.5rem 1rem;
    padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: #1a1d26;
    border-top: 1px solid #2a2e3a;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.45);
  }

  /*
   * Full-viewport filter (mobile): collapse + search + club fixed at top,
   * participant list scrolls in the middle, Clear/Apply fixed at bottom.
   * Tabs and tab panels are hidden while the filter is open (:has).
   */
  body:has(#mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden)) {
    overflow: hidden;
  }

  #mm-cm-content:has(#mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden))
    > .mm-cm-tabs,
  #mm-cm-content:has(#mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden))
    > .mm-cm-tabpanel {
    display: none !important;
  }

  #mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden) {
    position: fixed;
    inset: 0;
    z-index: 250;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    padding-top: calc(env(safe-area-inset-top, 0px) + 0.45rem);
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: var(--mm-cm-stack-gap);
    overflow: hidden;
    background: #12141a;
  }

  #mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden) .mm-cm-events-toolbar {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  #mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden) .mm-filter-main-btn {
    flex-shrink: 0;
  }

  #mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden) #mm-filter-panel:not(.is-hidden) {
    flex: 1 1 0;
    min-height: 0;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: var(--mm-cm-stack-gap);
    overflow: hidden;
  }

  #mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden)
    #mm-filter-panel
    > .mm-filter-panel-status,
  #mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden)
    #mm-filter-panel
    > .mm-filter-panel-hint {
    flex-shrink: 0;
  }

  #mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden) #mm-filter-panel-body {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden) .mm-filter-scroll {
    flex: 1 1 0;
    min-height: 0;
    margin-top: 0;
    max-height: none !important;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
  }

  #mm-cm-filter-root.mm-cm-filter.is-open:not(.is-hidden) .mm-filter-mobile-bar:not(.is-hidden) {
    z-index: 260;
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }
}

@media (min-width: 40.0625rem) {
  .mm-filter-mobile-bar {
    display: none !important;
  }
}

.mm-filter-apply-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0e1218;
  background: #7aa8ff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.mm-filter-apply-btn:active {
  filter: brightness(0.95);
}

.mm-filter-apply-btn:focus-visible {
  outline: 2px solid #c4d8ff;
  outline-offset: 2px;
}

/* Current matches — fullscreen Help dialog */
body.mm-cm-help-open {
  overflow: hidden;
}

.mm-cm-help.is-hidden {
  display: none !important;
}

.mm-cm-help:not(.is-hidden) {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: #12141a;
  padding-top: env(safe-area-inset-top, 0px);
}

.mm-cm-help__scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0.85rem max(1rem, env(safe-area-inset-right, 0px)) 0.5rem
    max(1rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.mm-cm-help__title {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #e8e8ec;
}

.mm-cm-help__lead {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #c8cdd8;
}

.mm-cm-help__heading {
  margin: 1.1rem 0 0.45rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #e2e8f0;
}

.mm-cm-help__list {
  margin: 0 0 0.65rem;
  padding-left: 1.15rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #c8cdd8;
}

.mm-cm-help__list--ordered {
  padding-left: 1.35rem;
}

.mm-cm-help__list li + li {
  margin-top: 0.35rem;
}

.mm-cm-help__lane-list {
  list-style: none;
  padding-left: 0.15rem;
}

.mm-cm-help__lane-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.mm-cm-help__lane-list .mm-event-lane-slot {
  flex-shrink: 0;
  margin-top: 0.15em;
}

.mm-cm-help__dl {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #c8cdd8;
}

.mm-cm-help__dl dt {
  margin: 0.65rem 0 0.15rem;
  font-weight: 700;
  color: #e2e8f0;
}

.mm-cm-help__dl dt:first-child {
  margin-top: 0;
}

.mm-cm-help__dl dd {
  margin: 0;
}

.mm-cm-help__note {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #9aa0b0;
}

.mm-cm-help p {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #c8cdd8;
}

.mm-cm-help__link {
  color: #7aa8ff;
  text-decoration: none;
}

.mm-cm-help__link:hover {
  text-decoration: underline;
}

.mm-cm-help__footer {
  margin-top: 1rem !important;
  padding-top: 0.75rem;
  border-top: 1px solid #2a2e3a;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #b8c0d0;
}

.mm-cm-help__bar {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
  padding: 0.5rem max(1rem, env(safe-area-inset-right, 0px))
    calc(0.55rem + env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
  background: #1a1d26;
  border-top: 1px solid #2a2e3a;
  box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.45);
}

.mm-cm-help__bar .mm-cm-help__close {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.mm-cm-help code {
  font-size: 0.8125em;
  padding: 0.08em 0.3em;
  background: #2a2e3a;
  border-radius: 4px;
  color: #dbeafe;
}

/* Current matches — QR code fullscreen dialog (extends .mm-cm-help shell) */
.mm-cm-qr__body {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0.85rem max(1rem, env(safe-area-inset-right, 0px)) 0.5rem
    max(1rem, env(safe-area-inset-left, 0px));
  text-align: center;
}

.mm-cm-qr__title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #e8e8ec;
}

.mm-cm-qr__lead {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #c8cdd8;
  max-width: 22rem;
}

.mm-cm-qr__lead.is-hidden {
  display: none !important;
}

.mm-cm-qr__notice {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #fcd34d;
  max-width: 22rem;
}

.mm-cm-qr__notice.is-hidden {
  display: none !important;
}

.mm-cm-qr__canvas {
  display: block;
  width: min(85vw, 18rem);
  height: auto;
  max-height: min(55vh, 18rem);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.mm-cm-qr__error {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #fca5a5;
  max-width: 22rem;
}

.mm-cm-qr__error.is-hidden {
  display: none !important;
}

.mm-filter-list-root {
  padding: 0.35rem 0.6rem 0.65rem;
}

.mm-filter-club {
  margin-top: 0.65rem;
  scroll-margin-top: 0.35rem;
}

.mm-filter-club:first-child {
  margin-top: 0;
}

@media (min-width: 40.0625rem) {
  .mm-filter-club {
    scroll-margin-top: 3.75rem;
  }
}

.mm-filter-club-name {
  margin: 0 0 0.45rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #b8d4ff;
  background: rgba(90, 140, 255, 0.14);
  border-left: 3px solid #6d9ef7;
  border-radius: 0 8px 8px 0;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.mm-filter-club-name--with-select {
  padding: 0.4rem 0.55rem;
}

.mm-filter-club-name__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  cursor: default;
}

.mm-filter-club-name__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mm-filter-club-name__check-wrap {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding-top: 0.05rem;
}

.mm-filter-club-name__check-wrap input[type="checkbox"] {
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  accent-color: #7aa8ff;
  cursor: pointer;
}

.mm-filter-club-name__label--club-locked {
  cursor: default;
}

.mm-filter-club-name__label--club-locked .mm-filter-club-name__check-wrap input[type="checkbox"] {
  cursor: not-allowed;
  opacity: 0.52;
  accent-color: #64748b;
}

.mm-filter-club-name--all-dq-no-payment .mm-filter-club-name__dq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  min-height: 1.3rem;
}

.mm-filter-club-name__title {
  flex: 1;
  min-width: 0;
}

.mm-cm-slug-line {
  word-break: break-word;
}

.mm-cm-slug {
  font-size: 0.8125rem;
  color: #9ec0ff;
}

.mm-filter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.5rem;
  align-items: start;
  padding: 0.45rem 0;
  border-bottom: 1px solid #252936;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.mm-filter-row:last-child {
  border-bottom: none;
}

.mm-filter-row__text {
  min-width: 0;
  color: #d8dbe6;
}

.mm-filter-row__name {
  font-weight: 500;
  color: #f2f2f6;
}

.mm-filter-row__meta {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: #8b92a8;
}

.mm-filter-row__controls {
  display: flex;
  flex-shrink: 0;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.35rem;
  padding-top: 0.05rem;
}

.mm-filter-row__favorite-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  margin: 0;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
  color: #9aa3bc;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mm-filter-row__favorite-btn.is-active {
  color: #f0c040;
}

/* Filled favorite star in labels (filter toolbar, Help) — matches active row star */
.mm-fav-star-mark {
  color: #f0c040;
  font-weight: 700;
}

.mm-filter-row__favorite-btn:focus-visible {
  outline: 2px solid #7aa8ff;
  outline-offset: 1px;
}

.mm-filter-row__favorite-icon {
  display: block;
  line-height: 1;
}

.mm-filter-row__check {
  padding-top: 0.15rem;
}

.mm-filter-row__check-with-dq {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.mm-filter-row__check input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #7aa8ff;
  cursor: pointer;
}

.mm-filter-row--dq-no-payment .mm-filter-row__name {
  color: #c4c8d4;
}

.mm-filter-row__dq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  min-height: 1.25rem;
}

.mm-filter-row__dq-svg {
  display: block;
  flex-shrink: 0;
}

/* Tylko zaznaczone — pewne ukrycie mimo display:grid na wierszu (np. WebView) */
.mm-filter-row.mm-filter-row--filter-hidden {
  display: none !important;
}

.mm-filter-row.mm-filter-row--search-hidden {
  display: none !important;
}

.mm-filter-club.mm-filter-club--filter-hidden {
  display: none !important;
}

/* PWA install — fixed below header, above list content */
.mm-pwa-install {
  position: fixed;
  right: max(0.5rem, env(safe-area-inset-right, 0px));
  z-index: 30;
  margin: 0;
  padding: 0.4rem 0.75rem;
  min-height: 2.75rem;
  min-width: 5.5rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: #5b8cff;
  border: 1px solid #4a7ae8;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease,
    filter 0.1s ease;
}

.mm-pwa-install:hover {
  background: #6b9aff;
  border-color: #5b8cff;
}

.mm-pwa-install:active {
  transform: scale(0.98);
  filter: brightness(0.92);
}

.mm-pwa-install:focus-visible {
  outline: 2px solid #90cdf4;
  outline-offset: 2px;
}

.mm-pwa-install[hidden] {
  display: none !important;
}
