/* RESET (licht) */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  background: #0a152c; /* #081327; #0d1d3a; #; #0f172a; /* donker blauw/grijs */
  color: #f8fafc;
}

/* LAYOUT */
#app,
#live {
  max-width: 420px;
  margin: 0 auto;
  padding: 0 12px;
}

#screen {
  padding: 10px;           /* ← hier hoort het */
}

/* HEADER / STATUSBAR */
.statusbar,
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #020617;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  opacity: 1;
}

/* Default hub (running / break) */
.statusbar {
  padding: 22px 12px 0px;
}

/* Live hub */
.statusbar--live {
  padding: 10px 12px;
}

/* Finished / message */
.statusbar--finished {
  padding: 12px 12px;
}

.statusbar--live .statusbar-inner {
  align-items: center;
}

.statusbar-inner {
  display: flex;
  align-items: baseline;      /* lijn teksten onderling uit */
  width: 100%;
  justify-content: space-between;
}

.statusbar--center .statusbar-inner {
  align-items: center;
}

#clock,
#period {
  font-size: 14px;   /* exact gelijk aan statusbar */
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

header h1 {
  font-size: 1.4rem;   /* wat je nu ook gebruikt */
  line-height: 1;
}

header #status .period-live {
  margin-right: 0.40em;
}

#status {
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.35em;
  opacity: 0.85;
}

.statusbar .time {
  font-weight: 600;
}

@keyframes score-breathe {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.score-breathe {
  animation: score-breathe 550ms ease-in-out;
}

.score {
  font-size: 60px;
  font-weight: 900;
  letter-spacing: 0.01em;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25em;
  color: #f1f5f9;
}

.score-sep {
  opacity: 0.7;
  font-weight: 400;
}

/* SECTIONS */
h2, h3 {
  margin: 12px 0 8px;
  font-size: 16px;
  font-weight: 740;
  opacity: 0.9;
}

.last-events,
.goals-list {
  background: #020617;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  margin-top: 8px;
}

.last-events div,
.goals-list div,
.event {
  font-size: 14px;
  margin: 4px 0;
  opacity: 0.95;
}

.context-center {
  transition: opacity 160ms ease;
}

.context-center.is-transitioning {
  opacity: 0.4;
}

/* GOAL GRID */
.goal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 360px) {
  .goal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* BUTTONS */
button,
a.primary {
  display: block;
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

/* BUTTON VARIANTS */
button.primary,
a.primary {
  background: #2563eb;
  color: white;
}

button.secondary {
  background: #334155;
  color: #e5e7eb;
}

button.danger {
  background: #dc2626;
  color: white;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.secondary:disabled {
  background: #334155;           /* zelfde knop */
  color: #64748b;                /* dichter bij achtergrond */
}

/* GOAL BUTTONS */
.goal-grid button {
  background: #1e293b;
  color: #f8fafc;
  border-radius: 14px;
  font-size: 15px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  opacity: 1;
}

/* LINKS */
a {
  text-decoration: none;
}

/* LIVE BLOG */
#events {
  margin-top: 12px;
}

.event {
  background: #020617;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 14px;
}

/* Periode-blok */
.period {
  margin-bottom: 1.5rem;
}

/* Periode-header */
.period-header {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  opacity: 0.8;
  margin-bottom: 6px;
}

.period-header span.live {
  font-weight: normal;
  font-size: 0.85em;
  opacity: 0.6;
}

/* Algemene eventregel */
.event {
  padding-left: 0.5rem;
  margin: 0.15rem 0;
}

/* Goal voor */
.event-goal {
  color: #f8fafc;
}

/* Tegengoal */
.event-goal-against {
  color: #f8fafc;
}

/* Afsluiter van periode */
.period-end {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 10px;

  margin: 14px 0 10px;
  padding: 0 2px;

  font-size: 12px;
  color: rgba(248, 250, 252, 0.42);
}

.period-end__line {
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.00) 0%,
    rgba(255,255,255,0.16) 22%,
    rgba(255,255,255,0.16) 78%,
    rgba(255,255,255,0.00) 100%
  );
}

.period-end__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;

  padding: 0 2px;
}

.period-end__title {
  font-weight: 500;
  color: rgba(248, 250, 252, 0.50);
}

.period-end__dot {
  opacity: 0.32;
}

.period-end__time {
  color: rgba(248, 250, 252, 0.40);
  font-weight: 400;
}

@keyframes livePulse {
  0% {
    opacity: 0.5;
    transform: scale(0.9);
  }
  50% {
    opacity: 1.2;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.5;
    transform: scale(0.9);
  }
}

.period-live {
  font-size: 0.8em;              /* zoals jij al deed */
  color: #FF6A2A;            /* pulse kleur */
  line-height: 1;
  animation: livePulse 2.1s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(255, 106, 42, 0.35);
}

@supports (-webkit-touch-callout: none) {
  .period-live {
    font-size: 0.8em !important;
    text-shadow: 0 0 3px rgba(255, 106, 42, 0.25);
    transform: scale(0.9);
  }
}

.period-note {
  font-size: 0.85em;
  opacity: 0.55;
  margin: 0.3rem 0 0.6rem;
  padding-left: 0.5rem;
}

.period-status {
  display: flex;
  align-items: center;
  gap: 9px;   /* was 6px */
  font-size: 13px;
  margin-bottom: 18px;
  margin-top: 18px;
}

.period-label {
  font-weight: 700;
  opacity: 0.85;
  font-size: 1.1em;
  color: #f8fafc;
  line-height: 1;
}

.period-status.hidden {
  display: none;
}

.period-live {
  animation: livePulse 2.1s ease-in-out infinite;
  font-size: 1.2em;
  display: flex;          /* 🔑 */
  align-items: center;    /* 🔑 */
  line-height: 1; 
}

/* =========================
   CONTEXT SCORE BUG (v2)
   =========================

.context-bug {
  display: grid;
  grid-template-columns: 1fr min-content 1fr;
  align-items: center;

  background: #020617;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

*/

.context-bug {
  display: grid;
  grid-template-columns: 1fr min-content 1fr;
  align-items: center;
  position: relative;
  z-index: 2;

  padding: 14px 16px 16px;
  margin-top: 6px;
  margin-bottom: 0;

  border-radius: 14px;
  border: 1px solid rgba(120, 160, 220, 0.18);

  background:
    radial-gradient(120% 140% at 50% -10%, rgba(45,226,230,0.08) 0%, rgba(45,226,230,0.00) 42%),
    linear-gradient(180deg, rgba(8,18,38,0.96) 0%, rgba(2,6,23,0.985) 100%);

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.34),
    0 3px 10px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(255,255,255,0.02);
}

/* TEAMS */
.context-bug .team {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 4px;
}

.team--left {
  text-align: left;
}

.team--right {
  text-align: right;
}

/* .context-bug .club {
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.context-bug .team-name {
  font-size: 12px;
  color: #cbd5e1;
  opacity: 0.85;
  line-height: 1.2;
} */



.context-bug .team--left {
  text-align: left;
  justify-self: start;
}

