.md-controls,.md-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}
.md-filters{padding:14px 18px;border:1px solid #dce2d9;background:white;border-radius:12px}
.md-filters .field,.md-controls .field{flex:1;min-width:100px;margin:0}
.md-filters .field:first-child{flex:2;min-width:180px}.md-count{color:#68796d;margin:12px 0;font-size:13px}
.md-teams{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.md-team{border:1px solid #d4dfd2;background:white;border-radius:11px;overflow:hidden}
.md-team-head{display:flex;align-items:center;gap:6px;background:var(--team-pale);color:var(--team-ink);padding:10px}
.md-team-head svg{width:17px}.md-team-head span{margin-left:auto;font-size:11px;font-weight:700}
.md-team-roster{padding:4px 9px}.md-team-roster>div{display:flex;align-items:center;gap:6px;font-size:12px;padding:5px 0;border-bottom:1px solid #e6ebe4}
.md-team-roster .avatar{height:23px;width:23px}.md-team-roster small{display:block;color:#68796d;font-size:11px}
.md-team-roster b{margin-left:auto;color:#53664e;font-size:11px}.md-team>small{display:block;color:#586d59;padding:6px 9px 10px;font-size:11px}
.md-score-team{color:var(--team-ink)}
.md-color-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 14px}
.md-color-picker{display:grid;grid-template-columns:1.15rem minmax(0,1fr);align-items:center;gap:8px}
.md-color-picker select{width:100%;min-width:0}
.md-color-swatch{width:1.15rem;height:1.15rem;border-radius:50%;background:var(--team-accent);border:1px solid #12271f29}
.md-match-actions,.modal .md-teams+.sectiontools{flex-wrap:wrap}
.md-feed-title{margin-top:18px}.md-remove{margin-left:auto;display:grid;place-items:center;flex:0 0 44px;min-width:44px;min-height:44px;color:#65746b}
.md-remove:hover{background:#f4e4dd;border-radius:5px}.md-lineups{border-block:1px solid #dce3d9;padding:12px 0;margin:12px 0}.md-lineups summary{font-size:14px;font-weight:700;cursor:pointer}
[data-md-clock]{font-variant-numeric:tabular-nums}
@media(max-width:450px){.md-teams{grid-template-columns:1fr}.md-filters .field:first-child{flex-basis:100%}.md-team-roster{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 8px}.md-team-roster>div{min-width:0}.md-team-roster .avatar{display:none}}
.md-match-toolbar{margin-bottom:14px}

.md-inline-goal { margin: 12px 0 4px; padding: 12px; border-radius: 10px; border: 1px solid #cadcc3; background: #f0f7ed; }
.md-inline-goal h3 { margin: 0 0 9px; }
.md-match-clock { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #102b22; color: #f2faeb; border-radius: 9px; margin: 9px 0 12px; padding: 7px 10px; }
.md-match-clock > span { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.md-match-clock svg { width: 16px; height: 16px; }
.md-match-clock time { font: 900 32px/1 'Barlow Condensed', sans-serif; color: #c8f552; }

.modal:has(.md-draw) {
  width: min(820px, 100%);
  border-radius: 22px;
  background: #f7f8f3;
  padding: clamp(14px, 3vw, 26px);
}
.modal:has(.md-draw) .modalhead {
  margin-bottom: 15px;
}
.modal:has(.md-draw) .modalhead h2 {
  font: 800 clamp(27px, 5vw, 36px)/1 'Barlow Condensed', sans-serif;
}
.modal:has(.md-draw) .modalhead button {
  width: 44px;
  height: 44px;
}
.md-draw-start {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
}
.md-draw-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 276px;
  overflow: hidden;
  border-radius: 16px;
  padding: 16px;
  color: #f0f7e9;
  text-align: center;
  background: radial-gradient(ellipse at 50% 54%, #32512766 4%, #0b1e18bd 60%),
    linear-gradient(#091d15a8, #081913df), #0b1e17 url('/img/pelada-cover.webp') center 56% / cover;
}
.md-draw-count {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid #c2d7b54a;
  border-radius: 100px;
  background: #0b1f17a8;
  font-size: 12px;
  font-weight: 650;
}
.md-draw-count svg { width: 14px; height: 14px; margin-right: 3px; color: #c6f55c; }
.md-draw-count strong { color: #d4fc7b; }
.md-ballot {
  position: relative;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 208px;
  height: 142px;
  max-width: 100%;
}
.md-ballot-ring {
  position: absolute;
  inset: 9% 8%;
  border: 1px solid #c3f45d60;
  border-radius: 50%;
  transform: rotate(-19deg);
}
.md-ballot-ring.inner { inset: 19% 0; border-color: #c3f45d37; transform: rotate(18deg); }
.md-ballot-chip {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 26%, #ffffffbd, transparent 38%), var(--chip);
  box-shadow: inset -3px -4px 8px #09190c50, 0 3px 7px #06180b50;
}
.md-ballot-chip.first { --x: 8%; --y: 60%; --size: 24px; --chip: #75a9eb; }
.md-ballot-chip.second { --x: 77%; --y: 18%; --size: 29px; --chip: #f9945f; }
.md-ballot-chip.third { --x: 82%; --y: 69%; --size: 17px; --chip: #e6edd2; }
.md-ballot-ball {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 104px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #153117;
  background: radial-gradient(circle at 35% 20%, #eaffb0, #baf43f 55%, #83b91c);
  box-shadow: inset 0 -3px 10px #587e2b52, 0 10px 18px #06160b85, 0 0 35px #baf34a2b;
}
.md-ballot-ball > span {
  display: grid;
  place-items: center;
  width: 73%;
  aspect-ratio: 1;
  border: 1px solid #56911934;
  border-radius: 50%;
  background: #eeffd975;
  font: 800 53px/.9 'Barlow Condensed', sans-serif;
}
.md-ballot-ball svg { width: 33px; height: 33px; }
.md-draw-stage-foot h3 {
  color: #f4f8ee;
  font: 800 clamp(25px, 5vw, 32px)/1 'Barlow Condensed', sans-serif;
}
.md-draw-skip {
  min-height: 44px;
  margin: 5px auto 0;
  padding-inline: 10px;
  color: #e7f5d9;
  font-size: 13px;
  font-weight: 750;
}
.md-draw-skip svg { margin-left: 5px; width: 15px; height: 15px; vertical-align: middle; }
.md-draw-stage:has(.md-draw-skip) .md-draw-stage-foot { min-height: 80px; }
.md-draw[data-phase="rolling"] .md-ballot-ball { animation: md-draw-hop 1.05s cubic-bezier(.4,0,.2,1) infinite; }
.md-draw[data-phase="rolling"] .md-ballot-ring { animation: md-draw-spin 1.7s linear infinite; }
.md-draw[data-phase="rolling"] .md-ballot-ring.inner { animation-direction: reverse; }
.md-draw[data-phase="rolling"] .md-ballot-chip { animation: md-draw-rattle .47s ease-in-out infinite alternate; }
.md-draw[data-phase="rolling"] .md-ballot-chip.second { animation-delay: -.25s; }
.md-draw[data-phase="rolling"] .md-ballot-chip.third { animation-delay: -.1s; }
@keyframes md-draw-hop {
  0%, 100% { transform: translateY(2px) scale(1.04, .96); }
  44% { transform: translateY(-15px) scale(.96, 1.04); }
  65% { transform: translateY(-6px) scale(1); }
}
@keyframes md-draw-spin {
  from { transform: rotate(-19deg); }
  to { transform: rotate(341deg); }
}
@keyframes md-draw-rattle {
  to { transform: translate(-8px, -12px); }
}
.md-draw-setup {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 12px;
  border: 1px solid #dbe3d8;
  border-radius: 16px;
  background: #fff;
  padding: clamp(13px, 2.2vw, 20px);
}
.md-draw .md-draw-setup p { margin: 0; color: #4b5f52; font-size: 13px; line-height: 1.5; }
.md-draw-controls { display: grid; gap: 12px; }
.md-draw-controls .field, .md-draw .button.primary { width: 100%; margin: 0; }
.md-draw .button { min-height: 44px; justify-content: center; margin: 0; }
.md-draw-options { display: flex; flex-wrap: wrap; gap: 7px; }
.md-draw-options .button { font-size: 12px; }
.md-draw-options [aria-pressed="true"] { background: #e6f2db; border-color: #ccdec7; color: #233e2b; }
.md-draw-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 17px clamp(14px, 3vw, 24px) 19px;
  border-radius: 15px;
  background: linear-gradient(110deg, #0d2b20, #173b2b);
  color: #f6faef;
}
.md-draw-result-count { color: #ddebd6; font-size: 12px; font-weight: 750; }
.md-draw-banner h3 { margin-top: 3px; font: 800 clamp(29px, 6vw, 44px)/.98 'Barlow Condensed', sans-serif; }
.md-draw-colors { display: flex; flex: none; padding-left: 5px; }
.md-draw-colors span {
  width: clamp(15px, 4.5vw, 27px);
  aspect-ratio: 1;
  margin-left: -5px;
  border: 2px solid #173b2b;
  border-radius: 50%;
  background: var(--team-accent);
}
.md-draw-tools { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.md-draw .md-draw-tools .button.primary { width: auto; }
.md-draw .md-teams { margin: 0; gap: 12px; }
.md-draw .md-team { border-radius: 14px; }
.md-draw .md-team-head { gap: 8px; padding: 12px; }
.md-draw .md-team-head b { color: inherit; }
.md-draw .md-team-head span { white-space: nowrap; font-size: 12px; }
.md-draw .md-team-roster { display: block; padding: 0 10px; }
.md-draw .md-team-roster > div { min-height: 45px; padding: 2px 0; }
.md-draw .md-team-roster > div:last-child { border: 0; }
.md-draw .md-team-roster .avatar { display: grid; width: 30px; height: 30px; }
.md-draw .md-team > small { padding-inline: 12px; }
.md-draw-redo { margin-bottom: 12px; border-block: 1px solid #dbe3d8; }
.md-draw-redo[open] { padding-bottom: 10px; }
.md-draw-redo summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 2px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  list-style: none;
}
.md-draw-redo summary::-webkit-details-marker { display: none; }
.md-draw-redo summary svg { width: 17px; height: 17px; flex: none; }
.md-draw-redo summary svg:last-child { margin-left: auto; }
.md-draw-redo[open] summary svg:last-child { transform: rotate(180deg); }
.md-draw[data-phase="revealed"] .md-team { animation: md-draw-reveal .38s ease-out both; }
.md-draw[data-phase="revealed"] .md-team:nth-child(2) { animation-delay: 65ms; }
.md-draw[data-phase="revealed"] .md-team:nth-child(3) { animation-delay: 130ms; }
.md-draw[data-phase="revealed"] .md-team:nth-child(4) { animation-delay: 195ms; }
@keyframes md-draw-reveal {
  from { opacity: 0; transform: translateY(12px); }
}
@media (max-width: 640px) {
  .md-draw-start { grid-template-columns: 1fr; gap: 10px; }
  .md-draw-stage { min-height: 225px; padding: 12px; }
  .md-draw .md-draw-tools .button { flex: 1 1 135px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .md-draw[data-phase] :is(.md-ballot-ball, .md-ballot-ring, .md-ballot-chip, .md-team) { animation: none; }
}

.md-team[data-my-team] { outline: 2px solid var(--team-accent); outline-offset: 2px; scroll-margin: 6px; }
.md-team-roster > .md-my-player { padding-inline: 6px; border-radius: 6px; background: var(--team-pale); }
.md-my-player small { color: var(--team-ink); font-weight: 750; }
.modal:has(.md-court) { width: min(540px, 100%); padding: clamp(12px, 3vw, 22px); }
.modal:has(.md-court) .modalhead { margin-bottom: 10px; }
.md-court-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 13px;
  border-radius: 13px;
  background: #102c22;
  color: #f7fbf0;
  box-shadow: 0 4px 9px #122e2440;
}
.md-court-kicker { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .75rem; font-weight: 800; }
.md-court-kicker span { display: flex; align-items: center; gap: 6px; }
.md-court-kicker svg { width: 15px; }
.md-court-kicker b { padding: 3px 7px; border-radius: 5px; background: #e4f5c2; color: #284422; }
.md-court-header .scoreboard { margin-top: 5px; }
.md-court-header .team { color: #f4f8ec; }
.md-court-header .team > svg { width: 35px; height: 40px; margin-bottom: 3px; }
.md-court-header .scorenum { color: #fbfff6; }
.md-court-header .scorenum em, .md-court-header .scorenum small { color: #c6d9c9; }
.md-court-timer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 9px; padding-top: 8px; border-top: 1px solid #ffffff28; }
.md-court-timer time { font: 900 34px/1 'Barlow Condensed', sans-serif; color: #c8f552; }
.md-court-timer .button { min-height: 44px; color: #1c392b; }
.md-court-goals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.md-court-goal { display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 53px; padding: 7px; border: 1px solid var(--team-accent); border-radius: 9px; background: var(--team-pale); color: var(--team-ink); font-weight: 800; }
.md-court-goal svg { width: 18px; height: 18px; flex: none; }
.md-court-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.md-court-options .button { min-height: 44px; }
.md-court .md-inline-goal { scroll-margin-top: 195px; }

.md-plan-totals { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.md-plan-totals span { padding: 5px 8px; border-radius: 6px; background: var(--team-pale); color: var(--team-ink); font-size: .78rem; }
.md-plan-totals strong { padding-left: 3px; font-variant-numeric: tabular-nums; }
.md-plan-team, .md-plan-pool { border: 1px solid #dce4d8; border-radius: 9px; margin: 8px 0; padding: 8px 10px; }
.md-plan-team h3 { margin: 0 0 3px; color: var(--team-ink); font-size: 1rem; }
.md-plan-pool summary { font-weight: 700; cursor: pointer; }
.md-plan-player { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(115px,42%); align-items: center; gap: 7px; min-height: 48px; padding: 5px 0; border-top: 1px solid #e9eee6; }
.md-plan-player .avatar { width: 26px; height: 26px; }
.md-plan-player span { overflow-wrap: anywhere; font-size: .85rem; }
.md-plan-player small { display: block; color: #536659; }
.md-plan-player select { width: 100%; min-width: 0; padding: 6px; min-height: 40px; color: #213a2a; background: #fff; border: 1px solid #cbd9cb; border-radius: 6px; font-size: .86rem; }
.md-plan-form > button[type="submit"] { position: sticky; bottom: 0; z-index: 1; width: 100%; min-height: 44px; box-shadow: 0 2px 10px #17271830; }
.md-sub-event > svg { width: 16px; flex: none; color: #3e6947; }
.md-court-goal:disabled { opacity: .55; cursor: default; }
.md-inline-substitution .md-controls { margin: 9px 0; }
@media(max-width:390px) { .md-plan-player .avatar { display: none; } .md-plan-player { grid-template-columns: minmax(0,1fr) minmax(110px,44%); } }
/* Gols no cartão de placar: só no computador, onde o cartão sobra ao lado da capa. */
.score-goals { display: none; }
@media (min-width: 1151px) {
  .score-goals { display: grid; gap: 8px; margin: 6px 0 14px; padding: 14px 0 0; border-top: 1px solid #e6eae2; list-style: none; }
  .score-goals li { display: grid; grid-template-columns: 16px 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 13px; }
  .score-goals li svg { width: 14px; height: 14px; color: #5d7a63; }
  .score-goals b { color: #5d7a63; font-weight: 800; }
  .score-goals span { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .score-goals small { color: #6c7f71; font-size: 12px; }
  .score-goals .more { display: block; color: #6c7f71; font-size: 12px; }
}
