/* ==========================================================================
   components.css — botões, controles, cartões de deck, tabela, gaveta,
   tooltip, pódio, linha do tempo, hall da fama e regras
   ========================================================================== */

/* ---------- painel genérico ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.panel-head h3 {
  font-size: 16px;
  font-weight: 600;
}

.panel-head p {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 4px;
  max-width: 560px;
}

/* ---------- botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--hair-2);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
  background: var(--surface-3);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-2);
}

.btn-ghost {
  background: transparent;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--hair-2);
  background: var(--surface-2);
}

/* ---------- controle segmentado ---------- */

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--hair);
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hair-2);
}

.segmented.is-accent button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
  font-weight: 600;
}

/* ---------- campos ---------- */

.field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--hair);
  font-size: 13px;
  color: var(--ink-2);
}

.field input[type="search"],
.field select {
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  min-width: 0;
}

.field input[type="search"] {
  width: 180px;
}

.field select {
  cursor: pointer;
}

.field select option {
  background: var(--surface-2);
}

.field:focus-within {
  border-color: var(--hair-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input[type="range"] {
  accent-color: var(--accent);
  width: 110px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.toolbar .spacer {
  flex: 1;
}

/* ---------- KPIs ---------- */

.kpi {
  background: rgba(24, 24, 26, 0.72);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 16px 18px;
  backdrop-filter: blur(6px);
  min-width: 0;
}

.kpi-label {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}

.kpi-value {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-value.is-text {
  font-size: 19px;
  margin-top: 10px;
}

.kpi-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- símbolos de mana ---------- */

.pips {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
}

.pips img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.pips.is-lg img {
  width: 20px;
  height: 20px;
}

.set-icon {
  width: 18px;
  height: 18px;
  filter: invert(1) opacity(0.85);
  flex-shrink: 0;
}

.color-toggle {
  display: inline-flex;
  gap: 4px;
}

.color-toggle button {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: var(--surface);
  display: grid;
  place-items: center;
  opacity: 0.45;
  filter: grayscale(0.7);
  transition: opacity 0.2s, filter 0.2s, transform 0.2s;
}

.color-toggle button img {
  width: 20px;
  height: 20px;
}

.color-toggle button:hover {
  opacity: 0.8;
}

.color-toggle button[aria-pressed="true"] {
  opacity: 1;
  filter: none;
  box-shadow: 0 0 0 2px var(--accent);
}

/* ---------- barra V/E/D ---------- */

.wdl {
  display: flex;
  gap: 2px;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-3);
}

.wdl span {
  display: block;
  min-width: 2px;
  transition: filter 0.2s;
}

.wdl span:hover {
  filter: brightness(1.25);
}

.wdl .w {
  background: var(--win);
}

.wdl .d {
  background: var(--draw);
}

.wdl .l {
  background: var(--loss);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12px;
  color: var(--ink-2);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.legend i.line {
  width: 14px;
  height: 2px;
  border-radius: 2px;
}

.legend i.dot {
  border-radius: 50%;
}

/* ---------- cartões de deck ---------- */

.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.deck-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}

.deck-card:hover,
.deck-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--hair-2);
  box-shadow: var(--shadow);
  outline: none;
}

.deck-card-art {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2) center 25% / cover no-repeat;
}

.deck-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 24, 26, 0) 45%, rgba(24, 24, 26, 0.95) 100%);
}

.deck-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.6s var(--ease);
}

.deck-card:hover .deck-card-art img {
  transform: scale(1.05);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(14, 14, 15, 0.78);
  border: 1px solid var(--hair-2);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.rank-badge.is-top {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.deck-card-set {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(14, 14, 15, 0.7);
  backdrop-filter: blur(6px);
}

.deck-card-body {
  padding: 2px 16px 16px;
  margin-top: -18px;
  position: relative;
  z-index: 1;
}

.deck-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.deck-card-title h3 {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-card-cmd {
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.deck-card-stats {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 8px;
}

.deck-card-rate {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
}

.deck-card-rate small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-3);
  margin-top: 4px;
}

.deck-card-games {
  font-size: 12px;
  color: var(--ink-2);
  text-align: right;
}

.deck-card-wdl {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 6px;
}

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--ink-3);
  border: 1px dashed var(--hair-2);
  border-radius: var(--radius);
}