.context-bug .team--right {
  text-align: right;
  justify-self: end;
}

/* MIDDEN
.context-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  padding: 0 8px;
}

.context-primary {
  font-size: 14px;
  font-weight: 760;
  color: #f8fafc;
  line-height: 1.2;
} */

.context-primary #clock {
  font-size: 13px;
  font-weight: 400;
  color: #f8fafc;
  line-height: 1.2;
}

/*.context-secondary {
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 0.02em;
  margin-top: 2px;
  white-space: nowrap;
  line-height: 1.2;
}*/

.context-bug .club {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.context-bug .team-name {
  font-size: 12px;
  color: rgba(203, 213, 225, 0.82);
  line-height: 1.15;
}

.context-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
}

.context-primary {
  font-size: 14px;
  font-weight: 760;
  color: #f8fafc;
  line-height: 1.15;
}

.context-secondary {
  font-size: 12px;
  color: rgba(203, 213, 225, 0.78);
  margin-top: 6px;
  white-space: nowrap;
  line-height: 1.15;
}

/* LIVE DOT */
.context-live-dot {
  color: #ff6a2a;
  margin-right: 0.35em;
  animation: livePulse 2.1s ease-in-out infinite;
}

/* Mobile safety */
@media (max-width: 360px) {
  .context-bug {
    gap: 8px;
  }

  .context-bug .team-name {
    font-size: 11px;
  }
}

header {
  display: block;       /* ⛔ override flex */
  padding: 0;           /* padding zit nu in .context-bug */
  background: none;     /* context-bug draagt de achtergrond */
 }

header#appHeader {
  display: block;
  position: relative;
  z-index: 2;

  padding: 0;
  margin: 0 auto 18px;
  min-height: 0;
  height: auto;
  background: none;
  border-radius: 0;
  max-width: 420px;
}

header#appHeader.appHeader--live {
  padding: 0 6px;
}

header#appHeader > .context-bug {
  margin-bottom: 12px; /* spacing onder de bug, niet van header */
}

.event {
  padding: 4px 14px;
  margin: 8px 0;
  z-index: 0;
}

.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-main {
  flex: 1;
  font-weight: 600;
}

.event-time {
  font-size: 13px;
  opacity: 0.7;
  min-width: 48px;
}

.event-score {
  font-size: 13px;
  font-weight: 800;
  color: #2DE2E6;
  min-width: 36px;
  text-align: right;
  opacity: 0.9;
}

.event-assist {
  font-size: 13px;
  opacity: 0.6;
  margin-left: 56px;
  margin-top: 2px;
}

.event-goal {
  min-height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.event-goal-against {
  min-height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.event-goal-against .event-main {
  font-weight: normal;
  opacity: 0.75;
}

.goal-ball {
  width: 19px;
  height: 19px;
  object-fit: contain;
  margin-right: 5px;
  transform: translateY(1px);
}

#events .event-goal-against .goal-ball {
  width: 18px;
  height: 18px;
}

.event-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 33px;
}

.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-main {
  flex: 1;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.event-assist {
  font-size: 13px;
  opacity: 0.6;
  margin-left: 52px;
  height: 16px;   /* 🔥 vaste hoogte voor consistentie */
}

.scorer {
  font-weight: 600;
}

.assist-sep {
  margin: 0 6px;
  opacity: 0.4;
}

.assist-name {
  opacity: 0.65;
  font-weight: 400;
}

/* .event.new-goal {
  animation: goalBorderFade 1700ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes goalBorderFade {
  0% {
    box-shadow: 0 0 0 0 rgba(45,226,230,0);
  }
  30% {
    box-shadow: 0 0 0 1px rgba(45,226,230,0.15);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45,226,230,0);
  }
}*/

.event--new {
  animation: eventHighlightFade 1600ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes eventHighlightFade {
  0% {
    box-shadow:
      0 0 0 1px rgba(45, 226, 230, 0.22),
      0 0 0 0 rgba(45, 226, 230, 0.00);
    background: rgba(6, 15, 32, 0.98);
  }

  22% {
    box-shadow:
      0 0 0 1px rgba(45, 226, 230, 0.22),
      0 0 18px rgba(45, 226, 230, 0.08);
    background: rgba(10, 24, 46, 0.98);
  }

  100% {
    box-shadow:
      0 0 0 0 rgba(45, 226, 230, 0),
      0 0 0 rgba(45, 226, 230, 0);
    background: #020617;
  }
}

.match-card {
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.match-card.win {
  border-left: 4px solid #22c55e;
}

.match-card.loss {
  border-left: 4px solid #ef4444;
}

.match-card.draw {
  border-left: 4px solid #64748b;
}

.match-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.team-portal {
  max-width: 720px;
  margin: 40px auto 80px;
  padding: 0 20px;
}

.portal-header h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}

.portal-header p {
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 28px;
}

/* =========================
   HERO TILE (Team Portal)
   ========================= */

.hero-match {
  position: relative;
  padding: 26px 22px;
  border-radius: 22px;
  margin: 25px 0;

  background:
    radial-gradient(120% 120% at 50% 0%, rgba(45,226,230,0.05), transparent 65%),
    linear-gradient(180deg, #0e1a30 0%, #0b1424 100%);

  border: 1px solid rgba(255,255,255,0.08);

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 8px 22px rgba(0,0,0,0.35),
    0 0 40px rgba(45,226,230,0.04);
}

/* --- Top status row --- */

.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.hero-meta {
  font-size: 13px;
  opacity: 0.6;
}

.hero-live-badge {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --- Score row --- */

.hero-score-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.hero-score-row .team.home {
  text-align: left;
  font-size: 14px;
}

.hero-score-row .team.away {
  text-align: right;
  font-size: 14px;
}

.hero-score {
  font-size: 44px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
}

.live-dot {
  width: 7px;
  height: 7px;
  color: #ff6a2a;
  margin-right: 0.35em;
  animation: livePulse 2.1s ease-in-out infinite;
}

.upcoming,
.played {
  margin-top: 40px;
}

.upcoming h2,
.played h2 {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.35;
  margin-bottom: 16px;
  position: relative;
}

.upcoming h2 {
  opacity: 0.65;
}

.upcoming h2::after,
.played h2::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 10px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.1),
    rgba(255,255,255,0.07)
  );
}

.played .match-block {
  padding-bottom: 14px;
}

.played .match-block + .match-block {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 18px;
}

.match-block {
  margin-bottom: 22px;
}

.match-date {
  font-size: 12px;
  opacity: 0.5;
  margin-bottom: 6px;
}

.match-row {
  display: flex;
  align-items: left;
  justify-content: left;
  gap: 18px;
}

.match-row .team {
  flex: 1;
  text-align: center;
}

.match-row .score,
.match-row .vs {
  min-width: 60px;
  text-align: center;
}

.match-row .team {
  width: 38%;
  font-size: 14px;
}

.match-row .team.home {
  text-align: left;
}

.match-row .team.away {
  text-align: right;
}

.match-row .score,
.match-row .vs {
  text-align: center;
}

.match-row .score {
  width: 24%;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}

.played-item.win .score {
  text-shadow: 0 0 8px rgba(45,226,230,0.7);
}

.played-item.loss .score {
  opacity: 0.6;
}

.played-item.draw .score {
  opacity: 0.85;
}

.vs {
  opacity: 0.5;
  font-weight: 500;
}

.ph-admin-context { margin-top: 6px; opacity: .9; }
.ph-admin-season { opacity: .7; margin-left: 6px; }
.ph-admin-context-sub { font-size: 12px; opacity: .5; }
.ph-admin-controls { display:flex; justify-content:space-between; align-items:center; margin: 8px 0 12px; }
.ph-admin-hint { opacity:.6; font-size:12px; }
.ph-admin-warn { padding:10px 12px; border-radius:12px; opacity:.9; margin-bottom:12px; }

.ph-admin-ok{
  background: rgba(34, 197, 94, .10);
  border: 1px solid rgba(34, 197, 94, .22);
  color: rgba(236, 253, 245, .95);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 10px 0 0 0;

  font-size: 12px;      /* kleiner */
  line-height: 1.35;
}

.ph-admin-toast{
  position: relative;   /* eigen regel/blok */
}

.ph-fade-out{
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 320ms ease, transform 320ms ease;
}

/* ADMIN LAYOUT */
.ph-admin-header, .ph-admin-main {
  max-width: 420px;
  margin: 0 auto;
  padding: 0 12px;
}

/* Admin variant van de context-bug */
.context-bug--admin {
  margin-bottom: 12px; /* zelfde spacing vibe als app header */
}

/* Admin nav wat strakker onder de tile */
.ph-admin-nav {
  margin-top: 6px;
}

/* Admin: header full width, content inset */
.ph-admin-inner{
  padding: 0 12px 16px;
  max-width: 420px;
  margin: 0 auto;
}

/* Admin view badge (chip) */
.ph-badge{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: 0.2px;
  font-weight: 700;
  line-height: 1.2;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.12);
}

