/* Layout: "sala de guerra" — estandarte do clã com raios girando, o rio da guerra como herói,
   placares sobre azul-real noturno com elixir flutuando ao fundo. Ouro só onde há conquista.
   Visual único escuro, como o jogo. */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --night: #060b22;
  --deep: #0b1536;
  --plate: #12204e;
  --plate-hi: #1b2d68;
  --rule: #24377a;
  --ink: #f3f5ff;
  --mist: #93a0d4;
  --gold: #ffc93a;
  --gold-hi: #ffe58a;
  --gold-deep: #a86c00;
  --elixir: #d44dff;
  --elixir-hi: #f0a8ff;
  --blue: #3ea6ff;
  --red: #ff5468;
  --green: #3fe08f;
  --water-a: #1446a8;
  --water-b: #0f3584;

  --f-display: 'Lilita One', 'Arial Black', Impact, sans-serif;
  --f-body: 'Nunito', 'Trebuchet MS', system-ui, sans-serif;
  --f-label: 'Barlow Condensed', 'Arial Narrow', sans-serif;

  --gutter: 16px;
  --r: 16px;
  --ease: cubic-bezier(.2, .9, .25, 1.15);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--night);
  color: var(--ink);
  font: 600 15px/1.45 var(--f-body);
  min-height: 100vh;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body::before { /* brilho do céu */
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(700px 380px at 15% -60px, rgba(62, 166, 255, .28), transparent 70%),
    radial-gradient(600px 420px at 100% 10%, rgba(212, 77, 255, .16), transparent 70%),
    radial-gradient(900px 500px at 50% 120%, rgba(255, 201, 58, .08), transparent 70%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 1em; height: 1em; display: inline-block; vertical-align: -.14em; flex: none; }

/* ---------- tipografia ---------- */
h1, h2 { font-family: var(--f-display); font-weight: 400; letter-spacing: .4px; margin: 0; text-wrap: balance; }
.title-game {
  color: var(--ink);
  -webkit-text-stroke: 1.5px #02040f; paint-order: stroke fill;
  text-shadow: 0 3px 0 #02040f, 0 8px 24px rgba(0, 0, 0, .5);
}
.title-gold {
  background: linear-gradient(180deg, #fff6c9 0%, var(--gold-hi) 35%, var(--gold) 60%, #e89a00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 0; filter: drop-shadow(0 3px 0 #2a1900) drop-shadow(0 0 18px rgba(255, 201, 58, .35));
}
h1 { font-size: 30px; line-height: 1.05; }
h2 { font-size: 21px; }
.label { font: 700 12.5px/1 var(--f-label); text-transform: uppercase; letter-spacing: 1.5px; color: var(--mist); }
.num { font-family: var(--f-display); font-weight: 400; font-variant-numeric: tabular-nums; }
.muted { color: var(--mist); }
.small { font-size: 13px; }
.gold { color: var(--gold); }
.win { color: var(--green); }
.loss { color: var(--red); }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- topo ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter);
  background: linear-gradient(180deg, rgba(6, 11, 34, .96), rgba(6, 11, 34, .72));
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(62, 166, 255, .15);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 30px; height: 34px; filter: drop-shadow(0 0 10px rgba(255, 201, 58, .45)); }
.brand span { font: 400 23px/1 var(--f-display); color: var(--gold); -webkit-text-stroke: 1px #2a1900; paint-order: stroke fill; text-shadow: 0 2px 0 #2a1900; }
.livepill {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; border-radius: 999px;
  background: rgba(255, 84, 104, .14); border: 1px solid rgba(255, 84, 104, .45);
  font: 700 13.5px/1 var(--f-label); text-transform: uppercase; letter-spacing: 1.1px; color: #ffd0d6;
}
.livepill i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: ping 1.6s infinite; --pc: 255, 84, 104; }
.livepill.calm { background: rgba(62, 166, 255, .12); border-color: rgba(62, 166, 255, .4); color: #cfe7ff; }
.livepill.calm i { background: var(--blue); --pc: 62, 166, 255; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(var(--pc, 63, 224, 143), .7); } 70%, 100% { box-shadow: 0 0 0 9px rgba(var(--pc, 63, 224, 143), 0); } }