/* ---------- tabela ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: var(--surface);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data th,
table.data td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--hair);
  white-space: nowrap;
}

table.data th {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface-2);
  position: sticky;
  top: 0;
}

table.data th.sortable {
  cursor: pointer;
  user-select: none;
}

table.data th.sortable:hover {
  color: var(--ink);
}

table.data th[aria-sort="descending"]::after {
  content: " ↓";
  color: var(--accent);
}

table.data th[aria-sort="ascending"]::after {
  content: " ↑";
  color: var(--accent);
}

table.data td.r,
table.data th.r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.data tbody tr {
  transition: background 0.15s;
}

table.data tbody tr:hover {
  background: var(--surface-2);
}

table.data tbody tr.is-clickable {
  cursor: pointer;
}

table.data tbody tr:last-child td {
  border-bottom: 0;
}

.cell-deck {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.cell-deck img.thumb {
  width: 44px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.cell-deck b {
  display: block;
  font-weight: 600;
  font-size: 13px;
}

.cell-deck small {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
}

.inline-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}

.inline-bar .track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}

.inline-bar .fill {
  height: 100%;
  border-radius: 0 3px 3px 0;
  background: var(--s1);
}

.inline-bar .stackfill {
  display: flex;
  gap: 2px;
  height: 100%;
}

.inline-bar .stackfill .fin {
  background: var(--s1);
}

.inline-bar .stackfill .disc {
  background: var(--draw);
}

.inline-bar .stackfill span:last-child {
  border-radius: 0 3px 3px 0;
}

/* ---------- tooltip ---------- */

.tooltip {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  min-width: 170px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(31, 31, 34, 0.97);
  border: 1px solid var(--hair-2);
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s, transform 0.12s;
}

.tooltip.is-visible {
  opacity: 1;
  transform: none;
}

.tooltip-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

.tooltip-sub {
  color: var(--ink-3);
  margin-bottom: 6px;
}

.tooltip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--ink-2);
}

.tooltip-row i {
  width: 12px;
  height: 2px;
  border-radius: 2px;
  flex-shrink: 0;
}

.tooltip-row strong {
  margin-left: auto;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- gaveta (detalhe do deck) ---------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(620px, 100vw);
  background: var(--page);
  border-left: 1px solid var(--hair-2);
  overflow-y: auto;
  transform: translateX(102%);
  transition: transform 0.35s var(--ease);
  overscroll-behavior: contain;
}

.drawer.is-open {
  transform: none;
}

.drawer-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2) center 25% / cover no-repeat;
}

.drawer-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 14, 15, 0.1) 30%, var(--page) 100%);
}

.drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: rgba(14, 14, 15, 0.7);
  backdrop-filter: blur(6px);
}

.drawer-credit {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  font-size: 11px;
  color: var(--ink-3);
}

.drawer-body {
  padding: 0 24px 40px;
  margin-top: -56px;
  position: relative;
  z-index: 1;
}

.drawer-body h2 {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.02em;
}

.drawer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.drawer-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.drawer-section {
  margin-top: 26px;
}

.drawer-section > h4 {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 12px;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.season-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.season-card {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.season-card.is-current {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
}

.season-card h5 {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}

.season-card .big {
  font-size: 24px;
  font-weight: 650;
  margin: 6px 0 2px;
}

.season-card .small {
  font-size: 12px;
  color: var(--ink-3);
}

.season-card .wdl {
  margin-top: 10px;
}

.card-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.card-gallery a {
  display: block;
  border-radius: 4.75% / 3.5%;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  background: var(--surface-2);
  aspect-ratio: 488 / 680;
}

.card-gallery a:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.card-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.fact {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.fact b {
  display: block;
  font-size: 18px;
  font-weight: 650;
}

.fact span {
  font-size: 11px;
  color: var(--ink-3);
}

/* ---------- destaques ---------- */

.highlight-card {
  position: relative;
  min-height: 210px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hair);
  background: var(--surface) center 25% / cover no-repeat;
  background-clip: padding-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.highlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 14, 15, 0.1) 0%, rgba(14, 14, 15, 0.92) 78%);
}