/* Accent variant voor actieve view */
.ph-badge--accent{
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.95);
  background: rgba(45,226,230,0.06);
  box-shadow: 0 0 10px rgba(45,226,230,0.08);
}

.context-bug--admin .team--right .club{
  display: flex;
  justify-content: flex-end;
}

/* Admin context-bug: rechter badge mooi gecentreerd */
.context-bug--admin .team--right{
  display: flex;
  align-items: center;      /* verticaal centreren */
  justify-content: flex-end;/* rechts uitlijnen */
}

.context-bug--admin .team--right .ph-badge{
  margin-top: 0;            /* voor de zekerheid */
}

:root{
  --ph-pulse: #FF6A2A;
  --ph-accent: #2DE2e6;
}

/* Admin tabs: rustig, dashboard-style (badge blijft de highlight) */
.ph-admin-tabs{
  display:flex;
  gap:18px;
  margin-top: 12px;
  margin-bottom: 6px;
  padding: 0 12px;                 /* match gutters */
}

.ph-admin-tabs a{
  position: relative;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  opacity: 0.55;                   /* rustig */
  background: none;
  border: none;
}

.ph-admin-tabs a:hover{
  opacity: 0.85;
}

.ph-admin-tabs a.active{
  opacity: 1;
  color: rgba(255, 255, 255, 0.92);
}

/* dunne underline bij active (subtiel accent) */
.ph-admin-tabs a.active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1.5px;
  border-radius: 999px;
  background: #f8fafcc4;
  box-shadow: 0 0 10px rgba(45,226,230,0.10);
}

/* Badge menu (details/summary) */
.ph-menu{ position: relative; }
.ph-menu > summary{ list-style: none; cursor: pointer; }
.ph-menu > summary::-webkit-details-marker{ display:none; }

.ph-badge--menu{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ph-badge-icon{
  font-size: 12px;
  opacity: 0.9;
}

/* dropdown panel */
.ph-menu-pop{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 150px;
  background: #020617;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  z-index: 50;
}

.ph-menu-pop a{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  opacity: 0.75;
  border: 1px solid transparent;
}

.ph-menu-pop a:hover{
  background: rgba(255,255,255,0.05);
  opacity: 1;
}

.ph-menu-pop a.active{
  background: rgba(45,226,230,0.08);
  border-color: rgba(45,226,230,0.18);
  opacity: 1;
}

/* Menu links: geen default blauw/paars */
.ph-menu-pop a,
.ph-menu-pop a:visited{
  color: rgba(255,255,255,0.86);
  text-decoration: none;
}

.ph-menu-dot{
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.20);
  box-shadow: none;
}

.ph-menu-pop a.active .ph-menu-dot{
  background: var(--ph-accent);
  box-shadow: 0 0 10px rgba(45,226,230,0.18);
}

/* Menu open state */
.ph-menu[open] > .ph-badge--menu{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
}

.ph-badge-icon{
  display: inline-block;
  transition: transform 160ms ease, opacity 160ms ease;
  transform-origin: 50% 50%;
}

.ph-menu[open] .ph-badge-icon{
  transform: rotate(90deg);
  opacity: 0.95;
}

.ph-btn--ghost{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.88);
}

button.ph-btn{
  appearance: none;
  border: none;
  cursor: pointer;
}

button.ph-btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

.ph-linkaction{
  position: relative;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 800;
  opacity: 0.75;
  text-decoration: none;
}
.ph-linkaction:hover{ opacity: 1; }
.ph-linkaction::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:2px;
  height:1.5px;
  border-radius:999px;
  background: rgba(255,255,255,0.35);
  opacity:0;
}
.ph-linkaction:hover::after{ opacity:1; }

.ph-admin-controls{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 12px;
  margin: 10px 0 12px;
}

.ph-admin-controls-right{
  display:flex;
  align-items:center;
  gap: 12px;
}

.ph-admin-titleline{
  display:flex;
  align-items: baseline;
  gap: 8px;
}

.ph-admin-title{
  font-size: 14px;
  font-weight: 900;
  opacity: 0.92;
}

.ph-admin-count{
  font-size: 12px;
  opacity: 0.6;
}

/* toggle compact */
.ph-admin-toggle{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.7;
}

/* tab-style action link */
.ph-linkaction{
  position: relative;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 800;
  opacity: 0.75;
  text-decoration: none;
  color: rgba(255,255,255,0.86);
}
.ph-linkaction:hover{ opacity: 1; }
.ph-linkaction::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:2px;
  height:1.5px;
  border-radius:999px;
  background: rgba(255,255,255,0.35);
  opacity:0;
}
.ph-linkaction:hover::after{ opacity:1; }

/* Klikbare match row */
a.ph-row-link{
  text-decoration: none;
  color: inherit;
}

a.ph-row-link:hover{
  transform: translateY(-1px);
}

