/* =========================================================================
   Site future, phase 2.1: the owner's review on a phone (November 2026).
   1. The homepage's next match, its own headed block with both badges.
   2. Badges in their own shape, everywhere: never a circle, ring or crop.
   3. The squad card's Stats button, under the photograph, off the face.
   4. Admin-uploaded portraits on black: the black reads as the card's own
      charcoal, not a box.
   5. The match page's line-up: the starting XI, then the substitutes used,
      then the timeline.
   Built on phases 1 and 2 (css/site-future.css, css/site-future-2.css).
   Only transform and opacity animate; nothing here animates at all.
   ========================================================================= */

/* ---- 2. Badges in their own shape ---------------------------------------
   The badge image is contained in its box, on nothing: no disc, no border,
   no ring, no circular crop. Without a badge, the club's initials sit on a
   plain shield drawn in the text colour at low strength. */
.sb-crest img{object-fit:contain;background:none;border:0;border-radius:0}
.sb-crest.ini{line-height:1;padding-bottom:.25em;box-sizing:border-box}
.sb-crest.ini::before{content:'';position:absolute;inset:2% 8% 0;z-index:-1;background:currentColor;opacity:.13;clip-path:polygon(0 0,100% 0,100% 58%,50% 100%,0 58%)}
.sb-crest.ini{isolation:isolate}
#league-tbody-2 td.club{white-space:normal}
#league-tbody-2 td.club .sb-crest{display:inline-flex;vertical-align:middle;width:26px;height:26px;margin:-4px 10px -4px 0;font-size:.62rem}
#league-tbody-2 td.club .club-n{vertical-align:middle}
@media (max-width:600px){#league-tbody-2 td.club .sb-crest{width:22px;height:22px;margin-right:8px}}

/* ---- 1. The homepage's Next Match -----------------------------------------
   Its own block straight after the hero: the heading and the state, then the
   two badges facing each other with the names under them, then the date,
   kick-off, venue, the countdown and the ways on. Two columns on wide
   screens; one, centred, on a phone. It is drawn with live data. On a phone
   it is below the first screen; on wide screens its top shows under the
   92svh hero, so there it keeps its room from the first paint. */
.hnext{position:relative;overflow:hidden;isolation:isolate;border-top:1px solid var(--line);background:radial-gradient(70% 120% at 0% 0%,rgba(215,86,119,.16),transparent 62%),var(--bg)}
.hnext-tex{z-index:-1;width:min(900px,95vw);right:-14%;top:-300px;transform:rotate(-58deg);--tex-c:rgba(232,121,155,.08)}
.hnext-in{max-width:var(--maxw);margin:0 auto;padding:var(--s7) var(--s6)}
@media (min-width:901px){.hnext-in{min-height:400px}}
.hnext-none{display:none}
.hnext.is-none .hnext-none{display:block}
.hnext-none p{margin-top:var(--s4)}
.nx-head{display:flex;align-items:center;justify-content:space-between;gap:var(--s4);flex-wrap:wrap;padding-bottom:var(--s4);margin-bottom:var(--s6);border-bottom:1px solid var(--line)}
.nx-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:var(--s7);align-items:center}
.nx-comp{margin:0 0 var(--s4);text-align:center;font:500 var(--fs-label)/1.2 'Teko',sans-serif;letter-spacing:.2em;text-transform:uppercase;color:var(--accent)}
.nx-teams{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:start;gap:var(--s4)}
.hnext .nx-side{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:var(--s3);padding:0;text-align:center;color:var(--text)}
.hnext .nx-side .sb-crest{width:96px;height:96px;font-size:1.6rem;color:var(--text-2)}
.hnext .nx-side .sb-team{font:500 clamp(1rem,1.6vw,1.25rem)/1.2 'DM Sans',sans-serif;overflow-wrap:anywhere}
.nx-v{align-self:center;margin-top:-28px;font:400 clamp(1.6rem,3vw,2.4rem)/1 'Anton',sans-serif;color:var(--pink)}
.nx-meta{gap:var(--s2) var(--s4);color:var(--text);font-size:var(--fs-body)}
.nx-count{margin-top:var(--s5)}
.nx-foot{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s4) var(--s6);margin-top:var(--s6)}
/* The card on the day (12 Nov 2026): "Scheduled kick-off 1pm" where the
   countdown was; the first meeting under a replay's two badges; where
   matchday updates are posted; a confirmed result's final score. */