.highlight-card:hover,
.highlight-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  outline: none;
}

.highlight-card > * {
  position: relative;
}

.highlight-card .eyebrow {
  color: var(--ink-2);
}

.highlight-card h3 {
  font-size: 20px;
  margin-top: 8px;
}

.highlight-card .hl-value {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-top: 6px;
  line-height: 1;
}

.highlight-card .hl-sub {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 6px;
}

/* ---------- pódio (raridades) ---------- */

.podium {
  display: grid;
  gap: 10px;
}

.podium-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--hair);
}

.rarity {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tier) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier) 45%, transparent);
}

.rarity svg {
  width: 22px;
  height: 22px;
  fill: var(--tier);
}

.tier-mitica {
  --tier: var(--mythic);
}

.tier-rara {
  --tier: var(--rare);
}

.tier-incomum {
  --tier: var(--uncommon);
}

.podium-item small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.podium-item b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-item .pts {
  text-align: right;
  font-size: 20px;
  font-weight: 650;
}

.podium-item .pts small {
  display: inline;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- jogadores ---------- */

.player-row-detail td {
  background: var(--surface-2);
  white-space: normal;
}

.player-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 4px 0;
}

.player-detail .season-card {
  background: var(--surface);
}

.player-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--surface-3);
  border: 1px solid var(--hair);
  color: var(--ink-2);
}

.badge.tier-mitica,
.badge.tier-rara,
.badge.tier-incomum {
  border-color: color-mix(in srgb, var(--tier) 50%, transparent);
  color: var(--ink);
}

.badge.tier-mitica::before,
.badge.tier-rara::before,
.badge.tier-incomum::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tier);
}

/* ---------- edições ---------- */

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

/* próxima edição: anunciada, ainda sem resultados */
.edition.is-next {
  cursor: default;
  border-style: dashed;
  border-color: var(--accent);
  background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface);
}

.edition.is-next:hover {
  transform: none;
}

.edition.is-next .season-tag {
  color: var(--accent-2);
  font-weight: 600;
}

.edition {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edition.has-info {
  border-color: var(--hair-2);
}

.edition-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.edition-num sup {
  font-size: 14px;
  color: var(--ink-3);
}

.edition .season-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  color: var(--ink-3);
}

.edition h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.edition p {
  font-size: 12px;
  color: var(--ink-3);
}

.edition .podium-mini {
  display: grid;
  gap: 4px;
  margin-top: auto;
  font-size: 12px;
}

.edition .podium-mini div {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
}

.edition .podium-mini i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tier);
  flex-shrink: 0;
}

.hall {
  display: grid;
  gap: 10px;
}

.hall-item {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  padding: 14px 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hair);
  background: var(--surface) center 30% / cover no-repeat;
  background-clip: padding-box;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.25s var(--ease);
}

.hall-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--surface) 30%, rgba(24, 24, 26, 0.78) 62%, rgba(24, 24, 26, 0.55) 100%);
}

.hall-item:hover,
.hall-item:focus-visible {
  border-color: var(--hair-2);
  transform: translateX(3px);
  outline: none;
}

.hall-item > * {
  position: relative;
}

.hall-pos {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-3);
}

.hall-item b {
  display: block;
  font-size: 16px;
}

.hall-item small {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 2px;
}

.hall-rate {
  text-align: right;
  font-size: 26px;
  font-weight: 650;
}

.hall-rate small {
  font-size: 11px;
  font-weight: 500;
}

/* ---------- regras ---------- */

.rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rule h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.rule p,
.rule li {
  font-size: 13px;
  color: var(--ink-2);
}

.rule ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.seats {
  width: 100%;
  max-width: 240px;
  margin: 6px auto 12px;
  display: block;
}