.ph-row-top{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.ph-row-date{
  font-size: 13px;
  font-weight: 800;
  opacity: 0.9;
}

.ph-row-status{
  font-size: 12px;
  font-weight: 800;
  opacity: 0.6;
  white-space: nowrap;
}

.ph-row-bottom{
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.92;
  line-height: 1.25;
}

/* Match rows: meer lucht + duidelijke hiërarchie */
a.ph-row-link{
  text-decoration: none;
  color: inherit;
}

.ph-row{
  margin-bottom: 16px;      /* meer ruimte tussen rows */
  padding: 12px 12px;       /* iets meer padding */
}

.ph-row-meta{
  font-size: 12px;
  font-weight: 350;
  opacity: 0.7;
  line-height: 1.3;
}

.ph-dot{
  opacity: 0.55;
  margin: 0 6px;
}

.ph-row-bottom{
  margin-top: 6px;
  font-size: 14px;
  font-weight: 400;         /* niet te dik */
  opacity: 0.92;
  line-height: 1.35;
}

a.ph-row-link:active{
  transform: scale(0.99);
  opacity: 0.95;
}

a.ph-row-link:active{
  transform: scale(0.99);
  opacity: 0.95;
}

.ph-actionchip{
  display:inline-flex;
  align-items:center;
  gap:2px;                 /* iets meer adem dan 1px */
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2px;
  text-decoration:none;
  color: rgba(255,255,255,0.88);
  border-radius: 10px;
}

.ph-actionchip:hover{
  color: rgba(255,255,255,0.96);
}

.ph-actionchip-text{
  position: relative;
  display: inline-block;
}

.ph-actionchip-text::after{
  content:"";
  position:absolute;
  left: 0;
  right: 0;
  bottom: -2px;            /* net onder baseline */
  height: 1.5px;
  background: rgba(45,226,230,0.55);
  opacity: 0;
}

.ph-actionchip:hover .ph-actionchip-text::after{
  opacity: 1;
}

/* plusje subtiel mee laten “oplichten” */
.ph-actionchip-plus{
  width: 18px;
  height: 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size: 14px;
  font-weight: 900;
  color: rgba(45,226,230,0.95);
  opacity: 0.95;
}

.ph-actionchip:hover .ph-actionchip-plus{
  text-shadow: 0 0 10px rgba(45,226,230,0.25);
  opacity: 1;
}

/* keyboard focus */
.ph-actionchip:focus-visible{
  outline: 2px solid rgba(45,226,230,0.35);
}

.ph-mid{
  font-size: 15px;
  font-weight: 950;
  color: rgba(255,255,255,0.96);
  padding: 0 4px;
}

.ph-mid{ min-width: 44px; }

.ph-mid.is-empty{
  opacity: 0.4;
  font-weight: 800;
}

.ph-mid.win{
  text-shadow: 0 0 8px rgba(45,226,230,0.7);
}

.ph-mid.loss{
  opacity: 0.68;
}

.ph-mid.draw{
  opacity: 0.85;
}

.ph-pagehead{
  display:flex;
  align-items:center;          /* verticaal centreren = jouw wens */
  justify-content:space-between;
  gap:12px;
  margin: 10px 0 12px;
}

.ph-pagehead-title{
  margin: 0;                   /* h2 heeft vaak default margins */
  display:flex;
  align-items: baseline;
  gap: 8px;
}

/* Matchline: vaste 3-koloms layout zodat alles uitlijnt */
.ph-matchline{
  margin-top: 6px;
  width: 100%;
  max-width: 420px;     /* extra safety, maar jouw main zit al op 420 */
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* links groot, midden klein, rechts groot */
  align-items: center;
  gap: 10px;
}

/* Links / rechts mogen afkappen i.p.v. wrap (rustiger) */
.ph-home,
.ph-away{
  font-size: 14px;
  font-weight: 500;
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-home{ text-align: left; }
.ph-away{ text-align: right; }

/* Score altijd gecentreerd */
.ph-mid{
  text-align: center;
  font-size: 15px;
  font-weight: 950;
  color: rgba(255,255,255,0.96);
  min-width: 36px; /* zorgt dat 1-0 en 10-0 niet “wiebelen” */
}

.ph-section{
  margin-top: 12px;
}

.ph-section:first-child{
  margin-top: 0;
}

.ph-section-title{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: 0.45;
  margin: 8px 0 10px;
}

.ph-section-list .ph-row{
  margin-bottom: 10px;
}

/* extra scheiding tussen secties zonder drukte */
.ph-section + .ph-section{
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* --- Admin form layout (scoped, minimal) --- */
.ph-formgrid {
  display: grid;
  gap: 12px;
}

.ph-formgrid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 720px) {
  .ph-formgrid-2 {
    grid-template-columns: 1fr;
  }
}

/* Make a ph-row behave like a field row (label + control) */
.ph-row--field .ph-row-meta {
  margin-bottom: 6px;
}

/* Small hint text under a field, using existing muted feel */
.ph-field-hint {
  font-size: 13px;
  opacity: .7;
  line-height: 1.35;
}

/* Actions row: keep buttons aligned and compact */
.ph-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Two-column grid helper (admin forms) */
.ph-grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.running-group {
  margin-bottom: 16px;
}

.running-group h3 {
  margin: 0 0 8px;
  font-size: 14px;
  opacity: 0.75;
  transition: opacity 160ms ease;
}

.bench-grid {
  opacity: 0.65;
  transition: opacity 160ms ease;
}

.dim {
  opacity: 0.4;
}

/* RUNNING substitution focus mode:
   dim de rest van de UI, laat titel + veldspelers spreken */
.sub-focus-mode .running-group h3,
.sub-focus-mode .bench-grid {
  opacity: 0.28;
}

.sub-focus-mode h2,
.sub-focus-mode .sub-hint,
.sub-focus-mode #fieldGrid,
.sub-focus-mode #fieldGrid button {
  opacity: 1;
}

.dimmed-control,
.dimmed-control:disabled {
  opacity: 0.08;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.sub-focus-score {
  opacity: 0.08;
  transition: opacity 160ms ease;
}

.sub-focus-mode-pickin .running-group h3 {
  opacity: 0.28;
}

.sub-focus-mode-pickin #fieldGrid {
  opacity: 1;
  transition: opacity 160ms ease;
}

.sub-focus-mode-pickin #fieldGrid button {
  opacity: 1;
}

.sub-focus-mode-pickin .bench-grid button {
  opacity: 1;
}

.sub-focus-mode-pickin h2,
.sub-focus-mode-pickin .sub-hint,
.sub-focus-mode-pickin .bench-grid,
.sub-focus-mode-pickin .bench-grid button {
  opacity: 1;
}

.assist-scorer {
  --borderWidth: 2px;
  position: relative;
  border-radius: var(--borderWidth);
}

.assist-scorer:after {
  content: '';
  position: absolute;
  top: calc(-1 * var(--borderWidth));
  left: calc(-1 * var(--borderWidth));
  height: calc(100% + var(--borderWidth) * 2);
  width: calc(100% + var(--borderWidth) * 2);
  background: linear-gradient(65deg, #FF6A2A, #334155, #FF6A2A, #334155);
  border-radius: 14px;
  z-index: -1;
  animation: animatedgradient 6.5s ease infinite;
  background-size: 300% 400%;
}


@keyframes animatedgradient {
	0% {
		background-position: 0% 85%;
	}
	50% {
		background-position: 90% 30%;
	}
	100% {
		background-position: 0% 85%;
	}
}

.assist-focus-mode .running-group h3,
.assist-focus-mode .bench-grid {
  opacity: 0.08;
}

.assist-focus-mode h2,
.assist-focus-mode #fieldGrid,
.assist-focus-mode #fieldGrid button {
  opacity: 1;
}

