/* Hall da Fama (ranking histórico) e páginas de mundos.
   Visual inspirado no próprio Tribal Wars: placas de madeira com moldura de
   metal (como as capas do blog), pergaminho e tabelas nas cores do jogo. */

:root {
  --wood-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0035 0.12' numOctaves='4' seed='8' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.06 0 0 0 0 0.02 0 0 0 1.2 -0.38'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.28 0 0 0 0 0.1 0 0 0 0.55 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  --paper-stains: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.008' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.38 0 0 0 0 0.15 0 0 0 0.9 -0.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");

  --paper: #f4e4bc;
  --paper-light: #fff5da;
  --paper-row: #f0e2be;
  --paper-head: #c1a264;
  --paper-line: #d8c190;
  --ink: #3b2408;
  --ink-soft: #6b4f2a;
  --ink-link: #603000;
  --ink-red: #8a2412;
  --frame: #7d510f;
  --wood-dark: #3d2613;
  --wood: #5b3a1d;
  --wood-light: #7a5230;
  --metal: #9a948b;
  --metal-dark: #4d4842;
}

/* ------------------------------------------------------------ faixa de madeira */
.hall-hero {
  position: relative;
  padding-block: clamp(26px, 4.5vw, 52px) clamp(28px, 4.5vw, 48px);
  background:
    var(--wood-grain) center / cover no-repeat,
    radial-gradient(900px 300px at 50% 0%, rgba(255, 196, 92, 0.16), transparent 70%),
    linear-gradient(180deg, #4a2e16, #2e1c0d);
  border-bottom: 3px solid #1c1108;
  box-shadow:
    inset 0 -1px 0 rgba(255, 214, 140, 0.18),
    inset 0 1px 0 rgba(255, 214, 140, 0.12);
}

.hall-hero .crumbs ol {
  color: #c9ae84;
}

.hall-hero .crumbs a {
  color: #e8d3ad;
}

.hall-hero .crumbs li + li::before {
  color: #8a6a44;
}

.hall-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px 40px;
}

.hall-hero.is-center .hall-hero-grid {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.hall-hero.is-center .crumbs ol {
  justify-content: center;
}

.hall-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #f2c55c;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hall-hero h1 {
  margin: 0;
  color: #fbecd0;
  font-size: clamp(1.8rem, 4.2vw, 2.9rem);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}

.hall-lead {
  max-width: 62ch;
  margin: 12px 0 0;
  color: #e3cda6;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
}

.hall-lead strong {
  color: #ffe2a3;
}

.hall-hero.is-center .hall-lead {
  margin-inline: auto;
}

.hall-hero-aside {
  width: min(100%, 360px);
}

.hall-hero.is-center .hall-hero-aside {
  width: min(100%, 520px);
  margin-top: 8px;
}

@media (max-width: 860px) {
  .hall-hero-grid {
    grid-template-columns: 1fr;
  }

  .hall-hero-aside {
    width: 100%;
  }
}

/* seletor de país (Brasil, Portugal, Alemanha, Estados Unidos) sobre a madeira */
.market-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 2px 0 20px;
}

.hall-hero.is-center .market-switch {
  justify-content: center;
}

.market-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  color: #c9ae84;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: rgba(20, 11, 4, 0.45);
  border: 1px solid rgba(255, 214, 140, 0.28);
  border-radius: 999px;
  color: #f1dcb4;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.market-pill .flag {
  flex: none;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.market-pill:hover {
  border-color: #f2c55c;
  background: rgba(20, 11, 4, 0.65);
  color: #fff3dc;
}

/* botão do país atual: abre a grade com todos */
.market-menu {
  position: relative;
}

.market-menu > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.market-menu > summary::-webkit-details-marker {
  display: none;
}

