/* The game you can play at the top of the home page (23 Oct 2026, Jamie's idea), drawn like the app: its colours
   (src/theme), its Exo 2 titles, the pitch and badges (pitch-markings, pitch-badge), the player-of-the-match panel
   (ratings-panel) and the playing card (card-shape). play.js builds each step inside #play-box. */
@font-face { font-family: "Exo 2 Bibs"; src: url("/fonts/Exo2-BlackItalic.ttf") format("truetype"); font-display: swap; }
.play { padding: 22px 20px 30px; }
.play-intro { text-align: center; max-width: 560px; margin: 0 auto 18px; }
.play-intro h2 { font-size: clamp(30px, 6vw, 44px); line-height: 1.05; letter-spacing: -1px; margin: 6px 0 10px; }
.play-intro h2 span { color: var(--primary); }
.play-intro p { color: var(--muted); font-size: 17px; margin: 0; }
@media (min-width: 900px) {
  .play { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 52px; align-items: center; padding: 30px 20px 40px; }
  .play-intro { text-align: left; margin: 0; }
  .play-intro h2 { font-size: 50px; }
}

/* The app's screen: near-black with the green glow at the top */
.play-box { max-width: 420px; margin: 0 auto; border-radius: 30px; border: 1px solid var(--border); background: radial-gradient(130% 55% at 50% 0%, rgba(34, 197, 94, 0.17), rgba(34, 197, 94, 0) 70%), #0B0F0D; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 80px rgba(34, 197, 94, 0.08); overflow: hidden; }
/* touch-action stops a phone zooming in when the −/+ buttons are tapped quickly (double-tap zoom); pinch zoom still works */
.play-box { touch-action: manipulation; }
.play-box button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.play-box button[disabled] { cursor: default; }
.screen { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 18px; animation: play-in 0.35s ease-out; }
.screen.still { animation: none; }
@keyframes play-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.bar { display: flex; justify-content: center; padding: 2px 0 0; }
.bar-title { font-size: 17px; font-weight: 700; color: var(--text); }
.tabs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tab { text-align: center; padding: 7px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; }
.tab.on { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.tab.done { color: var(--primary-dark); opacity: 0.65; }
.caption { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.ico { display: block; }

/* Buttons: the solid green call to action, and the app's one pill shape */
.cta { display: block; width: 100%; border: 0; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: 16px; font-weight: 700; padding: 15px 20px; text-align: center; }
a.cta:hover { text-decoration: none; filter: brightness(1.05); }
.cta[disabled] { opacity: 0.45; }
.cta[hidden] { display: none; }
.pill { border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 600; }
.pill.on { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }

/* 1. The game's header, as on its screen in the app */
.game-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 6px 0 2px; }
.tile { position: relative; width: 66px; height: 66px; border-radius: 18px; background: var(--raised); border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.tile-ring { width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--primary); display: flex; align-items: center; justify-content: center; animation: play-spin 9s linear infinite; }
.tile-ball { width: 30px; height: 30px; }
@keyframes play-spin { to { transform: rotate(360deg); } }
.tile-num { position: absolute; right: -6px; bottom: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font: 15px/24px "Exo 2 Bibs", sans-serif; text-align: center; border: 2px solid #0B0F0D; }
.game-title { margin: 0; font: 30px/1.05 "Exo 2 Bibs", -apple-system, sans-serif; color: var(--primary); text-transform: uppercase; letter-spacing: 0; }
.game-when { margin: 0; font-size: 18px; font-weight: 700; color: var(--primary); }
.game-where { margin: 0; font-size: 15px; color: var(--muted); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); font-size: 12px; font-weight: 600; }
.game-count { margin: 6px 0 0; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.count { font-size: 22px; font-weight: 800; color: var(--primary); }
.bench { color: var(--muted); font-size: 14px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.warn { background: var(--warning-light); color: var(--warning); }
.status.ok { background: var(--primary-light); color: var(--primary); }

/* Pictures: initials on the player's colour; you in the brand green */
.av { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); background: var(--primary-light); color: var(--text); font-size: 11px; font-weight: 800; flex-shrink: 0; overflow: hidden; }
.av.me { background: var(--primary); border-color: var(--primary-dark); }
.av.me svg { width: 72%; height: 72%; fill: var(--on-primary); margin-top: 18%; }
.av.open { background: rgba(255, 255, 255, 0.04); border: 2px dashed rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.55); font-size: 18px; font-weight: 300; }
.faces { display: flex; justify-content: center; }
.faces .av + .av { margin-left: -6px; }
.faces .av { border-color: #0B0F0D; }
.pop { animation: play-pop 0.4s ease-out; }
@keyframes play-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* The pitch: grass, mown stripes, the halfway line, centre circle and boxes, sides named at each end */
.pitch { position: relative; width: min(100%, 320px, calc(58svh * 0.62)); aspect-ratio: 0.62; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #0D2417; border: 1px solid rgba(255, 255, 255, 0.16); touch-action: manipulation; }
.pitch .stripe { position: absolute; left: 0; right: 0; height: 16.7%; background: rgba(255, 255, 255, 0.025); }
.pitch .s0 { top: 0; } .pitch .s2 { top: 33.4%; } .pitch .s4 { top: 66.8%; }
.pitch .halfway { position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: rgba(255, 255, 255, 0.16); }
.pitch .circle { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.16); }
.pitch .box { position: absolute; left: 28%; right: 28%; height: 10%; border: 1.5px solid rgba(255, 255, 255, 0.16); }
.pitch .box.top { top: -2px; border-top: 0; }
.pitch .box.bottom { bottom: -2px; border-bottom: 0; }
.pitch .side { position: absolute; left: 10px; font-size: 9px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 255, 255, 0.3); pointer-events: none; }
.pitch .side.top { top: 7px; }
.pitch .side.bottom { bottom: 7px; color: rgba(34, 197, 94, 0.55); }

/* A badge: the picture in its side's ring (green for Bibs, white for Non-bibs), the card's overall at the corner
   in the card's green-on-black, the first name underneath. The point placed is the picture's centre. */
.badge { position: absolute; width: 0; height: 0; z-index: 2; }
.badge .ring { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--text); }
.badge.t1 .ring { border-color: var(--primary); }
.badge.you { z-index: 3; }
.badge .av { width: 30px; height: 30px; font-size: 10px; border-width: 2px; }
.badge .pip { position: absolute; right: -8px; bottom: -6px; min-width: 22px; padding: 1px 3px; border-radius: 999px; background: #0B0F0D; border: 1px solid var(--primary); color: var(--primary); font: 11px/1.2 "Exo 2 Bibs", sans-serif; text-align: center; }
.badge .nm { position: absolute; top: 20px; left: -40px; width: 80px; text-align: center; font-size: 10.5px; font-weight: 600; color: var(--text); white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.badge.you .nm { color: var(--primary-dark); font-weight: 800; }
.badge.pop .ring { animation: play-pop 0.4s ease-out; }
/* A free place: a dashed ring with a +, named by its line */
.seat { position: absolute; width: 60px; height: 56px; margin: -18px 0 0 -30px; padding: 0; border: 0; background: none; display: flex; flex-direction: column; align-items: center; z-index: 3; }
.seat-ring { width: 36px; height: 36px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.7); font-size: 22px; font-weight: 300; line-height: 32px; text-align: center; animation: play-breathe 1.6s ease-in-out infinite; }
.seat-line { margin-top: 3px; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: rgba(255, 255, 255, 0.45); }
.seat:hover .seat-ring, .seat:focus-visible .seat-ring { border-style: solid; border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.seat:focus-visible { outline: none; }
@keyframes play-breathe { 50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.22); } }
.balance { margin: 0; display: flex; justify-content: center; align-items: baseline; gap: 10px; min-height: 1.4em; font-size: 15px; font-weight: 800; }
.balance .b1 { color: var(--primary); }
.balance .b2 { color: var(--text); }
.balance .vs { color: var(--muted); font-weight: 600; font-size: 13px; }

/* 3. The scoreboard, the ball and what's happening */
.board { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 8px 14px; }
.side-score { display: flex; align-items: center; gap: 10px; }
.side-score.t2 { justify-content: flex-end; }
.side-name { font-size: 10px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.side-score.t1 .side-name { color: rgba(34, 197, 94, 0.8); }
.score { font: 30px/1 "Exo 2 Bibs", sans-serif; color: var(--text); min-width: 20px; text-align: center; }
.side-score.t1 .score { color: var(--primary); }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 54px; justify-content: center; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: play-blink 1.2s ease-in-out infinite; }
.live.ft { background: var(--raised); color: var(--muted); }
.live.ft::before { display: none; }
@keyframes play-blink { 50% { opacity: 0.25; } }
.pitch .ball { position: absolute; width: 15px; height: 15px; transform: translate(-50%, -50%); z-index: 4; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.goal-flash { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.6); font: 46px/1 "Exo 2 Bibs", sans-serif; text-transform: uppercase; color: var(--primary); text-shadow: 0 4px 24px rgba(0, 0, 0, 0.75); opacity: 0; pointer-events: none; z-index: 5; }
.goal-flash.on { animation: play-goal 1.1s ease-out; }
@keyframes play-goal { 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
.feed { list-style: none; margin: 0; padding: 0; min-height: 5.2em; display: flex; flex-direction: column; gap: 6px; }
.feed li { display: grid; grid-template-columns: 22px 30px minmax(0, 1fr); align-items: start; gap: 6px; font-size: 13px; line-height: 1.4; color: var(--muted); animation: play-in 0.3s ease-out; }
.feed li:first-child { color: var(--text); }
.feed li.mine { color: var(--primary-dark); font-weight: 600; }
.feed-ico { width: 20px; height: 20px; }
.feed-ico.dot { width: 8px; height: 8px; margin: 6px 0 0 6px; border-radius: 50%; background: var(--primary); }
.feed-min { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.skip { align-self: center; background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 14px; padding: 2px 4px; }
.skip[disabled] { visibility: hidden; }

/* 4. The player-of-the-match panel: a card edged in green, a star to vote, steppers to rate in fives */
.ft-line { margin: 0; display: flex; align-items: baseline; justify-content: center; gap: 8px; font-size: 18px; }
.ft-label { font-size: 10px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.ft-line .t1 { color: var(--primary); }
.ft-line .vs { color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--primary); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.panel-title { margin: 0; font-size: 20px; font-weight: 700; color: var(--primary); }
.vote-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.vote-row { display: flex; align-items: center; gap: 8px; }
.star { width: 38px; height: 38px; padding: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.star .star-ico { width: 24px; height: 24px; opacity: 0.35; filter: saturate(0.6); transition: opacity 0.2s; }
.star.on { background: var(--primary-light); border-color: var(--primary); }
.star.on .star-ico { opacity: 1; filter: none; animation: play-pop 0.4s ease-out; }
.vote-name { flex: 1; min-width: 0; font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper { display: flex; align-items: center; gap: 4px; }
.step { width: 34px; height: 34px; padding: 0; font-size: 19px; font-weight: 800; line-height: 1; color: var(--primary-dark); }
.rating { width: 34px; text-align: center; font-size: 15px; font-weight: 800; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.rating.bump { animation: play-bump 0.25s ease-out; }
@keyframes play-bump { 40% { transform: scale(1.25); } }
.panel .cta { margin-top: 6px; }

/* The result: the panel's Results, then your card */
.res-title { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.results { display: flex; flex-direction: column; gap: 4px; }
.res-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.res-name { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-row.you .res-name { color: var(--primary-dark); font-weight: 700; }
.res-star { width: 26px; height: 26px; flex-shrink: 0; }
.res-right { display: flex; align-items: center; gap: 8px; }
.res-votes { display: inline-flex; align-items: center; gap: 2px; color: var(--warning); font-size: 13px; font-weight: 700; }
.res-vote-ico { width: 16px; height: 16px; }
.avg { min-width: 44px; padding: 4px 8px; border-radius: 8px; background: var(--primary-light); color: var(--primary-dark); font-size: 15px; font-weight: 800; text-align: center; }
.mine { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; }
.mine-head { margin: 0 0 4px; font-size: 18px; font-weight: 800; line-height: 1.25; }
.mine-head.won { color: var(--primary); }
.pcard { position: relative; width: 150px; aspect-ratio: 100 / 142; animation: play-card 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes play-card { from { transform: rotateY(80deg) scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }
.card-shape { position: absolute; inset: 0; width: 100%; height: 100%; }
.pc-layer { position: absolute; inset: 0; padding: 14px 14px 0; display: flex; flex-direction: column; }
.pc-top { display: flex; align-items: flex-start; }
.pc-corner { width: 38px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.pc-overall { font: 27px/29px "Exo 2 Bibs", sans-serif; color: var(--primary); }
.pc-pos { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: var(--text); }
.pc-face { flex: 1; display: flex; justify-content: center; margin-top: 2px; }
.pc-face svg { width: 62px; height: 62px; border-radius: 50%; background: var(--primary); border: 2px solid var(--primary-dark); fill: var(--on-primary); padding: 8px 6px 0; box-sizing: border-box; }
.pc-name { margin: 6px 4px 0; padding-bottom: 3px; text-align: center; border-bottom: 1px solid rgba(34, 197, 94, 0.35); font: 13px/1.2 "Exo 2 Bibs", sans-serif; text-transform: uppercase; color: var(--text); }
.pc-skills { display: flex; justify-content: center; gap: 8px; margin-top: 7px; }
.pc-col { display: flex; flex-direction: column; gap: 2px; }
.pc-div { width: 1px; background: rgba(34, 197, 94, 0.35); }
.pc-skill { display: flex; align-items: baseline; gap: 3px; }
.pc-skill b { width: 19px; text-align: right; font-size: 13px; font-weight: 800; color: var(--text); }
.pc-skill span { font-size: 8px; font-weight: 700; letter-spacing: 0.5px; color: var(--muted); }
.outro { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.outro-title { margin: 0; font-size: 19px; letter-spacing: -0.3px; }
.again { padding: 13px 20px; color: var(--text); font-size: 15px; }
.outro .small { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width: 380px) {
  .screen { padding: 12px 12px 16px; }
  .mine { grid-template-columns: 130px minmax(0, 1fr); }
  .pcard { width: 130px; }
  .pc-overall { font-size: 23px; line-height: 25px; }
  .pc-face svg { width: 52px; height: 52px; }
  .step { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .screen, .pop, .badge.pop .ring, .seat-ring, .pcard, .goal-flash.on, .feed li, .tile-ring, .live::before, .star.on .star-ico, .rating.bump { animation: none; }
}