.assist-scorer__label {
  color: rgba(248, 250, 252, 0.18);
}

.assist-scorer__ball {
  color: rgba(248, 250, 252, 0.38);
}

.assist-scorer {
  background: #172235 !important;
}

.running-title-ball {
  width: 23px;
  height: 23px;
  object-fit: contain;
  vertical-align: -6px;
  margin-right: 6px;
}

.event-substitution .event-main {
  opacity: 0.75;
  font-weight: 500;
}

.event-substitution {
  color: #ffffff;
  font-size: 13px !important;
  opacity: 1;
}

.event-substitution .event-time,
.event-substitution .event-icon,
.event-substitution .event-text,
.event-substitution .event-main,
.event-substitution .event-meta {
  opacity: 0.74;
}

.event-formation-change .event-time,
.event-formation-change .event-icon,
.event-formation-change .event-main,
.event-formation-change .event-meta {
  opacity: 0.74;
}

.event-main .substitution {
  font-size: 10px !important;
}

.event-meta {
  font-size: 13px;
  font-weight: 500;
  color: #f8fafc;
  min-width: 36px;
  text-align: right;
  opacity: 0.75;
}

.event-substitution .event-main {
  font-weight: 500;
  opacity: 0.9;
}

.running-field{
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.running-field__pitch{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  gap: 5px 3px;
  align-items: center;
}

.running-field__pitch > button{
  width: 100%;
}

.running-field__fallback{
  grid-column: auto !important;
  grid-row: auto !important;
}

.running-field__pitch{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-rows:auto auto auto auto;
  column-gap:10px;
  row-gap:14px;
  align-items:center;
}

.running-field__pitch > button{
  width:100%;
  max-width:110px;
  justify-self:center;
}

.running-field__pitch > button[data-slot="LM"],
.running-field__pitch > button[data-slot="LW"],
.running-field__pitch > button[data-slot="LB"]{
  justify-self:end;
}

.running-field__pitch > button[data-slot="RM"],
.running-field__pitch > button[data-slot="RW"],
.running-field__pitch > button[data-slot="RB"]{
  justify-self:start;
}

.running-field__pitch > button[data-slot="CB"],
.running-field__pitch > button[data-slot="CM"],
.running-field__pitch > button[data-slot="ST"],
.running-field__pitch > button[data-slot="GK"]{
  justify-self:center;
}

.running-field{
  padding: 0;
}

.running-field__pitch{
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px !important;
}

.running-field__row{
  display: grid;
  justify-content: center;
  align-items: center;
}

.running-field__row--1{
  grid-template-columns: 1fr;
}

.running-field__row--1[data-line="keeper"]{
  grid-template-columns: 1fr;
  margin-top: 8px;
}

.running-field__row--2{
  grid-template-columns: repeat(2, 108px);
  column-gap: 50px;
}

.running-field__row--2[data-line="midfield"]{
  grid-template-columns: repeat(2, 108px);
  column-gap: 116px;
}

.running-field__row--2[data-line="defence"]{
  grid-template-columns: repeat(2, 108px);
  column-gap: 30px;
}

.running-field__row--3{
  grid-template-columns: repeat(3, 108px);
  column-gap: 20px;
}

.running-field__row[data-line="midfield"]{
  margin-top: -6px;
}

.running-field__pitch[data-shape="1-3-2"] .running-field__row--2[data-line="midfield"]{
  column-gap: 52px;
}

.running-field__pitch[data-shape="1-2-1-2"] .running-field__row--2[data-line="defence"]{
  column-gap: 82px;
}

.running-field__pitch[data-shape="1-2-1-2"] .running-field__row--2[data-line="attack"]{
  column-gap: 62px;
}

.running-field__btn{
  position: relative;
  width: 118px;
  max-width: 118px;
  min-width: 118px;
  background: #1e293b;
  color: #f8fafc;
  border-radius: 14px;
  font-size: 15px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  opacity: 1;
  overflow: visible;
}

@media (hover: hover) and (pointer: fine) {
  .running-field__btn:hover{
    opacity: 0.70;
    -webkit-tap-highlight-color: transparent;
  }
}

.running-field__slot-badge{
  position: absolute;
  top: -10px;
  left: 6px;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 38px;
  height: 18px;
  padding: 0 8px;

  opacity: 0.45;

  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.88);

  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;

  pointer-events: none;
}

.running-field__btn--source,
.running-field__btn--source:disabled {
  opacity: 0.18 !important;
  cursor: default;
}

.running-field__btn--swap-target {
  opacity: 1;
}

.sub-focus-mode-pickin #fieldGrid button.running-field__btn--source,
.sub-focus-mode-pickin #fieldGrid button.running-field__btn--source:disabled {
  opacity: 0.28;
}

.sub-focus-mode-pickin #fieldGrid button.running-field__btn--source {
  pointer-events: none;
}

.running-action-badge{
  position: absolute;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 34px;
  height: 20px;
  padding: 0 7px;

  opacity: 1;

  border-radius: 7px;
  background: rgba(255,255,255,0.11);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.92);

  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset;
}

.running-action-badge svg{
  width: 13px;
  height: 13px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* swap: rechts in het midden */
.running-action-badge--swap{
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
}

.running-action-badge--sub{
  top: -10px;
  right: 14px;
}

.running-action-badge--sub svg{
  transform: rotate(90deg);
  transform-origin: 50% 50%;
}

.running-field__btn,
.bench-grid button{
  position: relative;
  overflow: visible;
}

.running-field__btn {
  position: relative;
}

.running-field__btn--swap-target .running-action-icon {
  opacity: 0.7;
}

.running-field__btn:hover .running-action-icon {
  opacity: 1;
}

.bench-grid button {
  position: relative;
}

.running-field__slot-badge{
  position: absolute;
  top: -10px;
  left: 6px;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;

  min-width: 38px;
  height: 18px;
  padding: 0 8px;

  opacity: 0.55;

  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.88);

  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;

  pointer-events: none;
}

.running-field__slot-text{
  display: inline-block;
}

.running-slot-action-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.running-slot-action-icon svg{
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.running-field__slot-badge--bench{
  left: auto;
  right: 10px;
  min-width: 28px;
  padding: 0 6px;
}

.running-slot-action-icon--sub svg{
  transform: rotate(90deg);
  transform-origin: 50% 50%;
  height: 20px;
}

.sub-focus-mode-pickin .running-field__slot-badge,
.sub-focus-mode-pickin .running-field__slot-badge--bench,
.sub-focus-mode .running-field__slot-badge,
.sub-focus-mode .running-field__slot-badge--bench
{
  opacity: 0.88;
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.24);
  color: rgba(255,255,255,0.98);
}

.running-bench__btn--source,
.running-bench__btn--source:disabled {
  opacity: 0.80;
  filter: saturate(0.85);
}

