

/* Match-Center proportions follow the compact WM sidebars. */
.workspace {
  grid-template-columns: 228px minmax(660px, 1fr) 228px;
  gap: 6px;
}

.player-row {
  grid-template-columns: 28px minmax(0, 1fr) 23px;
  gap: 4px;
  min-height: 29px;
  padding: 2px 4px;
}

.player-row .number {
  min-height: 22px;
  font-size: .62rem;
}

.player-row .player-name {
  font-size: .71rem;
}

.player-row .card-btn {
  position: relative;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  overflow: visible;
  padding: 0;
}

.card-shape {
  display: block;
  width: 8px;
  height: 12px;
  border: 1px solid rgb(255 255 255 / .55);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .45);
}

.card-shape.yellow { background: #ffd92f; }
.card-shape.red { background: #e53a43; }

.card-stack {
  position: relative;
  display: block;
  width: 13px;
  height: 14px;
}

.card-stack .card-shape {
  position: absolute;
  top: 1px;
}

.card-stack .yellow { left: 0; }
.card-stack .red { right: 0; }

.card-empty {
  display: block;
  width: 11px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
  opacity: .55;
}

.card-btn small {
  position: absolute;
  right: -3px;
  bottom: -7px;
  z-index: 2;
  padding: 0 2px;
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font-size: .47rem;
  line-height: 1.25;
  white-space: nowrap;
}

.field-player .card-btn {
  display: grid;
  place-items: center;
  padding: 0;
  overflow: visible;
}

.bench-tools {
  grid-template-columns: minmax(0, 1fr) 34px 68px;
  padding: 5px 4px;
}

.subs {
  grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr) 27px;
  padding: 4px;
}



.match-info-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 9px;
}

.match-info-icon.is-empty { opacity: .48; }
.match-info-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.whistle-icon {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.stadium-schematic img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  margin: 6px auto 0;
  object-fit: contain;
}

.hover.is-pinned { box-shadow: 0 0 0 2px var(--accent), 0 18px 42px #000b; }
.test-hover-content { display: grid; min-width: 0; }
.test-hover-content.has-notes {
  grid-template-columns: minmax(300px, .95fr) minmax(300px, 1.05fr);
  gap: 10px;
  align-items: start;
}
.test-hover-main { min-width: 0; }
.test-hover-content.has-notes > .app-notes-component { min-width: 0; max-height: calc(100vh - 70px); overflow: auto; border-left: 1px solid var(--line); overscroll-behavior: contain; }
.formatted-note-block .note-line-text,.formatted-note-block .note-line-spacer { display: block; }
.formatted-note-block .note-line-spacer { min-height: .65em; }
.formatted-note-block .note-bullets { margin: 2px 0; padding-left: 1.2em; }

@media (max-width: 800px) {
  
  
  .test-hover-content.has-notes { grid-template-columns: 1fr; }
  .test-hover-content.has-notes > .app-notes-component { max-height: none; border-top: 1px solid var(--line); border-left: 0; }
}

@media (min-width: 801px) and (max-width: 1250px) {
  .workspace { grid-template-columns: 205px minmax(560px, 1fr) 205px; }
}








.team-scorers {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 2px 5px;
  margin-top: 2px;
  color: var(--accent);
  font-size: .6rem;
  font-weight: 900;
  line-height: 1.15;
}

.goal-scorer-chip {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
  padding: 1px 4px 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  white-space: nowrap;
}

.goal-scorer-chip > button {
  width: 15px;
  height: 15px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 950;
  line-height: 13px;
}

.goal-scorer-chip > button:hover,
.goal-scorer-chip > button:focus-visible {
  background: color-mix(in srgb, var(--text) 12%, transparent);
  color: var(--text);
}

.team-scorers em {
  padding: 1px 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  font-size: .56rem;
  font-style: normal;
}

.team-scorers.is-empty {
  color: var(--muted);
  opacity: .8;
}

.goalbar .goal-kind {
  display: inline-flex;
  width: auto;
  height: 38px;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.goalbar .goal-kind:has(input:checked) {
  border-color: var(--accent);
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
}

.goalbar .goal-kind input {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.test-menu .menu-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
}

.test-menu .menu-toggle:hover {
  border-color: var(--ad-menu-line);
  background: var(--ad-menu-bg);
}

.test-menu .menu-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.test-menu .menu-range {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--ad-menu-line);
}

.test-menu .menu-range label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: .78rem;
  font-weight: 900;
}

.test-menu .menu-range strong {
  color: var(--ad-menu-accent-strong);
}

.test-menu .menu-range input {
  width: 100%;
  margin: 0;
}

.test-menu .ad-menu-direct {
  padding: 0;
}

.test-menu .ad-menu-direct .ad-menu-action {
  width: 100%;
}

