/* Share cards v2 (1024px wide, rendered by html2canvas 1.4.1: no object-fit, filters or color-mix).
   Dark card: team-colour glow on rows, date blocks on the schedule, red circuit outline. */
.share-template.s3 { width: 1024px; height: auto; color: #fff; font-family: Manrope, Inter, sans-serif;
  background: linear-gradient(180deg, #16181d 0%, #0b0c0f 100%);
  padding: 28px 28px 24px; box-sizing: border-box; letter-spacing: -0.01em; position: relative; overflow: hidden; }

/* Hero */
.s3-hero { position: relative; height: 380px; border-radius: 36px; overflow: hidden; background-color: #15171b;
  background-size: cover; background-position: center; color: #fff; }
.s3-hero.compact { height: 260px; }
.s3-hero.nophoto { background-image: linear-gradient(135deg, #e10600 0%, #5c0200 100%); }
.s3-shade { position: absolute; left: 0; top: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.05) 35%, rgba(0,0,0,.88) 100%); }
.s3-trackbg { position: absolute; right: 30px; top: 70px; width: 380px; opacity: .22; }
.s3-trackbg path { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linejoin: round; }
.s3-top { position: absolute; left: 32px; right: 32px; top: 28px; display: flex; justify-content: space-between; align-items: center; }
.s3-chip { background: #e10600; color: #fff; border-radius: 999px; padding: 10px 20px; font-size: 22px; font-weight: 800; letter-spacing: .03em; }
.s3-hero-body { position: absolute; left: 32px; right: 32px; bottom: 30px; }
.s3-gp { display: flex; align-items: center; gap: 18px; font-size: 76px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.s3-hero.compact .s3-gp { font-size: 60px; }
.s3-flag { width: 72px; height: 48px; border-radius: 8px; background-size: cover; background-position: center; flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.s3-sub { font-size: 26px; font-weight: 600; opacity: .88; margin-top: 12px; }

/* Podium */
.s3-podium { display: flex; gap: 16px; align-items: flex-end; margin-top: 20px; }
.s3-pod { flex: 1; position: relative; height: 330px; border-radius: 30px; overflow: hidden; color: #fff; }
.s3-pod.p1 { flex: 1.18; height: 380px; }
.s3-pos { position: absolute; left: 22px; top: 16px; font-size: 64px; font-weight: 900; line-height: 1; opacity: .9; }
.s3-portrait { position: absolute; left: 0; right: 0; top: 14px; bottom: 112px; background-size: contain; background-repeat: no-repeat;
  background-position: center bottom; }
.s3-pod-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 20px 18px; background: rgba(0,0,0,.28); }
.s3-pod-info .nm { font-size: 30px; font-weight: 800; line-height: 1.05; white-space: nowrap; overflow: hidden; }
.s3-pod-info .tm { font-size: 19px; font-weight: 600; opacity: .8; margin-top: 2px; }
.s3-pod-info .vl { font-size: 24px; font-weight: 700; margin-top: 6px; font-family: "JetBrains Mono", ui-monospace, monospace; }

/* Rows: each one a tile glowing in the team colour */
.s3-list { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.s3-row { display: flex; align-items: center; gap: 18px; padding: 12px 26px 12px 18px; border-radius: 24px;
  border: 2px solid rgba(255,255,255,.06); }
.s3-rpos { width: 48px; font-size: 38px; font-weight: 900; color: #fff; text-align: center; }
.s3-face { width: 62px; height: 62px; border-radius: 31px; flex: 0 0 auto; background-size: cover; background-position: center top;
  display: flex; align-items: center; justify-content: center; border: 3px solid rgba(255,255,255,.85); box-sizing: border-box; }
.s3-face span { color: #fff; font-weight: 800; font-size: 20px; }
.s3-rname { flex: 1; min-width: 0; }
.s3-rname b { display: block; font-size: 29px; font-weight: 800; white-space: nowrap; overflow: hidden; }
.s3-rname span { display: block; font-size: 19px; font-weight: 600; color: rgba(255,255,255,.6); }
.s3-rval { font-size: 27px; font-weight: 700; font-family: "JetBrains Mono", ui-monospace, monospace; }
.s3-rval.st { color: #ff4d4d; font-family: Manrope, Inter, sans-serif; font-weight: 800; }
.s3-results.is-remaining .s3-row { padding-top: 9px; padding-bottom: 9px; }

/* Schedule */
.s3-circuit { display: flex; gap: 26px; align-items: center; border-radius: 30px; padding: 22px 28px; margin-top: 18px;
  background: linear-gradient(135deg, #22252c 0%, #15171b 100%); border: 2px solid rgba(255,255,255,.06); }
.s3-circuit svg { width: 220px; flex: 0 0 auto; }
.s3-circuit svg path { fill: none; stroke: #e10600; stroke-width: 2.8; stroke-linejoin: round; stroke-linecap: round; }
.s3-circuit-info b { display: block; font-size: 30px; font-weight: 800; line-height: 1.15; }
.s3-circuit-info > span { display: block; font-size: 21px; color: rgba(255,255,255,.55); font-weight: 600; margin-top: 4px; }
.s3-facts { display: flex; gap: 30px; margin-top: 14px; }
.s3-facts i { display: block; font-style: normal; font-size: 16px; color: rgba(255,255,255,.45); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.s3-facts em { display: block; font-style: normal; font-size: 28px; font-weight: 700; font-family: "JetBrains Mono", ui-monospace, monospace; }
.s3-days { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.s3-day { display: flex; gap: 18px; align-items: stretch; border-radius: 30px; padding: 14px;
  background: linear-gradient(135deg, #22252c 0%, #15171b 100%); border: 2px solid rgba(255,255,255,.06); }
.s3-day.main { background: linear-gradient(135deg, #3a0a08 0%, #17090a 100%); border-color: rgba(225,6,0,.45); }
.s3-date { width: 132px; flex: 0 0 auto; border-radius: 22px; background: rgba(255,255,255,.07); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 12px 0; }
.s3-day.main .s3-date { background: #e10600; }
.s3-date b { font-size: 56px; font-weight: 900; line-height: 1; }
.s3-date span { font-size: 20px; font-weight: 800; letter-spacing: .08em; margin-top: 4px; }
.s3-date em { font-style: normal; font-size: 16px; font-weight: 600; opacity: .7; margin-top: 2px; }
.s3-day-list { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.s3-ses { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px; }
.s3-ses + .s3-ses { border-top: 2px solid rgba(255,255,255,.07); }
.s3-ses span { font-size: 32px; font-weight: 800; }
.s3-ses b { font-size: 36px; font-weight: 700; font-family: "JetBrains Mono", ui-monospace, monospace; }
.s3-ses.main b { color: #ff3b30; }

/* Footer */
.s3-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding: 0 8px; }
.s3-foot-l { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; letter-spacing: .04em; }
.s3-foot-l i { width: 12px; height: 12px; border-radius: 6px; background: #e10600; display: block; }
.s3-foot-r { font-size: 18px; color: rgba(255,255,255,.5); font-weight: 700; }

/* ---------- Classic, light theme ---------- */
.share-template.s3.s3-light { background: linear-gradient(180deg, #f6f7f9 0%, #eceef2 100%); color: #111317; }
.s3-light .s3-row { border-color: rgba(0,0,0,.05); }
.s3-light .s3-rpos { color: #111317; }
.s3-light .s3-rname span { color: #8a919c; }
.s3-light .s3-rval.st { color: #e10600; }
.s3-light .s3-face { border-color: #ffffff; }
.s3-light .s3-circuit, .s3-light .s3-day { background: #ffffff; border-color: rgba(0,0,0,.05); }
.s3-light .s3-circuit-info > span, .s3-light .s3-facts i { color: #8a919c; }
.s3-light .s3-date { background: #f1f2f5; }
.s3-light .s3-day.main { background: linear-gradient(135deg, #fff1f0 0%, #ffffff 100%); border-color: rgba(225,6,0,.35); }
.s3-light .s3-day.main .s3-date { background: #e10600; color: #fff; }
.s3-light .s3-ses + .s3-ses { border-top-color: #eef0f3; }
.s3-light .s3-ses.main b { color: #e10600; }
.s3-light .s3-foot-r { color: #8a919c; }

/* ---------- Poster ---------- */
.share-template.s3p { width: 1024px; min-height: 1280px; height: auto; position: relative; overflow: hidden; color: #fff;
  font-family: Manrope, Inter, sans-serif; background-color: #0b0c0f; background-size: cover; background-position: center top;
  padding: 40px 40px 30px; box-sizing: border-box; letter-spacing: -0.01em; }
.share-template.s3p.nophoto { background-image: linear-gradient(160deg, #e10600 0%, #3a0200 60%, #0b0c0f 100%); }
.pp-shade { position: absolute; left: 0; top: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.35) 30%, rgba(0,0,0,.82) 60%, rgba(0,0,0,.95) 100%); }
.s3p > * { position: relative; }
.s3p > .pp-shade { position: absolute; }
.pp-top { display: flex; align-items: center; gap: 18px; }
.pp-date { font-size: 24px; font-weight: 700; opacity: .85; }
.pp-date.big { font-size: 28px; margin-top: 10px; }
.pp-title { display: flex; align-items: center; gap: 22px; font-size: 120px; font-weight: 900; line-height: .95; letter-spacing: -0.04em;
  margin-top: 120px; text-transform: uppercase; }
.pp-title .s3-flag { width: 96px; height: 64px; }
.s3p.is-schedule .pp-title { margin-top: 260px; }
.pp-winner { display: flex; align-items: flex-end; gap: 10px; height: 330px; border-radius: 34px; margin-top: 36px; overflow: hidden; }
.pp-portrait { width: 360px; height: 330px; background-size: contain; background-repeat: no-repeat; background-position: center bottom; flex: 0 0 auto; }
.pp-winfo { padding: 0 20px 34px 0; }
.pp-label { display: inline-block; background: #e10600; border-radius: 999px; padding: 7px 16px; font-size: 20px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; }
.pp-winfo b { display: block; font-size: 60px; font-weight: 900; line-height: 1; margin-top: 16px; }
.pp-team { display: block; font-size: 24px; font-weight: 600; opacity: .8; margin-top: 8px; }
.pp-winfo em { display: block; font-style: normal; font-size: 40px; font-weight: 700; margin-top: 14px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.pp-duo { display: flex; gap: 16px; margin-top: 16px; }
.pp-duo-card { flex: 1; display: flex; align-items: center; gap: 18px; background: rgba(255,255,255,.08); border-radius: 26px;
  padding: 16px 20px; border-left: 8px solid #888; }
.pp-duo-card .s3-face { width: 82px; height: 82px; border-radius: 41px; border: 3px solid rgba(255,255,255,.8); box-sizing: border-box;
  background-size: cover; background-position: center top; }
.pp-duo-card span { display: block; font-size: 20px; font-weight: 800; opacity: .7; }
.pp-duo-card b { display: block; font-size: 34px; font-weight: 900; }
.pp-duo-card em { display: block; font-style: normal; font-size: 26px; font-weight: 700; font-family: "JetBrains Mono", ui-monospace, monospace; }
.pp-rest { display: flex; gap: 16px; margin-top: 16px; }
.pp-col { flex: 1; background: rgba(255,255,255,.07); border-radius: 26px; padding: 8px 20px; }
.pp-cell { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.pp-cell + .pp-cell { border-top: 2px solid rgba(255,255,255,.08); }
.pp-cell .p { width: 40px; font-size: 26px; font-weight: 900; }
.pp-cell i { width: 6px; height: 30px; border-radius: 3px; display: block; }
.pp-cell b { flex: 1; font-size: 26px; font-weight: 800; }
.pp-cell em { font-style: normal; font-size: 22px; font-weight: 700; opacity: .85; font-family: "JetBrains Mono", ui-monospace, monospace; }
.pp-sched { margin-top: 40px; background: rgba(0,0,0,.45); border-radius: 30px; padding: 10px 30px; }
.pp-srow { display: flex; align-items: center; padding: 18px 0; }
.pp-srow + .pp-srow { border-top: 2px solid rgba(255,255,255,.1); }
.pp-srow .d { width: 160px; font-size: 24px; font-weight: 800; opacity: .7; }
.pp-srow .n { flex: 1; font-size: 36px; font-weight: 800; }
.pp-srow b { font-size: 40px; font-weight: 700; font-family: "JetBrains Mono", ui-monospace, monospace; }
.pp-srow.main .n, .pp-srow.main b { color: #ff3b30; }
.s3p .s3-foot { margin-top: 26px; }

/* style switcher in the share modal */
.share-style-toggle { display: flex; gap: 6px; margin-top: 14px; }
.share-style-toggle button { flex: 1; padding: 9px 8px; border-radius: 10px; border: 1px solid var(--border, #e7e9ee); background: transparent;
  color: inherit; font: 700 13px Manrope, Inter, sans-serif; cursor: pointer; }
.share-style-toggle button.active { background: #e10600; border-color: #e10600; color: #fff; }

/* GP name with the session right under it, both in one column next to the flag */
.s3-gp { align-items: flex-start; }
.s3-gp .s3-flag { margin-top: 12px; }
.s3-titles { display: flex; flex-direction: column; }
.s3-session { font-size: 44px; font-weight: 700; line-height: 1.05; margin-top: 8px; color: rgba(255,255,255,.78);
  letter-spacing: -0.01em; text-transform: none; }
.pp-title { align-items: flex-start; }
.pp-title .s3-flag { margin-top: 22px; }
.pp-session { font-size: 56px; font-weight: 800; margin-top: 10px; letter-spacing: -0.02em; }