.running-bench__btn--dimmed,
.running-bench__btn--dimmed:disabled {
  opacity: 0.12;
}

.running-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  margin: 4px 0 16px;
  min-height: 28px;
  pointer-events: none;
}

.running-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.running-toolbar__chip {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: rgba(248,250,252,0.88);

  min-width: 32px;
  height: 28px;
  padding: 0 10px;

  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 15px;
  line-height: 1;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

.running-toolbar__icon {
  opacity: 0.90;
  transition: opacity 140ms ease;
}

.running-toolbar__chip:active {
  transform: scale(0.96);
}

@media (hover: hover) and (pointer: fine) {
  .running-toolbar__chip:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.16);
  }

  .running-toolbar__chip:hover .running-toolbar__icon {
    opacity: 0.90;
  }
}

.goals,
.goals h2,
.goals h3,
.goals button,
.running-toolbar,
.running-toolbar * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* =========================================
   RUNNING actions: 2x2 compact grid
   ========================================= */

.running-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
  margin-bottom: 10px;
}

.running-actions-grid button {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  margin-bottom: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
}

.running-actions-grid button:active {
  transform: scale(0.97);
}

button.danger-soft {
  background: rgba(220, 38, 38, 0.38);
  color: #e5e7eb;
  /*border: 1px solid rgba(255, 180, 180, 0.22);*/
}

@media (max-width: 360px) {
  .running-actions-grid button {
    min-height: 46px;
    padding: 9px 10px;
    font-size: 13px;
  }
}

/* RUNNING: consistent gap between "Op het veld" and field on iOS + desktop */
.running-group > .running-field {
  margin-top: 36px;
}

.running-group > .running-field > .running-field__pitch {
  margin-top: 0 !important;
}

/* LIVE timeline: substitution icon aligned with RUNNING */
.event-sub-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  transform: translateY(1px);
  opacity: 0.78;
  vertical-align: middle;
}

.event-sub-icon svg{
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* RUNNING: player status corner */
.running-field__btn,
.bench-grid button {
  position: relative;
  overflow: visible;
}

/*.running-player-status-yellow {
  box-shadow:
    inset -2px 0 0 rgba(255, 204, 0, 0.95),
    inset -8px 0 8px -8px rgba(255, 204, 0, 0.65);
}*/

.running-player-status-yellow {
  box-shadow:
    inset -2px 0 0 rgba(255, 204, 0, 0.92),
    inset -8px 0 8px -8px rgba(255, 204, 0, 0.45);
}

.running-player-status-red {
  box-shadow:
    inset -2px 0 0 rgba(220, 38, 38, 0.98),
    inset -8px 0 8px -8px rgba(220, 38, 38, 0.68);
}

/* LIVE timeline: cards */
.event-card {
  min-height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.event-card .event-main {
  font-weight: 500;
  opacity: 0.92;
}

.event-card-icon {
  display: inline-block;
  width: 11px;
  height: 15px;
  border-radius: 2px;
  margin-right: 7px;
  flex: 0 0 auto;
  transform: translateY(0.5px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}

.event-card-icon--yellow {
  background: rgba(255, 204, 0, 0.95);
}

.event-card-icon--red {
  background: rgba(220, 38, 38, 0.98);
}

.event-card-yellow .event-meta,
.event-card-red .event-meta {
  opacity: 0.78;
}

/* RUNNING toolbar: use real card icons instead of emoji */
.running-toolbar__icon-card {
  display: inline-block;
  width: 11px;
  height: 14px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}

.running-toolbar__icon-card--yellow {
  background: rgba(255, 204, 0, 0.95);
}

.running-toolbar__icon-card--red {
  background: rgba(220, 38, 38, 0.98);
}

.running-toolbar__chip {
  line-height: 1;
}

.running-toolbar__icon-card {
  transform: translateY(0.5px);
}

/* FINISHED: card summary lines aligned like live events */
.finished-card-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}

.finished-card-time {
  font-size: 13px;
  opacity: 0.7;
  min-width: 52px;
}

.finished-card-main {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  font-weight: 500;
}

.finished-card-meta {
  font-size: 13px;
  opacity: 0.78;
  min-width: 56px;
  text-align: right;
}

.finished-card-line + .finished-card-line {
  margin-top: 2px;
}

.finished-card-line[data-player-break="true"] {
  margin-top: 8px;
}

/* BREAK: card rows in 'Laatste momenten' */
.break-card-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}

.break-card-time {
  font-size: 13px;
  opacity: 0.7;
  min-width: 52px;
}

.break-card-main {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  font-weight: 500;
}

.break-card-meta {
  font-size: 13px;
  opacity: 0.78;
  min-width: 56px;
  text-align: right;
}

.last-events .event-card-icon {
  vertical-align: -2px;
}

/* RUNNING: dismissed players compact out strip */
.running-field-context {
  margin: 0 0 8px;
  min-height: 18px;
}

.running-out-strip__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.running-out-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0.88;
}

.running-out-name {
  font-weight: 600;
}

.running-out-meta {
  opacity: 0.66;
}

.running-out-chip--more {
  opacity: 0.64;
}

/* RUNNING: compact mode row instead of heavy headline */
.goals h2 {
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.running-mode-label {
  display: inline-block;
}

.running-title-ball {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
  transform: translateY(1px);
}

/* RUNNING: contextual dismissal row under mode label */
.running-field-context {
  margin: 0 0 8px;
  min-height: 18px;
}

.running-out-strip__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.running-out-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0.88;
  margin-left: 3px;
}

.running-out-chip .event-card-icon {
  transform: translateY(0.5px);
}

.running-out-name {
  font-weight: 500;
  margin-top: 2px;
  margin-left: 5px;
}

.running-out-meta {
  opacity: 0.66;
}

.running-out-chip--more {
  opacity: 0.64;
}

.running-field-context {
  margin: 0 0 10px;
  min-height: 18px;
  opacity: 0.72;
}

.running-out-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.running-out-name {
  font-weight: 500;
}

.running-out-meta {
  opacity: 0.58;
}

#benchGrid button:hover {
  opacity: 0.65;
}

.ph-pr-chip.is-display-only {
  cursor: default;
  pointer-events: none;
}

.live-made-with {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;

  display: inline-flex;
  align-items: center;
  gap: 5px;

  padding: 7px 12px;
  border-radius: 999px;

  font-size: 12px;
  line-height: 1;
  text-decoration: none;

  color: rgba(255, 255, 255, 0.82);
  background: rgba(8, 12, 20, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.10);

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);

  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
}

.live-made-with__label {
  font-weight: 500;
  opacity: 0.78;
}

.live-made-with__brand {
  font-weight: 700;
}

@media (max-width: 420px) {
  .live-made-with {
    font-size: 11px;
    padding: 7px 11px;
  }
}

.live-score-banner {
  margin-top: 12px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;

  color: rgba(255, 255, 255, 0.96);
  background: rgba(45, 226, 230, 0.12);
  border: 1px solid rgba(45, 226, 230, 0.22);
}

.live-score-banner__text {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
}