.score-list {
  display: grid;
  gap: 8px;
}

.score-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
}

.score-list b {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.method {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.method h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.method p,
.method li {
  font-size: 13px;
  color: var(--ink-2);
}

.method ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.formula {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  margin: 8px 0;
  display: block;
}

@media (max-width: 1080px) {
  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rules {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .season-cards,
  .player-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method {
    grid-template-columns: minmax(0, 1fr);
  }

  .field input[type="search"] {
    width: 130px;
  }

  .drawer-body {
    padding: 0 16px 32px;
  }

  .drawer-body h2 {
    font-size: 24px;
  }

  .hall-item {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    padding: 12px 14px;
    background-size: cover;
  }

  .hall-rate {
    font-size: 20px;
  }
}

/* ---------- ajustes de largura (celular) ---------- */

.field {
  max-width: 100%;
  min-width: 0;
}

.field select {
  max-width: min(420px, 62vw);
  text-overflow: ellipsis;
}

.pilot-pick .field select {
  max-width: none;
}

.drawer-credit {
  top: 16px;
  left: 16px;
  right: auto;
  bottom: auto;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(14, 14, 15, 0.7);
  backdrop-filter: blur(6px);
}

@media (max-width: 640px) {
  .filterbar .segmented {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filterbar .segmented button {
    padding: 7px 10px;
    font-size: 12px;
  }

  .segmented {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .segmented button {
    padding: 7px 10px;
  }
}

/* ---------- campo com busca (combobox) ---------- */

.combo {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.combo-input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  padding: 0 22px 0 0;
  text-overflow: ellipsis;
}

.combo-input::placeholder {
  color: var(--ink-3);
}

.combo-clear {
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1;
  display: none;
}

.combo-clear:hover {
  color: var(--ink);
  background: var(--surface-3);
}

.combo.has-value .combo-clear {
  display: block;
}

.combo-list {
  position: absolute;
  left: -12px;
  right: -12px;
  top: calc(100% + 12px);
  z-index: 35;
  max-height: 290px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--hair-2);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.combo-option {
  display: grid;
  gap: 1px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.combo-option b {
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
}

.combo-option small {
  font-size: 11px;
  color: var(--ink-3);
}

.combo-option.is-active {
  background: var(--surface-3);
}

.combo-option.is-selected b {
  color: var(--accent-2);
}

.combo-empty {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ink-3);
}

.toolbar .combo {
  min-width: 260px;
}

@media (max-width: 640px) {
  .toolbar .combo {
    min-width: 0;
  }
}

.rank-badge.is-off {
  color: var(--ink-3);
  font-weight: 600;
}

.link {
  color: var(--accent-2);
  cursor: pointer;
}

.link:hover {
  text-decoration: underline;
}

.drawer .table-wrap table.data td small {
  display: block;
  font-size: 11px;
}

/* ---------- edições: seleção e classificação ---------- */

.edition {
  cursor: pointer;
  transition: border-color 0.2s, transform 0.25s var(--ease);
}

.edition:hover {
  transform: translateY(-2px);
}

.edition.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
}

.deck-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.deck-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 3px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--hair);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.deck-chip:hover {
  border-color: var(--hair-2);
}

.deck-chip img {
  width: 30px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
}

.deck-chip .pips img {
  width: 12px;
  height: 12px;
}

/* ---------- estilo do deck ---------- */

.style-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.style-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface-3);
  border: 1px solid var(--hair-2);
  color: var(--ink);
}

.style-chip.is-secondary {
  background: transparent;
  font-weight: 500;
  color: var(--ink-2);
}

.theme-bars {
  display: grid;
  gap: 8px;
}

.theme-bar {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 96px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.theme-bar .track {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}

.theme-bar .fill {
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--s1);
}

.theme-bar .val {
  text-align: right;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .theme-bar {
    grid-template-columns: 110px minmax(0, 1fr) 80px;
  }
}

.facts.facts-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .facts.facts-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* temas da comunidade (EDHREC): outra fonte, outra cor */
.theme-bars.is-community .fill {
  background: var(--s3);
}