.market-pill.is-current {
  background: linear-gradient(180deg, #f6d27a, #d9a640);
  border-color: #f6d27a;
  color: #2e1a06;
}

.market-pill.is-current .icon {
  margin-left: -2px;
  transition: transform 0.15s;
}

.market-menu[open] > .market-pill .icon {
  transform: rotate(180deg);
}

.market-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  width: min(620px, calc(100vw - 32px));
  padding: 14px;
  background: linear-gradient(180deg, #3a2412, #24160a);
  border: 1px solid rgba(255, 214, 140, 0.35);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  text-align: left;
}

.hall-hero.is-center .market-panel {
  left: 50%;
  transform: translateX(-50%);
}

.market-panel-title {
  margin: 0 4px 10px;
  color: #c9ae84;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 4px;
}

.market-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #f1dcb4;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.market-option .flag {
  flex: none;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.market-option:hover,
.market-option:focus-visible {
  background: rgba(255, 214, 140, 0.12);
  color: #fff3dc;
}

.market-option[aria-current='page'] {
  background: rgba(242, 197, 92, 0.2);
  color: #ffe2a3;
}

@media (max-width: 520px) {
  .market-pill {
    padding: 5px 11px 5px 7px;
    font-size: 0.84rem;
  }

  .market-grid {
    grid-template-columns: 1fr 1fr;
  }

  .market-option {
    padding: 7px 6px;
    font-size: 0.86rem;
  }

  /* no celular a grade ocupa a largura toda, presa à linha do seletor */
  .market-switch {
    position: relative;
  }

  .market-menu {
    position: static;
  }

  .market-panel,
  .hall-hero.is-center .market-panel {
    left: 0;
    right: 0;
    width: auto;
    transform: none;
  }
}

/* busca de jogador sobre a madeira */
.player-search {
  position: relative;
  width: 100%;
}

.player-search .search .icon {
  color: #8a6a44;
}

.player-search .input {
  padding-block: 13px;
  background: var(--paper-light);
  border: 2px solid #b0884a;
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 2px 4px rgba(90, 60, 20, 0.2);
}

.player-search .input::placeholder {
  color: #9a7b52;
}

.player-search .input:focus {
  border-color: #f2c55c;
  box-shadow: 0 0 0 3px rgba(242, 197, 92, 0.35);
}

.player-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 340px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  background: var(--paper-light);
  border: 2px solid var(--frame);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  list-style: none;
  text-align: left;
}

.player-results li {
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--ink-link);
  font-weight: 700;
  cursor: pointer;
}

.player-results li[aria-selected='true'],
.player-results li:hover {
  background: #f0dcaa;
  color: var(--ink-red);
}

.player-results .empty,
.player-results .empty:hover {
  background: none;
  color: var(--ink-soft);
  font-weight: 500;
  cursor: default;
}

/* ------------------------------------------------------------ placas de madeira */
.hall-section {
  padding-top: clamp(28px, 4vw, 44px);
}

.hall-band {
  background:
    radial-gradient(900px 320px at 50% 0%, rgba(242, 190, 54, 0.08), transparent 70%),
    var(--bg-alt);
  border-block: 1px solid var(--border);
}

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

@media (max-width: 900px) {
  .plaque-row {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-inline: auto;
  }
}

.plaque {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 20px;
  text-align: center;
  border-radius: 14px;
  background:
    var(--wood-grain) center / cover no-repeat,
    radial-gradient(ellipse at 50% 30%, rgba(255, 190, 110, 0.14), transparent 65%),
    linear-gradient(180deg, var(--wood-light) 0%, var(--wood) 45%, var(--wood-dark) 100%);
  box-shadow:
    inset 0 0 0 3px var(--metal),
    inset 0 0 0 5px var(--metal-dark),
    inset 0 0 0 6px rgba(0, 0, 0, 0.4),
    inset 0 10px 30px rgba(0, 0, 0, 0.35),
    0 16px 34px rgba(0, 0, 0, 0.5);
}

