:root {
  /* Layout: janela de jogo com duas abas, somente leitura. Comandantes: lista de cartas à esquerda e ficha à direita. Equipes: cartões de time com 6 vagas. */
  color-scheme: dark;
  --page: #06101C;
  --panel: #0B1220;
  --panel-2: #121A2B;
  --line: #24324A;
  --fg: #FFFFFF;
  --muted: #8FA0B4;
  --cyan: #2FD8F5;
  --yellow: #FFD84A;
  --outline: #02060D;
  --so: -1px -1px 0 var(--outline), 1px -1px 0 var(--outline), -1px 1px 0 var(--outline), 1px 1px 0 var(--outline), 0 2px 0 var(--outline);
  --so2: -2px -2px 0 var(--outline), 2px -2px 0 var(--outline), -2px 2px 0 var(--outline), 2px 2px 0 var(--outline), 0 4px 0 var(--outline);
  --f-display: 'Lilita One', 'Arial Rounded MT Bold', Impact, sans-serif;
  --f-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--page); }
body {
  margin: 0;
  background: var(--page) radial-gradient(1200px 500px at 50% -10%, #0D2B45 0%, transparent 70%);
  color: var(--fg);
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  min-height: 100vh;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1100px; margin: 0 auto; padding-block: 24px 48px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* Tier (nota) */
.t-S { --tier: #FF3B3B; --on-tier: #FFFFFF; }
.t-A { --tier: #FFC21A; --on-tier: #1A1200; }
.t-B { --tier: #4FD13A; --on-tier: #06200A; }
.t-C { --tier: #3FA9FF; --on-tier: #04162B; }
.t-D { --tier: #8B97A8; --on-tier: #0A0F19; }

/* Raridade */
.r-none { --rb: #3A4660; }
.r-comum { --rb: #8E96A3; --rg: linear-gradient(180deg, #FFFFFF, #C3C8CF 55%, #9AA1AB); }
.r-raro { --rb: #2F80FF; --rg: linear-gradient(180deg, #55A8FF, #1F62E8 55%, #0B3DB5); }
.r-epico { --rb: #B04CFF; --rg: linear-gradient(180deg, #D685FF, #9A2DFF 55%, #6A12C9); }
.r-lendario { --rb: #FFD21F; --rg: linear-gradient(180deg, #FFF26E, #FFD21A 55%, #E0A200); }
.r-almiral { --rb: #FF3B3B; --rg: linear-gradient(180deg, #FF7474, #E0242F 55%, #A8121C); }
.r-secreto { --rb: #FFFFFF; --rg: linear-gradient(180deg, #3C3C3C, #000000); }
.rp { display: inline-block; padding: 2px 14px; border-radius: 9px; border: 2px solid var(--outline); background: var(--rg, linear-gradient(180deg, #3A465E, #232C40)); font: italic 400 16px/1.15 var(--f-display); color: #fff; text-shadow: var(--so); text-transform: uppercase; letter-spacing: 0.01em; white-space: nowrap; }
.rp.r-secreto { border-color: #fff; }

/* Janela */
.game { border: 3px solid #08496A; border-radius: 16px; background: linear-gradient(180deg, #0C1626, #070B13); box-shadow: 0 14px 50px rgba(0, 0, 0, 0.55); }
.gh { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 10px 20px 0; border-radius: 13px 13px 0 0; background: linear-gradient(180deg, #46E3FF 0%, #14B6E8 55%, #0A94CB 100%); border-bottom: 3px solid #07587A; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.tab { padding: 2px 4px 6px; background: none; border: 0; border-bottom: 5px solid transparent; cursor: pointer; font: italic 400 clamp(26px, 5.5vw, 40px)/1 var(--f-display); color: rgba(255, 255, 255, 0.55); text-shadow: var(--so2); letter-spacing: 0.01em; }
.tab[aria-selected="true"] { color: #fff; border-bottom-color: #fff; }

.gx { width: 44px; height: 44px; flex: none; border-radius: 10px; border: 3px solid var(--outline); background: linear-gradient(180deg, #FF7A7A, #E0242F 60%, #A8121C); color: #fff; font: 400 24px/1 var(--f-display); text-shadow: var(--so); cursor: pointer; }
.gbtn { display: inline-block; min-height: 36px; padding: 6px 14px; border-radius: 10px; border: 3px solid var(--outline); background: linear-gradient(180deg, #2B3850, #18212F); cursor: pointer; font: italic 400 16px/1.3 var(--f-display); color: #fff; text-shadow: var(--so); }
.gbtn:hover { filter: brightness(1.1); }
.gbtn:focus-within { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* Aba Comandantes */
.gb { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.lpane { padding: 16px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.search { width: 100%; min-height: 54px; padding: 8px 18px; border-radius: 12px; border: 2px solid var(--line); background: rgba(0, 0, 0, 0.4); font: italic 400 24px/1 var(--f-display); color: #fff; }
.search::placeholder { color: #70808F; opacity: 1; }
.search:focus-visible { border-color: var(--cyan); outline: 0; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sel { min-height: 34px; max-width: 100%; padding: 4px 10px; border-radius: 8px; border: 2px solid var(--line); background: var(--panel-2); font-size: 13px; font-weight: 800; }
.seg { display: inline-flex; align-self: flex-start; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { min-height: 30px; padding: 3px 12px; border: 0; background: var(--panel-2); color: var(--muted); font-size: 13px; font-weight: 800; cursor: pointer; }
.seg button + button { border-left: 2px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--cyan); color: #032633; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 2px 12px; border-radius: 9px; border: 2px solid var(--line); background: var(--panel-2); font-size: 13px; font-weight: 900; cursor: pointer; }
.chip i, .rchip i { font: 900 12px var(--f-body); font-style: normal; opacity: 0.8; margin-left: 6px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { border-color: var(--cyan); background: #0E2A3A; }
.rchip { cursor: pointer; font-size: 14px; padding: 2px 12px; }
.rchip[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff; }
.rchip.dim { opacity: 0.55; }

.glist { max-height: 620px; overflow: auto; padding: 4px 6px 6px 2px; margin-right: -4px; scrollbar-color: #2A3A52 transparent; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.csec + .csec { margin-top: 16px; }
.ch { margin: 0 0 8px; font: italic 400 24px/1 var(--f-display); color: var(--cyan); text-shadow: var(--so); }
.ch i { font: 800 13px var(--f-body); font-style: normal; color: var(--muted); text-shadow: none; margin-left: 8px; }
.ch.muted { color: #9FB0C8; }

/* Carta */
.gc { position: relative; min-width: 0; aspect-ratio: 1 / 1.04; border-radius: 9px; border: 3px solid var(--rb, #3A4660); background: radial-gradient(circle at 50% 38%, #2B3445 0%, #151B28 78%); overflow: hidden; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6); }
.gc:hover { filter: brightness(1.12); }
.gc.on { box-shadow: 0 0 0 3px #fff, 0 0 16px var(--rb, #fff); }
.gc .pic { position: absolute; inset: 15% 6% 20%; display: grid; place-items: center; }
.gc .pic img { width: 100%; height: 100%; object-fit: contain; }
.ph { width: 55%; height: auto; opacity: 0.3; color: #9FB0C8; }
.gc .tl { position: absolute; top: 5px; left: 6px; }
.tchip { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 6px; border: 2px solid var(--outline); background: var(--tier); color: var(--on-tier); font: 400 15px/18px var(--f-display); text-align: center; }
.gc .nm { position: absolute; left: 8px; right: 6px; bottom: 6px; font-weight: 900; font-size: 15px; line-height: 1.05; text-shadow: var(--so); overflow-wrap: anywhere; }

/* Tier list */
.tiers { display: grid; gap: 8px; }
.trow { display: grid; grid-template-columns: 56px minmax(0, 1fr); border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.tlabel { display: grid; place-items: center; background: var(--tier); color: var(--on-tier); font: 400 36px/1 var(--f-display); }
.titems { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; padding: 8px; min-height: 88px; }
.tile { width: 74px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.tile .box { aspect-ratio: 1; border-radius: 8px; border: 3px solid var(--rb, #3A4660); background: radial-gradient(circle at 50% 38%, #2B3445, #151B28 80%); display: grid; place-items: center; overflow: hidden; }
.tile.on .box { box-shadow: 0 0 0 2px #fff; }
.tile .box img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.tile span { font-size: 11px; font-weight: 900; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tempty { align-self: center; color: var(--muted); font-size: 12px; padding-left: 4px; }

.empty { display: grid; justify-items: start; gap: 12px; padding: 22px; border: 2px dashed var(--line); border-radius: 12px; }
.empty h2 { margin: 0; font: italic 400 28px/1 var(--f-display); text-shadow: var(--so); }
.empty p { margin: 0; color: var(--muted); max-width: 52ch; font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ficha */
.dpane { padding: 18px; border-left: 3px solid #0B2237; background: linear-gradient(180deg, #0A111D, #060A12); border-radius: 0 0 13px 0; min-width: 0; }
.dp { display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.dclose { display: none; }
.dtop { display: grid; grid-template-columns: minmax(0, 138px) minmax(0, 1fr); gap: 14px; align-items: end; }
.dimg { aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(circle at 50% 40%, #2B3445, #121722 80%); border: 3px solid var(--rb, #1C2840); overflow: hidden; }
.dimg img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.info { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.dname { margin: 0; font: italic 400 clamp(30px, 5vw, 38px)/1 var(--f-display); text-shadow: var(--so2); overflow-wrap: anywhere; }
.rrate { display: flex; align-items: center; gap: 10px; }
.rrate .tchip { font-size: 22px; line-height: 30px; min-width: 36px; border-radius: 8px; }
.rrate .meter { flex: 1; height: 10px; border-radius: 6px; background: #0A1424; border: 2px solid #1B2A44; overflow: hidden; }
.rrate .meter i { display: block; height: 100%; background: var(--tier); }
.rrate .sc { font: 400 22px/1 var(--f-display); text-shadow: var(--so); font-variant-numeric: tabular-nums; }
.rrate .sc small { font-size: 14px; color: var(--muted); }
.cps { display: flex; flex-wrap: wrap; gap: 6px; }
.cp { display: inline-block; padding: 3px 12px; border-radius: 999px; border: 2px solid #0C5A73; background: #0B2A38; color: #BFF3FF; font-size: 13px; font-weight: 900; }
.skill { margin: 0; font: italic 400 28px/1 var(--f-display); color: var(--cyan); text-shadow: var(--so); }
.sdesc { margin: 6px 0 0; font-size: 17px; font-weight: 800; line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere; text-shadow: var(--so); }
.sdesc.none { color: var(--muted); text-shadow: none; }
.meta { color: var(--muted); font-size: 12px; font-weight: 800; }
.dempty { display: grid; place-items: center; min-height: 220px; text-align: center; color: var(--muted); padding: 20px; }

/* Aba Equipes */
.tv { display: grid; gap: 14px; padding: 16px; }
.tintro { margin: 0; color: var(--muted); max-width: 70ch; }
.teams { display: grid; gap: 14px; }
.team { display: grid; gap: 12px; padding: 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel); }
.th { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.th h3 { margin: 0; flex: 1 1 200px; min-width: 0; font: italic 400 clamp(24px, 4vw, 30px)/1.05 var(--f-display); text-shadow: var(--so); overflow-wrap: anywhere; }
.tcount { font: 400 20px/1 var(--f-display); color: var(--cyan); text-shadow: var(--so); font-variant-numeric: tabular-nums; }
.slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.slot { min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.slot .box { aspect-ratio: 1; border-radius: 9px; border: 3px solid var(--rb, #3A4660); background: radial-gradient(circle at 50% 38%, #2B3445, #151B28 80%); display: grid; place-items: center; overflow: hidden; }
.slot .box img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.slot .n { font-size: 12px; font-weight: 900; line-height: 1.1; overflow-wrap: anywhere; text-shadow: var(--so); }
.slot.empty { display: flex; padding: 0; border: 0; gap: 4px; justify-items: initial; }
.slot.empty .box { border: 2px dashed var(--line); background: transparent; }
.slot.filled { cursor: pointer; }
.slot.filled:hover .box { filter: brightness(1.15); }

.foot { margin: 18px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); }

@media (max-width: 819px) {
  .gb { grid-template-columns: minmax(0, 1fr); }
  .glist { max-height: none; overflow: visible; padding: 0; margin: 0; }
  .dpane { display: none; position: fixed; inset: 0; z-index: 60; overflow: auto; border: 0; border-radius: 0; background: #070C15;
    padding: max(14px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .dpane.open { display: block; }
  .dclose { display: block; margin-left: auto; }
  .dtop { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); }
  .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Páginas do site público */
a.gc, a.tile, a.slot, a.tab, a.gbtn, .foot a, .seo-list a { color: inherit; text-decoration: none; }
a.gc { display: block; }
a.tab { display: inline-block; }
.tab.on { color: #fff; border-bottom-color: #fff; }
.th h2 { margin: 0; flex: 1 1 200px; min-width: 0; font: italic 400 clamp(24px, 4vw, 30px)/1.05 var(--f-display); text-shadow: var(--so); overflow-wrap: anywhere; }
.pt { margin: 0; font: italic 400 clamp(28px, 5vw, 38px)/1 var(--f-display); text-shadow: var(--so2); }
.sp { padding: 18px; }
.sp .dp { max-width: 760px; }
.sp .dname { font-size: clamp(34px, 6vw, 46px); }
.seo-list { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.seo-list a { color: var(--cyan); }
.foot a { color: var(--cyan); text-decoration: underline; }
a.slot.filled { cursor: pointer; }

/* Tier list */
.tt-tile, .tv .tile { width: 84px; }
.tile .ts { font: 400 15px/1 var(--f-display); color: var(--tier); text-shadow: var(--so); }
.tnote { margin: 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.tsec { display: grid; gap: 10px; }
.tsec + .tsec { margin-top: 10px; }
a.chip { color: inherit; text-decoration: none; }
a.cp { text-decoration: none; }
a.gc, a.tile { display: block; }
a.tile { display: flex; }
.link { background: none; border: 0; padding: 4px 0; cursor: pointer; font-weight: 800; font-size: 13px; color: var(--cyan); text-decoration: underline; }
.cps a.gbtn { text-decoration: none; color: #fff; }
.wrap > .pt { margin: 0 0 14px; }
