/* PAGE 2, part 2: tapping a match, the full-table cascade, the match sheet */

/* reveal (iris): the stadium photo opens as a circle while the page slides in */
.p2-bg { clip-path: circle(var(--iris, 90%) at 50% 42%); }
.p2-stage.iris-open { --iris: 90%; }
.p2-stage.iris-open .p2-bg { transition: clip-path 1.3s cubic-bezier(.16, 1, .3, 1); }
/* kinetic title (words) */
.p2-title .k-word { display: inline-block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; vertical-align: bottom; }
.p2-title .k-in { display: inline-block; transform: translateY(108%); }
.p2-title.k-go .k-in { animation: kUp2 .9s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--l) * 110ms); }
@keyframes kUp2 { from { transform: translateY(108%); } to { transform: none; } }
/* the story cards: rise in one by one; the tilt is set inline by JS */
.next .all-list li { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .8s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--ci, 0) * 90ms); }
.next .all-list li.in { opacity: 1; transform: none; }
.next .all-list a { transition: transform .35s cubic-bezier(.16, 1, .3, 1), border-color .2s; transform-style: preserve-3d; will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .p2-bg { clip-path: none; } .p2-title .k-in { transform: none; animation: none !important; }
  .next .all-list li { opacity: 1; transform: none; transition: none; }
}
.m[data-id] { cursor: pointer; position: relative; }
.m[data-id]:hover { background: rgba(239, 215, 29, .07); }
.m[data-id]:focus-visible { outline: 2px solid var(--y); outline-offset: -2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the full table opens with a cascade: drop in, LED flicker (points count up in JS) */
.board-table tr.drop { animation: rowDrop .55s var(--ease) var(--d, 0ms) both; }
.board-table tr.drop td { animation: ledOn .5s steps(1) var(--d, 0ms) both; }
@keyframes rowDrop { from { opacity: 0; transform: translateY(-10px) scaleY(.6); } to { opacity: 1; transform: none; } }
@keyframes ledOn { 0% { opacity: 0 } 20% { opacity: 1 } 35% { opacity: .25 } 55% { opacity: 1 } 70% { opacity: .55 } 85%, 100% { opacity: 1 } }

/* ---------- the match sheet ---------- */
html.modal-open { overflow: hidden; }
.match { --red: #FF4B3E; --led: "DotGothic16", "Archivo", monospace; width: min(760px, 100% - 32px); max-height: min(88vh, 900px); margin: auto; padding: 0; border: 1px solid #2a2a24; border-radius: 20px; background: #070707; color: var(--ink); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(239, 215, 29, .08); overflow: hidden; }
.match::backdrop { background: rgba(3, 3, 3, .72); backdrop-filter: blur(6px); }
.match[open] { animation: sheetIn .38s var(--ease) both; }
.match[open]::backdrop { animation: fadeIn .3s both; }
.match.closing { animation: sheetOut .22s ease-in both; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sheetOut { to { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0 } }
.match-in { position: relative; max-height: inherit; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 26px; }
.match-x { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #2a2a24; background: #121210; color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; z-index: 2; }
.match-x svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.match-x:focus-visible { outline: 2px solid var(--y); outline-offset: 2px; }
.match-lg { margin: 0 52px 14px 0; font: 700 12px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--y); }
/* the score: an LED panel */
.match-score { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; padding: 20px 16px; border-radius: 14px; background: #030303; border: 1px solid #1d1d1a; overflow: hidden; }
.match-score::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, transparent 0 58%, rgba(0, 0, 0, .22) 78%) 0 0 / 4px 4px; mix-blend-mode: multiply; }
.ms-team b { display: block; font: 800 clamp(16px, 2.4vw, 22px)/1.15 var(--f-ui); }
.ms-h { text-align: right; } .ms-a { text-align: left; }
.ms-goals { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; color: var(--ink-soft); }
.ms-goals span { color: var(--y); font-variant-numeric: tabular-nums; }
.ms-mid { display: grid; justify-items: center; gap: 6px; }
.ms-sc { font: 400 clamp(40px, 7vw, 64px)/1 var(--led); color: var(--y); text-shadow: 0 0 18px rgba(239, 215, 29, .55); white-space: nowrap; }
.ms-st { font: 700 11px var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.match.live .ms-st { color: var(--red); }
.match-info { margin: 12px 2px 0; font-size: 13px; color: var(--ink-soft); }
.match-tabs { display: flex; gap: 6px; margin: 18px 0 14px; padding: 4px; border-radius: 999px; background: #121210; border: 1px solid #22221e; }
.match-tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font: 700 13px var(--f-ui); letter-spacing: .04em; cursor: pointer; transition: background .2s, color .2s; }
.match-tabs button[aria-selected="true"] { background: var(--y); color: var(--y-ink); }
.match-tabs button:focus-visible { outline: 2px solid var(--y); outline-offset: 2px; }
.mp-empty { color: var(--ink-soft); padding: 18px 4px; margin: 0; }
.match-pane.in > * > * { animation: paneIn .4s var(--ease) both; animation-delay: calc(min(var(--i, 0), 18) * 28ms); }
@keyframes paneIn { from { opacity: 0; transform: translateY(8px); } }
/* timeline: home events left, away events right, the minute in the middle */
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #22221e; }
.tl-e { position: relative; display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; padding: 7px 0; }
.tl-min { grid-column: 2; grid-row: 1; justify-self: center; z-index: 1; min-width: 46px; text-align: center; padding: 3px 6px; border-radius: 999px; background: #121210; border: 1px solid #2a2a24; font: 700 12px var(--f-ui); font-variant-numeric: tabular-nums; }
.tl-tx { display: grid; gap: 1px; font-size: 14px; }
.tl-tx small { color: var(--ink-soft); font-size: 12px; }
.tl-h .tl-tx { grid-column: 1; grid-row: 1; text-align: right; padding-right: 30px; }
.tl-a .tl-tx, .tl-x .tl-tx { grid-column: 3; grid-row: 1; padding-left: 30px; }
.tl-ic { position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 3px; }
.tl-h .tl-ic { right: calc(50% + 38px); }
.tl-a .tl-ic, .tl-x .tl-ic { left: calc(50% + 38px); }
.k-goal .tl-ic, .k-own .tl-ic { border-radius: 50%; background: var(--y); box-shadow: 0 0 10px rgba(239, 215, 29, .6); }
.k-goal .tl-tx b { color: var(--y); }
.k-own .tl-ic { background: #8f8b7e; box-shadow: none; }
.k-yellow .tl-ic { width: 10px; background: #F5C518; }
.k-red .tl-ic { width: 10px; background: #E5352B; }
.k-sub .tl-ic { background: none; border: 2px solid #4fbf6a; border-radius: 50%; width: 12px; height: 12px; }
.k-miss .tl-ic { border: 2px solid #8f8b7e; border-radius: 50%; }
.tl-mark { position: relative; text-align: center; padding: 10px 0; }
.tl-mark span { position: relative; z-index: 1; display: inline-block; padding: 4px 12px; border-radius: 999px; background: #070707; border: 1px solid #22221e; font: 700 11px var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
/* stats: a bar per number, home yellow, away grey */
.st { display: grid; gap: 14px; }
.st-r { display: grid; grid-template-columns: 70px 1fr 70px; gap: 4px 10px; align-items: center; }
.st-v { font: 400 20px/1 var(--led); color: var(--ink); font-variant-numeric: tabular-nums; }
.st-v:first-child { text-align: left; }
.st-v:nth-child(3) { text-align: right; }
.st-l { text-align: center; font: 700 12px var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.st-bar { grid-column: 1 / -1; display: flex; gap: 4px; height: 8px; }
.st-bar i { display: block; height: 100%; border-radius: 4px; width: var(--w); animation: barGrow .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms + 120ms); }
.st-h { background: var(--y); box-shadow: 0 0 10px rgba(239, 215, 29, .35); transform-origin: right; }
.st-a { background: #3b3b35; transform-origin: left; }
@keyframes barGrow { from { transform: scaleX(0); } }
/* the pitch with both line-ups */
.pitch-wrap { margin: 2px 0 18px; }
.pitch { display: block; width: 100%; max-width: 460px; margin: 0 auto; height: auto; border-radius: 18px; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .05); }
.pl circle { stroke-width: 3; }
.pl-h circle { fill: var(--y); stroke: #151513; }
.pl-a circle { fill: #151513; stroke: #F4F1E6; }
.pl-n { font: 400 26px var(--led); text-anchor: middle; }
.pl-h .pl-n { fill: #151513; } .pl-a .pl-n { fill: #F4F1E6; }
.pl-name { font: 700 19px "Archivo", sans-serif; text-anchor: middle; fill: #F4F1E6; paint-order: stroke; stroke: rgba(10, 20, 10, .85); stroke-width: 5px; stroke-linejoin: round; }
.pl.off circle { opacity: .85; }
.pl-sub { fill: #E5352B; }
.pitch-k { font: 700 18px "Archivo", sans-serif; letter-spacing: .1em; text-transform: uppercase; fill: rgba(244, 241, 230, .7); }
/* players drop onto the grass one by one */
.match-pane.in .pl-in { animation: plIn .5s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--i, 0) * 38ms + 100ms); transform-box: fill-box; transform-origin: center; }
@keyframes plIn { from { opacity: 0; transform: translateY(-14px) scale(.4); } }

/* line-ups */
.lus { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.lu h3 { margin: 0 0 10px; font: 800 15px var(--f-ui); }
.lu h3 span { color: var(--y); font-weight: 700; margin-left: 6px; }
.lu ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lu li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-top: 1px solid #171714; font-size: 14px; }
.lu-n { min-width: 26px; font: 400 15px var(--led); color: var(--y); }
.lu-off, .lu-on { margin-left: auto; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; }
.lu-off { border-top: 7px solid #E5352B; }
.lu-on { border-bottom: 7px solid #4fbf6a; }
.lu-k { margin: 12px 0 4px; font: 700 11px var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }
@media (max-width: 760px) {
  .match { width: 100%; max-width: none; max-height: 92svh; margin: auto 0 0; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .match[open] { animation: sheetUp .42s var(--ease) both; }
  .match.closing { animation: sheetDown .24s ease-in both; }
  .match-in { padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); }
  .match-score { padding: 16px 12px; gap: 10px; }
  .ms-sc { font-size: 34px; }
  .ms-team b { font-size: 15px; }
  .ms-goals { font-size: 12px; }
  .ms-goals li span { white-space: nowrap; }
  .lus { grid-template-columns: 1fr; }
  .tl-e { grid-template-columns: 1fr 54px 1fr; }
  .tl-h .tl-tx { padding-right: 22px; }
  .tl-a .tl-tx, .tl-x .tl-tx { padding-left: 22px; }
  .tl-h .tl-ic { right: calc(50% + 31px); }
  .tl-a .tl-ic, .tl-x .tl-ic { left: calc(50% + 31px); }
  .tl-tx { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .match[open], .match.closing, .match-pane.in > * > *, .match-pane.in .pl-in, .st-bar i, .board-table tr.drop, .board-table tr.drop td { animation: none !important; }
}

/* ---------- the day: arrows, swipe, calendar (30-11) ---------- */
.board-matches { position: relative; }
.bday { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 14px 10px; }
.bday button { font: inherit; color: inherit; cursor: pointer; }
.bday-arrow { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #2a2a24; background: #0d0d0c; transition: background .2s, border-color .2s, transform .2s; }
.bday-arrow svg, .bcal-top svg { width: 18px; height: 18px; fill: none; stroke: var(--y); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bday-arrow:hover { border-color: var(--y); background: #171710; }
.bday-arrow:active { transform: scale(.92); }
.bday-date { flex: 1; min-width: 0; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 14px; border-radius: 999px; border: 1px solid #2a2a24; background: #0d0d0c; font: 600 13px var(--f-ui) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft) !important; white-space: nowrap; transition: border-color .2s, background .2s; }
.bday-date b { color: var(--y); font-weight: 800; margin-right: 2px; text-shadow: 0 0 10px rgba(239, 215, 29, .45); }
.bday-date svg { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--y); stroke-width: 1.8; stroke-linecap: round; }
.bday-date:hover, .bday-date[aria-expanded="true"] { border-color: var(--y); background: #171710; }
.bday button:focus-visible, .bcal button:focus-visible, .be-jump button:focus-visible { outline: 2px solid var(--y); outline-offset: 2px; }
.bswipe { touch-action: pan-y; will-change: transform; }
.be-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.be-jump button { padding: 9px 14px; border-radius: 999px; border: 1px solid #2a2a24; background: #0d0d0c; color: var(--y); font: 700 12px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.be-jump button:hover { border-color: var(--y); }

.bcal { position: absolute; z-index: 6; left: 14px; right: 14px; top: 58px; max-width: 340px; margin: 0 auto; padding: 14px 14px 12px; border-radius: 16px; background: #080807; border: 1px solid #2c2c25; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .9), 0 0 0 1px rgba(239, 215, 29, .08), 0 0 40px -14px rgba(239, 215, 29, .35);
  font-family: var(--f-ui); opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: 50% 0; transition: opacity .2s, transform .28s cubic-bezier(.16, 1, .3, 1); }
.bcal.open { opacity: 1; transform: none; }
.board.cal-open .board-body { min-height: 430px; }
.bcal button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.bcal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bcal-top b { font: 400 18px var(--led); color: var(--y); text-transform: capitalize; letter-spacing: .04em; text-shadow: 0 0 10px rgba(239, 215, 29, .4); }
.bcal-top button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
.bcal-top button:hover { background: #171710; }
.bcal-wd, .bcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.bcal-wd span { font: 700 10px var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding-bottom: 6px; }
.bcal-grid button { position: relative; aspect-ratio: 1; min-height: 36px; border-radius: 10px; font: 400 16px var(--led) !important; color: #6d6a5e !important; transition: background .15s, color .15s; }
.bcal-grid button:hover { background: #171710; color: var(--ink) !important; }
.bcal-grid button.has { color: #F4EFD8 !important; }
.bcal-grid button.has::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--y); box-shadow: 0 0 6px var(--y); }
.bcal-grid button.today { box-shadow: inset 0 0 0 1px rgba(239, 215, 29, .6); }
.bcal-grid button.sel { background: var(--y); color: #151513 !important; box-shadow: 0 0 18px -2px rgba(239, 215, 29, .7); }
.bcal-grid button.sel::after { background: #151513; box-shadow: none; }
.bcal.open .bcal-grid button { animation: calOn .35s ease-out both; animation-delay: calc(var(--i, 0) * 7ms); }
@keyframes calOn { from { opacity: 0; filter: brightness(2.2); } }
.bcal-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid #1c1c18; }
.bcal-foot button { padding: 7px 12px; border-radius: 999px; border: 1px solid #2a2a24 !important; color: var(--y) !important; font: 700 11px var(--f-ui) !important; letter-spacing: .1em; text-transform: uppercase; }
.bcal-foot span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-soft); }
.bcal-foot i { width: 5px; height: 5px; border-radius: 50%; background: var(--y); box-shadow: 0 0 6px var(--y); }
@media (max-width: 760px) {
  .bday { margin: 0 12px 10px; }
  .bday-date { font-size: 12px !important; letter-spacing: .05em; padding: 0 10px; gap: 8px; }
  .bcal { position: relative; top: auto; left: auto; right: auto; margin: 0 12px 12px; max-width: none; }
  .board.cal-open .board-body { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .bcal, .bcal.open .bcal-grid button { transition: none; animation: none; } }

/* ---------- the complete squad under the pitch: the eleven and the whole bench ---------- */
.lu li { gap: 10px; padding: 6px 4px; }
.lu-ph { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #1b1b18; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px #2e2e28; }
.lu-ph b { font: 400 14px var(--led); color: var(--y); }
.lu-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; background: #1b1b18; }
.lu-nm { display: grid; gap: 1px; min-width: 0; font-weight: 600; }
.lu-nm small { font: 600 10px var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.lu li.is-on .lu-ph { box-shadow: inset 0 0 0 1.5px #4fbf6a; }
.lu-k i { font-style: normal; color: var(--y); margin-left: 4px; }

/* ---------- logos on the light board: a crest beside every club, in the matches and in the table ---------- */
.m .lg { width: 1.25em; height: 1.25em; object-fit: contain; vertical-align: -.28em; filter: drop-shadow(0 0 4px rgba(0, 0, 0, .6)); }
.m .h .lg { margin-left: .5em; } .m .a .lg { margin-right: .5em; }
.board-table .tc { display: inline-flex; align-items: center; gap: .55em; min-width: 0; }
.board-table .tc .lg { flex: none; width: 1.3em; height: 1.3em; object-fit: contain; }
.board-vv { display: grid; place-items: center; width: 1.4em; height: 1.4em; margin-right: -4px; }
.board-vv svg { width: 100%; height: 100%; fill: var(--y); filter: drop-shadow(0 0 6px rgba(239, 215, 29, .6)); }
.bday { touch-action: pan-y; }
@media (max-width: 760px) {
  .m .h, .m .a { display: flex; align-items: center; gap: 8px; }
  .m .h { justify-content: flex-end; } .m .h .lg, .m .a .lg { margin: 0; flex: none; width: 22px; height: 22px; }
  .board-table .tc .lg { width: 20px; height: 20px; }
}

/* ---------- under the pitch: the bench and the rest of the squad as photo cards (no starting eleven list) ---------- */
.lu-g { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.lu-p { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 12px; background: #0d0d0c; border: 1px solid #1a1a17; font-size: 13px; cursor: pointer; transition: border-color .2s, transform .2s; }
.lu-p:hover, .lu-p:focus-visible { border-color: var(--y); outline: none; transform: translateY(-1px); }
.lu-p .lu-on { margin-left: auto; }
.lu-g-rest .lu-p { opacity: .72; }
.lu-rest:empty { display: none; }
.pl[data-pid] { cursor: pointer; }
.pl[data-pid]:hover circle { stroke: #fff; }
.sq-p[data-pid] { cursor: pointer; transition: border-color .2s; }
.sq-p[data-pid]:hover, .sq-p[data-pid]:focus-visible { border-color: var(--y); outline: none; }

/* ---------- club names: the full name on a computer, a short one on a phone so every name stays on one line ---------- */
.nm-s { display: none; }
@media (max-width: 760px) {
  .nm-l { display: none; } .nm-s { display: inline; }
  .m .h, .m .a { white-space: nowrap; overflow: hidden; }
  .m .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .board-table .tc { white-space: nowrap; }
}

/* ---------- "Hele stand": a split-flap board unfolding (rows flip down from their top edge, a light runs over them) ---------- */
.board-table tr.drop { transform-origin: 50% 0; animation: rowFlip .72s cubic-bezier(.2, .85, .25, 1) var(--d, 0ms) both; }
.board-table tr.drop td { animation: ledOn .5s steps(1) calc(var(--d, 0ms) + 140ms) both, rowLight 1.1s ease-out var(--d, 0ms) both; }
.board-table tr.fold { transform-origin: 50% 0; animation: rowFold .26s cubic-bezier(.5, 0, .9, .4) var(--d, 0ms) both; }
@keyframes rowFlip { 0% { opacity: 0; transform: perspective(600px) rotateX(-96deg); } 55% { opacity: 1; transform: perspective(600px) rotateX(14deg); } 78% { transform: perspective(600px) rotateX(-5deg); } 100% { opacity: 1; transform: none; } }
@keyframes rowLight { 0%, 30% { background-color: rgba(239, 215, 29, .28); box-shadow: inset 0 1px 0 rgba(239, 215, 29, .7); } 100% { background-color: transparent; box-shadow: inset 0 1px 0 transparent; } }
@keyframes rowFold { to { opacity: 0; transform: perspective(600px) rotateX(-90deg); } }
@media (prefers-reduced-motion: reduce) { .board-table tr.drop, .board-table tr.drop td, .board-table tr.fold { animation: none !important; } }

/* ---------- twelve competitions: one row that scrolls sideways, fading at the edges ---------- */
.p2-tabs { width: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 2px 2px 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent); }
.p2-tabs::-webkit-scrollbar { display: none; }
.p2-tabs button { flex: none; scroll-snap-align: center; }
.p2-tabs button:first-child { margin-left: 10px; } .p2-tabs button:last-child { margin-right: 24px; }
@media (max-width: 760px) {
  .m { gap: 7px; padding: 10px 12px; font-size: 14px; letter-spacing: -.01em; }
  .m .h, .m .a { gap: 6px; }
  .m .h .lg, .m .a .lg { width: 20px; height: 20px; }
  .m .s { min-width: 56px; padding: 5px 7px; }
}

/* ---------- the live table: clubs playing now get a red dot, arrows show who climbs or drops ---------- */
.lt-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #FF4B3E; box-shadow: 0 0 8px #FF4B3E; vertical-align: 1px; animation: pulse 1.2s ease-in-out infinite; }
.board.live-table #bTH { color: #FF8A80; }
.board-table tr.is-live td { background: rgba(255, 75, 62, .07); }
.board-table .lv { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #FF4B3E; box-shadow: 0 0 6px #FF4B3E; animation: pulse 1.2s ease-in-out infinite; }
.board-table .mv { margin-left: 5px; font: 700 .62em var(--f-ui); font-style: normal; vertical-align: 1px; }
.board-table .mv.up { color: #4fbf6a; } .board-table .mv.down { color: #FF4B3E; }
.m.changed .s { animation: scoreHit 1.4s ease-out 2; }
@keyframes scoreHit { 0% { background: var(--y); color: #151513; text-shadow: none; } 100% { background: transparent; } }

/* ---------- less empty space above the board; "Live" small in the board's top right, beside the clock ---------- */
.p2-in { gap: 16px; padding-top: 78px; }
.board-clock { margin-left: 0; }
.board-onair { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 7px; border-radius: 999px; border: 1px solid #2a2a24; font: 700 10px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.board-onair i { width: 6px; height: 6px; border-radius: 50%; background: var(--y); opacity: .7; }
.board.is-live .board-onair { color: #fff; background: var(--red); border-color: var(--red); }
.board.is-live .board-onair i { background: #fff; opacity: 1; animation: pulse 1.2s ease-in-out infinite; }
@media (max-width: 760px) {
  .p2-in { justify-content: flex-start; padding-top: 74px; gap: 12px; }
  .p2-title { font-size: 34px; }
  .board-onair { font-size: 9px; padding: 2px 7px 2px 6px; }
}

/* the result of the chosen day beside a club in the table (W/G/V) */
.board-table .dres { flex: none; display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 4px; font: 800 9px var(--f-ui); font-style: normal; color: #0b0b0a; }
.board-table .dres.f-V { color: #fff; }
/* "Live" always red, like the old label (Patto 30-11); while matches are played its dot pulses */
.board-onair { color: #fff; background: var(--red); border-color: var(--red); }
.board-onair i { background: #fff; opacity: 1; animation: pulse 1.4s ease-in-out infinite; }

/* a cup without a table: the matches use the whole board */
.board-body:has(#bTableWrap[hidden]) { grid-template-columns: 1fr; }
.board-body:has(#bTableWrap[hidden]) .board-matches { border-right: 0; }