/* rebites nos cantos */
.plaque::before {
  content: '';
  position: absolute;
  inset: 11px;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, #ece7df 0 2px, #8b847b 3px, #3f3a35 4px, transparent 5px) left top / 10px 10px no-repeat,
    radial-gradient(circle at 50% 50%, #ece7df 0 2px, #8b847b 3px, #3f3a35 4px, transparent 5px) right top / 10px 10px no-repeat,
    radial-gradient(circle at 50% 50%, #ece7df 0 2px, #8b847b 3px, #3f3a35 4px, transparent 5px) left bottom / 10px 10px no-repeat,
    radial-gradient(circle at 50% 50%, #ece7df 0 2px, #8b847b 3px, #3f3a35 4px, transparent 5px) right bottom / 10px 10px no-repeat;
}

.plaque-ribbon {
  position: relative;
  margin: 0 0 18px;
  padding: 7px 28px;
  background: linear-gradient(180deg, #c0302a, #861711);
  color: #fdebc8;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%, 12px 50%);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4));
}

.plaque-medal {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6cf 0%, #edc25c 32%, #b27a1f 70%, #6d4410 100%);
  box-shadow:
    0 0 0 4px #2d1a0a,
    0 0 0 6px #d6a23c,
    0 10px 20px rgba(0, 0, 0, 0.55);
}

.plaque-medal img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.plaque-medal b {
  position: absolute;
  right: -6px;
  bottom: -4px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding-inline: 4px;
  background: linear-gradient(180deg, #c0302a, #861711);
  border: 2px solid #f2c55c;
  border-radius: 50%;
  color: #fff3d6;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
}

/* plaquinha de pergaminho com o nick (como nas capas do blog) */
.nameplate {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 18px 0 0;
  padding: 11px 24px 9px;
  background:
    var(--paper-grain) center / cover no-repeat,
    radial-gradient(ellipse at 50% 35%, #fdf4dc 0%, #f1ddb0 62%, #d9bd86 100%);
  border-radius: 6px;
  box-shadow:
    0 0 0 2px #a8844c,
    0 5px 12px rgba(0, 0, 0, 0.45),
    inset 0 0 14px rgba(120, 80, 30, 0.35);
  outline: 1.5px dashed rgba(110, 72, 34, 0.55);
  outline-offset: -6px;
  color: #4a2a0c;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}

a.nameplate:hover {
  color: var(--ink-red);
}

.plaque-value {
  margin: 16px 0 0;
  color: #ffdf8e;
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.plaque-value small {
  display: block;
  margin-top: 4px;
  color: #e3c89b;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: none;
}

.plaque-meta {
  margin: 8px 0 0;
  color: #e3c89b;
  font-size: 0.9rem;
}

.plaque .world,
.hall-hero .world {
  color: #ffd98a;
}

.plaque-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 9px 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(242, 197, 92, 0.45);
  border-radius: 999px;
  color: #ffdf8e;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.plaque-link:hover {
  color: #fff0c9;
  background: rgba(0, 0, 0, 0.4);
  border-color: #f2c55c;
}

/* placas menores (outros recordes) */
.plaque-compact {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 18px 18px 18px 22px;
  text-align: left;
}

.plaque-compact::before {
  inset: 8px;
}

.plaque-compact .plaque-medal {
  width: 68px;
  height: 68px;
}

.plaque-compact .plaque-medal img {
  width: 44px;
  height: 44px;
}

.plaque-body {
  flex: 1;
  min-width: 0;
}

.plaque-label {
  margin: 0;
  color: #f2c55c;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plaque-compact .nameplate {
  margin-top: 8px;
  padding: 7px 14px 6px;
  font-size: 1.12rem;
  outline-offset: -4px;
}

.plaque-compact .plaque-value {
  margin-top: 8px;
  font-size: 1.1rem;
}

.plaque-compact .plaque-value small {
  display: inline;
  margin: 0 0 0 4px;
  font-size: 0.7rem;
}

.plaque-compact .plaque-meta {
  margin-top: 2px;
  font-size: 0.82rem;
}

.plaque-more {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid rgba(242, 197, 92, 0.5);
  border-radius: 50%;
  color: #ffdf8e;
  background: rgba(0, 0, 0, 0.25);
}

.plaque-more:hover {
  color: #fff0c9;
  border-color: #f2c55c;
}

.hall-title {
  margin: 0 0 20px;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
}

.hall-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 14px;
  margin-top: 26px;
}

.hall-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}

.hall-link > .icon:first-child {
  color: var(--gold);
}

.hall-link span {
  flex: 1;
}

.hall-link strong {
  display: block;
}

.hall-link small {
  color: var(--text-mute);
}

.hall-link:hover {
  color: var(--text);
  border-color: var(--gold-deep);
}

.hall-note {
  margin: 16px 2px 0;
  color: var(--text-mute);
  font-size: 0.86rem;
}

/* ------------------------------------------------------------ abas das categorias */
.cat-tabs {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-tabs::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 9px 14px 8px;
  background: linear-gradient(180deg, #cfae70, #b08a4c);
  border: 2px solid var(--frame);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: #3b2408;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  transform: translateY(2px);
}

.cat-tab img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.cat-tab .icon {
  color: #5b3a12;
}

.cat-tab:hover {
  color: var(--ink-red);
  background: linear-gradient(180deg, #dcbd83, #bf9a58);
}

.cat-tab[aria-current='page'] {
  position: relative;
  z-index: 1;
  background: var(--paper);
  color: var(--ink-red);
}

/* ------------------------------------------------------------ pergaminho */
.parchment {
  position: relative;
  padding: clamp(14px, 2.4vw, 24px);
  background:
    var(--paper-grain) center / cover no-repeat,
    var(--paper-stains) center / cover no-repeat,
    radial-gradient(ellipse at 50% 0%, #fbf1d6, #f1dfb2 60%, #e6ce98 100%);
  color: var(--ink);
  border: 2px solid var(--frame);
  border-radius: 4px 10px 10px 10px;
  box-shadow:
    0 0 0 4px #c1a264,
    0 0 0 6px #4e3208,
    0 20px 44px rgba(0, 0, 0, 0.55);
}

.parchment .muted {
  color: #8a6d45;
}

.parchment a {
  color: var(--ink-link);
}

.parchment.is-loading .tw-table-wrap,
.parchment.is-loading .podium {
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

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

.tw-seg {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  background: #e2cb96;
  border: 2px solid #9c7a3e;
  border-radius: 8px;
}

.tw-seg button {
  padding: 8px 14px;
  background: none;
  border: 0;
  border-radius: 5px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
}

.tw-seg button:hover {
  color: var(--ink);
  background: rgba(255, 245, 218, 0.6);
}

.tw-seg button[aria-selected='true'] {
  background: linear-gradient(180deg, #8a5a18, #6a430e);
  color: #fff3d6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.tw-field {
  display: block;
  position: relative;
}

.tw-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--paper-light);
  border: 2px solid #b08a4a;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 2px 3px rgba(90, 60, 20, 0.15);
}

.tw-input:focus {
  outline: none;
  border-color: var(--frame);
  box-shadow: 0 0 0 3px rgba(125, 81, 15, 0.25);
}

.tw-input::placeholder {
  color: #9a7b52;
  font-weight: 500;
}

select.tw-input {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237d510f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.tw-search {
  flex: 1;
  min-width: 220px;
}

.tw-search .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9a7b52;
  pointer-events: none;
}

.tw-search .tw-input {
  padding-left: 38px;
}

.tw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #f3dfae, #d9bb7c);
  border: 2px solid #9c7a3e;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.tw-btn:hover:not(:disabled) {
  border-color: var(--frame);
  color: var(--ink-red);
}

.tw-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.tw-btn.is-done {
  background: linear-gradient(180deg, #cfe9b8, #9fcf7d);
  border-color: #4f7a2c;
  color: #1f3a0c;
}

/* ------------------------------------------------------------ pódio */
.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 16px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.podium-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 18px 14px 16px;
  text-align: center;
  border-radius: 12px;
  background:
    var(--wood-grain) center / cover no-repeat,
    linear-gradient(180deg, var(--wood-light), var(--wood) 50%, var(--wood-dark));
  box-shadow:
    inset 0 0 0 2px var(--metal),
    inset 0 0 0 4px var(--metal-dark),
    0 8px 18px rgba(80, 50, 15, 0.45);
}

.podium-1 {
  order: 2;
  padding-top: 26px;
  padding-bottom: 22px;
}

.podium-2 {
  order: 1;
}

.podium-3 {
  order: 3;
}

.podium-medal {
  position: relative;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  box-shadow:
    0 0 0 3px #2d1a0a,
    0 0 0 5px var(--ring),
    0 6px 14px rgba(0, 0, 0, 0.5);
  background: var(--disc);
}

.podium-1 .podium-medal {
  width: 84px;
  height: 84px;
}

.podium-medal img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.podium-medal b {
  position: absolute;
  right: -6px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--disc);
  border: 2px solid #2d1a0a;
  border-radius: 50%;
  color: #2d1a0a;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
}

.podium-1 {
  --ring: #d6a23c;
  --disc: radial-gradient(circle at 35% 30%, #fff6cf, #edc25c 35%, #a8741d 75%);
}

.podium-2 {
  --ring: #c9ced4;
  --disc: radial-gradient(circle at 35% 30%, #ffffff, #d5dbe1 38%, #8d969f 80%);
}

.podium-3 {
  --ring: #d08a4e;
  --disc: radial-gradient(circle at 35% 30%, #ffe0c2, #d6935a 38%, #8e5227 80%);
}

.podium-item .nameplate {
  margin-top: 14px;
  padding: 8px 16px 7px;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  outline-offset: -5px;
}

.podium-1 .nameplate {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.podium-value {
  margin-top: 12px;
  color: #ffdf8e;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.podium-value small {
  display: block;
  margin-top: 2px;
  color: #e3c89b;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: none;
}

.podium-value small.inline {
  display: inline;
  letter-spacing: 0.02em;
}

.podium-sub {
  margin-top: 6px;
  color: #e3c89b;
  font-size: 0.84rem;
}

.parchment .podium .world {
  color: #ffd98a;
}

@media (max-width: 720px) {
  .podium {
    grid-template-columns: 1fr;
  }

  .podium-1,
  .podium-2,
  .podium-3 {
    order: 0;
  }

  .podium-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: 'medal name' 'medal value' 'medal sub';
    align-items: center;
    gap: 0 14px;
    padding: 12px 14px;
    text-align: left;
  }

  .podium-1 {
    padding-block: 14px;
  }

  .podium-medal,
  .podium-1 .podium-medal {
    grid-area: medal;
    width: 58px;
    height: 58px;
  }

  .podium-medal img {
    width: 38px;
    height: 38px;
  }

  .podium-item .nameplate {
    grid-area: name;
    justify-self: start;
    margin: 0;
  }

  .podium-value {
    grid-area: value;
    margin-top: 8px;
    font-size: 1.05rem;
  }

  .podium-value small {
    display: inline;
    margin-left: 4px;
  }

  .podium-sub {
    grid-area: sub;
    margin-top: 2px;
  }
}

/* ------------------------------------------------------------ tabela no estilo do jogo */
.tw-table-wrap {
  overflow-x: auto;
  border: 2px solid var(--frame);
  border-radius: 6px;
  background: var(--paper-light);
}

.tw-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.95rem;
}

.tw-table th,
.tw-table td {
  padding: 9px 12px;
  text-align: left;
  white-space: nowrap;
}

.tw-table thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #cdb074, var(--paper-head));
  border-bottom: 2px solid var(--frame);
  color: #2b1a05;
  font-size: 0.82rem;
  font-weight: 800;
}

.tw-table tbody tr:nth-child(odd) {
  background: var(--paper-light);
}

.tw-table tbody tr:nth-child(even) {
  background: var(--paper-row);
}

.tw-table tbody td {
  border-bottom: 1px solid var(--paper-line);
}

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

.tw-table tbody tr:hover {
  background: #fbe3a8;
}

.tw-table .r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tw-table .c {
  text-align: center;
}

.tw-table .rank {
  width: 1%;
  text-align: center;
}

.tw-table .pos {
  color: var(--ink-soft);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.medal {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #2d1a0a;
  color: #2d1a0a;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 2px 3px rgba(60, 35, 5, 0.35);
}

.medal-1 {
  background: radial-gradient(circle at 35% 30%, #fff6cf, #edc25c 40%, #a8741d 85%);
}

.medal-2 {
  background: radial-gradient(circle at 35% 30%, #ffffff, #d5dbe1 42%, #8d969f 88%);
}

.medal-3 {
  background: radial-gradient(circle at 35% 30%, #ffe0c2, #d6935a 42%, #8e5227 88%);
}

.tw-table .who {
  font-weight: 700;
}

.tw-table .player {
  color: var(--ink-link);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
}

.tw-table .player:hover {
  color: var(--ink-red);
  text-decoration: underline;
}

.tw-table .world {
  color: var(--ink-red);
  font-weight: 700;
  text-decoration: none;
}

.tw-table .world:hover {
  text-decoration: underline;
}

.tw-table .value {
  font-weight: 800;
}

.tw-table .tribe,
.tw-table .tribe-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tw-table .tribe-name {
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
  color: var(--ink);
  font-weight: 800;
}

.tw-table .worlds-cell {
  white-space: normal;
  min-width: 180px;
}

.count-gold,
.count-silver,
.count-bronze {
  font-weight: 800;
}

.count-gold {
  color: #9a6a0c;
}

.count-silver {
  color: #5d6670;
}

.count-bronze {
  color: #8e5227;
}

.fixed-note {
  color: var(--ink-red);
  text-decoration: none;
  cursor: help;
}

.rank-empty td {
  padding: 36px 16px;
  text-align: center;
  color: var(--ink-soft);
  white-space: normal;
}

/* segunda linha sob o nick (mundo e tribo): só aparece no celular */
.row-sub {
  display: none;
}

@media (max-width: 900px) {
  .hide-md {
    display: none;
  }
}

@media (max-width: 620px) {
  .hide-sm {
    display: none;
  }

  .tw-table {
    table-layout: fixed;
    font-size: 0.9rem;
  }

  .tw-table th,
  .tw-table td {
    padding: 9px 8px;
  }

  .tw-table thead th {
    font-size: 0.72rem;
  }

  /* larguras fixas para o valor nunca ficar escondido atrás da rolagem */
  .tw-table th.rank {
    width: 54px;
  }

  .tw-table .col-value {
    width: 122px;
  }

  .tw-table .col-count {
    width: 62px;
  }

  .tw-table .col-medal {
    width: 58px;
  }

  .tw-table .who {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tw-table .who .player,
  .tw-table .who .tribe-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .row-sub {
    display: block;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
    text-overflow: ellipsis;
  }

  .medal {
    width: 26px;
    height: 26px;
  }
}

/* ------------------------------------------------------------ páginas */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.pager-count {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.pager-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pager-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-inline: 4px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
}

.pager-jump .tw-input {
  width: 72px;
  padding: 6px 8px;
  text-align: center;
}

@media (max-width: 560px) {
  .pager {
    justify-content: center;
  }

  .pager-count {
    width: 100%;
    text-align: center;
  }
}

/* ------------------------------------------------------------ perguntas no Hall */
.hall-faq details {
  background: var(--surface);
}

/* ------------------------------------------------------------ perfil do jogador */
.player-dialog {
  width: min(100vw - 24px, 1120px);
  max-width: none;
  max-height: min(100vh - 24px, 880px);
  padding: 0;
  background:
    var(--paper-grain) center / cover no-repeat,
    var(--paper-stains) center / cover no-repeat,
    radial-gradient(ellipse at 50% 0%, #fbf1d6, #f1dfb2 60%, #e6ce98 100%);
  border: 3px solid var(--frame);
  color: var(--ink);
}

.player-dialog[open] {
  display: flex;
  flex-direction: column;
}

.profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 22px;
  background:
    var(--wood-grain) center / cover no-repeat,
    linear-gradient(180deg, var(--wood-light), var(--wood-dark));
  border-bottom: 3px solid #2d1a0a;
}

.profile-id {
  min-width: 0;
}

.profile-head .hall-eyebrow {
  margin-bottom: 6px;
  font-size: 0.72rem;
}

.profile-head .nameplate {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.profile-sub {
  margin: 12px 0 0;
  color: #e3c89b;
  font-size: 0.92rem;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.player-dialog .dialog-close {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(242, 197, 92, 0.5);
  color: #ffdf8e;
}

.profile-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.profile-stats .stat {
  padding: 12px 14px;
  background: rgba(255, 248, 228, 0.75);
  border: 2px solid #c9a86a;
  border-radius: 8px;
}

.profile-stats dt {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-stats dd {
  margin: 3px 0 4px;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stat-line {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.35;
}

.stat-line b {
  color: var(--ink-red);
}

.profile-feats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.feat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: rgba(255, 248, 228, 0.75);
  border: 1px solid #c9a86a;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.feat .medal {
  width: 24px;
  height: 24px;
  font-size: 0.72rem;
}

.profile-table {
  font-size: 0.88rem;
}

.profile-table th,
.profile-table td {
  padding: 9px 10px;
}

.pos-note {
  margin-left: 6px;
  color: #8a6d45;
  font-size: 0.76rem;
  font-weight: 700;
}

.pos-note.top {
  color: var(--ink-red);
}

.profile-note {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.profile-loading,
.profile-error {
  padding: 40px 24px;
  text-align: center;
  color: var(--ink-soft);
}

@media (max-width: 620px) {
  /* no celular o nick ganha a largura toda, abaixo da linha com os botões */
  .profile-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    padding: 16px;
  }

  .profile-id {
    display: contents;
  }

  .profile-head .hall-eyebrow {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }

  .profile-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .profile-head .nameplate {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    margin-top: 14px;
  }

  .profile-sub {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .profile-body {
    padding: 16px;
  }

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

  .profile-stats .stat {
    padding: 10px 11px;
  }

  .profile-stats dd {
    font-size: 0.98rem;
  }
}

/* ------------------------------------------------------------ mundos */
.world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 14px;
}

.world-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.world-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.world-card .world-name {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
}

.world-card .world-period {
  color: var(--text-mute);
  font-size: 0.8rem;
  text-align: right;
}

.world-facts {
  display: grid;
  gap: 5px;
  margin: 0;
  font-size: 0.9rem;
}

.world-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.world-facts dt {
  flex: none;
  color: var(--text-mute);
}

.world-facts dd {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(76, 195, 138, 0.18);
}

.world-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.world-filter .search {
  width: min(100%, 340px);
}

/* página de um mundo */
.world-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.world-summary > div {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.world-summary dt {
  color: var(--text-mute);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.world-summary dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
}

.world-summary dd small {
  display: block;
  color: var(--text-mute);
  font-size: 0.8rem;
  font-weight: 500;
}

.world-summary .player {
  color: var(--text);
  text-decoration: none;
}

.world-summary .player:hover {
  color: var(--gold);
}

.world-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 22px;
}

.world-table-card {
  padding: 14px;
}

.world-table-card > header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.world-table-card > header img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.world-table-card > header .icon {
  color: var(--frame);
}

.world-table-card > header h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
}

.world-table-card .tw-table {
  table-layout: fixed;
  font-size: 0.9rem;
}

.world-table-card .tw-table td {
  padding: 7px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.world-table-card .tw-table .rank {
  width: 50px;
  padding-right: 4px;
  text-overflow: clip;
}

.world-table-card .tw-table .tribe {
  width: 84px;
  max-width: none;
}

.world-table-card .tw-table .value {
  width: 126px;
}

.world-table-card .tw-table .members {
  width: 118px;
}

.world-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.world-note {
  margin-top: 24px;
}

/* botões sobre a faixa de madeira */
.hall-hero .actions {
  margin-top: 22px;
}

.hall-hero .btn-ghost {
  border-color: rgba(242, 197, 92, 0.5);
  color: #fbecd0;
  background: rgba(0, 0, 0, 0.2);
}

.hall-hero .btn-ghost:hover {
  color: #fff3d6;
  background: rgba(0, 0, 0, 0.35);
}

.profile-id .hall-eyebrow {
  display: flex;
}

/* barra de filtros no celular: uma coisa por linha, abas do mesmo tamanho */
@media (max-width: 620px) {
  .rank-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tw-seg {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
  }

  .tw-seg button {
    padding: 9px 6px;
  }

  .tw-search {
    min-width: 0;
  }

  .plaque {
    padding: 20px 16px 16px;
  }

  .plaque-medal {
    width: 84px;
    height: 84px;
  }

  .plaque-medal img {
    width: 54px;
    height: 54px;
  }

  .plaque-ribbon {
    padding-inline: 22px;
    font-size: 0.72rem;
  }
}

/* ------------------------------------------------------------ resumo do jogador */
.profile-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.style-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff7df, #f2e0b2);
  border: 2px solid #9c7a3e;
  border-radius: 8px;
}

.style-card img {
  width: 48px;
  height: 48px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(60, 35, 5, 0.35));
}

.style-body {
  flex: 1;
  min-width: 0;
}

.summary-label {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.style-name {
  margin: 2px 0 4px;
  color: var(--ink-red);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.15;
}

.style-def .style-name {
  color: #284f78;
}

.style-sup .style-name {
  color: #3f6a22;
}

.style-mix .style-name,
.style-none .style-name {
  color: var(--ink);
}

.style-bar {
  display: flex;
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  background: #e2cb96;
  border: 1px solid #9c7a3e;
  border-radius: 999px;
}

.style-bar span {
  display: block;
  height: 100%;
}

.seg-a,
.dot-a {
  background: #b3261e;
}

.seg-d,
.dot-d {
  background: #2f5f8a;
}

.seg-s,
.dot-s {
  background: #4f7a2c;
}

.seg-m,
.dot-m {
  background: #b8862b;
}

.style-od {
  margin-top: 6px;
}

.style-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
}

.summary-item {
  min-width: 0;
  padding: 12px 14px;
  background: rgba(255, 248, 228, 0.75);
  border: 2px solid #c9a86a;
  border-radius: 8px;
}

.summary-value {
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.summary-tribe {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

  .style-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .profile-summary {
    grid-template-columns: 1fr 1fr;
  }

  .summary-item:last-child {
    grid-column: 1 / -1;
  }
}

/* selo de fonte dos dados nos mundos */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(242, 197, 92, 0.45);
  color: #ffdf8e;
  font-size: 0.75rem;
  font-weight: 700;
}

.world-card .source-badge {
  align-self: flex-start;
  margin-top: auto;
  background: var(--surface-3);
  border-color: var(--border-strong);
  color: var(--text-dim);
}

.hall-lead .source-badge {
  display: flex;
  width: fit-content;
  margin: 12px 0 0;
}

/* grupos da lista de mundos (normais e casuais) */
.world-group + .world-group {
  margin-top: 34px;
}

.world-group-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}

.world-group-title span {
  color: var(--text-mute);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
}

.world-group-lead {
  max-width: 70ch;
  margin: -6px 0 16px;
  font-size: 0.92rem;
}

.world-sources {
  max-width: 90ch;
  margin-top: 30px;
  font-size: 0.86rem;
  line-height: 1.6;
}

/* ------------------------------------------------------------ tribos */
/* sigla clicável: abre o perfil da tribo */
a.tribe,
a.tribe-name {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

a.tribe:hover,
a.tribe-name:hover {
  color: var(--ink-red);
  text-decoration: underline;
}

.tw-table a.tribe {
  color: var(--ink);
}

.tw-table a.tribe-name {
  color: var(--ink);
  font-weight: 800;
}

.parchment .podium a.tribe,
.plaque a.tribe {
  color: #f3dfb4;
}

.parchment .podium a.tribe:hover,
.plaque a.tribe:hover {
  color: #fff3d6;
}

.world-summary a.tribe {
  color: var(--text);
}

.world-summary a.tribe:hover {
  color: var(--gold);
}

/* coroa da tribo campeã */
.crown {
  display: inline-flex;
  vertical-align: -2px;
  margin-left: 4px;
  color: #c08a1c;
  filter: drop-shadow(0 1px 0 rgba(60, 35, 5, 0.35));
}

.mw .crown,
.feat .crown,
.summary-titles .crown {
  margin: 0 3px 0 0;
}

/* mundo com medalha ou título: "(2) BR96" */
.mw {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 12px 2px 0;
  white-space: nowrap;
}

.mw .medal {
  width: 20px;
  height: 20px;
  border-width: 1.5px;
  font-size: 0.66rem;
  box-shadow: none;
}

.mw-more {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.medal-worlds {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.medal-worlds .mw {
  margin: 2px 6px;
}

.medal-worlds .mw-more {
  color: #e3c89b;
}

.feat-title {
  border-color: #c08a1c;
  background: linear-gradient(180deg, #fff3c9, #f3dc9c);
  padding-left: 10px;
}

.feat-title a.tribe {
  color: var(--ink-red);
}

/* sugestões da busca: nota à direita (títulos ou mundos) */
.player-results li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.player-results li small {
  flex: none;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

/* voltar para o perfil anterior (jogador -> tribo -> jogador) */
.profile-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin: 0 0 8px -4px;
  padding: 3px 8px 3px 4px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(242, 197, 92, 0.35);
  border-radius: 999px;
  color: #f3dfb4;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.profile-back span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-back:hover {
  color: #fff3d6;
  border-color: rgba(242, 197, 92, 0.7);
}

/* card de títulos no perfil da tribo */
.title-card .title-medal {
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 3px solid #5a3a0e;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6cf, #edc25c 40%, #a8741d 85%);
  box-shadow: 0 3px 6px rgba(60, 35, 5, 0.35);
  color: #3b2408;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
}

.title-card.is-empty .title-medal {
  background: radial-gradient(circle at 35% 30%, #fffaf0, #e6dccb 45%, #b9ab92 90%);
  color: #7a6a4f;
}

.title-card .style-name {
  color: #7a4b05;
}

.title-card.is-empty .style-name {
  color: var(--ink);
}

.title-worlds {
  display: flex;
  flex-wrap: wrap;
  margin: 6px 0 0;
}

.player-dialog .title-worlds .world,
.player-dialog .feat .world {
  color: var(--ink-red);
  font-weight: 800;
  text-decoration: none;
}

.player-dialog .title-worlds .world:hover {
  text-decoration: underline;
}

.title-worlds .mw {
  margin: 2px 10px 2px 0;
}

.summary-titles {
  display: flex;
  align-items: center;
}

/* seções do perfil da tribo */
.tribe-section {
  margin-top: 22px;
}

.tribe-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.tribe-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}

.tribe-more {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.tribe-more:empty {
  display: none;
}

.tribe-players-table .worlds-cell {
  min-width: 220px;
}

.profile-table tr.is-won td {
  background: rgba(237, 194, 92, 0.18);
}

/* ranking de títulos */
.titles-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.titles-panel.is-loading .tw-table-wrap {
  opacity: 0.55;
}

@media (max-width: 620px) {
  .profile-back {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: start;
  }

  .profile-head .hall-eyebrow,
  .profile-actions {
    grid-row: 2;
  }

  .profile-head .nameplate {
    grid-row: 3;
  }

  .profile-sub {
    grid-row: 4;
  }

  .title-card .title-medal {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
  }

  .titles-bar .tw-field {
    width: 100%;
  }
}

/* ranking da tribo em um mundo (perfil da tribo) */
.tribe-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tribe-controls .tw-input {
  min-width: 0;
  max-width: 100%;
}

.tribe-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.tribe-world-line {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.92rem;
}

.tribe-world-line .crown {
  margin: 0 2px 0 0;
}

.player-dialog .tribe-world-line .world {
  color: var(--ink-red);
  font-weight: 800;
  text-decoration: none;
}

/* tabela larga: no celular rola para o lado em vez de espremer as colunas */
.tw-table.tribe-members-table {
  table-layout: auto;
  min-width: 720px;
  font-size: 0.86rem;
}

.tribe-members-table td,
.tribe-members-table th {
  padding: 8px 9px;
  white-space: nowrap;
}

/* # e nick ficam parados quando a tabela rola para o lado (celular) */
.tribe-members-table th:nth-child(-n + 2),
.tribe-members-table td:nth-child(-n + 2) {
  position: sticky;
  z-index: 1;
}

.tribe-members-table td:nth-child(-n + 2) {
  background: inherit;
}

.tribe-members-table th:nth-child(1),
.tribe-members-table td:nth-child(1) {
  left: 0;
  width: 44px;
  min-width: 44px;
}

.tribe-members-table th:nth-child(2),
.tribe-members-table td:nth-child(2) {
  left: 44px;
  box-shadow: 1px 0 0 var(--paper-line);
}

.tribe-members-table thead th:nth-child(-n + 2) {
  z-index: 3;
}

.tribe-members-table .is-sorted {
  background: rgba(237, 194, 92, 0.22);
}

.th-sort {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.th-sort:hover {
  text-decoration: underline;
}

/* "Membros" no Mundo a mundo: abre o ranking da tribo naquele mundo */
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink-red);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

@media (max-width: 620px) {
  .tribe-controls,
  .tribe-controls .tw-field,
  .tribe-controls .tw-input {
    width: 100%;
  }
}

/* classificação completa na página do mundo */
.world-full-lead {
  max-width: 80ch;
  margin: -4px 0 16px;
  font-size: 0.92rem;
}

.tw-table.world-full-table {
  min-width: 840px;
}

.world-full-table .tribe {
  max-width: 140px;
}
