/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --paper: #f0e6cf;
  --paper-2: #e7d9b9;
  --paper-3: #d8c59c;
  --ink: #1c1a15;
  --ink-2: #463f33;
  --ink-3: #6e6352;
  --blue: #1f55d6;
  --blue-deep: #12318a;
  --gold: #e3b53b;
  --gold-soft: #f4dc8f;
  --red: #b3321e;
  --board: #1b231e;
  --board-2: #253029;
  --board-line: #3a4a3f;
  --chalk: #f3ead2;
  --chalk-dim: #b9b29c;

  --font-display: 'Anton', 'Oswald', Impact, sans-serif;
  --font-label: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Zilla Slab', Georgia, serif;

  --container: 1280px;
  --gutter: 16px;
  --radius: 4px;
  --print-shadow: 4px 4px 0 var(--ink);
  --section-space: clamp(48px, 7vw, 88px);
}

@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) and (max-width: 1365px) { :root { --container: 1180px; } }

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  min-height: 100vh;
  background-color: var(--paper);
  /* Grão de papel + retícula de jornal */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(rgba(70, 55, 30, .07) 1px, transparent 1.2px);
  background-size: 160px 160px, 6px 6px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--chalk); padding: 10px 16px;
  font-family: var(--font-label); text-transform: uppercase; letter-spacing: .06em;
}
.skip-link:focus { top: 12px; }

.kicker {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: .8125rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue-deep);
}

.stripes {
  height: 14px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 22px, var(--blue) 22px 44px);
  border-block: 2px solid var(--ink);
}

/* ── Masthead ───────────────────────────────────────────────────────────── */
.masthead__strip {
  background: var(--ink);
  color: var(--chalk);
  font-family: var(--font-label);
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.masthead__strip-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 8px;
  white-space: nowrap;
}
@media (max-width: 420px) { .masthead__strip { font-size: .6875rem; letter-spacing: .1em; } }

.masthead__main {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 20px;
  padding-block: 32px 28px;
}
@media (min-width: 768px) {
  .masthead__main {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
    gap: 40px;
    padding-block: 44px 36px;
    align-items: center;
  }
}

.pennant {
  width: clamp(120px, 30vw, 190px);
  height: auto;
  transform-origin: 50% 4%;
  animation: sway 6s ease-in-out infinite;
  filter: drop-shadow(5px 7px 0 rgba(28, 26, 21, .18));
}
@keyframes sway {
  0%, 100% { transform: rotate(-2.2deg); }
  50% { transform: rotate(2.2deg); }
}

/* Autoridade de espaçamento: gap do container */
.masthead__title { display: grid; gap: 10px; }
.masthead__h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4rem, 15vw, 10rem);
  line-height: .86;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 4px 4px 0 var(--blue), 8px 8px 0 rgba(28, 26, 21, .14);
}
/* Sempre em 1 linha: tamanho acompanha a largura da tela */
.masthead__tagline {
  font-style: italic;
  font-size: clamp(.75rem, 3.6vw, 1.375rem);
  color: var(--ink-2);
  white-space: nowrap;
}
@media (min-width: 768px) { .masthead__tagline { font-size: clamp(1rem, 2.1vw, 1.375rem); } }

.prize-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding-block: 0;
}
@media (min-width: 640px) { .prize-strip { grid-template-columns: repeat(3, 1fr); } }

.prize {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--paper-3);
}
@media (min-width: 640px) {
  .prize { padding: 18px 20px; border-bottom: 0; border-right: 1px solid var(--paper-3); }
  .prize:first-child { padding-left: 0; }
  .prize:last-child { border-right: 0; }
}
.prize__label {
  font-family: var(--font-label);
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.prize__value {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}

/* ── Ticker ─────────────────────────────────────────────────────────────── */
.ticker {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--board);
  color: var(--chalk);
  border-block: 3px solid var(--ink);
}
.ticker__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding-block: 18px;
  font-family: var(--font-label);
  font-size: .9375rem;
  letter-spacing: .03em;
}
.ticker__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.ticker__badge.is-live { color: #ff6b52; }
.ticker__badge.is-live::before {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }
.ticker__text { flex: 1 1 260px; }

/* ── Seções ─────────────────────────────────────────────────────────────── */
.section { padding-block: var(--section-space); }
.section + .section { border-top: 4px double var(--ink); }

/* Autoridade de espaçamento: gap. Cabeçalho → conteúdo: 32px; dentro do cabeçalho: 10px. */
.section__inner { display: grid; gap: 32px; }
.section__head { display: grid; gap: 10px; max-width: 720px; }
.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.section__lede { color: var(--ink-2); font-size: 1.0625rem; max-width: 60ch; }
.section__lede:empty { display: none; }

.section--bracket { background: rgba(216, 197, 156, .28); }

/* ── Placar (rodada da vez) ─────────────────────────────────────────────── */
.boards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .boards { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.boards--single { grid-template-columns: minmax(0, 680px) !important; justify-content: center; }

.skeleton {
  height: 220px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--paper-2), var(--paper-3), var(--paper-2));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.board {
  display: grid;
  text-align: left;
  width: 100%;
  background: var(--board);
  color: var(--chalk);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  /* Textura de madeira escura */
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 7px);
}
.board:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.board:active { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }

