.clans { --c-line: rgba(252, 211, 18, 0.14); }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; margin: 6px 0 22px; padding-bottom: 14px;
  background: var(--divider) center bottom / auto var(--divider-h, 22px) repeat-x; }
.podium[hidden] { display: none; }
.pod { --lift: 0px; position: relative; display: grid; justify-items: center; gap: 4px; min-width: 0; padding: 30px 12px 14px; text-align: center; text-decoration: none; color: var(--text);
  background: radial-gradient(ellipse at 50% 0%, rgba(252, 211, 18, 0.16), transparent 62%), linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.32));
  border: 6px solid transparent; border-image: url("/assets/w3/human-tooltip-border.png") 14 / 6px stretch;
  transform: translateY(var(--lift)); transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.2s ease; }
.pod--1 { order: 2; padding-top: 40px; padding-bottom: 22px; background: radial-gradient(ellipse at 50% 0%, rgba(252, 211, 18, 0.32), transparent 66%), linear-gradient(180deg, rgba(20, 14, 0, 0.75), rgba(0, 0, 0, 0.35)); }
.pod--2 { order: 1; }
.pod--3 { order: 3; }
.pod:hover, .pod:focus-visible { --lift: -4px; filter: brightness(1.12); }
.pod::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 236, 160, 0.14), transparent 70%); transition: opacity 0.3s ease; }
.pod:hover::after { opacity: 1; }
.pod__place { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font: 400 1.15rem/1 var(--font); color: #2c1c08; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  background: radial-gradient(circle at 35% 30%, #fff6c2, #fcd312 45%, #9a6a00 100%); box-shadow: 0 0 0 2px #000, 0 0 0 3px #6b4a00, 0 4px 10px rgba(0, 0, 0, 0.7); }
.pod--1 .pod__place { width: 42px; height: 42px; top: -18px; font-size: 1.4rem; box-shadow: 0 0 0 2px #000, 0 0 0 3px #6b4a00, 0 0 18px rgba(252, 211, 18, 0.7), 0 4px 10px rgba(0, 0, 0, 0.7); }
.pod--2 .pod__place { background: radial-gradient(circle at 35% 30%, #ffffff, #c9d2dc 45%, #59626d 100%); }
.pod--3 .pod__place { background: radial-gradient(circle at 35% 30%, #ffe0bf, #d58b4c 45%, #5a2e0e 100%); }
.pod__emblem img { width: 64px; height: 64px; }
.pod--1 .pod__emblem img { width: 80px; height: 80px; }
.pod--1 .pod__emblem { box-shadow: 0 0 22px rgba(252, 211, 18, 0.35), 0 8px 18px rgba(0, 0, 0, 0.65); }
.pod__ribbon { display: grid; place-items: center; min-width: 7.5em; height: 34px; margin-top: 6px; padding: 0 22px 1px 14px; line-height: 1; box-sizing: border-box;
  background: url("/assets/w3/scorescreen-goldbannerborder.png") center / 100% 100% no-repeat; }
.pod__ribbon .ctag { font-size: 1rem; }
.pod__name { max-width: 100%; color: var(--white); font: 400 1.05rem/1.2 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod__rating { margin-top: 2px; color: var(--gold); font: 400 1.9rem/1 var(--font); font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(252, 211, 18, 0.35), 0 2px 2px #000; }
.pod--1 .pod__rating { font-size: 2.3rem; }
.pod__label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.pod__foot { color: var(--muted); font-size: 0.82rem; }

.clans__table .c-name { width: auto; }
.clans__table .c-place--top { color: var(--gold); }
.clans__table tbody tr:nth-child(-n+3) .c-place { color: var(--muted); }
.clans__table tbody tr:nth-child(-n+3) .c-place--top { color: var(--gold); }
.clans__table td.c-pts { font: 400 1.1rem/1 var(--font); color: var(--gold); }
.clans__table .c-rated, .clans__table .c-members { color: var(--muted); }
.clans__table .c-wars { white-space: nowrap; }
.clan-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cname { min-width: 0; color: var(--white); text-decoration: none; overflow-wrap: anywhere; }
.cname:hover, .cname:focus-visible { color: var(--gold); }
.cname:hover .ctag { color: var(--white); }

.crest { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 6px 0 18px; background: var(--divider) center bottom / auto var(--divider-h, 22px) repeat-x; }
.crest--empty .crest__emblem, .crest--empty .crest__tag:empty { display: none; }
.crest__emblem { position: relative; flex: none; }
.crest__emblem::before { content: ""; position: absolute; inset: -26px; z-index: -1; pointer-events: none; background: radial-gradient(circle, rgba(252, 211, 18, 0.28), transparent 65%); animation: crest-glow 4.5s ease-in-out infinite; }
.emblem--crest { border-width: 16px; border-image-width: 16px; }
.emblem--crest img { width: 96px; height: 96px; }
.crest__who { flex: 1 1 280px; min-width: 0; }
.crest__tag { margin: 0; }
.ctag--big { font-size: 1.5rem; letter-spacing: 0.08em; text-shadow: 0 0 10px rgba(252, 211, 18, 0.45), 0 2px 2px #000; }
.crest__name { margin: 2px 0 0; overflow-wrap: anywhere; }
.crest__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 8px 0 0; color: var(--muted); }
.crest__meta:empty { display: none; }
.crest__chief { display: inline-flex; align-items: center; gap: 7px; }
.crest__chief-label { color: var(--muted); }
.crest__place { display: grid; justify-items: center; flex: none; min-width: 96px; padding: 10px 14px 8px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.25));
  border: 6px solid transparent; border-image: url("/assets/w3/human-tooltip-border.png") 14 / 6px stretch; }
.crest__place[hidden] { display: none; }
.crest__place-n { color: var(--white); font: 400 2.4rem/1 var(--font); font-variant-numeric: tabular-nums; }
.crest__place-n::before { content: "#"; color: var(--muted); font-size: 0.55em; vertical-align: 0.5em; margin-right: 2px; }
.crest__place[data-top] .crest__place-n { color: var(--gold); text-shadow: 0 0 14px rgba(252, 211, 18, 0.55), 0 2px 2px #000; }
.crest__place-label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.figure__value.gold { color: var(--gold); text-shadow: 0 0 10px rgba(252, 211, 18, 0.35); }
@keyframes crest-glow { 50% { opacity: 0.45; transform: scale(0.94); } }
@media (prefers-reduced-motion: reduce) { .crest__emblem::before { animation: none; } }

.roster { overflow-x: auto; }
.roster__table .c-name { width: auto; }
.roster__table tbody tr.roster__group { cursor: default; }
.roster__table tbody tr.roster__group:hover { background: none; }
.roster__table .roster__group th { padding: 14px 6px 6px; text-align: left; border-bottom: 1px solid rgba(252, 211, 18, 0.3); }
.roster__table tbody tr.roster__group:first-child th { padding-top: 8px; }
.roster__rank { display: inline-flex; align-items: center; gap: 10px; color: var(--gold); font: 400 1.05rem/1 var(--font); }
.roster__rank .emblem--rank { width: 30px; height: 30px; }
.roster__count { min-width: 1.6em; padding: 2px 6px; color: var(--muted); font-size: 0.82rem; text-align: center; background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 0 0 1px rgba(252, 211, 18, 0.2); }
.roster__who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.roster__row--chieftain .plink { color: var(--gold); }
.roster__row--peon .plink { color: #cfcabd; }
.roster__table .c-joined { color: var(--muted); white-space: nowrap; }

.wars__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.war { position: relative; display: grid; gap: 10px; padding: 12px 14px; background: rgba(0, 0, 0, 0.36); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.war::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--muted); opacity: 0.6; }
.war--running::before { background: #ff6b5b; opacity: 1; }
.war--pending::before { background: #8fd0ff; opacity: 1; }
.war--won::before { background: #3fe05a; opacity: 1; }
.war--lost::before { background: #ff5a4a; opacity: 1; }
.war--declined, .war--cancelled, .war--expired { opacity: 0.78; }
.war__top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.war__side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.war__side--b { flex-direction: row-reverse; text-align: right; }
.war__side--ours .cname__text { color: var(--white); }
.war__side--won .war__emblem { box-shadow: 0 0 0 1px #000, 0 0 12px rgba(252, 211, 18, 0.55); }
.war__name { font-size: 1.02rem; }
.war__mid { display: grid; justify-items: center; gap: 4px; }
.war__score { display: inline-flex; align-items: baseline; gap: 6px; color: var(--white); font: 400 1.9rem/1 var(--font); font-variant-numeric: tabular-nums; text-shadow: 0 2px 2px #000; }
.war__score b { font-weight: 400; }
.war__score i { font-style: normal; color: var(--muted); }
.war__score--none { opacity: 0.35; }
.war__verdict { font-size: 0.85rem; }
.tbadge--w-pending { color: #8fd0ff; }
.tbadge--w-running { color: #ff6b5b; }
.tbadge--w-running::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; animation: tpulse 1.4s ease-in-out infinite; }
.tbadge--w-finished { color: var(--gold); }
.tbadge--w-declined, .tbadge--w-cancelled { color: #ff5a4a; }
.tbadge--w-expired { color: var(--muted); }
.war__rosters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.war__roster { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 0.9rem; }
.war__roster--b { justify-content: flex-end; text-align: right; }
.war__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--muted); font-size: 0.85rem; }
.war__fmt { color: var(--gold); }
.war__map { overflow-wrap: anywhere; }
.war__tour { margin-left: auto; }

.cgame { grid-template-columns: 48px minmax(0, 1fr) auto; }
.cgame__side { display: grid; justify-items: end; gap: 2px; }
.cgame__after { color: var(--muted); font-size: 0.82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cgame__left { border-color: rgba(255, 90, 74, 0.6); color: #ff5a4a; }

@media (max-width: 860px) {
  .cgame { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: none; }
  .cgame > .icon, .cgame .match__main, .cgame .cgame__side { grid-area: auto; }
}
@media (max-width: 640px) {
  .podium { gap: 8px; }
  .pod { padding: 24px 4px 10px; }
  .pod--1 { padding-top: 30px; }
  .pod__emblem { border-width: 8px; border-image-width: 8px; }
  .pod__emblem img, .pod--1 .pod__emblem img { width: 44px; height: 44px; }
  .pod--1 .pod__emblem img { width: 52px; height: 52px; }
  .pod__ribbon { min-width: 0; width: 100%; height: 24px; padding: 0 8px; }
  .pod__ribbon .ctag { font-size: 0.85rem; }
  .pod__name { font-size: 0.85rem; }
  .pod__rating, .pod--1 .pod__rating { font-size: 1.4rem; }
  .pod__foot { display: none; }
  .clans__table .c-rated, .clans__table .c-members { display: none; }
  .clan-cell { gap: 8px; }
  .clan-cell .emblem--btn { width: 30px; height: 30px; }
  .crest { gap: 12px 16px; }
  .emblem--crest { border-width: 12px; border-image-width: 12px; }
  .emblem--crest img { width: 64px; height: 64px; }
  .crest__place { min-width: 0; padding: 6px 10px 4px; }
  .crest__place-n { font-size: 1.8rem; }
  .roster__table .c-joined { display: none; }
  .war { padding: 10px; }
  .war__top { gap: 8px; }
  .war__side { flex-direction: column; align-items: flex-start; gap: 6px; }
  .war__side--b { flex-direction: column; align-items: flex-end; }
  .war__name { font-size: 0.9rem; }
  .war__score { font-size: 1.5rem; }
  .war__tour { margin-left: 0; flex-basis: 100%; }
}
