/* TodoPorras 2026-11-04 — single final palette for pool views.
   Loaded after legacy CSS. Keep text color and Safari text-fill paired. */
html[data-tp-theme="light"]{
  --tp-pool-ink:#071c38;
  --tp-pool-muted:#42556f;
  --tp-pool-surface:#ffffff;
  --tp-pool-soft:#f3f7fb;
  --tp-pool-line:#d9e4ed;
  --tp-pool-accent:#087a45;
  --tp-pool-highlight:#e8f6ee;
  --tp-pool-shadow:0 10px 28px rgba(8,44,99,.075);
}
html[data-tp-theme="dark"]{
  --tp-pool-ink:#f5f8f6;
  --tp-pool-muted:#b0c6ba;
  --tp-pool-surface:#0d1813;
  --tp-pool-soft:#15241c;
  --tp-pool-line:#304738;
  --tp-pool-accent:#65e3a0;
  --tp-pool-highlight:#193a2a;
  --tp-pool-shadow:0 10px 30px rgba(0,0,0,.2);
}
html[data-tp-theme] :is(.tp-gameplay-shell,.tp-results-panel,.tp-results-rankings,.tp-pot-view){
  color:var(--tp-pool-ink)!important;
  -webkit-text-fill-color:var(--tp-pool-ink)!important;
}
html[data-tp-theme] :is(.tp-gameplay-shell,.tp-results-panel,.tp-results-rankings,.tp-pot-view)
  :is(h1,h2,h3,h4,.tp-results-rank-person strong,.tp-results-rank-value,.tp-pot-allocation h3,
      .tp-results-rank-icon,.tp-pot-metrics strong,.tp-confidence-live-summary strong){
  color:var(--tp-pool-ink)!important;
  -webkit-text-fill-color:var(--tp-pool-ink)!important;
  opacity:1!important;
  text-shadow:none!important;
}
html[data-tp-theme] :is(.tp-gameplay-shell,.tp-results-panel,.tp-results-rankings,.tp-pot-view)
  :is(p,small,.muted,.tp-results-rank-person small,.tp-pot-metrics small,.tp-pot-allocation small,.tp-result-state){
  color:var(--tp-pool-muted)!important;
  -webkit-text-fill-color:var(--tp-pool-muted)!important;
  opacity:1!important;
}
html[data-tp-theme] :is(.tp-results-rankings,.tp-pot-view .tp-results-view-header,
    .tp-pot-view .tp-pot-metrics>section,.tp-pot-view .tp-pot-allocation){
  background:var(--tp-pool-surface)!important;
  border:1px solid var(--tp-pool-line)!important;
  border-radius:18px;
  box-shadow:var(--tp-pool-shadow);
}
html[data-tp-theme] .tp-results-rankings{
  padding:clamp(16px,2.4vw,24px);
  gap:15px;
  min-width:0;
}
html[data-tp-theme] .tp-results-rankings .tp-results-section-title{
  border-bottom:2px solid var(--tp-pool-line);
  padding:0 0 13px;
}
html[data-tp-theme] .tp-results-rankings .tp-results-section-title h3,
html[data-tp-theme] .tp-results-view .tp-results-section-title h3{
  font-size:clamp(21px,3vw,27px)!important;
  font-weight:900;
  letter-spacing:-.035em;
  line-height:1.2;
  margin:0!important;
  color:var(--tp-pool-ink)!important;
  -webkit-text-fill-color:var(--tp-pool-ink)!important;
}
html[data-tp-theme] .tp-results-ranking-list{display:grid;gap:10px;min-width:0}
html[data-tp-theme] .tp-results-ranking-row{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  min-height:72px;
  padding:12px 14px;
  background:var(--tp-pool-soft)!important;
  color:var(--tp-pool-ink)!important;
  -webkit-text-fill-color:var(--tp-pool-ink)!important;
  border:1px solid var(--tp-pool-line)!important;
  border-radius:15px;
  min-width:0;
}
html[data-tp-theme] .tp-results-ranking-row:is(:first-child,.is-mine){
  border-left:4px solid var(--tp-pool-accent)!important;
}
html[data-tp-theme] .tp-results-ranking-row.is-mine{
  background:var(--tp-pool-highlight)!important;
}
html[data-tp-theme] .tp-results-rank-icon{
  display:grid;place-items:center;
  width:45px;height:45px;
  border:1px solid var(--tp-pool-line)!important;
  border-radius:14px;
  background:var(--tp-pool-surface)!important;
  font-size:23px!important;
  font-weight:900;
  color:var(--tp-pool-ink)!important;
  -webkit-text-fill-color:var(--tp-pool-ink)!important;
}
html[data-tp-theme] .tp-results-rank-person{min-width:0;overflow-wrap:anywhere}
html[data-tp-theme] .tp-results-rank-person strong{font-size:clamp(14px,1.6vw,16px)!important;line-height:1.3}
html[data-tp-theme] .tp-results-rank-person small{
  display:block;margin-top:6px;font-size:12px!important;line-height:1.4!important;
  color:var(--tp-pool-muted)!important;-webkit-text-fill-color:var(--tp-pool-muted)!important
}
html[data-tp-theme] .tp-results-you{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  padding:3px 8px;
  border-radius:99px;
  background:var(--tp-pool-surface);
  color:var(--tp-pool-accent)!important;
  -webkit-text-fill-color:var(--tp-pool-accent)!important;
  border:1px solid var(--tp-pool-line);
  font-size:11px;
  font-weight:900;
  vertical-align:middle;
}
html[data-tp-theme] .tp-results-rank-value{
  font-size:clamp(15px,1.8vw,19px)!important;
  font-variant-numeric:tabular-nums;
  font-weight:900!important;
  text-align:right;
}
html[data-tp-theme] .tp-confidence-rank-points{display:flex;align-items:flex-end;flex-direction:column;gap:4px}
html[data-tp-theme] .tp-confidence-rank-points strong{
  color:var(--tp-pool-ink)!important;-webkit-text-fill-color:var(--tp-pool-ink)!important;
  font-size:clamp(14px,1.6vw,17px)!important
}
html[data-tp-theme] .tp-confidence-rank-points small{
  color:var(--tp-pool-muted)!important;-webkit-text-fill-color:var(--tp-pool-muted)!important;
  font-size:12px!important;
}
html[data-tp-theme] .tp-pot-view{display:grid;gap:14px;min-width:0}
html[data-tp-theme] .tp-pot-view .tp-results-view-header{
  padding:18px 21px;display:flex;align-items:center;gap:12px;
}
html[data-tp-theme] .tp-pot-view .tp-results-view-header h2{
  font-size:clamp(24px,3.4vw,31px)!important;
  font-weight:900;
  letter-spacing:-.035em;
  color:var(--tp-pool-ink)!important;-webkit-text-fill-color:var(--tp-pool-ink)!important;
}
html[data-tp-theme] .tp-pot-view .tp-pot-metrics{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;
}
html[data-tp-theme] .tp-pot-view .tp-pot-metrics>section{
  padding:20px;display:flex;flex-direction:column;justify-content:center;gap:10px;
  min-width:0;
}
html[data-tp-theme] .tp-pot-view .tp-pot-metrics>section:first-child{
  background:var(--tp-pool-highlight)!important;
  border-left:4px solid var(--tp-pool-accent)!important;
}
html[data-tp-theme] .tp-pot-view .tp-pot-metrics small{
  color:var(--tp-pool-muted)!important;-webkit-text-fill-color:var(--tp-pool-muted)!important;
  font-size:13px!important;font-weight:800;
}
html[data-tp-theme] .tp-pot-view .tp-pot-metrics strong{
  font-size:clamp(27px,4vw,37px)!important;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.045em;
  line-height:1.05;
  color:var(--tp-pool-ink)!important;-webkit-text-fill-color:var(--tp-pool-ink)!important;
}
html[data-tp-theme] .tp-pot-view .tp-pot-allocation{padding:20px 22px}
html[data-tp-theme] .tp-pot-view .tp-pot-allocation>small{
  color:var(--tp-pool-muted)!important;-webkit-text-fill-color:var(--tp-pool-muted)!important;
  font-weight:800!important;font-size:13px!important;
}
html[data-tp-theme] .tp-pot-view .tp-pot-allocation h3{
  font-size:clamp(25px,4vw,36px)!important;font-weight:900;
  line-height:1.22;
  letter-spacing:-.04em;
  overflow-wrap:anywhere;
  margin:8px 0 0!important;
}
html[data-tp-theme] .tp-gameplay-shell .tp-gameplay-head{
  border-bottom:2px solid var(--tp-pool-line);
  padding-bottom:16px;
}
html[data-tp-theme] .tp-gameplay-shell .tp-gameplay-head h1{
  color:var(--tp-pool-ink)!important;-webkit-text-fill-color:var(--tp-pool-ink)!important;
  font-weight:950;line-height:1.13;
}
html[data-tp-theme] .tp-gameplay-shell .tp-confidence-live-summary{
  background:var(--tp-pool-highlight)!important;
  border-left:4px solid var(--tp-pool-accent)!important;
}
html[data-tp-theme] .tp-gameplay-shell .tp-confidence-live-summary .tp-kicker{
  font-weight:900!important;letter-spacing:.035em;
  color:var(--tp-pool-accent)!important;-webkit-text-fill-color:var(--tp-pool-accent)!important;
}
html[data-tp-theme] .tp-gameplay-shell .tp-confidence-inline-hint{
  margin:6px 0 12px!important;
  padding:0 6px;
  font-size:12px;
}
html[data-tp-theme] :is(.tp-results-panel,.tp-pot-view,.tp-results-rankings)
  :is(button,.tp-results-refresh){
  color:var(--tp-pool-ink)!important;-webkit-text-fill-color:var(--tp-pool-ink)!important;
}
html[data-tp-theme] :is(.tp-results-panel,.tp-pot-view,.tp-results-rankings)
  :is(button,a,input,select):focus-visible{outline:3px solid var(--tp-pool-accent)!important;outline-offset:2px}
