/* FENIKS wyniki — widok mobilny. Kolor akcentu: .wl-app { --wl-accent: #... } w „Dodatkowy CSS”. */
.wl-app {
  --wl-accent: #e9b230;
  --wl-ink: #17181c;
  --wl-muted: #6b6f78;
  --wl-line: #e7e8ec;
  --wl-bg: #ffffff;
  --wl-soft: #f5f6f8;
  --wl-gold: #f2c94c;
  --wl-silver: #c9ced6;
  --wl-bronze: #d9a37a;
  --wl-top: 0px; /* ustaw, jeśli motyw ma przyklejony nagłówek, np. 60px */
  color: var(--wl-ink);
  background: var(--wl-bg);
  font-size: 16px;
  line-height: 1.35;
  max-width: 760px;
  margin: 0 auto;
  -webkit-text-size-adjust: 100%;
  font-variant-numeric: tabular-nums;
}
.wl-app *, .wl-app *::before, .wl-app *::after { box-sizing: border-box; }
.wl-app button, .wl-app input, .wl-app select {
  font: inherit; color: inherit; margin: 0; letter-spacing: normal; text-transform: none; box-shadow: none;
}
.wl-app button { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* nagłówek */
.wl-head { padding: 14px 16px 10px; }
.wl-title { font-size: 1.35em; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.wl-meta { margin-top: 6px; color: var(--wl-muted); font-size: .85em; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.wl-meta b { font-weight: 400; opacity: .5; }
.wl-live { display: inline-flex; align-items: center; gap: 6px; color: #12813b; font-weight: 600; }
.wl-live i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: wl-pulse 1.6s infinite; }
.wl-live.is-off { color: #b42318; }
.wl-live.is-off i { animation: none; }
.wl-final { color: var(--wl-ink); font-weight: 600; }
@keyframes wl-pulse { 0% { box-shadow: 0 0 0 0 rgba(18,129,59,.45); } 70% { box-shadow: 0 0 0 7px rgba(18,129,59,0); } 100% { box-shadow: 0 0 0 0 rgba(18,129,59,0); } }

/* przyklejony pasek: szukaj + zakładki */
.wl-bar {
  position: sticky; top: var(--wl-top); z-index: 20;
  background: var(--wl-bg);
  padding: 6px 0 0;
  border-bottom: 1px solid var(--wl-line);
}
body.admin-bar .wl-bar { top: calc(var(--wl-top) + 46px); }
@media (min-width: 783px) { body.admin-bar .wl-bar { top: calc(var(--wl-top) + 32px); } }

.wl-search { position: relative; margin: 0 16px 8px; }
.wl-search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: var(--wl-muted); pointer-events: none; }
.wl-search input {
  width: 100%; height: 46px; padding: 0 44px 0 40px;
  border: 1.5px solid var(--wl-line); border-radius: 12px; background: var(--wl-soft);
  font-size: 16px; /* 16px = iPhone nie powiększa strony */
  outline: none; -webkit-appearance: none; appearance: none;
}
.wl-search input:focus { border-color: var(--wl-accent); background: var(--wl-bg); }
.wl-search input::-webkit-search-cancel-button { display: none; }
.wl-clear {
  position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; border-radius: 10px;
  background: transparent; font-size: 24px; line-height: 1; color: var(--wl-muted); visibility: hidden; padding: 0;
}

.wl-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.wl-tabs::-webkit-scrollbar { display: none; }
.wl-tabs button {
  flex: 0 0 auto; scroll-snap-align: start;
  height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--wl-line); background: var(--wl-bg);
  font-size: .9em; font-weight: 600; white-space: nowrap; color: var(--wl-ink);
}
.wl-tabs button.is-on { background: var(--wl-ink); border-color: var(--wl-ink); color: #fff; }
.wl-tabs button.has-err { border-style: dashed; }
.wl-tabs small { font-size: .8em; opacity: .7; margin-left: 2px; }

/* filtry */
.wl-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 2px; }
.wl-filters:empty { display: none; }
.wl-sel { flex: 1 1 140px; position: relative; }
.wl-sel select {
  width: 100%; height: 40px; padding: 0 30px 0 12px; border-radius: 10px;
  border: 1.5px solid var(--wl-line); background: var(--wl-bg); font-size: 15px;
  -webkit-appearance: none; appearance: none;
}
.wl-sel::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border-right: 2px solid var(--wl-muted); border-bottom: 2px solid var(--wl-muted); transform: rotate(45deg); pointer-events: none; }

/* lista */
.wl-list { padding: 6px 0 8px; }
.wl-count, .wl-empty, .wl-hint { padding: 6px 16px; margin: 0; color: var(--wl-muted); font-size: .88em; }
.wl-empty { padding: 28px 16px; text-align: center; font-size: .95em; }

.wl-row { border-bottom: 1px solid var(--wl-line); outline: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wl-row:focus-visible { box-shadow: inset 0 0 0 2px var(--wl-accent); }
.wl-row.is-new { animation: wl-new 2.4s ease-out; }
@keyframes wl-new { 0% { background: #fff1d6; } 100% { background: transparent; } }
.wl-row.is-fav .wl-name::after { content: " ★"; color: var(--wl-accent); }

.wl-main { display: flex; align-items: center; gap: 12px; padding: 11px 16px; min-height: 60px; }
.wl-place {
  flex: 0 0 34px; height: 34px; border-radius: 10px; background: var(--wl-soft);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95em;
}
.wl-place:empty { background: transparent; }
.wl-place.m1 { background: var(--wl-gold); }
.wl-place.m2 { background: var(--wl-silver); }
.wl-place.m3 { background: var(--wl-bronze); }
.wl-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.wl-name { font-size: 1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-name b { font-weight: 700; }
.wl-sub { color: var(--wl-muted); font-size: .8em; margin-top: 1px; }
.wl-res { flex: 0 0 auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.wl-time { font-weight: 800; font-size: 1.05em; letter-spacing: -.01em; }
.wl-pts { font-size: .75em; color: var(--wl-muted); margin-top: 1px; }
.wl-status { font-weight: 700; font-size: .85em; color: #b42318; }
.wl-wait { color: var(--wl-muted); }

.wl-det { display: none; padding: 0 16px 14px 62px; }
.wl-row.is-open { background: var(--wl-soft); }
.wl-row.is-open .wl-det { display: block; }
.wl-row.is-open .wl-name, .wl-row.is-open .wl-sub { white-space: normal; }
.wl-det dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 14px; }
.wl-det dl > div { min-width: 0; }
.wl-det dt { font-size: .72em; text-transform: uppercase; letter-spacing: .04em; color: var(--wl-muted); margin: 0; }
.wl-det dd { margin: 1px 0 0; font-weight: 600; font-size: .95em; }
.wl-det dd small { font-weight: 400; color: var(--wl-muted); }
.wl-act { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.wl-act button {
  height: 38px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--wl-line);
  background: var(--wl-bg); font-size: .88em; font-weight: 600;
}
.wl-act .wl-star { color: var(--wl-accent); border-color: currentColor; }

.wl-app .wl-more {
  display: block; width: calc(100% - 32px); margin: 14px 16px 6px; height: 44px;
  border: 1.5px dashed var(--wl-line); border-radius: 12px; background: transparent;
  color: var(--wl-muted); font-weight: 600;
}

/* zakładki-tabele (np. klasyfikacja szkół) */
.wl-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 4px 0 0; }
.wl-table { border-collapse: separate; border-spacing: 0; font-size: .85em; min-width: 100%; margin: 0; }
.wl-table th, .wl-table td { padding: 8px 10px; border: 0; border-bottom: 1px solid var(--wl-line); text-align: center; white-space: nowrap; background: var(--wl-bg); }
.wl-table thead th { font-size: .82em; font-weight: 700; color: var(--wl-muted); white-space: normal; min-width: 64px; vertical-align: bottom; }
.wl-table th[scope=row], .wl-table thead th:first-child { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 700; box-shadow: 1px 0 0 var(--wl-line); }
.wl-table tr.is-sum th, .wl-table tr.is-sum td { font-weight: 800; background: var(--wl-soft); }

.wl-foot { padding: 12px 16px 20px; color: var(--wl-muted); font-size: .78em; text-align: center; }
.wl-foot:empty { display: none; }

@media (min-width: 640px) {
  .wl-head { padding: 20px 16px 12px; }
  .wl-title { font-size: 1.6em; }
  .wl-main:hover { background: var(--wl-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .wl-live i, .wl-row.is-new { animation: none; }
}

/* klasyfikacja szkół */
.wl-seg { display: flex; width: 100%; padding: 3px; border-radius: 12px; background: var(--wl-soft); gap: 3px; }
.wl-seg button { flex: 1 1 0; height: 38px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; font-size: .92em; color: var(--wl-muted); }
.wl-seg button.is-on { background: var(--wl-bg); color: var(--wl-ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.wl-who-list { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--wl-line); }
.wl-who-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--wl-line); font-size: .9em; }
.wl-who-list small { color: var(--wl-muted); }
.wl-who-list b { flex: 0 0 auto; }
.wl-wins { color: var(--wl-ink); font-weight: 600; }

/* komputer (mysz): wszystkie zakładki widoczne naraz, w kilku rzędach */
@media (hover: hover) and (pointer: fine) {
  .wl-tabs { flex-wrap: wrap; overflow: visible; scroll-snap-type: none; }
}

/* biegi masowe: przełącznik widoku, podium kategorii, stronicowanie */
.wl-seg-view { flex: 1 1 100%; }
.wl-pod { margin: 6px 0 14px; }
.wl-pod h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0; padding: 12px 16px 6px; font-size: 1em; font-weight: 800; border-bottom: 2px solid var(--wl-ink); }
.wl-pod h3 small { font-size: .78em; font-weight: 500; color: var(--wl-muted); }
.wl-app .wl-pod-all { display: block; margin: 0 0 0 auto; padding: 8px 16px; border: 0; background: transparent; color: var(--wl-accent); font-weight: 700; font-size: .9em; }
.wl-app .wl-next {
  display: block; width: calc(100% - 32px); margin: 14px 16px 6px; height: 46px;
  border: 1.5px solid var(--wl-ink); border-radius: 12px; background: var(--wl-bg); font-weight: 700;
}
.wl-app .wl-act .wl-dip { background: var(--wl-ink); border-color: var(--wl-ink); color: #fff; }

/* przycisk „Pobierz aplikację” nad wynikami (strony WordPress) */
.wl-getapp {
  --wl-accent: #e9b230;
  display: flex; align-items: center; gap: 12px;
  max-width: 760px; margin: 0 auto 16px; padding: 12px 14px;
  border-radius: 16px; background: #fff7f0; border: 1.5px solid var(--wl-accent);
  color: #17181c !important; text-decoration: none !important; box-shadow: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px; line-height: 1.3; -webkit-tap-highlight-color: transparent;
}
.wl-getapp-ico img { display: block; width: 44px; height: 44px; border-radius: 11px; }
.wl-getapp-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.wl-getapp-txt b { font-weight: 800; }
.wl-getapp-txt small { font-size: .82em; color: #6b6f78; margin-top: 2px; }
.wl-getapp-btn {
  flex: 0 0 auto; padding: 9px 16px; border-radius: 999px;
  background: var(--wl-accent); color: #fff; font-weight: 800; font-size: .9em;
}
.wl-getapp:hover .wl-getapp-btn { filter: brightness(1.08); }
@media (display-mode: standalone) { .wl-getapp { display: none; } }
.wl-app > .wl-getapp { margin: 12px 16px 4px; }

/* status „Przyszłe” */
.wl-soon { color: #1d5fbf; font-weight: 600; }
.wl-soonbox { margin: 12px 16px 6px; padding: 14px 16px; border-radius: 14px; background: #eef4fd; color: #17181c; display: flex; flex-direction: column; gap: 4px; line-height: 1.4; }
.wl-soonbox span { color: #4a4f59; font-size: .92em; }
.wl-tabs .wl-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #12813b; margin-right: 6px; vertical-align: 1px; }
.wl-tabs button.is-on .wl-dot { background: #4ade80; }

/* numer startowy — duża plakietka obok nazwiska i imienia */
.wl-bib {
  display: inline-block; min-width: 2.3em; margin-right: 8px; padding: 1px 6px;
  border: 2px solid var(--wl-ink); border-radius: 7px;
  font-weight: 800; font-size: 1.05em; line-height: 1.25; text-align: center;
  letter-spacing: -.01em; vertical-align: 1px; background: var(--wl-bg);
}
.wl-row.is-open .wl-bib { background: var(--wl-bg); }
.wl-who-list .wl-bib { font-size: .9em; padding: 0 4px; margin-right: 6px; border-width: 1.5px; }

/* przycisk PDF w nagłówku */
.wl-head { position: relative; }
.wl-app .wl-pdf {
  float: right; display: inline-flex; align-items: center; gap: 5px; margin: 2px 0 6px 10px;
  height: 34px; padding: 0 11px; border-radius: 10px; border: 1.5px solid var(--wl-line); background: var(--wl-bg);
  font-size: .85em; font-weight: 700; color: var(--wl-ink);
}
.wl-app .wl-pdf svg { width: 18px; height: 18px; }

/* wydruk / PDF */
.wl-print { display: none; }
@media print {
  @page { size: A4; margin: 12mm 12mm 14mm; }
  body.wl-printing > *:not(.wl-print) { display: none !important; }
  body.wl-printing { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  body.wl-printing .wl-print { display: block; color: #000; font: 10pt/1.35 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
  .wl-print header { border-bottom: 2px solid #000; padding-bottom: 3mm; margin-bottom: 4mm; }
  .wl-print h1 { font-size: 16pt; margin: 0 0 1mm; }
  .wl-print header p { margin: 0; font-size: 10.5pt; }
  .wl-print .wlp-note { color: #555; font-size: 9pt; margin-top: 1mm; }
  .wl-print h2 { font-size: 12pt; margin: 5mm 0 2mm; break-after: avoid; }
  .wl-print section.wlp-break { break-before: page; }
  .wl-print table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
  .wl-print th { text-align: left; font-size: 8.5pt; text-transform: uppercase; letter-spacing: .03em; color: #444; border-bottom: 1.5px solid #000; padding: 1.5mm 2mm; }
  .wl-print td { border-bottom: .3mm solid #ccc; padding: 1.4mm 2mm; vertical-align: top; }
  .wl-print tr { break-inside: avoid; }
  .wl-print thead { display: table-header-group; }
  .wl-print td:first-child, .wl-print th:first-child { width: 12mm; }
  .wl-print table.wlp-start td:nth-child(2) { font-weight: 800; font-size: 12pt; }
  .wl-print footer { margin-top: 6mm; font-size: 8pt; color: #666; }
}

/* ===== kolorystyka strony Feniksa (grafit #141210, złoto #E9B230, krem #F8F5EF; Bebas Neue + Barlow) ===== */
.wl-app {
  --wl-accent: #e9b230;
  --wl-dark: #141210;
  --wl-ink: #141210;
  --wl-muted: #7a6f66;
  --wl-line: #ebe4d8;
  --wl-bg: #ffffff;
  --wl-soft: #f8f5ef;
  --wl-gold: #e9b230;
  --wl-silver: #cfd2d6;
  --wl-bronze: #d39b6a;
  font-family: Barlow, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  border-radius: 18px;
}
.wl-title { font-family: "Bebas Neue", Barlow, sans-serif; font-weight: 400; font-size: 2.1em; letter-spacing: .5px; line-height: 1; }
.wl-head { border-top: 6px solid var(--wl-accent); border-radius: 18px 18px 0 0; }
body.wla .wl-head { border-top: 0; border-radius: 0; }
.wl-tabs button { font-weight: 700; border-color: var(--wl-line); }
.wl-tabs button.is-on { background: var(--wl-dark); border-color: var(--wl-dark); color: var(--wl-accent); }
.wl-tabs button.is-on .wl-dot { background: var(--wl-accent); }
.wl-search input { background: var(--wl-soft); border-color: var(--wl-line); }
.wl-place { background: var(--wl-soft); }
.wl-place.m1 { background: var(--wl-gold); color: var(--wl-dark); }
.wl-row.is-open { background: var(--wl-soft); }
.wl-time { font-weight: 800; }
.wl-app .wl-act button { border-radius: 999px; }
.wl-app .wl-act .wl-star { color: var(--wl-dark); background: var(--wl-accent); border-color: var(--wl-accent); }
.wl-app .wl-act .wl-dip { background: var(--wl-dark); border-color: var(--wl-dark); color: var(--wl-accent); }
.wl-row.is-fav .wl-name::after { color: #b8860b; }
.wl-pod h3 { font-family: "Bebas Neue", Barlow, sans-serif; font-weight: 400; font-size: 1.45em; letter-spacing: .5px; border-bottom: 3px solid var(--wl-accent); }
.wl-pod h3 small { font-family: Barlow, sans-serif; letter-spacing: 0; }
.wl-app .wl-pod-all { color: var(--wl-dark); text-decoration: underline; text-decoration-color: var(--wl-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.wl-app .wl-next { border-radius: 999px; background: var(--wl-accent); border-color: var(--wl-accent); color: var(--wl-dark); }
.wl-app .wl-more { border-radius: 999px; }
.wl-seg button.is-on { color: var(--wl-dark); box-shadow: inset 0 -3px 0 var(--wl-accent), 0 1px 3px rgba(0,0,0,.1); }
.wl-soon { color: #9a6c00; }
.wl-soonbox { background: #fbf3dc; border-left: 4px solid var(--wl-accent); border-radius: 12px; }
.wl-bib { border-color: var(--wl-dark); }
.wl-app .wl-pdf { border-radius: 999px; border-color: var(--wl-dark); }
.wl-row:focus-visible { box-shadow: inset 0 0 0 2px var(--wl-dark); }
/* przycisk „Pobierz aplikację” jak sekcja na górze strony: grafit + złoto */
.wl-getapp { background: var(--wl-dark, #141210); border-color: var(--wl-dark, #141210); color: #fff !important; border-radius: 18px; font-family: Barlow, system-ui, sans-serif; }
.wl-getapp-txt b { color: #fff; }
.wl-getapp-txt small { color: #cfc6b8; }
.wl-getapp-btn { background: var(--wl-accent); color: var(--wl-dark, #141210); border-radius: 999px; }
.wl-getapp-ico img { border-radius: 11px; box-shadow: 0 0 0 1.5px rgba(233,178,48,.5); }