/* The opened match fits the viewport; rosters scroll inside their sidebars. */
.shell:has(#matchPanel:not(.hidden)){height:100dvh;min-height:0;display:flex;flex-direction:column}
.shell:has(#matchPanel:not(.hidden))>.topbar{flex:0 0 auto}
#matchPanel:not(.hidden){display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
#matchPanel>.football-match-header{flex:0 0 auto}
#matchPanel>.workspace{flex:1 1 auto;height:auto;min-height:0;grid-template-columns:clamp(168px,17vw,228px) minmax(0,1fr) clamp(168px,17vw,228px);grid-template-rows:minmax(0,1fr);overflow:hidden}
#matchPanel .bench,#matchPanel .pitch{height:100%;min-height:0}
#matchPanel>.match-status{flex:0 0 auto;height:auto;min-height:15px}
#field{position:absolute;inset:0}
.field-slot{position:absolute;transform:translate(-50%,-50%);display:grid;place-content:center;gap:1px;width:clamp(58px,7vw,100px);height:42px;padding:2px;border:2px dashed #d9fff0aa;border-radius:9px;background:#073e3470;color:#f1fff9;z-index:2;line-height:1.1}
.field-slot>span{font-size:20px}.field-slot>small{font-size:9px;font-weight:700}
.field-slot.drag-over,.field-player.drag-over,.field-slot.is-target,.field-player.is-target{outline:3px solid #ffd76b;outline-offset:2px;background-color:#245f4e}
.field-player{width:clamp(64px,8vw,112px);min-height:40px;padding:3px 22px 3px 5px}
.field-player .fp-name{font-size:clamp(9px,.8vw,12px)}
[data-player-row]:focus-visible,[data-field-slot]:focus-visible{outline:3px solid #dfac25;outline-offset:-2px}
#hover .football-team-hover .fth-facts>.half{position:static;inset:auto;border-top:0}
@media(max-width:860px){
 .shell:has(#matchPanel:not(.hidden)){height:auto;min-height:100dvh}
 #matchPanel>.workspace{flex:none;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto 280px;grid-template-areas:"pitch pitch" "home away";overflow:visible}
 #pitch{grid-area:pitch;height:clamp(320px,65dvh,580px)!important}
 #homeSquad{grid-area:home}#awaySquad{grid-area:away}
 #hover .football-team-hover{grid-template-columns:minmax(0,1fr)}
 #hover .football-team-hover .fth-notes{border-left:0;padding-left:0;border-top:1px solid var(--line);padding-top:8px}
 .field-player{width:clamp(60px,17vw,100px)}
}

/* Occupied players and benches follow kits; unfilled positions stay neutral. */
.bench .number{background:var(--bubble);color:var(--bubble-text)}
.field-slot,.field-slot.drag-over,.field-slot.is-target{background:transparent;color:rgba(255,255,255,.86);border-color:rgba(255,255,255,.8)}
#pitch{container-type:size}
.field-slot{height:clamp(30px,8.5cqh,40px);padding:1px;line-height:1}
.field-slot>span{font-size:12px}.field-slot>small{font-size:10.5px;line-height:1}
.field-player{min-height:clamp(30px,8.5cqh,40px);padding-top:2px;padding-bottom:2px}
.field-player .fp-name{margin-top:8px;line-height:1.1;font-size:clamp(11px,2.5cqh,12px)}
.field-player .fp-number{top:2px;font-size:10px}
.field-player .card-btn{top:2px;right:2px;width:clamp(16px,5cqh,24px);height:clamp(16px,5cqh,24px)}
.test-match-timeline{flex:0 0 auto;min-width:0;margin:0 8px 5px;border:1px solid var(--line);border-radius:8px;background:var(--panel);overflow:hidden}
.test-ticker-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 6px;font-size:.76rem}
.test-ticker-head .ad-manual-event-add{padding:4px 8px;min-height:26px;font-size:.72rem}
.test-ticker-events{display:flex;gap:6px;max-height:90px;min-height:30px;overflow:auto;padding:0 6px 4px}
.test-ticker-empty{margin:0;font-size:.7rem;color:var(--muted)}
.test-ticker-events>.ad-highlight-event-shell{flex:0 0 min(190px,75vw);min-width:0;align-self:stretch}
.test-ticker-event{position:relative;display:flex;align-items:center;gap:6px;min-height:44px;padding:5px 33px 5px 6px;border:1px solid var(--line);border-radius:6px;font-size:.7rem;background:var(--panel)}
.test-ticker-events>.ad-highlight-event-shell>.test-ticker-event{box-sizing:border-box;flex:1 1 auto;min-width:0;width:100%}
.test-ticker-event>div{min-width:0}.test-ticker-event time{font-weight:900;white-space:nowrap}.test-ticker-event strong,.test-ticker-event span{display:block}.test-ticker-event span{font-size:.65rem;color:var(--muted)}.test-ticker-event p{margin:3px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.test-ticker-event .timeline-marker-edit{margin-left:auto;padding:1px 4px;flex:none}
.test-ticker-meta{display:grid;justify-items:center;align-content:center;gap:2px;flex:0 0 26px}.test-ticker-content{flex:1;min-width:0}
.test-ticker-content{max-height:66px;overflow:hidden}.test-ticker-content p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
@media(min-width:1101px){
 .shell:has(#matchPanel:not(.hidden))>.topbar{height:68px}
 html body #matchPanel>.football-match-header{padding:6px 10px}
 html body #matchPanel .fheader-fixture{position:absolute;left:0;top:0;width:190px;margin:0}
 html body #matchPanel .fheader-top{min-height:64px}
 html body #matchPanel .fheader-teams{width:calc(100% - 380px)}
 html body #matchPanel .fheader-bottom{margin-top:4px}
}