main {
  position: relative; z-index: 1;
  max-width: 720px; margin: 0 auto; padding: 18px var(--gutter) 8px;
  display: flex; flex-direction: column; gap: 28px; overflow-x: clip;
}
main > * { animation: rise .55s var(--ease) both; }
main > *:nth-child(2) { animation-delay: .07s; }
main > *:nth-child(3) { animation-delay: .14s; }
main > *:nth-child(4) { animation-delay: .21s; }
main > *:nth-child(5) { animation-delay: .28s; }
main > *:nth-child(n+6) { animation-delay: .34s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } }
section { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec-head a { font: 700 13px/1 var(--f-label); text-transform: uppercase; letter-spacing: 1px; color: var(--gold); }
.loading { display: grid; place-items: center; padding: 110px 0; }
.loading svg { width: 54px; height: 54px; color: var(--gold); animation: clash 0.7s ease-in-out infinite alternate; filter: drop-shadow(0 0 14px rgba(255, 201, 58, .6)); }
@keyframes clash { from { transform: rotate(-14deg) scale(.92); } to { transform: rotate(14deg) scale(1.08); } }

/* ---------- abas ---------- */
.tabs {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 6;
  max-width: 560px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(23, 38, 92, .92), rgba(10, 18, 48, .94));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(62, 166, 255, .25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.tab-glow {
  position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 4);
  border-radius: 16px; transition: transform .45s var(--ease);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, #eca514);
  box-shadow: 0 3px 0 var(--gold-deep), 0 0 22px rgba(255, 201, 58, .45);
}
.tabs a {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px;
  color: var(--mist); font: 700 12px/1 var(--f-label); text-transform: uppercase; letter-spacing: .9px;
  transition: color .3s;
}
.tabs a svg { width: 23px; height: 23px; transition: transform .4s var(--ease); }
.tabs a.on { color: #2a1900; }
.tabs a.on svg { transform: translateY(-1px) scale(1.12); }

/* ---------- estandarte do clã ---------- */
.banner { position: relative; display: grid; justify-items: center; text-align: center; gap: 6px; padding: 18px 0 4px; isolation: isolate; }
.rays {
  position: absolute; z-index: -1; top: -70px; left: 50%; width: 520px; height: 520px; margin-left: -260px;
  background: repeating-conic-gradient(from 0deg, rgba(255, 201, 58, .16) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 62%); mask: radial-gradient(circle, #000 0 18%, transparent 62%);
  animation: turn 40s linear infinite;
}
@keyframes turn { to { transform: rotate(360deg); } }
.crest { width: 112px; height: 126px; animation: float 4s ease-in-out infinite; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .35)) drop-shadow(0 0 30px rgba(255, 201, 58, .5)); }
@keyframes float { 50% { transform: translateY(-7px) rotate(-1.5deg); } }
.banner h1 { font-size: clamp(40px, 12vw, 58px); line-height: .95; margin-top: 4px; }
.banner .meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chip { font: 700 13px/1 var(--f-label); text-transform: uppercase; letter-spacing: 1.2px; padding: 6px 10px; border-radius: 8px; background: rgba(18, 32, 78, .75); border: 1px solid var(--rule); color: #c6d0f5; }
.big-trophy { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; font: 400 34px/1 var(--f-display); color: var(--gold); text-shadow: 0 3px 0 #2a1900, 0 0 20px rgba(255, 201, 58, .4); }
.big-trophy svg { width: 34px; height: 34px; filter: drop-shadow(0 3px 0 #2a1900); }

/* ---------- painel com borda viva ---------- */
.glow {
  position: relative; border-radius: 20px; isolation: isolate;
  background: linear-gradient(160deg, #19328a, #0c1b4d 70%);
  box-shadow: 0 5px 0 #030717, 0 20px 50px rgba(0, 0, 0, .45);
}
.glow::before {
  content: ''; position: absolute; inset: -1.5px; z-index: -1; border-radius: 21.5px;
  background: conic-gradient(from var(--spin), rgba(62, 166, 255, .25), var(--gold) 12%, rgba(62, 166, 255, .25) 25%, rgba(212, 77, 255, .5) 50%, rgba(62, 166, 255, .25) 75%);
  animation: border-spin 6s linear infinite;
}
.glow::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 20px; background: inherit; }
@keyframes border-spin { to { --spin: 360deg; } }
.glow.violet { background: linear-gradient(160deg, #2c1d68, #141a4a 70%); }

/* ---------- o rio ---------- */
.river { display: block; padding: 16px 14px 14px; }
.river-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.river-top h1 { font-size: 27px; }
.place {
  position: relative; overflow: hidden; flex: none;
  display: grid; place-items: center; min-width: 62px; height: 62px; padding: 0 8px;
  font: 400 32px/1 var(--f-display); color: #2a1900;
  background: radial-gradient(circle at 50% 28%, #fff6c9, var(--gold) 58%, var(--gold-deep));
  border-radius: 18px; box-shadow: 0 4px 0 #5c3a00, 0 0 26px rgba(255, 201, 58, .5);
  animation: pop .7s .25s var(--ease) both;
}
.place small { font-size: 15px; }
.place::after, .btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: skewX(-18deg); animation: shine 4.5s 1s ease-in-out infinite;
}
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 140%; } }
@keyframes pop { from { transform: scale(.3) rotate(-25deg); opacity: 0; } }
.lanes { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.lane { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; }
.lane-name { font-weight: 800; font-size: 13.5px; }
.lane-fame { font: 400 16px/1 var(--f-display); text-align: right; font-variant-numeric: tabular-nums; }
.water {
  grid-column: 1 / -1; position: relative; height: 24px; border-radius: 12px; overflow: visible;
  background: repeating-linear-gradient(115deg, var(--water-a) 0 12px, var(--water-b) 12px 24px);
  background-size: 52px 100%;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .06);
  animation: flow 1.6s linear infinite;
}
@keyframes flow { to { background-position: 52px 0; } }
.water::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 10px; border-radius: 0 12px 12px 0;
  background: repeating-conic-gradient(#fff 0 25%, #10172e 0 50%) 0 0 / 10px 10px; opacity: .9;
}
.wake {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 12px;
  background: linear-gradient(90deg, rgba(62, 166, 255, 0), rgba(120, 200, 255, .55));
  transition: width 1.4s .2s cubic-bezier(.2, .8, .2, 1);
}
.boat-wrap { position: absolute; top: 50%; left: 26px; transition: left 1.4s .2s cubic-bezier(.2, .8, .2, 1); }
.boat { display: block; width: 34px; height: 25px; transform: translate(-85%, -62%); animation: bob 1.8s ease-in-out infinite; }
.lane:nth-child(2) .boat { animation-delay: -.4s; } .lane:nth-child(3) .boat { animation-delay: -.8s; }
.lane:nth-child(4) .boat { animation-delay: -1.2s; } .lane:nth-child(5) .boat { animation-delay: -1.5s; }
@keyframes bob { 50% { transform: translate(-85%, -72%) rotate(-4deg); } }
.lane.me .lane-name, .lane.me .lane-fame { color: var(--gold); }
.lane.me .wake { background: linear-gradient(90deg, rgba(255, 201, 58, 0), rgba(255, 220, 110, .7)); }
.lane.me .boat { filter: drop-shadow(0 0 8px rgba(255, 201, 58, .8)); }
.river-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.river-foot div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.river-foot .num { font-size: 22px; line-height: 1; }
.cta-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 11px 12px; border-radius: 12px; background: rgba(255, 84, 104, .14); border: 1px solid rgba(255, 84, 104, .4); font-weight: 800; }
.cta-line.ok { background: rgba(63, 224, 143, .12); border-color: rgba(63, 224, 143, .4); }
.cta-line svg { transition: transform .3s; }
a:hover .cta-line svg { transform: translateX(4px); }

/* ---------- pódio ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 8px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.pod .nm { font-weight: 900; font-size: 13.5px; max-width: 100%; }
.pod .fm { font: 400 18px/1 var(--f-display); color: var(--gold-hi); }
.pillar {
  width: 100%; border-radius: 14px 14px 6px 6px; display: grid; place-items: start center; padding-top: 10px;
  font: 400 30px/1 var(--f-display); color: #2a1900; transform-origin: bottom;
  animation: grow .9s var(--ease) both;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 4px 0 rgba(0, 0, 0, .35);
}
.pod.p1 .pillar { height: 118px; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, #d98f00); animation-delay: .35s; }
.pod.p2 .pillar { height: 88px; background: linear-gradient(180deg, #ffffff, #c4cde6 50%, #8e9abd); animation-delay: .2s; }
.pod.p3 .pillar { height: 68px; background: linear-gradient(180deg, #ffd4ad, #e08a48 50%, #a95a22); animation-delay: .5s; }
@keyframes grow { from { transform: scaleY(0); } }
.pod .crown-top { width: 30px; height: 25px; color: var(--gold); filter: drop-shadow(0 0 10px rgba(255, 201, 58, .8)); animation: float 2.6s ease-in-out infinite; }

/* ---------- números do clã ---------- */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figures > div { display: flex; flex-direction: column; gap: 5px; padding: 2px 10px; border-left: 1px solid var(--rule); min-width: 0; }
.figures > div:first-child { border-left: 0; padding-left: 0; }
.figures .num { font-size: 23px; line-height: 1; white-space: nowrap; }
@media (max-width: 420px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .figures > div:nth-child(3) { border-left: 0; padding-left: 0; }
}

/* ---------- botões ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; border: 0; border-radius: 14px; cursor: pointer;
  font: 400 17px/1 var(--f-display); letter-spacing: .4px; color: #2a1900;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #f0ae17);
  box-shadow: 0 4px 0 var(--gold-deep), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .12s, box-shadow .12s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-deep); }
.btn.blue { color: #fff; background: linear-gradient(180deg, #74c3ff, var(--blue) 55%, #1f86e6); box-shadow: 0 4px 0 #0b4c94, inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.green { color: #04240f; background: linear-gradient(180deg, #8af5b9, var(--green) 55%, #1fc46d); box-shadow: 0 4px 0 #0c7a3e, inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.plain { color: var(--ink); background: var(--plate); box-shadow: 0 3px 0 #040820; border: 1px solid var(--rule); }
.btn.plain::after { display: none; }
.btn.sm { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn svg { width: 21px; height: 21px; }

/* ---------- segmentos ---------- */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 15px; background: rgba(11, 21, 54, .85); border: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1 0 auto; border: 0; cursor: pointer; background: none; color: var(--mist); padding: 10px 12px; border-radius: 11px;
  font: 700 14px/1 var(--f-label); text-transform: uppercase; letter-spacing: .9px; white-space: nowrap; transition: color .2s, background .25s;
}
.seg button.on { color: #2a1900; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: 0 2px 0 var(--gold-deep), 0 0 16px rgba(255, 201, 58, .35); }

/* ---------- listas ---------- */
.board { border-radius: var(--r); background: linear-gradient(180deg, rgba(18, 32, 78, .9), rgba(11, 21, 54, .92)); border: 1px solid var(--rule); overflow: hidden; box-shadow: 0 4px 0 #030717; }
.row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 11px 14px; border-top: 1px solid rgba(36, 55, 122, .55);
  animation: slide .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms);
}
@keyframes slide { from { opacity: 0; transform: translateX(-14px); } }
.row:first-child { border-top: 0; }
a.row { transition: background .2s; }
a.row:hover { background: rgba(62, 166, 255, .08); }
.row .who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row .who b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .who small { color: var(--mist); font-size: 12.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row .val { font: 400 18px/1 var(--f-display); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.row.wide { grid-template-columns: 30px minmax(0, 1fr) auto auto; }
.pos { font: 400 16px/1 var(--f-display); color: var(--mist); text-align: center; }
.pos.p1, .pos.p2, .pos.p3 {
  display: grid; place-items: center; width: 28px; height: 31px; color: #2a1900; font-size: 15px;
  clip-path: polygon(50% 0, 100% 18%, 100% 62%, 50% 100%, 0 62%, 0 18%);
}
.pos.p1 { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.pos.p2 { background: linear-gradient(180deg, #f3f6ff, #aeb8d6); }
.pos.p3 { background: linear-gradient(180deg, #ffc89a, #d07a3a); }
.empty { padding: 24px 14px; text-align: center; color: var(--mist); }

.role { font: 700 11.5px/1 var(--f-label); text-transform: uppercase; letter-spacing: .9px; padding: 3px 7px 2px; border-radius: 6px; background: rgba(147, 160, 212, .14); color: var(--mist); }
.role.leader { background: rgba(255, 201, 58, .16); color: var(--gold); }
.role.coLeader { background: rgba(212, 77, 255, .18); color: #e7a6ff; }
.role.elder { background: rgba(62, 166, 255, .16); color: #9fd1ff; }

.tickets { display: inline-flex; gap: 3px; }
.tickets i { width: 9px; height: 12px; border-radius: 2.5px; background: #24346c; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .3); }
.tickets i.on { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: inset 0 -2px 0 var(--gold-deep), 0 0 6px rgba(255, 201, 58, .5); }

/* ---------- gráficos ---------- */
.ring { position: relative; width: 96px; height: 96px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .trk { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 10; }
.ring .rv { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.4s .25s cubic-bezier(.2, .8, .2, 1); }
.ring .in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; }
.ring .in .num { font-size: 24px; line-height: 1; }
.ring .in .label { font-size: 10.5px; letter-spacing: 1px; }

.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; align-items: end; height: 150px; padding: 14px 14px 0; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; min-width: 0; }
.bar-col .b {
  width: 100%; max-width: 34px; border-radius: 8px 8px 3px 3px; transform-origin: bottom;
  background: linear-gradient(180deg, #7fc4ff, var(--blue)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35);
  animation: grow .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + .2s);
}
.bar-col .b.full { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 0 14px rgba(255, 201, 58, .45); }
.bar-col .v { font: 400 12.5px/1 var(--f-display); color: var(--ink); }
.bar-x { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 8px 14px 14px; }
.bar-x span { font: 700 11px/1 var(--f-label); text-transform: uppercase; letter-spacing: .6px; color: var(--mist); text-align: center; white-space: nowrap; overflow: hidden; }

.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 11px 14px; border-top: 1px solid rgba(36, 55, 122, .55); }
.hbar:first-child { border-top: 0; }
.hbar .track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: rgba(255, 84, 104, .35); overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: linear-gradient(90deg, #2bbf75, var(--green)); border-radius: 4px; transform-origin: left; animation: growx 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms + .2s); }
@keyframes growx { from { transform: scaleX(0); } }

.spark { display: block; width: 100%; height: auto; }
.spark .ln { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 1.8s .2s ease-out forwards; }
.spark .ar { animation: fadein 1s .9s both; }
.spark .dot { animation: pop .6s 1.6s var(--ease) both; transform-box: fill-box; transform-origin: center; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { from { opacity: 0; } }

/* ---------- cartas ---------- */
.deck { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.deck.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.card { position: relative; animation: deal .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms + .1s); transition: transform .25s var(--ease); }
.card:hover { transform: translateY(-5px) scale(1.06) rotate(-2deg); z-index: 1; }
@keyframes deal { from { opacity: 0; transform: translateY(-26px) rotate(-14deg) scale(.6); } }
.card img { display: block; width: 100%; max-width: 100%; aspect-ratio: 5 / 6; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .5)); }
.card .lv {
  position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%);
  font: 400 10.5px/1 var(--f-display); padding: 2px 5px 1px; border-radius: 5px; color: #fff;
  background: #1a2350; border: 1px solid #3a4a8a; white-space: nowrap;
}
.card.evo .lv { background: linear-gradient(180deg, #8a3cf0, #5b1f9e); border-color: #c18bff; box-shadow: 0 0 8px rgba(193, 139, 255, .7); }
.deck-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 9px; font-size: 13px; color: var(--mist); }
.elixir { display: inline-flex; align-items: center; gap: 4px; color: var(--elixir-hi); font: 400 15px/1 var(--f-display); }
.elixir svg { width: 13px; height: 16px; filter: drop-shadow(0 0 5px rgba(212, 77, 255, .8)); }
.deck-block { padding: 13px 14px 14px; border-top: 1px solid rgba(36, 55, 122, .55); }
.deck-block:first-child { border-top: 0; }
.rate { font: 400 17px/1 var(--f-display); }

/* ---------- treinador ---------- */
.coach { padding: 16px 14px; display: flex; flex-direction: column; gap: 14px; }
.coach-head { display: flex; align-items: center; gap: 12px; }
.orb {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 35% 30%, #f6c8ff, var(--elixir) 55%, #6a1a9a);
  box-shadow: 0 0 24px rgba(212, 77, 255, .7), inset 0 -4px 8px rgba(0, 0, 0, .3);
  animation: orb 2.4s ease-in-out infinite;
}
.orb svg { width: 22px; height: 22px; }
@keyframes orb { 50% { box-shadow: 0 0 40px rgba(212, 77, 255, .95), inset 0 -4px 8px rgba(0, 0, 0, .3); transform: scale(1.05); } }
.coach dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.coach dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .2); border: 1px solid rgba(193, 139, 255, .18); animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 120ms + .5s); }
.coach dt { font: 700 12.5px/1.5 var(--f-label); text-transform: uppercase; letter-spacing: 1.2px; color: var(--elixir-hi); }
.coach dd { margin: 0; }
@media (max-width: 420px) { .coach dl > div { grid-template-columns: 1fr; gap: 4px; } }
.thinking { display: flex; align-items: center; gap: 10px; color: #c9b8f2; }
.thinking i { width: 8px; height: 8px; border-radius: 50%; background: var(--elixir-hi); animation: hop 1s ease-in-out infinite; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes hop { 50% { transform: translateY(-7px); opacity: .5; } }

/* ---------- perfil ---------- */
.hero-p { display: flex; flex-direction: column; gap: 14px; padding: 16px 14px; }
.hero-p .top-line { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.tag { font: 600 14px/1 var(--f-label); letter-spacing: 1px; color: var(--mist); }
.trophy { display: inline-flex; align-items: center; gap: 7px; font: 400 28px/1 var(--f-display); color: var(--gold); white-space: nowrap; text-shadow: 0 2px 0 #2a1900, 0 0 16px rgba(255, 201, 58, .35); }
.trophy svg { width: 26px; height: 26px; }
.statline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.statline div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.statline .num { font-size: 22px; line-height: 1; }
.back { display: inline-flex; align-items: center; gap: 6px; font: 700 13px/1 var(--f-label); text-transform: uppercase; letter-spacing: 1px; color: var(--mist); }
.res { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font: 400 14px/1 var(--f-display); color: #fff; }
.res.win { background: linear-gradient(180deg, #4fb6ff, #1f7fe0); box-shadow: 0 0 10px rgba(62, 166, 255, .45); }
.res.loss { background: linear-gradient(180deg, #ff7686, #d8324a); }
.res.draw { background: #3a4677; }
.crowns { display: inline-flex; align-items: center; gap: 3px; font: 400 15px/1 var(--f-display); }
.crowns svg { width: 15px; height: 13px; }
.two { display: grid; gap: 28px; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; gap: 16px; } }

/* ---------- mural ---------- */
.post { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 14px; border-top: 1px solid rgba(36, 55, 122, .55); animation: slide .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.post:first-child { border-top: 0; }
.stub {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 56px; height: 60px; border-radius: 12px; background: var(--deep); border: 1px solid var(--rule); color: var(--mist);
}
.stub b { font: 400 24px/1 var(--f-display); color: var(--ink); }
.stub span { font: 700 11px/1 var(--f-label); text-transform: uppercase; letter-spacing: 1px; }
.stub svg { width: 25px; height: 25px; }
.post.evento .stub { background: linear-gradient(180deg, #4a3500, #241900); border-color: var(--gold-deep); color: var(--gold); box-shadow: 0 0 16px rgba(255, 201, 58, .2); }
.post.evento .stub b { color: var(--gold-hi); }
.post.resultado .stub { color: var(--green); }
.post h3 { margin: 0; font: 800 16px/1.3 var(--f-body); }
.post p { margin: 4px 0 0; white-space: pre-line; color: #cdd4f3; max-width: 65ch; }
.post .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--mist); }
.post .when { color: var(--gold); font-weight: 800; }
.pin { font: 700 11px/1 var(--f-label); text-transform: uppercase; letter-spacing: 1px; color: var(--gold); }
.post-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- semana ---------- */
.moves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.moves > div { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; border-left: 1px solid rgba(36, 55, 122, .55); min-width: 0; }
.moves > div:first-child { border-left: 0; }
.moves .num { font-size: 30px; line-height: 1; }
.moves ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 800; }
.moves li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moves .in .num { color: var(--green); text-shadow: 0 0 14px rgba(63, 224, 143, .4); }
.moves .out .num { color: var(--red); text-shadow: 0 0 14px rgba(255, 84, 104, .4); }
.moves .up .num { color: var(--gold); text-shadow: 0 0 14px rgba(255, 201, 58, .4); }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 6px; padding: 16px 14px; }
.form label { font: 700 12.5px/1 var(--f-label); text-transform: uppercase; letter-spacing: 1.2px; color: var(--mist); margin-top: 8px; }
.form .btn { margin-top: 14px; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 700; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); }
input:not([type=checkbox]), select, textarea {
  width: 100%; padding: 12px; border-radius: 12px; outline: none;
  background: rgba(6, 11, 34, .8); border: 1px solid var(--rule); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 201, 58, .18); }
textarea { resize: vertical; min-height: 84px; }
.hint { font-size: 12.5px; color: var(--mist); margin: 0; }
.err { min-height: 1.2em; font-size: 13px; font-weight: 700; color: var(--red); }
.err.ok { color: var(--green); }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

.foot { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--mist); }
.foot .live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: ping 2s infinite; }
.foot a { color: var(--mist); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #fx { display: none; }
}