.live-score-banner--celebration {
  box-shadow: 0 8px 24px rgba(45, 226, 230, 0.08);
}

@media (max-width: 420px) {
  .live-score-banner {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 12px;
  }

  .live-score-banner__text {
    font-size: 13px;
  }
}

/* =========================
   LIVE: match start lineup
   ========================= */

.event-lineup-start {
  margin-top: 18px;
  padding: 0;
  background: #15253d;
  border-radius: 8px;
  overflow: hidden;
}

/* Card grid: title full width, lines dynamic 2/3/4 cols */
.event-lineup-content {
  display: grid;
  grid-template-columns: repeat(var(--lineup-cols, 4), minmax(0, 1fr));
}

/* Header */
.event-lineup-titleRow {
  grid-column: 1 / -1;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 14px 10px 6px;
}

.event-lineup-title {
  min-width: 0;
  padding-left: 4px;

  font-size: 14px;
  font-weight: 750;
  color: rgba(248, 250, 252, 0.96);
}

.event-lineup-shape {
  flex: 0 0 auto;

  font-size: 13px;
  font-weight: 500;
  color: rgba(248, 250, 252, 0.82);
  white-space: nowrap;

  transform: translateX(-4px);
}

/* Equal columns, content centered per column */
.event-lineup-row {
  position: relative;

  display: flex;
  justify-content: flex-start;
  align-items: flex-start;

  width: 100%;
  min-width: 0;
  min-height: 64px;

  padding: 14px 14px 16px;

  font-size: 12px;
  line-height: 1.22;
}

/* Inner block: centered as a block, left-aligned inside */
.event-lineup-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

/* Vertical dividers, same principle as meta strip */
.event-lineup-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);

  opacity: 0.7;

  width: 1px;
  height: 50px;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.00) 0%,
    rgba(255,255,255,0.18) 20%,
    rgba(255,255,255,0.18) 80%,
    rgba(255,255,255,0.00) 100%
  );
}

/* No divider before first lineup column */
.event-lineup-titleRow + .event-lineup-row::before {
  display: none;
}

/* Text */
.event-lineup-label,
.event-lineup-text {
  display: block;
  width: auto;
  min-width: 0;
  max-width: 100%;
  text-align: left;
}

.event-lineup-label {
  margin-bottom: 6px;

  font-size: 10px;
  font-weight: 460;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: #2DE2e6;
}

.event-lineup-text {
  font-size: 13px;
  color: rgba(248, 250, 252, 0.84);
  line-height: 1.28;
  text-wrap: balance;
  overflow-wrap: normal;
}

.event-lineup-label,
.event-lineup-text {
  text-align: left;
}

.event-lineup-start--animate {
  animation: lineupEnter 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.event-lineup-start--animate .event-lineup-row {
  animation: lineupLineEnter 420ms ease;
}

.event-lineup-start--animate .event-lineup-row:nth-of-type(2) { animation-delay: 80ms; }
.event-lineup-start--animate .event-lineup-row:nth-of-type(3) { animation-delay: 130ms; }
.event-lineup-start--animate .event-lineup-row:nth-of-type(4) { animation-delay: 180ms; }
.event-lineup-start--animate .event-lineup-row:nth-of-type(5) { animation-delay: 230ms; }

@keyframes lineupEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lineupLineEnter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#live {
  max-width: 420px;
  margin: 0 auto;
  padding: 0 12px calc(84px + env(safe-area-inset-bottom, 0px));
}

.event-subrow--stacked {
  margin-left: 52px;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(248, 250, 252, 0.82);
}

.event-subrow-label {
  font-weight: 700;
  margin-right: 6px;
}

.event-subrow-text {
  font-weight: 400;
}

.event-row--substitution-followup {
  margin-top: 2px;
}

.event-row--substitution-followup .event-time,
.event-row--substitution-followup .event-meta {
  visibility: hidden;
}

.event-main--stacked {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  column-gap: 0;
}

.event-sub-label {
  font-weight: 650;
  opacity: 0.9;
}

.event-sub-text {
  min-width: 0;
  font-weight: 400;
}

.event-substitution-group {
  padding-top: 12px;
  padding-bottom: 12px;
}

.context-meta {
  position: relative;
  z-index: 1;

  margin-top: -10px;
  margin-left: 12px;
  margin-right: 12px;

  padding: 10px 10px 8px;
  min-height: 22px;

  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(140, 170, 220, 0.14);
  border-top: 0;

  background:
    linear-gradient(180deg, rgba(42,56,84,0.92) 0%, rgba(33,46,71,0.96) 100%);

  box-shadow:
    0 10px 22px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.035);
}

.context-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
}

.context-meta-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;

  font-size: 13px;
  font-weight: 500;
  color: rgba(248, 250, 252, 0.9);
}

.context-meta-item--left,
.context-meta-item--center,
.context-meta-item--right {
  justify-content: center;
}

.context-meta-item--center::before,
.context-meta-item--right::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 22px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.00) 0%,
    rgba(255,255,255,0.18) 20%,
    rgba(255,255,255,0.18) 80%,
    rgba(255,255,255,0.00) 100%
  );
}

.context-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 20px;
  height: 20px;
  flex: 0 0 16px;

  font-size: 13px;
  line-height: 1;
  opacity: 0.9;
  color: #2DE2e6;
}

.context-meta-svg {
  width: 20px;
  height: 20px;
  display: block;
  overflow: visible;
}

@media (max-width: 360px) {
  .context-bug {
    padding: 13px 14px 15px;
    border-radius: 13px;
  }

  .context-meta {
    margin-left: 8px;
    margin-right: 8px;
    padding: 12px 12px 10px;
    min-height: 50px;
  }

  .context-meta-item {
    font-size: 12px;
    gap: 6px;
  }

  .context-meta-icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
    font-size: 12px;
  }
}

.event-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-icon {
  width: 18px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 250, 252, 0.72);
}

.event-inline-svg {
  width: 24px;
  height: 24px;
  display: block;
}

.event-text {
  display: inline-flex;
  align-items: center;
}

.event-text .assist-sep {
  margin: 0 6px;
  opacity: 0.4;
}

.event-row--substitution-followup .event-time,
.event-row--substitution-followup .event-meta {
  visibility: hidden;
}

.goal-ball {
  margin-right: 0;
  transform: none;
}

/* Eén vaste layout voor alle timeline rows */
.event-row {
  display: grid;
  grid-template-columns: 46px 20px minmax(0, 1fr) 64px;
  align-items: center;
  column-gap: 10px;
}

/* Kolom 1: tijd */
.event-time {
  grid-column: 1;
  min-width: 0;
  text-align: left;
  font-size: 13px;
  opacity: 0.7;
}

/* Kolom 2: icon */
.event-icon {
  grid-column: 2;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 250, 252, 0.78);
}