@media(max-width:650px){
  html[data-tp-theme] .tp-results-ranking-row{
    grid-template-columns:42px minmax(0,1fr);gap:7px 12px;padding:12px;min-height:64px;
  }
  html[data-tp-theme] .tp-results-rank-icon{grid-column:1;grid-row:1/span 2;width:40px;height:40px;font-size:20px!important}
  html[data-tp-theme] .tp-results-rank-person{grid-column:2;grid-row:1}
  html[data-tp-theme] .tp-results-rank-value,
  html[data-tp-theme] .tp-confidence-rank-points{
    grid-column:2;grid-row:2;justify-self:start;
    align-items:flex-start;text-align:left;
  }
  html[data-tp-theme] .tp-pot-view .tp-pot-metrics{grid-template-columns:1fr}
  html[data-tp-theme] .tp-pot-view .tp-results-refresh{width:100%}
}

/* Common future-pool pattern: score and classification use the same theme tokens. */
html[data-tp-theme] .tp-classification-title{display:flex!important;align-items:center!important;gap:10px!important}
html[data-tp-theme] .tp-classification-title img{
  width:30px!important;height:30px!important;display:block!important;flex:0 0 30px!important;object-fit:contain
}
html[data-tp-theme] .tp-confidence-scoreboard{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;padding:12px!important;
  background:var(--tp-pool-surface)!important;border:1px solid var(--tp-pool-line)!important
}
html[data-tp-theme] .tp-confidence-score-metric{
  display:flex;flex-direction:column;gap:8px;min-width:0;padding:12px;
  background:var(--tp-pool-soft)!important;border-radius:12px
}
html[data-tp-theme] .tp-confidence-score-metric .tp-kicker{
  font-size:12px!important;color:var(--tp-pool-muted)!important;
  -webkit-text-fill-color:var(--tp-pool-muted)!important
}
html[data-tp-theme] .tp-confidence-score-metric strong{
  font-size:clamp(23px,3vw,30px)!important;color:var(--tp-pool-ink)!important;
  -webkit-text-fill-color:var(--tp-pool-ink)!important
}
/* Sticky after top-of-pool information; confined to the match list only. */
.tp-confidence-fixture-zone{display:grid;gap:9px;align-content:start;min-width:0}
html[data-tp-theme] .tp-confidence-fixture-zone > #tpConfidenceSticky.tp-confidence-sticky{
  position:sticky!important;top:var(--tp-confidence-anchor-top,72px)!important;
  left:auto!important;right:auto!important;width:100%!important;margin:0!important;
  z-index:24!important;pointer-events:auto!important;align-self:start!important
}
html[data-tp-theme] .tp-gameplay-shell:has(#tpConfidenceSticky) .tp-gameplay-layout{padding-top:0!important}
html[data-tp-theme] .tp-confidence-inline-hint[hidden]{display:none!important}
/* Clear 1X2 choice: high-contrast surface, heavy border, check mark, keyboard focus. */
html[data-tp-theme] .tp-gameplay-shell .tp-pick-three input[type="radio"]+span{
  position:relative;box-sizing:border-box;min-height:48px;
  border:2px solid var(--tp-pool-line)!important;
  background:var(--tp-pool-surface)!important;color:var(--tp-pool-ink)!important;
  -webkit-text-fill-color:var(--tp-pool-ink)!important
}
html[data-tp-theme] .tp-gameplay-shell .tp-pick-three input[type="radio"]:checked+span{
  border:3px solid var(--tp-pool-accent)!important;
  background:var(--tp-pool-highlight)!important;box-shadow:inset 0 0 0 1px var(--tp-pool-accent)!important;
  font-weight:950!important
}
html[data-tp-theme] .tp-gameplay-shell .tp-pick-three input[type="radio"]:checked+span::after{
  content:"✓";position:absolute;top:3px;right:4px;font-size:11px!important;
  color:var(--tp-pool-accent)!important;-webkit-text-fill-color:var(--tp-pool-accent)!important
}
html[data-tp-theme] .tp-gameplay-shell .tp-pick-three input[type="radio"]:focus-visible+span{
  outline:3px solid var(--tp-pool-accent)!important;outline-offset:3px
}
/* Editable compact list: preserve native radios/inputs and all unsaved values. */
html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-fixture-group{
  display:grid!important;grid-template-columns:minmax(0,1.05fr) minmax(0,1.95fr)!important;
  gap:6px 9px!important;align-items:center!important;min-width:0!important;
  padding:8px!important;margin:0!important;border-radius:12px!important;
  background:var(--tp-pool-surface)!important;border:1px solid var(--tp-pool-line)!important
}
html[data-tp-theme] .tp-confidence-fixtures.is-list :is(.tp-fixture-head,.tp-stadium-fixture .tp-fixture-head){
  display:block!important;grid-column:1;grid-row:1;min-width:0!important;
  padding:0!important;margin:0!important;background:transparent!important;border:0!important
}
html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-fixture-questions{
  display:block!important;grid-column:2;grid-row:1;padding:0!important;margin:0!important;min-width:0!important
}
html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-question-row{
  display:grid!important;grid-template-columns:minmax(0,1fr) 52px!important;
  gap:8px!important;align-items:center!important;padding:0!important;margin:0!important
}
html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-pick-three{
  display:grid!important;grid-column:1;grid-row:1;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:4px!important;min-width:0!important
}
html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-pick-three label span{
  display:flex!important;min-height:44px!important;height:44px!important;
  padding:0!important;margin:0!important;border-radius:9px!important;font-size:0!important
}
html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-pick-three label span::before{
  content:attr(data-tp-short);font-size:14px!important;font-weight:950!important;
  color:var(--tp-pool-ink)!important;-webkit-text-fill-color:var(--tp-pool-ink)!important
}
html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-question-row>label{
  display:flex!important;grid-column:2;grid-row:1;align-items:center!important;
  justify-content:center!important;min-width:0!important
}
html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-question-row>label input.tp-confidence-points{
  width:52px!important;max-width:52px!important;min-height:40px!important;height:40px!important;
  border:1px solid var(--tp-pool-line)!important;
  background:var(--tp-pool-surface)!important;color:var(--tp-pool-ink)!important;
  -webkit-text-fill-color:var(--tp-pool-ink)!important
}
html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-confidence-list-recap{display:none!important}
html[data-tp-theme] .tp-confidence-fixtures.is-list.is-readonly .tp-confidence-list-recap{
  display:grid!important;grid-column:1/-1
}
html[data-tp-theme] .tp-pot-rules-metrics{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:2px
}
html[data-tp-theme] .tp-pot-rules-metrics section{
  display:flex;flex-direction:column;gap:9px;
  border:1px solid var(--tp-pool-line)!important;border-radius:16px;
  background:var(--tp-pool-surface)!important;padding:18px
}
html[data-tp-theme] .tp-pot-rules-metrics small{
  color:var(--tp-pool-muted)!important;-webkit-text-fill-color:var(--tp-pool-muted)!important;font-weight:850
}
html[data-tp-theme] .tp-pot-rules-metrics strong{
  font-size:clamp(19px,2.7vw,26px)!important;
  color:var(--tp-pool-ink)!important;-webkit-text-fill-color:var(--tp-pool-ink)!important
}
@media(max-width:520px){
 html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-fixture-group{
   grid-template-columns:1fr!important;gap:7px!important;padding:9px!important
 }
 html[data-tp-theme] .tp-confidence-fixtures.is-list :is(.tp-fixture-head,.tp-stadium-fixture .tp-fixture-head){
   grid-column:1;grid-row:1
 }
 html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-fixture-questions{
   grid-column:1;grid-row:2
 }
 html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-question-row{
   grid-template-columns:minmax(0,1fr) 58px!important;gap:9px!important
 }
 html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-question-row>label input.tp-confidence-points{
   width:58px!important;max-width:58px!important
 }
 html[data-tp-theme] .tp-confidence-fixtures.is-list.is-readonly .tp-confidence-list-recap{
   grid-column:1;grid-row:3
 }
}
@media(max-width:380px){
 html[data-tp-theme] .tp-confidence-scoreboard{gap:6px!important;padding:8px!important}
 html[data-tp-theme] .tp-confidence-score-metric{padding:9px!important}
 html[data-tp-theme] .tp-pot-rules-metrics{grid-template-columns:1fr}
}

/* Compact predictions: outcomes remain clickable; bulky feedback stays off-list. */
html[data-tp-theme] .tp-confidence-fixtures.is-list .tp-prediction-feedback{
  display:none!important;
}

/* A pool without an informative sidebar uses all available width for fixtures. */
html[data-tp-theme] .tp-gameplay-layout.tp-gameplay-no-aside{
  grid-template-columns:minmax(0,1fr)!important
}
html[data-tp-theme] .tp-gameplay-layout.tp-gameplay-no-aside>.tp-gameplay-aside{
  display:none!important
}

/* No legacy TP badge is permitted next to the official logo and TodoPorras wordmark. */
#app .wrap>.top .tp-brand-mark,#app .tp-mobile-brandbar .tp-brand-mark,
#app .tp-sidebar .tp-brand-v2>.tp-brand-mark,#app .tp-public-detail-header .tp-brand-mark{display:none!important}

/* Stop the old CSS-generated TP badge, including settled member pool headers. */
#app .wrap>.top .brand::before,#app .tp-public-detail-header .brand::before{content:none!important;display:none!important}


/* Quiniela por Puntos: a complete, theme-scoped palette for the pinned
   allocation counter. Override legacy white text on pale light surfaces,
   including Safari's independent -webkit-text-fill-color inheritance. */
html[data-tp-theme="light"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky{
  background:#ffffff!important;color:#071c38!important;-webkit-text-fill-color:#071c38!important;
  border:2px solid #087a45!important;
  box-shadow:0 6px 20px rgba(7,28,56,.13)!important;
}
html[data-tp-theme="light"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky
  :is(#tpConfidenceStickyAssigned,#tpConfidenceStickyRemaining){
  color:#071c38!important;-webkit-text-fill-color:#071c38!important;opacity:1!important;
}
html[data-tp-theme="light"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky .tp-confidence-sticky-numbers span{
  color:#42556f!important;-webkit-text-fill-color:#42556f!important;opacity:1!important;
}
html[data-tp-theme="light"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky .tp-confidence-sticky-meter{
  background:#d9e4ed!important;
}
html[data-tp-theme="light"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky .tp-confidence-sticky-meter span{
  background:#087a45!important;
}
html[data-tp-theme="light"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky[data-state="complete"]{
  background:#e8f6ee!important;border-color:#087a45!important;
}
html[data-tp-theme="light"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky[data-state="error"]{
  background:#fff0ee!important;border-color:#b42318!important;
}
html[data-tp-theme="light"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky[data-state="error"] .tp-confidence-sticky-meter span{
  background:#b42318!important;
}
html[data-tp-theme="dark"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky{
  background:#103a2a!important;color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;
  border:2px solid #64f0a9!important;
  box-shadow:0 7px 22px rgba(0,0,0,.28)!important;
}
html[data-tp-theme="dark"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky
  :is(#tpConfidenceStickyAssigned,#tpConfidenceStickyRemaining){
  color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;opacity:1!important;
}
html[data-tp-theme="dark"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky .tp-confidence-sticky-numbers span{
  color:#d5f5e7!important;-webkit-text-fill-color:#d5f5e7!important;opacity:1!important;
}
html[data-tp-theme="dark"] .tp-gameplay-shell #tpConfidenceSticky.tp-confidence-sticky[data-state="error"]{
  background:#632a2a!important;border-color:#ffc0b6!important;
}
/* The same readable kit labels in both themes, without global kit recoloring. */
html[data-tp-theme] .tp-gameplay-shell .tp-goals-fixture{
  background:var(--tp-pool-soft)!important;
  border-color:var(--tp-pool-line)!important;
  color:var(--tp-pool-ink)!important;
}
html[data-tp-theme] .tp-gameplay-shell .tp-goals-fixture .tp-goals-fixture-teams{
  color:var(--tp-pool-ink)!important;
  -webkit-text-fill-color:var(--tp-pool-ink)!important;
}
html[data-tp-theme] .tp-gameplay-shell .tp-goals-fixture
  :is(.tp-goals-fixture-time,.vs){
  color:var(--tp-pool-muted)!important;
  -webkit-text-fill-color:var(--tp-pool-muted)!important;
}