.board__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--ink);
  font-family: var(--font-label);
  font-size: .8125rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 2px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill--live { background: var(--red); color: #fff; }
.pill--live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
.pill--final { background: var(--chalk); color: var(--ink); }
.pill--upcoming { border: 1px solid var(--chalk-dim); color: var(--chalk-dim); }

.board__rows { display: grid; }
.board__row {
  display: grid;
  grid-template-columns: auto 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.board__row + .board__row { border-top: 1px dashed var(--board-line); }
.board__row.is-loser { opacity: .45; }

.seed {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: .8125rem;
}
.board .seed { color: var(--gold); }

.shield {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.shield--sm { width: 28px; height: 28px; }
.shield--empty { opacity: .5; }

.team { display: grid; gap: 2px; min-width: 0; }
.team__name {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team__owner {
  font-size: .875rem;
  color: var(--chalk-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team__tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 2px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: .625rem;
  letter-spacing: .12em;
  vertical-align: middle;
}

/* Placa de número estilo placar de virar */
.score {
  position: relative;
  min-width: 96px;
  padding: 6px 10px;
  border-radius: 3px;
  background: linear-gradient(180deg, #0f1411 0 50%, #151c17 50% 100%);
  box-shadow: inset 0 0 0 1px #000, 0 2px 0 rgba(0, 0, 0, .4);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--chalk);
}
.score::after {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: rgba(0, 0, 0, .7);
}
.score--empty { color: var(--chalk-dim); }
.is-winner .score { color: var(--gold); }

.board__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--board-line);
  background: var(--board-2);
  font-family: var(--font-label);
  font-size: .8125rem;
  letter-spacing: .04em;
  color: var(--chalk-dim);
}
.board__cta { color: var(--gold); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }

.flag {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}

@media (max-width: 420px) {
  .board__row { grid-template-columns: auto 36px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .shield { width: 36px; height: 36px; }
  .score { min-width: 80px; font-size: 1.5rem; }
  .team__name { font-size: 1rem; }
}

/* ── Chaveamento ────────────────────────────────────────────────────────── */
.tie {
  display: grid;
  width: 100%;
  text-align: left;
  background: #fbf5e6;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--print-shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tie:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.tie:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.tie.is-live { border-color: var(--red); box-shadow: 4px 4px 0 var(--red); }

.tie__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 10px;
  white-space: nowrap;
  border-bottom: 2px solid var(--ink);
  background: var(--paper-2);
  font-family: var(--font-label);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tie .pill--final { background: var(--ink); color: var(--chalk); }
.tie .pill--upcoming { border-color: var(--ink-3); color: var(--ink-3); }

.tie__row {
  display: grid;
  grid-template-columns: 20px 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  min-height: 46px;
}
.tie__row + .tie__row { border-top: 1px solid var(--paper-3); }
.tie__row.is-winner { background: var(--blue); color: #fff; }
.tie__row.is-winner .tie__owner { color: rgba(255, 255, 255, .78); }
.tie__row.is-loser { color: var(--ink-3); }
.tie__row.is-loser .tie__name { text-decoration: line-through; text-decoration-thickness: 1.5px; }

.tie__seed {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: .8125rem;
  text-align: center;
}
.tie__team { display: grid; min-width: 0; }
.tie__name {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1.15;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tie__owner {
  font-size: .75rem;
  line-height: 1.2;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tie__score {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}
.tie__row--tbd .tie__name { color: var(--ink-2); }

/* Árvore (desktop) */
.tree { display: none; }
.stages { display: grid; gap: 40px; }

@media (min-width: 1100px) {
  .tree { display: grid; gap: 40px; }
  .stages { display: none; }
  .tree .shield--sm { width: 24px; height: 24px; }
  .tree .tie__name { font-size: .875rem; }
}

.tree__repescagem {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.tree__feed {
  display: grid;
  gap: 10px;
  max-width: 300px;
}
.tree__feed--right { justify-self: end; }
.tree__feed-label {
  font-family: var(--font-label);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tree__feed-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-deep);
}
.tree__feed-note::before {
  content: '';
  width: 2px;
  height: 22px;
  background: repeating-linear-gradient(180deg, var(--blue-deep) 0 4px, transparent 4px 7px);
}

.tree__grid {
  --link: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: calc(var(--link) * 2);
  align-items: center;
}
.tree__label {
  font-family: var(--font-label);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
  padding-bottom: 12px;
}
.tree__col { display: grid; align-content: center; height: 100%; }

/* Cada vaga tem a mesma altura → os pontos médios ficam a 25% e 75% do par */
.tree__pair { position: relative; display: grid; grid-template-rows: 1fr 1fr; height: 100%; }
.tree__slot { display: grid; align-items: center; padding-block: 14px; position: relative; }

.tree__pair::after {
  content: '';
  position: absolute;
  top: 25%;
  bottom: 25%;
  width: var(--link);
  border: 2px solid var(--ink);
}
.tree__col--left .tree__pair::after { right: calc(var(--link) * -1); border-left: 0; }
.tree__col--right .tree__pair::after { left: calc(var(--link) * -1); border-right: 0; }

.tree__single { position: relative; }
.tree__single::before {
  content: '';
  position: absolute;
  top: 50%;
  width: var(--link);
  border-top: 2px solid var(--ink);
}
.tree__col--semi-left .tree__single::before { left: calc(var(--link) * -1); }
.tree__col--semi-right .tree__single::before { right: calc(var(--link) * -1); }
.tree__col--semi-left .tree__single::after,
.tree__col--semi-right .tree__single::after {
  content: '';
  position: absolute;
  top: 50%;
  width: var(--link);
  border-top: 2px solid var(--ink);
}
.tree__col--semi-left .tree__single::after { right: calc(var(--link) * -1); }
.tree__col--semi-right .tree__single::after { left: calc(var(--link) * -1); }

.final {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.final__trophy { width: 84px; height: auto; filter: drop-shadow(3px 4px 0 rgba(28, 26, 21, .2)); }
.final__label {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  text-transform: uppercase;
}
.final .tie { width: 100%; }

.champion {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 14px 18px;
  width: 100%;
  border: 2px solid var(--ink);
  background: var(--gold);
  box-shadow: var(--print-shadow);
}
.champion__kicker { font-family: var(--font-label); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; }
.champion__name { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.05; text-transform: uppercase; }

/* Lista por fase (mobile e tablet) */
.stage { display: grid; gap: 14px; }
.stage__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}
.stage__title { font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; line-height: 1; text-transform: uppercase; }
.stage__round { font-family: var(--font-label); font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.stage__list { display: grid; gap: 16px; }
@media (min-width: 640px) { .stage__list { grid-template-columns: repeat(2, 1fr); } }

/* ── Classificação ──────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--print-shadow);
  background: #fbf5e6;
}
.standings { width: 100%; border-collapse: collapse; }
.standings th {
  padding: 10px 14px;
  background: var(--ink);
  color: var(--chalk);
  font-family: var(--font-label);
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: left;
}
.standings td { padding: 10px 14px; border-top: 1px solid var(--paper-3); vertical-align: middle; }
.standings tr.is-cut td { border-top: 3px double var(--ink); }
.standings .num { text-align: right; font-family: var(--font-label); font-weight: 600; font-variant-numeric: tabular-nums; }
.standings__pos { font-family: var(--font-display); font-size: 1.375rem; width: 52px; }
.standings__team { display: flex; align-items: center; gap: 12px; min-width: 0; }
.standings__name { font-family: var(--font-label); font-weight: 600; text-transform: uppercase; line-height: 1.15; }
.standings__owner { font-size: .875rem; color: var(--ink-3); }
.standings__info { display: grid; gap: 2px; min-width: 0; }
.standings__status-inline { display: none; }

@media (max-width: 639px) {
  .standings th, .standings td { padding: 9px 8px; }
  .standings th:first-child, .standings td:first-child { padding-left: 12px; }
  .standings th:nth-child(3), .standings td:nth-child(3) { padding-right: 12px; }
  .standings th:nth-child(4), .standings__status { display: none; }
  .standings__status-inline { display: block; padding-top: 4px; }
  .standings__status-inline .chip { font-size: .625rem; padding: 2px 7px; }
  .standings__pos { font-size: 1.125rem; width: 34px; vertical-align: top; line-height: 1.2; }
  .standings__team { gap: 8px; align-items: flex-start; }
  .standings__team .shield--sm { width: 22px; height: 22px; margin-top: 1px; }
  .standings__name { font-size: .8125rem; white-space: nowrap; letter-spacing: 0; }
  .standings__owner { font-size: .75rem; }
  .standings .num { font-size: .875rem; white-space: nowrap; vertical-align: top; }
}

.chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 2px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1.5px solid var(--ink);
}
.chip--alive { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip--out { color: var(--ink-3); border-color: var(--paper-3); text-decoration: line-through; }
.chip--champ { background: var(--gold); }
.chip--wait { background: transparent; }

/* ── Regulamento ────────────────────────────────────────────────────────── */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px;
  background: #fbf5e6;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--print-shadow);
  /* Picote de ingresso */
  background-image: radial-gradient(circle at 0 50%, var(--paper) 7px, transparent 7.5px), radial-gradient(circle at 100% 50%, var(--paper) 7px, transparent 7.5px);
}
.step__round {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--blue);
}
.step__title { font-family: var(--font-label); font-weight: 600; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .03em; }
.step p { color: var(--ink-2); font-size: 1rem; }
.rules-note { max-width: 80ch; color: var(--ink-2); font-style: italic; }

/* ── Rodapé ─────────────────────────────────────────────────────────────── */
.footer { background: var(--ink); color: var(--chalk); }
.footer__inner { display: grid; gap: 6px; padding-block: 28px 36px; font-size: .9375rem; }
.footer__small { color: var(--chalk-dim); font-size: .8125rem; }
@media (max-width: 639px) { .footer__lead { font-size: .875rem; } }

/* ── Escalações (dialog) ────────────────────────────────────────────────── */
.sheet {
  width: min(960px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}
.sheet::backdrop { background: rgba(20, 18, 14, .62); }
.sheet[open] { animation: rise .22s ease-out; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }

.sheet__inner { display: grid; grid-template-rows: auto 1fr; max-height: calc(100dvh - 30px); }
.sheet__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 3px solid var(--ink);
  background: var(--paper-2);
}
.sheet__head > div { display: grid; gap: 4px; }
.sheet__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.05; text-transform: uppercase; }
.sheet__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}
.sheet__close:hover { background: var(--ink); color: var(--chalk); }
.sheet__body { overflow-y: auto; padding: 20px; display: grid; gap: 20px; }
@media (min-width: 768px) { .sheet__body { grid-template-columns: 1fr 1fr; } }

.lineup { display: grid; align-content: start; gap: 12px; }
.lineup__head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.lineup__head .shield { width: 40px; height: 40px; }
.lineup__name { font-family: var(--font-label); font-weight: 600; font-size: 1.0625rem; text-transform: uppercase; line-height: 1.15; }
.lineup__owner { font-size: .875rem; color: var(--ink-3); }
.lineup__total { font-family: var(--font-display); font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.lineup.is-ahead .lineup__total { color: var(--blue); }
.lineup__meta { font-family: var(--font-label); font-size: .8125rem; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }

.players { list-style: none; padding: 0; display: grid; }
.player {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dotted var(--paper-3);
}
.player__pos {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: .6875rem;
  letter-spacing: .1em;
  text-align: center;
  padding: 2px 0;
  border-radius: 2px;
  background: var(--ink);
  color: var(--chalk);
}
.player__name { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; font-size: .9375rem; }
.player__name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__club { font-family: var(--font-label); font-size: .6875rem; letter-spacing: .08em; color: var(--ink-3); font-weight: 500; }
.player__badge {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: .625rem;
  background: var(--gold);
  color: var(--ink);
}
.player__badge--sub { background: var(--blue); color: #fff; }
.player__pts { font-family: var(--font-label); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.player__pts.is-neg { color: var(--red); }
.player.is-pending .player__pts, .player.is-out .player__pts { color: var(--ink-3); font-weight: 500; }
.player.is-out .player__name span:first-child { text-decoration: line-through; color: var(--ink-3); }
.player__state { font-family: var(--font-label); font-size: .625rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.player.is-live .player__state { color: var(--red); font-weight: 700; }

.bench { display: grid; gap: 6px; }
.bench summary {
  cursor: pointer;
  font-family: var(--font-label);
  font-size: .8125rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-block: 6px;
}
.bench .players { opacity: .8; }

.sheet__empty {
  grid-column: 1 / -1;
  padding: 28px 12px;
  text-align: center;
  color: var(--ink-2);
  font-style: italic;
}

.error-box {
  padding: 20px;
  border: 2px dashed var(--red);
  color: var(--red);
  font-family: var(--font-label);
  letter-spacing: .04em;
}

/* Nomes de time quebram em até 2 linhas antes de truncar — nomes do Cartola são longos. */
.team__name,
.tie__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
}

/* Na árvore a posição vai para a linha do dono — sobra largura para o nome */
.tie__owner-seed { display: none; }
@media (min-width: 1100px) {
  .tree .tie__seed { display: none; }
  .tree .tie__row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .tree .tie__owner-seed { display: inline; }
  .tree .tie__name { font-size: .8125rem; letter-spacing: 0; }
}

/* Telas muito estreitas (320px): escudo da tabela sai para o nome caber em 1 linha */
@media (max-width: 359px) {
  .standings__team .shield--sm { display: none; }
  .standings__name { font-size: .75rem; }
  .standings th, .standings td { padding-inline: 6px; }
  .standings__status-inline .chip { white-space: normal; }
}