.event-inline-svg,
.event-icon img,
.event-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Kolom 3: hoofdtekst */
.event-text {
  grid-column: 3;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Kolom 4: score / meta */
.event-meta,
.event-score {
  grid-column: 4;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
  justify-self: end;
}

/* Belangrijk: oude flex-gedrag van event-main neutraliseren */
.event-main {
  display: contents;
}

.goal-ball {
  margin: 0;
  transform: none;
}

.assist-sep {
  margin: 0 6px;
  opacity: 0.4;
}

.assist-name {
  opacity: 0.65;
  font-weight: 400;
}

.event-row--substitution-followup .event-time,
.event-row--substitution-followup .event-icon,
.event-row--substitution-followup .event-meta {
  visibility: hidden;
}

.event-text--group-sub {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  column-gap: 4px;
}

.event-text--group-sub .event-sub-label {
  font-weight: 650;
  opacity: 0.9;
}

.event-text--group-sub .event-sub-text {
  min-width: 0;
  font-weight: 400;
}

.event-row--substitution-followup .event-time,
.event-row--substitution-followup .event-icon,
.event-row--substitution-followup .event-meta {
  visibility: hidden;
}

.event-row--substitution-followup .event-text {
  opacity: 0.66;
}

.event-goal {
  opacity: 1;
}

.event-goal .event-time,
.event-goal .assist-name,
.event-goal .assist-sep {
  opacity: 0.78;
}

/* =========================
   LIVE: page bg + event row contrast
   ========================= */

/* donkerdere page background */
html,
body {
  background: #061225 !important;
}

/* live page mag dezelfde diepe achtergrond houden */
#live {
  background: transparent;
}

/* event rows: lichter dan de page bg, maar nog steeds rustig */
.event {
  background: #15253d;
}

/* dezelfde kleur ook laten winnen tijdens states/varianten */
.event-goal,
.event-goal-against,
.event-substitution,
.event-formation-change,
.event-substitution-group,
.event-lineup-start {
  background: #15253d;
}

/* nieuwe event highlight laten eindigen op dezelfde row-kleur */
@keyframes eventHighlightFade {
  0% {
    box-shadow:
      0 0 0 1px rgba(45, 226, 230, 0.22),
      0 0 0 0 rgba(45, 226, 230, 0.00);
    background: rgba(10, 24, 46, 0.98);
  }

  22% {
    box-shadow:
      0 0 0 1px rgba(45, 226, 230, 0.22),
      0 0 18px rgba(45, 226, 230, 0.08);
    background: rgba(18, 36, 59, 0.98);
  }

  100% {
    box-shadow:
      0 0 0 0 rgba(45, 226, 230, 0),
      0 0 0 rgba(45, 226, 230, 0);
    background: #15253d;
  }
}

/* =========================
   LIVE: row polish
   ========================= */

#events .event {
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* score rechts meer punch */
#events .event-score {
  font-weight: 800;
}

#events .event-meta {
  font-size: 12px;
}

#events .event-score {
  color: #2DE2e6;
  text-shadow: 0 0 10px rgba(127, 231, 243, 0.16);
}

/* LIVE: iOS 16-safe event row alignment */
#events .event-content {
  min-height: 34px;
}

#events .event-row {
  min-height: 34px;
  align-items: center;
}

#events .event-time,
#events .event-icon,
#events .event-text,
#events .event-score,
#events .event-meta {
  min-height: 34px;
  line-height: 1.15;
}

/* Geen height:100% en geen translate op grid children.
   iOS 16 Safari kan daardoor lege cards / losgeraakte tekst painten. */
#events .event-time,
#events .event-icon,
#events .event-score,
#events .event-meta {
  display: flex;
  align-items: center;
}

#events .event-text {
  display: inline-flex;
  align-items: center;
}

/* icon assets stabiel houden zonder layout-transform */
#events .event-icon img,
#events .event-icon svg,
#events .event-inline-svg,
#events .goal-ball {
  display: block;
  transform: none;
}

/* alleen het wissel-icoon groter maken */
#events .event-substitution .event-icon img {
  width: 32px;
  height: 32px;
  line-height: 1;
  font-weight: 700;
  display: block;
}

#events .event-icon-formation .event-text, 
.event-main.formation {
  opacity: 0.75 !important;
}

/* LIVE: herstel 2-koloms layout voor group subs */
#events .event-substitution-group .event-text--group-sub {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  column-gap: 4px;
  height: auto;
  line-height: 1.2;
  transform: none;
}

#events .event-substitution-group .event-sub-label,
#events .event-substitution-group .event-sub-text {
  display: block;
}

#events .event-substitution-group .event-sub-text {
  min-width: 0;
}

#events .event-icon-formation {
  width: 20px;
  min-width: 20px;
  height: 20px;
}

#events .event-icon-formation img.formation-change-icon {
  display: block;
  width: 18px;
  height: auto;
  max-width: none;
  object-fit: contain;
  opacity: 0.78;
  image-rendering: -webkit-optimize-contrast;
  transform: translateY(0.5px);
}

#events .event-icon.substitution img {
  display: block;
  width: 18px;
  height: 11px;
  max-width: none;
  object-fit: contain;
  opacity: 0.78;
  image-rendering: -webkit-optimize-contrast;
  transform: translateY(0.5px)
}

.event-formation-change .event-main {
  font-weight: 500;
  opacity: 0.74 !important;
}

.event-formation-change .event-meta {
  opacity: 0.74 !important;
}

/*=========================
   LIVE: iOS 16 Safari paint safety
=========================*/

@supports (-webkit-touch-callout: none) {
  #events,
  #events .period,
  #events .event,
  #events .event-content,
  #events .event-row {
    contain: none;
    content-visibility: visible;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  #events .event {
    position: relative;
    transform: translateZ(0);
  }

  #events .event-row {
    transform: none;
  }

  #events .event-time,
  #events .event-icon,
  #events .event-text,
  #events .event-score,
  #events .event-meta {
    transform: none !important;
    height: auto !important;
  }
}

/* =========================
   LIVE: restore compact group substitution rows
   after iOS 16 timeline safety rules
========================= */

#events .event-substitution-group {
  padding-top: 10px;
  padding-bottom: 10px;
}

#events .event-substitution-group .event-content {
  min-height: 0;
}

#events .event-substitution-group .event-row {
  min-height: 24px;
  align-items: center;
}

#events .event-substitution-group .event-row + .event-row {
  margin-top: 4px;
}

#events .event-substitution-group .event-time,
#events .event-substitution-group .event-icon,
#events .event-substitution-group .event-text,
#events .event-substitution-group .event-meta {
  min-height: 24px;
  line-height: 1.2;
}

#events .event-substitution-group .event-row--substitution-followup {
  min-height: 24px;
}

#events .event-substitution-group .event-row--substitution-followup .event-time,
#events .event-substitution-group .event-row--substitution-followup .event-icon,
#events .event-substitution-group .event-row--substitution-followup .event-meta {
  visibility: hidden;
}

#events .event-substitution-group .event-text--group-sub {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;

  min-height: 24px;
  height: auto;
  line-height: 1.2;

  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

#events .event-substitution-group .event-sub-label {
  display: block;
  font-weight: 750;
  opacity: 0.88;
}

#events .event-substitution-group .event-sub-text {
  display: block;
  min-width: 0;
  font-weight: 400;
  opacity: 0.78;
  overflow-wrap: anywhere;
}