.nx-sched{margin:var(--s5) 0 0;font:400 clamp(1.5rem,2.6vw,2rem)/1.05 'Anton',sans-serif;text-transform:uppercase;letter-spacing:.01em;color:var(--text)}
.nx-first{margin:var(--s4) 0 0;text-align:center}
.nx-first .a-link{white-space:normal}
.nx-updates{margin:var(--s4) 0 0}
.nx-note{margin:var(--s3) 0 0;max-width:46ch}
.nx-k{font:500 var(--fs-label)/1.2 'Teko',sans-serif;letter-spacing:.2em;text-transform:uppercase;color:var(--accent);margin-right:var(--s2)}
.nx-final .sb-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:var(--s3);padding:var(--s3) 0}
.nx-final .sb-row+.sb-row{border-top:1px solid var(--line)}
.nx-final .sb-crest{width:48px;height:48px}
.nx-final .sb-team{font:500 clamp(1.05rem,1.7vw,1.3rem)/1.2 'DM Sans',sans-serif;text-align:left;justify-self:start}
.nx-final .sb-n{font:400 clamp(2.6rem,5vw,3.6rem)/1 'Anton',sans-serif}
/* The hero's own card after the scheduled time: its one button is the long
   one, so on a phone it stands alone on its row (the match centre's link is
   on the card below) and is set a little tighter so it is never cut off. */
.hero-md .a-btn[data-md-instagram]{flex:none;max-width:100%}
@media (max-width:600px){
  .hero-md .hero-actions .md-wide{display:none}
  .hero-md .a-btn[data-md-instagram]{letter-spacing:.1em;padding-left:var(--s3);padding-right:var(--s3)}
}
@media (max-width:360px){
  .hero-md .a-btn[data-md-instagram]{white-space:normal;line-height:1.15;text-align:center}
  /* At 320 the card's button was squeezed until its label was cut ("Match
     centr"): it keeps its width now, and the row is set closer so the link
     beside it still fits. */
  .hero-md .hero-actions{gap:var(--s2) var(--s3)}
  .hero-md .hero-actions .a-btn{flex:none;padding-left:var(--s3);padding-right:var(--s3)}
}
@media (max-width:900px){
  .hnext-in{padding:var(--s6) var(--s4)}
  .nx-grid{grid-template-columns:1fr;gap:var(--s5)}
  .nx-board{text-align:center}
  .nx-meta{justify-content:center}
  .nx-count{justify-content:center}
  .nx-foot{justify-content:center}
  .nx-sched,.nx-updates{text-align:center}
  .nx-note{margin-left:auto;margin-right:auto;text-align:center}
  .nx-final{text-align:left}
}
@media (max-width:600px){
  .hnext .nx-side .sb-crest{width:72px;height:72px;font-size:1.25rem}
  .nx-v{margin-top:-22px}
  .nx-head{margin-bottom:var(--s5)}
}

/* ---- 3. The squad card's Stats button: a bar under the photograph ---------
   It used to sit on the photograph's top right, over the player's face. Now
   the card keeps a 56px strip between the photograph and the stats row, and
   the button is that strip: a 44px button with its target (::before) filling
   the strip, so it can never cover the photograph. The photograph is 3:4 of
   the card's width, so a top margin of 4/3 of the width (a percentage margin
   is of the width) puts the strip exactly under it at every size. */
