:root {
  --bg: #f4f4f1;
  --card: #ffffff;
  --ink: #111111;
  --muted: #666660;
  --line: #e2e2dc;
  --black: #0d0d0d;
  --yellow: #f5c400;
  --yellow-ink: #1a1500;
  --blue: #1f5fbf;
  --ok: #1d7a3a;
  --bad: #b3261e;
  --radius: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.wrap { width: min(100% - 32px, 1040px); margin-inline: auto; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h2 { font-size: 1.25rem; margin-top: 28px; }
h1 .sub, h2 .sub { font-weight: 400; color: var(--muted); font-size: 0.9rem; margin-left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
button { font: inherit; cursor: pointer; }
.link { background: none; border: 0; color: inherit; text-decoration: underline; padding: 0; }

/* Nagłówek */
.top { background: var(--black); color: #fff; position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.logo-t { font-weight: 900; font-style: italic; font-size: 2rem; letter-spacing: -1px; color: #fff; text-shadow: 3px 3px 0 var(--yellow); line-height: 1; }
.logo-sub { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.15; color: #ddd; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: #eee; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; }
.nav a.on { background: #fff; color: var(--black); }
.nav a.nav-ref { background: var(--yellow); color: var(--yellow-ink); }
.demo-bar { font-size: 0.85rem; color: var(--muted); padding: 8px 0; }

main { padding: 12px 0 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1.4fr 1fr; } .grid-eq { grid-template-columns: 1fr 1fr; } }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* Hero */
.hero { background: var(--black); color: #fff; border-radius: 16px; padding: clamp(20px, 4vw, 36px); margin-top: 6px; position: relative; overflow: hidden; }
.hero::after { content: "TLS"; position: absolute; right: -10px; bottom: -40px; font-size: 14rem; font-weight: 900; font-style: italic; color: rgba(255,255,255,0.05); pointer-events: none; line-height: 1; }
.hero .kicker { color: var(--yellow); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; margin: 0 0 6px; }
.hero h1 { color: #fff; font-size: clamp(1.7rem, 5vw, 2.6rem); margin-bottom: 8px; }
.hero p { margin: 0 0 14px; color: #ddd; max-width: 60ch; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 18px; }
.stat { background: rgba(255,255,255,0.08); border-radius: 10px; padding: 10px 14px; min-width: 120px; }
.stat b { display: block; font-size: 1.15rem; color: #fff; }
.stat span { font-size: 0.75rem; color: #bbb; text-transform: uppercase; letter-spacing: 0.06em; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.btn.btn-inline { width: auto; }

/* Tabela */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
td.team, th.team { text-align: left; white-space: normal; }
td.team a { color: inherit; text-decoration: none; font-weight: 600; }
td.pos { font-weight: 800; width: 2.2em; }
tr.top1 td.pos { color: var(--yellow-ink); background: var(--yellow); border-radius: 6px; }
tr.playoff td.pos::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-left: 4px; vertical-align: middle; }
td.pts { font-weight: 800; }
@media (max-width: 430px) { .mp { display: none; } th, td { padding: 8px 5px; } }
tr.flash td { animation: flash 2.4s ease-out; }
@keyframes flash { from { background: #fff4bf; } to { background: transparent; } }
.legend { font-size: 0.8rem; color: var(--muted); margin: 0.6em 0 0; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 4px; }

/* Mecze */
.match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.match:last-child { border-bottom: 0; }
.match .home { text-align: right; font-weight: 600; }
.match .away { font-weight: 600; }
.match a { color: inherit; text-decoration: none; }
.score { font-weight: 900; font-size: 1.2rem; background: var(--black); color: #fff; border-radius: 8px; padding: 4px 10px; min-width: 64px; text-align: center; }
.score.planned { background: var(--line); color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.sets { grid-column: 1 / -1; text-align: center; font-size: 0.85rem; color: var(--muted); margin-top: -4px; }
.round-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 18px 0 4px; }
.badge { display: inline-block; font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; background: var(--yellow); color: var(--yellow-ink); font-weight: 700; }
.badge.live { background: var(--bad); color: #fff; }
.list { margin: 0; padding-left: 1.2em; }
.mvp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.mvp-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.mvp-card b { display: block; font-size: 1.05rem; }
.mvp-card .star { color: var(--yellow); }
.sponsors { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.sponsor { border: 2px dashed var(--line); border-radius: 10px; padding: 18px 8px; text-align: center; color: var(--muted); font-size: 0.85rem; }
.sponsor.real { border-style: solid; font-weight: 700; color: var(--ink); }

/* Drużyny */
.team-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; }
.team-card .crest { width: 56px; height: 56px; border-radius: 10px; background: var(--black); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.1rem; overflow: hidden; }
.crest img { width: 100%; height: 100%; object-fit: contain; display: block; }
.crest.small { display: inline-grid; width: 34px; height: 34px; border-radius: 8px; background: var(--black); vertical-align: middle; margin-right: 6px; }
.roster-t td.ok { color: var(--ok); font-weight: 700; }
.roster-t td.low { color: var(--bad); font-weight: 700; }
.bar { display: inline-block; width: 70px; height: 8px; background: var(--line); border-radius: 4px; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); }
.team-card b { font-size: 1.05rem; }
.form { display: flex; gap: 4px; }
.form i { font-style: normal; width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; color: #fff; }
.form .w { background: var(--ok); } .form .l { background: var(--bad); }
.team-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.team-head .crest { width: 84px; height: 84px; font-size: 1.5rem; border-radius: 14px; background: var(--black); color: #fff; display: grid; place-items: center; font-weight: 900; overflow: hidden; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.roster div { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; color: var(--muted); }
.signup { display: grid; gap: 10px; }
.signup .row { display: grid; gap: 10px; }
@media (min-width: 600px) { .signup .row { grid-template-columns: 1fr 1fr; } }

/* Relacje */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.video { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.video .thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #000 center / cover no-repeat; border: 0; width: 100%; padding: 0; cursor: pointer; }
.video .thumb::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 2.2rem; background: linear-gradient(transparent, rgba(0,0,0,0.5)); text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.video .thumb:hover::after { color: var(--yellow); }
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.video .meta { padding: 10px 12px; }
.video .meta b { display: block; font-size: 0.95rem; line-height: 1.3; }
.video .meta span { font-size: 0.8rem; color: var(--muted); }
.video .tag { display: inline-block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--yellow-ink); background: var(--yellow); border-radius: 4px; padding: 1px 6px; margin-bottom: 6px; }
.video.big { grid-column: 1 / -1; }
@media (min-width: 860px) { .video.big { display: grid; grid-template-columns: 1.6fr 1fr; } .video.big .meta { padding: 20px; } .video.big .meta b { font-size: 1.2rem; } }
.yt-link { display: inline-flex; gap: 10px; align-items: center; background: var(--black); color: #fff; border-radius: 10px; padding: 10px 14px; text-decoration: none; font-weight: 700; }
.yt-link b { color: var(--yellow); }
.fb-card { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: inherit; text-decoration: none; }
.fb-card .fb-av.big { width: 64px; height: 64px; font-size: 1.2rem; }
.fb-card b { display: block; font-size: 1.05rem; }
.fb-card span { display: block; font-size: 0.85rem; color: var(--muted); }
.fb-card .fb-go { color: var(--blue); font-weight: 700; margin-top: 4px; }
.fb-card:hover { border-color: var(--black); }
.feed .fb { max-width: none; margin: 0 0 14px; }
.feed .fb img { max-width: 360px; margin: 0 auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 0.85rem; font-weight: 600; }
.chip.on { background: var(--black); color: #fff; border-color: var(--black); }

/* Symulacja aplikacji */
.sim { display: grid; gap: 24px; align-items: start; }
@media (min-width: 860px) { .sim { grid-template-columns: 360px 1fr; } }
.phone { width: 300px; margin: 0 auto; background: #111; border-radius: 38px; padding: 12px; box-shadow: 0 20px 50px rgba(0,0,0,0.3), inset 0 0 0 2px #333; }
.phone-notch { width: 110px; height: 22px; background: #111; border-radius: 0 0 14px 14px; margin: -12px auto 6px; position: relative; z-index: 2; }
.phone-screen { background: var(--bg); border-radius: 28px; height: 560px; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.ps-top { background: var(--black); color: #fff; padding: 22px 14px 10px; font-weight: 900; font-style: italic; font-size: 1.1rem; text-shadow: 2px 2px 0 var(--yellow); display: flex; justify-content: space-between; align-items: baseline; }
.ps-top small { font-style: normal; font-weight: 600; text-shadow: none; font-size: 0.7rem; color: #bbb; }
.ps-body { padding: 12px; flex: 1; overflow: hidden; animation: slidein .35s ease-out; font-size: 0.85rem; }
@keyframes slidein { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.ps-body h3 { font-size: 1.05rem; margin-bottom: 8px; }
.ps-body .card { padding: 12px; }
.ps-body input, .ps-body .fake-input { font: inherit; font-size: 16px; width: 100%; padding: 10px; border: 1px solid #c9c9c2; border-radius: 10px; background: #fff; }
.ps-body .btn { padding: 11px; font-size: 0.95rem; border-radius: 10px; }
.ps-body .pick { padding: 10px; margin-bottom: 8px; }
.ps-body .pick b { font-size: 0.9rem; }
.ps-body .pick.hl { border-color: var(--yellow); box-shadow: 0 0 0 3px #fff4bf; }
.ps-body .setrow { grid-template-columns: 2.6em 1fr auto 1fr; margin-bottom: 8px; }
.ps-body .setrow .fake-input { text-align: center; font-size: 18px; font-weight: 800; padding: 8px 2px; min-height: 40px; }
.ps-body .fake-input.cursor::after { content: "|"; animation: blink 1s steps(2) infinite; color: var(--muted); font-weight: 400; }
@keyframes blink { to { visibility: hidden; } }
.ps-body table { font-size: 0.78rem; }
.ps-body th, .ps-body td { padding: 6px 4px; }
.ps-body .fb { font-size: 0.8rem; }
.ps-body .fb-h { padding: 8px; }
.ps-body .fb-t { padding: 0 8px 6px; }
.sms { background: #fff; border-radius: 14px 14px 14px 4px; padding: 10px 12px; margin: 8px 0 14px; box-shadow: 0 2px 6px rgba(0,0,0,0.08); font-size: 0.85rem; }
.sms small { display: block; color: var(--muted); font-size: 0.7rem; margin-bottom: 2px; }
.tap { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: rgba(245,196,0,0.55); border: 2px solid var(--yellow); animation: tap 1.1s ease-out infinite; pointer-events: none; }
@keyframes tap { 0% { transform: scale(0.6); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
.toast { position: absolute; left: 12px; right: 12px; bottom: 16px; background: #e9f6ec; border: 1px solid #bfe3c8; color: var(--ok); border-radius: 10px; padding: 10px; font-weight: 700; font-size: 0.85rem; animation: slidein .3s; }
.toast.bad { background: #fdecea; border-color: #f3b9b3; color: var(--bad); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-weight: 800; }
.steps li.on { border-color: var(--black); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.steps li.on::before { background: var(--yellow); color: var(--yellow-ink); }
.steps li.done::before { background: var(--black); color: #fff; }
.steps b { display: block; }
.steps span { font-size: 0.85rem; color: var(--muted); }
.sim-ctrl { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.sim-ctrl .btn { width: auto; padding: 10px 14px; font-size: 0.9rem; }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--yellow); width: 0; }
.progress i.run { animation: prog var(--dur, 4s) linear forwards; }
@keyframes prog { to { width: 100%; } }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.flow div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 0.9rem; position: relative; }
.flow div b { display: block; margin-bottom: 4px; }
.flow .ico { font-size: 1.6rem; display: block; margin-bottom: 4px; }

/* Na żywo */
.nav a.nav-live { background: #2f7bff; color: #fff; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); margin-right: 4px; animation: pulse 1.4s infinite; vertical-align: middle; }
@keyframes pulse { 50% { opacity: 0.35; } }
.live-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.live-head select { flex: 1; font-size: 15px; padding: 8px 10px; }
.score-live { display: grid; gap: 8px; }
.score-live .t { display: grid; grid-template-columns: 1fr 48px 72px; align-items: center; background: var(--black); color: #fff; border-radius: 10px; overflow: hidden; border: 3px solid transparent; }
.score-live .t.srv { border-color: var(--yellow); }
.score-live .n { padding: 10px 14px; font-weight: 800; font-size: 1.1rem; }
.score-live .lsets { text-align: center; font-weight: 700; color: #bbb; background: #161616; height: 100%; display: grid; place-items: center; }
.score-live .lpts { text-align: center; font-weight: 900; font-size: 2rem; background: var(--yellow); color: var(--yellow-ink); height: 100%; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.score-live.done .lpts { background: #ddd; }
.live-ctl { margin-top: 12px; }
.live-ctl .btn + .btn { margin-top: 8px; }
.center { text-align: center; }
.qr svg { width: 180px; height: 180px; }
code.url { display: block; background: #f4f4f1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 0.8rem; word-break: break-all; }

/* Sędzia */
.ref { max-width: 520px; margin: 0 auto; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=tel], select, textarea {
  font: inherit; font-size: 18px; width: 100%; padding: 12px; border: 1px solid #c9c9c2; border-radius: 10px; background: #fff; color: var(--ink);
}
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 12px; padding: 14px 18px; font-weight: 800; font-size: 1.05rem; background: var(--black); color: #fff; width: 100%; text-decoration: none; }
.btn.yellow { background: var(--yellow); color: var(--yellow-ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.hero .btn.ghost { color: #fff; border-color: #555; }
.btn + .btn { margin-top: 10px; }
.btn-inline + .btn-inline { margin-top: 0; }
.pick { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; color: var(--ink); }
.pick b { display: block; font-size: 1.05rem; }
.setrow { display: grid; grid-template-columns: 3.2em 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 10px; }
.setrow .lbl { font-weight: 700; color: var(--muted); }
.setrow input { text-align: center; font-size: 22px; font-weight: 800; padding: 10px 4px; }
.setrow .colon { font-weight: 900; font-size: 1.3rem; }
.teams-h { display: grid; grid-template-columns: 3.2em 1fr auto 1fr; gap: 8px; font-size: 0.85rem; font-weight: 700; text-align: center; margin-bottom: 6px; }
.err { color: var(--bad); font-weight: 600; min-height: 1.5em; }
.okbox { background: #e9f6ec; border: 1px solid #bfe3c8; color: var(--ok); border-radius: 12px; padding: 12px 14px; font-weight: 700; margin-bottom: 14px; }

/* Podgląd posta FB */
.fb { background: #fff; border: 1px solid #dddfe2; border-radius: 10px; max-width: 520px; margin: 0 auto; overflow: hidden; }
.fb-h { display: flex; gap: 10px; align-items: center; padding: 12px; }
.fb-av { width: 40px; height: 40px; border-radius: 50%; background: var(--black); color: #fff; display: grid; place-items: center; font-weight: 900; font-style: italic; font-size: 0.8rem; text-shadow: 1px 1px 0 var(--yellow); flex: none; }
.fb-h small { color: #65676b; display: block; }
.fb-t { padding: 0 12px 10px; white-space: pre-line; }
.fb img { display: block; width: 100%; height: auto; }
.fb-f { padding: 10px 12px; color: #65676b; font-size: 0.9rem; border-top: 1px solid #e4e6eb; }
.note { font-size: 0.85rem; color: var(--muted); text-align: center; margin: 10px auto; max-width: 520px; }

.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.event { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; border-left: 5px solid var(--yellow); }
.event b { display: block; }
.event span { font-size: 0.85rem; color: var(--muted); }

.foot { padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.foot p { margin: 4px 0; }
.foot-cols { display: grid; gap: 12px; }
@media (min-width: 700px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-cols div:last-child { text-align: right; } }

/* Sezon 6: strefy tabeli wg regulaminu i oznaczenie ligi przy meczu */
tr.f4 td.pos { box-shadow: inset 4px 0 0 var(--ok); }
tr.baraz td.pos { box-shadow: inset 4px 0 0 #ff7a00; }
tr.spadek td.pos { box-shadow: inset 4px 0 0 var(--bad); }
.legend i.z-f4 { background: var(--ok); } .legend i.z-baraz { background: #ff7a00; } .legend i.z-spadek { background: var(--bad); }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.match { position: relative; padding-top: 22px; }
.liga-tag { position: absolute; left: 0; top: 4px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