.fcard .pcard-media{margin-bottom:56px}
.fcard .pcard-back{padding-top:var(--s4)}
.fcard .fcard-flip{top:0;left:0;right:0;margin-top:calc(400% / 3 + 6px);height:44px;justify-content:space-between;padding:0 var(--s3);border:0;background:#151518;font-size:.95rem;color:#EDE6DA;transition:none}
.fcard .fcard-flip::before{inset:-6px 0;z-index:-1;min-width:0;background:#151518;border-top:2px solid var(--pink)}
.fcard .fcard-flip:hover::before,.fcard .fcard-flip[aria-pressed="true"]::before{background:var(--pink)}
.fcard .fcard-flip:hover,.fcard .fcard-flip[aria-pressed="true"]{background:var(--pink);color:var(--ink)}
.fcard .fcard-flip::after{transform:rotate(135deg);margin-top:-4px}
.fcard .fcard-flip[aria-pressed="true"]::after{transform:rotate(-45deg);margin-top:4px}
.fcard .fcard-flip:focus-visible{outline-offset:4px}
.fcard .fcard-flip *,.fcard .fcard-flip::before,.fcard .fcard-flip::after{transition:none}

/* ---- 5. The match page (rebuilt to the owner's reference) -----------------
   The scoreboard: competition on top, date and kick-off over the score, the
   two badges (their own shape) on clean tiles, Full time under the score.
   .mc-meta and .mc-teams keep their names for everything that reads them and
   lay their children into the board's grid (display: contents). */
.mc-board{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:"comp comp comp" "when when when" "home score away" "home state away" "venue venue venue";align-items:center;column-gap:var(--s4);max-width:820px;margin-top:var(--s4);padding:0 0 var(--s5);border:1px solid var(--line-2);background:radial-gradient(80% 120% at 50% 30%,rgba(215,86,119,.14),transparent 62%),var(--surface);text-align:center}
.mc .mc-board .mc-meta,.mc .mc-board .mc-teams{display:contents}
.mc-board .bit::after{display:none}
.mc-board .mc-comp{grid-area:comp;justify-content:center;padding:var(--s3) var(--s4);border-bottom:1px solid var(--line);font:500 var(--fs-label)/1.3 'Teko',sans-serif;letter-spacing:.18em;text-transform:uppercase;color:var(--accent)}
.mc-board .mc-when{grid-area:when;justify-content:center;padding:var(--s5) var(--s4) var(--s2);color:var(--text-2);font-variant-numeric:tabular-nums}
.mc-board .mc-venue{grid-area:venue;justify-content:center;padding-top:var(--s4);color:var(--text-3)}
.mc-board .mrow-team{grid-row:3/5;align-self:start;display:flex;flex-direction:column;align-items:center;gap:var(--s3);padding:0 var(--s3);white-space:normal;text-align:center;font-size:clamp(.95rem,1.8vw,1.25rem)}
.mc-board .mrow-team.home{grid-area:home}
.mc-board .mrow-team:not(.home){grid-area:away}
.mc-board .mrow-tn{overflow:visible}
.mc-tile{display:flex;align-items:center;justify-content:center;width:96px;height:96px;border-radius:18px;background:#F4F0E9}
.mc .mc-tile .sb-crest{width:72px;height:72px;font-size:1.3rem;color:#151416}
.mc-board .mrow-score{grid-area:score;align-self:end;min-width:0;font-size:clamp(2.8rem,8vw,4.6rem)}
.mc-board .mrow-score.ko{align-self:center}
.mc-board .mc-state{grid-area:state;justify-self:center;align-self:start;margin-top:var(--s2)}
@media (max-width:600px){.mc-board{column-gap:var(--s2)}.mc-tile{width:72px;height:72px;border-radius:14px}.mc .mc-tile .sb-crest{width:54px;height:54px;font-size:1rem}.mc-board .mrow-team{padding:0 var(--s2)}.mc-board .mrow-score{font-size:2.6rem}}

/* The line-up: a dark pitch (our half, attacking upwards, the goal at the
   bottom), the XI in rows - GK, DEF, MID, FWD by the squad list unless a real
   formation is published - each a round head-and-shoulders photograph (a
   player, not a badge), the number and surname on a pill, and the markers on
   the photograph's corners. Phones first: a row of five fits at 320. */
.mc .mc-lineups{grid-template-columns:1fr;gap:var(--s6)}
@media (min-width:1000px){.mc .mc-lineups{grid-template-columns:minmax(0,560px) minmax(0,1fr);align-items:start}}
.pitch{position:relative;display:flex;flex-direction:column;aspect-ratio:68/84;max-width:560px;margin-top:var(--s4);container-type:inline-size;color:rgba(237,230,218,.2);background:repeating-linear-gradient(180deg,rgba(255,255,255,.018) 0 12.5%,transparent 12.5% 25%),linear-gradient(180deg,#16201B,#101512)}
/* The touchlines and the halfway line (an inset frame), the centre circle's
   arc at the top and our penalty area at the bottom, each drawn at its own
   scale, so the pitch can grow taller for its players without stretching. */
.pitch::before{content:'';position:absolute;inset:calc(100cqw / 68);border:1px solid currentColor;pointer-events:none}
.pitch-lines{position:absolute;left:0;width:100%;height:auto;pointer-events:none}
.pitch-top{top:0}
.pitch-box{bottom:0}
/* The rows are in the flow: GK at the bottom, then up the pitch, evenly
   spaced; a row that needs more room (names, two lines of markers) makes
   the pitch taller rather than running into the next. */
.pitch-rows{position:relative;flex:1;display:flex;flex-direction:column-reverse;justify-content:space-around;gap:var(--s4);margin:0;padding:calc(100cqw * 12 / 68) 0 calc(100cqw * 4 / 68);list-style:none}
.pr-in{display:flex;justify-content:space-evenly;align-items:flex-start;margin:0;padding:0 2%;list-style:none}
.pp{position:relative;flex:0 1 calc(96% / max(var(--n),3));min-width:0;display:flex;flex-direction:column;align-items:center;--ph:clamp(36px,13vw,64px)}
.pp-link{display:flex;flex-direction:column;align-items:center;min-width:0;max-width:100%;color:#EDE6DA;text-decoration:none}
.pp-ph{position:relative;display:block;width:var(--ph);height:var(--ph);border-radius:50%;overflow:hidden;isolation:isolate;background:#141417;border:2px solid rgba(237,230,218,.85)}
.pp-ph picture,.pp-ph img{display:block;width:100%;height:100%}
.pp-ph img{object-fit:cover;object-position:50% 12%}
.pp-ini,.sl-ph .pp-ini{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font:400 calc(var(--ph) * .42)/1 'Anton',sans-serif;color:#EDE6DA}
.pp-n{display:flex;align-items:baseline;gap:3px;max-width:100%;margin-top:3px;padding:2px 6px;background:rgba(10,10,12,.9);font:500 .75rem/1.25 'DM Sans',sans-serif;color:#EDE6DA;white-space:nowrap}
.pp-n b{font-weight:400;color:#B9B1A6}
.pp-n span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.pp-link:hover .pp-n,.pp-link:focus-visible .pp-n{background:var(--pink);color:#151416}
.pp-link:hover .pp-n b,.pp-link:focus-visible .pp-n b{color:#151416}
/* Markers: a centred row of small chips under the name, wrapping when the
   slot is narrow - never over a photograph, never into a neighbour. */
.pm-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:2px 3px;max-width:100%;margin-top:3px}
.pm{display:inline-flex;align-items:center;gap:1px;min-height:17px;padding:0 4px;background:#0E0E10;border:1px solid rgba(237,230,218,.35);font:500 .69rem/1 'DM Sans',sans-serif;color:#EDE6DA;white-space:nowrap;font-variant-numeric:tabular-nums}
.pm i{font-style:normal}
.pm b{font-weight:500}
.pm-card{width:11px;height:15px;min-height:0;padding:0;border:0;border-radius:2px}
.pm-card.y{background:#E8C547}
.pm-card.r{background:#D9443B}
.pm-off{color:#F2A0A0}
.pm-on{color:#9BE0AE}
.pm-a{font-family:'Anton',sans-serif;font-weight:400}
.pitch-note{margin-top:var(--s2)}
/* The substitutes, as a list in the reference's manner. */
.xi.sl{margin-top:var(--s4)}
.sl-row{grid-template-columns:44px 26px minmax(0,1fr) auto;gap:var(--s3);padding:var(--s3) 0}
.sl-ph{display:block;width:44px;height:44px;border-radius:50%;overflow:hidden;isolation:isolate;background:#141417;--ph:44px}
.sl-ph picture,.sl-ph img{display:block;width:100%;height:100%}
.sl-ph img{object-fit:cover;object-position:50% 12%}
.sl-num{font:400 1rem/1 'Anton',sans-serif;color:var(--text-3);text-align:right}
.sl-who{display:flex;flex-direction:column;min-width:0;gap:2px}
.sl-who .xi-name{font-size:.95rem;white-space:normal}
.sl-rep{font-size:var(--fs-meta);color:var(--text-2)}
.sl-marks{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px}
.lu-key{display:flex;flex-wrap:wrap;gap:var(--s2) var(--s4);margin-top:var(--s4);font-size:var(--fs-meta)}
.lu-key i{display:inline-block;vertical-align:-2px}
@media (max-width:420px){.pp-n{font-size:.69rem;padding:1px 4px}.pm{font-size:.69rem;padding:0 3px}.pm-row{gap:2px}}

/* ---- 4. Admin-uploaded portraits on black ----------------------------------
   A portrait uploaded through Admin (a Storage path, .is-sb) is often a
   cut-out flattened onto black by the upload's crop step, with a coloured
   glow, so the card showed a black box. Blended with lighten over a flat
   charcoal (#141417), the black becomes the card's charcoal and the player
   keeps his own colours. Nothing else sits behind a blended photograph (no
   glow, no texture: they showed through dark hair and kit - review M2), so a
   pixel changes only where all three channels are under 20/255, and only up
   to 20. The committed legacy photographs are not blended. */
.pcard-media:has(img.is-sb){isolation:isolate;background:#141417}
.pcard-media img.is-sb,.pp-ph img.is-sb,.sl-ph img.is-sb{mix-blend-mode:lighten}

/* ---- 5. The transparent cut-out, where a player has one --------------------
   players.cutout_url, the cut-out Admin makes at upload (index.html,
   cutoutSrc). Shown whole (contain) on the charcoal each frame already has -
   #1C1C21 on a card and the profile, standing on the frame's bottom edge.
   In the round frames of the pitch and the substitutes (#141417) it fills
   the circle from the top (cover), so the head and shoulders show and a face
   is not drawn tiny. No blend: its background is transparent, so there is no
   black to hide, and the player's own colours are drawn exactly. A cut-out
   that fails falls back to the portrait (.is-sb, section 4). */
.pcard-media img.is-cut,.prof-media .pcard-media img.is-cut{object-fit:contain;object-position:50% 100%;mix-blend-mode:normal}
.pp-ph img.is-cut,.sl-ph img.is-cut{object-fit:cover;object-position:50% 0;mix-blend-mode:normal}
/* A transparent cut-out stands on the pitch frameless (owner, 6 Nov): no
   circle, ring or backdrop. A portrait fallback loses .is-cut and keeps the
   circle, which hides its background. */
.pp-ph:has(img.is-cut),.sl-ph:has(img.is-cut){border-radius:0;border-color:transparent;background:transparent;overflow:visible}
.pp-ph:has(img.is-cut) img.is-cut,.sl-ph:has(img.is-cut) img.is-cut{filter:drop-shadow(0 2px 3px rgba(0,0,0,.55))}
.pp.xi-row{border:0;padding:0;gap:0}
.pm-a b{font-family:'DM Sans',sans-serif}
@media (max-width:420px){.mc-board .mrow-team{font-size:.82rem;padding:0 var(--s1);overflow-wrap:break-word}.mc-board .mc-when{padding-left:var(--s3);padding-right:var(--s3)}.mc-tile{width:60px;height:60px;border-radius:12px}.mc .mc-tile .sb-crest{width:46px;height:46px}.mc-board .mc-state{font-size:.68rem;letter-spacing:.1em;padding:2px 6px 0}.mc-board .mrow-score{font-size:2.3rem}}
