/* Táticas do Vazio: the public site (landing page, sign-up and login).
   Builds on style.css, which holds the game's tokens, buttons and type, so the
   site and the game share one look: void backgrounds, 1px hairlines, square
   corners, coloured top borders for cost and tier, crisp pixel art.
   Single dark theme by design. Class names avoid the game's own (.card, .panel,
   .stat, .trait, .modal, .shop...) so nothing from the game leaks in. */

:root {
  --edge: #6a6088;            /* form control boundary: 3:1 against abyss */
  --err: #f09ea2;             /* error text on abyss */
  --gutter: 16px;
  --nav-h: 60px;
  --maxw: 1200px;
}
@media (min-width: 720px) { :root { --gutter: 32px; --nav-h: 68px; } }

html { scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body.site { font-size: 17px; line-height: 1.65; }
.site a { color: inherit; }
.site a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.site canvas { display: block; }
.site img:not([src]) { visibility: hidden; } /* portraits wait for the sprite atlas */
.site a:focus-visible, .site button:focus-visible, .site [tabindex]:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
main:focus { outline: none; }

.wrap { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }
.site p { text-wrap: pretty; }
.site h1, .site h2, .site h3, .hero .eyebrow, .hero-pitch { text-wrap: balance; }
/* Instructions that depend on the pointer: "passe o mouse" or "toque". */
@media (hover: none) { .on-mouse { display: none; } }
@media (hover: hover) { .on-touch { display: none; } }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ember); color: var(--void); font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; padding: 10px 14px; }
.skip:focus { top: 12px; }
.site .skip:focus-visible { outline-color: var(--bone); }

.noscript { margin: 0; padding: 10px var(--gutter); background: var(--abyss); border-bottom: 1px solid var(--line); color: var(--ash); font-family: var(--f-mono); font-size: 13px; text-align: center; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h); margin-bottom: calc(-1 * var(--nav-h));
  background: transparent linear-gradient(180deg, rgba(13, 10, 20, .8), rgba(13, 10, 20, 0));
  transition: background-color .25s ease, box-shadow .25s ease;
}
.nav.is-scrolled { background-color: rgba(13, 10, 20, .95); box-shadow: 0 1px 0 var(--line); }
.nav-in { height: 100%; display: flex; align-items: center; gap: 28px; }
.wordmark { font-family: var(--f-display); font-size: 1.5rem; line-height: 1; color: var(--bone); text-decoration: none; white-space: nowrap; }
.wordmark em { color: var(--rift); }
.nav .wordmark { margin-right: auto; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  position: relative; padding: 10px 0;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ash); text-decoration: none;
}
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--ember); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--bone); }
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }
.nav-acts { display: flex; align-items: center; gap: 10px; }
.nav-links + .nav-acts::before, .nav-links + .nav-acts + .nav-acts::before { content: ""; width: 1px; height: 22px; background: var(--line); margin-right: 18px; }
.nav-hello { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-mono); font-size: 12px; color: var(--ash); }
.nav-hello b { color: var(--bone); font-weight: 500; }
/* While a saved session is being checked, don't flash the guest buttons. */
.auth-pending .nav-acts, .auth-pending .hero-ctas, .auth-pending .cta-row { visibility: hidden; }
/* With the section links showing, there is no room for the greeting too (the hero repeats it). */
@media (min-width: 1024px) and (max-width: 1199px) { .nav-hello { display: none; } }
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .nav-links + .nav-acts::before, .nav-links + .nav-acts + .nav-acts::before { display: none; }
}
@media (max-width: 559px) {
  .nav-in { gap: 10px; }
  .nav .wordmark { font-size: 1.12rem; }
  .nav-hello { display: none; }
  .nav-acts { gap: 6px; }
  .nav-acts .btn { padding: 7px 9px; font-size: 10.5px; letter-spacing: .06em; }
}
@media (max-width: 359px) { .nav .wordmark { font-size: 1rem; } .nav-acts .btn { padding: 7px 7px; } }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden; overflow: clip;
  min-height: 90vh; min-height: 90svh;
  display: grid; align-items: center; justify-items: center;
  padding: calc(var(--nav-h) + 40px) var(--gutter) 96px;
  text-align: center; background: var(--void);
}
.hero-canvas { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.hero-canvas.is-ready { opacity: 1; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 33% 42% at 50% 54%, rgba(13, 10, 20, .7), rgba(13, 10, 20, .32) 62%, rgba(13, 10, 20, 0) 100%),
    linear-gradient(180deg, rgba(13, 10, 20, .5) 0, rgba(13, 10, 20, 0) 20%, rgba(13, 10, 20, 0) 80%, var(--void) 100%);
}
.hero-content { width: min(780px, 100%); display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero .eyebrow { margin: 0; text-shadow: 0 1px 10px rgba(8, 6, 14, .9); }
.hero-title {
  display: flex; flex-direction: column; align-items: center;
  font-size: clamp(2.2rem, 1.9rem + 1.9vw, 4.1rem); line-height: 1;
  text-shadow: 0 2px 22px rgba(8, 6, 14, .95), 0 1px 0 rgba(8, 6, 14, .6);
}
.hero-title span { display: block; }
.hero-title em { display: block; font-size: 2.5em; line-height: .84; letter-spacing: -.01em; padding: 0 .08em .06em; }
.hero-pitch { margin: 0; max-width: 42ch; font-size: clamp(1.08rem, 1.8vw, 1.3rem); line-height: 1.55; color: var(--bone); text-shadow: 0 1px 14px rgba(8, 6, 14, .95), 0 0 2px rgba(8, 6, 14, .8); }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-ctas .btn { padding: 14px 22px; font-size: 13px; }
.hero .btn.ghost, .hero-authed .btn.ghost { color: var(--bone); background: rgba(13, 10, 20, .6); border-color: rgba(232, 223, 207, .34); }
.hero .btn.ghost:hover { background: rgba(29, 23, 41, .85); border-color: rgba(232, 223, 207, .55); }
.hero-authed { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-hello { margin: 0; font-family: var(--f-mono); font-size: 13px; color: var(--ash); text-shadow: 0 1px 10px rgba(8, 6, 14, .95); }
.hero-hello b { color: var(--bone); font-weight: 500; }
.hero-stats {
  list-style: none; margin: 6px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ash);
  text-shadow: 0 1px 8px rgba(8, 6, 14, .95);
}
.hero-stats li { display: inline-flex; align-items: center; gap: .55em; }
.hero-stats li + li::before { content: ""; width: 5px; height: 5px; margin: 0 14px; background: var(--rift); transform: rotate(45deg); }
.hero-stats b { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--bone); }

.hero-meta { position: absolute; right: var(--gutter); bottom: 22px; display: flex; align-items: center; gap: 14px; }
.hero-arena { margin: 0; display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ash); text-shadow: 0 1px 8px rgba(8, 6, 14, .95); }
.hero-ticks { display: flex; gap: 4px; }
.hero-ticks i { width: 12px; height: 2px; background: rgba(232, 223, 207, .24); }
.hero-ticks i.on { background: var(--ember); }
.hero-pause { position: relative; width: 30px; height: 30px; padding: 0; flex: none; background: rgba(13, 10, 20, .6); border: 1px solid rgba(232, 223, 207, .3); cursor: pointer; }
.hero-pause:hover { border-color: rgba(232, 223, 207, .6); }
.hero-pause::before, .hero-pause::after { content: ""; position: absolute; top: 9px; width: 3px; height: 10px; background: var(--bone); }
.hero-pause::before { left: 10px; }
.hero-pause::after { right: 10px; }
.hero-pause[aria-pressed="true"]::before { left: 11px; width: 0; height: 0; background: none; border-left: 9px solid var(--bone); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.hero-pause[aria-pressed="true"]::after { display: none; }

/* Phones: the game's arena is a wide composition, so it becomes a diorama
   under the text instead of a backdrop behind it. site.js reads the same
   breakpoint (max-width: 719px). */
@media (max-width: 719px) {
  .hero { align-items: start; padding-top: calc(var(--nav-h) + 28px); padding-bottom: calc(80vw + 40px); }
  .hero-canvas {
    top: auto; height: calc(80vw + 64px);
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 20%, #000 90%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 20%, #000 90%, transparent 100%);
  }
  .hero-shade { background: radial-gradient(ellipse 80% 40% at 50% 28%, rgba(154, 134, 255, .07), rgba(154, 134, 255, 0) 100%); }
  .hero-content { gap: 18px; }
  .hero-meta { left: var(--gutter); right: var(--gutter); bottom: 12px; justify-content: space-between; }
}
@media (max-width: 479px) {
  .hero-ctas { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 26px; }
  .hero-stats li + li::before { display: none; }
}

/* ---------------------------------------------------------------- sections */
.sec { padding-block: clamp(72px, 8.5vw, 116px); }
/* Big numbers that carry game values (cost, ranking) use Spectral: IM Fell's
   old-style "1" reads as a capital I. */
.num-serif { font-family: var(--f-body); font-style: italic; font-weight: 400; font-variant-numeric: lining-nums; }
.sec-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head h2 { font-size: clamp(2.3rem, 5.2vw, 3.5rem); line-height: 1; }
.sec-head p { margin: 18px 0 0; max-width: 58ch; color: var(--ash); font-size: 1.12rem; line-height: 1.6; }
.load-fail { display: none; margin: 0; color: var(--ash); font-family: var(--f-mono); font-size: 13px; }
.no-game-art .load-fail { display: block; }
.no-game-art .needs-art { display: none; }

/* ---------------------------------------------------------------- o jogo */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* Each card spans two rows of the parent grid, so illustrations and titles line up across a row. */
.feat { display: flex; flex-direction: column; background: var(--abyss); border: 1px solid var(--line); min-width: 0; }
@supports (grid-template-rows: subgrid) {
  .feat { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
}
.feat-art {
  min-height: 196px; padding: 28px 20px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 60% 70% at 50% 100%, rgba(154, 134, 255, .07), rgba(154, 134, 255, 0) 70%), var(--void);
}
.feat-body { padding: 24px 26px 28px; }
.feat-body h3 { margin: 0 0 10px; font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; line-height: 1.12; }
.feat-body p { margin: 0; max-width: 54ch; color: var(--ash); }
.stars { color: #c9d4e0; letter-spacing: .04em; white-space: nowrap; }
@media (max-width: 859px) { .features { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 479px) { .feat-art { min-height: 0; padding: 22px 14px; } .feat-body { padding: 20px 18px 24px; } }

/* mini illustrations, drawn with the game's own pieces */
.ill-shop { width: min(100%, 480px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ill-card { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 7px; background: var(--abyss); border: 1px solid var(--line); border-top: 3px solid var(--cc); }
.ill-card img { width: 64px; height: 64px; }
.ill-card .nm { min-height: 2.3em; display: flex; align-items: center; text-align: center; font-family: var(--f-display); font-size: 12.5px; line-height: 1.12; color: var(--bone); }
.ill-card .ct { font-family: var(--f-mono); font-size: 11px; font-weight: 600; color: var(--ember); }
@media (max-width: 479px) { .ill-card img { width: 48px; height: 48px; } .ill-card .nm { display: none; } }

.ill-traits { width: min(100%, 420px); display: flex; flex-direction: column; gap: 4px; font-family: var(--f-mono); font-size: 12px; text-align: left; }
.ill-trait { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 3px 12px; padding: 8px 12px; background: var(--abyss); border: 1px solid var(--line); }
.ill-trait .cnt { width: 24px; height: 24px; display: grid; place-items: center; font-weight: 600; font-size: 11px; color: var(--void); background: var(--tc); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.ill-trait b { font-weight: 500; color: var(--bone); }
.ill-trait .tiers { display: flex; color: var(--ash); }
.ill-trait .tiers span + span::before { content: "›"; margin: 0 6px; color: var(--line); }
.ill-trait .tiers .on { color: var(--bone); font-weight: 600; }
.ill-trait small { grid-column: 2 / 4; font-size: 11px; line-height: 1.35; color: var(--ash); }
.ill-trait.off .cnt { background: var(--line); color: var(--ash); }
.ill-trait.off b { color: var(--ash); }

.ill-items { display: flex; flex-direction: column; gap: 10px; }
.ill-recipe { display: flex; align-items: center; gap: 10px; }
.ill-recipe .ico { background-color: var(--abyss); }
.ill-recipe .op { width: 10px; text-align: center; font-family: var(--f-mono); font-size: 13px; color: var(--ash); }
.ill-recipe .res { margin-left: 4px; font-family: var(--f-display); font-size: 1.05rem; color: var(--bone); white-space: nowrap; }
@media (max-width: 359px) { .ill-recipe { gap: 7px; } .ill-recipe .res { font-size: .95rem; white-space: normal; } }

.ill-rituals { width: min(100%, 470px); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ill-fenda { padding: 3px 10px; border: 1px solid var(--rift); font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--rift); }
.ill-augs { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ill-aug { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 13px 10px 12px; text-align: left; background: var(--abyss); border: 1px solid var(--line); }
.ill-aug::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; background: var(--tier, var(--rift)); }
.ill-aug.t-prata { --tier: #c9d4e0; }
.ill-aug.t-ouro { --tier: #d9a066; }
.ill-aug.t-prismatico { --tier: linear-gradient(90deg, #ff7ad9, #9a86ff, #6fb7c9); }
.ill-aug .tier { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ash); }
.ill-aug b { font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; line-height: 1.15; color: var(--bone); }

/* ---------------------------------------------------------------- criaturas */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-bottom: 18px; }
.filter-set { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-label { margin-right: 6px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ash); }
.chip {
  --tc: var(--ash);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--bone); background: transparent; border: 1px solid var(--line); cursor: pointer;
}
.chip::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--tc); transform: rotate(45deg); }
.chip.chip-all::before { display: none; }
.chip .n { font-size: 10.5px; letter-spacing: 0; color: var(--ash); }
.chip:hover { background: var(--abyss); border-color: var(--edge); }
.chip[aria-pressed="true"] { border-color: var(--tc); background: rgba(166, 157, 182, .12); background: color-mix(in srgb, var(--tc) 16%, var(--void)); }
.chip.chip-all[aria-pressed="true"] { border-color: var(--bone); }
.unit-status { margin: 0 0 18px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ash); }
.trait-detail { margin: 0 0 26px; padding: 12px 16px; max-width: 720px; background: var(--abyss); border: 1px solid var(--line); border-left: 3px solid var(--tc, var(--rift)); }
.trait-detail .td-head { margin: 0 0 6px; display: flex; align-items: baseline; gap: 12px; }
.trait-detail .td-head b { font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; color: var(--bone); }
.trait-detail .td-head span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--tc, var(--ash)); }
.trait-detail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: .98rem; color: var(--bone); }
.trait-detail li { display: flex; gap: 10px; }
.trait-detail .td-n { flex: none; min-width: 1.6em; font-family: var(--f-mono); font-size: 13px; font-weight: 600; color: var(--tc, var(--ash)); line-height: 1.75; }
.trait-detail .td-note { margin: 6px 0 0; color: var(--ash); font-size: .95rem; }

.cost-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; padding-block: 22px; border-top: 1px solid var(--line); }
.cost-label { position: sticky; top: calc(var(--nav-h) + 20px); align-self: start; margin: 0; display: flex; flex-direction: column; font-weight: 400; }
.cost-word { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ash); }
.cost-num { font-size: 3.9rem; line-height: 1; color: var(--cc); }
.unit-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 10px; }
.unit-grid > li { min-width: 0; }
.unit { position: relative; height: 100%; display: flex; flex-direction: column; background: var(--abyss); border: 1px solid var(--line); border-top: 3px solid var(--cc); cursor: default; }
.unit:hover { background: var(--deep); }
.unit-art {
  height: 128px; display: grid; place-items: center;
  background:
    radial-gradient(ellipse 34% 9% at 50% 86%, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 100%),
    radial-gradient(circle at 50% 46%, rgba(154, 134, 255, .07), rgba(154, 134, 255, 0) 62%);
}
.unit-art img { width: 96px; height: 96px; }
.unit-cost { position: absolute; top: 8px; left: 10px; margin: 0; display: flex; align-items: center; gap: 5px; font-family: var(--f-mono); font-size: 12px; font-weight: 600; color: var(--cc); }
.unit-cost::before { content: ""; width: 7px; height: 7px; border: 1.5px solid var(--cc); transform: rotate(45deg); }
.unit-info { padding: 4px 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.unit-name { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.14rem; line-height: 1.15; color: var(--bone); }
.unit-traits { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-family: var(--f-mono); font-size: 10.5px; line-height: 1.4; }
.unit-traits li { display: inline-flex; align-items: center; gap: 5px; color: var(--tc); }
.unit-traits li::before { content: ""; flex: none; width: 5px; height: 5px; background: var(--tc); transform: rotate(45deg); }
.unit-ab {
  position: absolute; left: 0; right: 0; top: 0; height: 128px; padding: 12px 12px 10px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  font-size: 13.5px; line-height: 1.38; color: var(--bone);
  background: rgba(13, 10, 20, .93); border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.unit-ab b { font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--rift); }
.unit-ab small { font-family: var(--f-mono); font-size: 10.5px; color: var(--ash); }
.unit:hover .unit-ab, .unit:focus .unit-ab, .unit:focus-within .unit-ab { opacity: 1; transform: none; }
.unit-hint { margin-top: 20px; }
@media (max-width: 719px) {
  .cost-row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 18px; }
  .cost-label { position: static; flex-direction: row; align-items: baseline; gap: 10px; }
  .cost-num { font-size: 2.4rem; }
  .unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .unit-art, .unit-ab { height: 104px; }
  .unit-art img { width: 64px; height: 64px; }
  .unit-ab { font-size: 12.5px; padding: 10px; }
  .unit-info { padding: 2px 10px 12px; }
}

/* ---------------------------------------------------------------- arenas, chibis, booms */
.sub + .sub { margin-top: clamp(56px, 7vw, 88px); }
.sub-head { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px 32px; align-items: baseline; margin-bottom: 24px; }
.sub-head h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.85rem; line-height: 1.1; }
.sub-head p { margin: 0; max-width: 60ch; color: var(--ash); }
@media (max-width: 719px) { .sub-head { grid-template-columns: minmax(0, 1fr); } }

.arena-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.arena-card { min-width: 0; background: var(--abyss); border: 1px solid var(--line); }
.arena-card canvas { width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--void); border-bottom: 1px solid var(--line); }
.arena-body { padding: 14px 16px 18px; }
.arena-body h4 { margin: 0 0 4px; font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; line-height: 1.15; }
.arena-body p { margin: 0; font-size: .98rem; line-height: 1.5; color: var(--ash); }
@media (max-width: 959px) { .arena-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .arena-grid { grid-template-columns: minmax(0, 1fr); } }

.chibis { list-style: none; margin: 0; padding: 0 0 2px; display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 4px; border-bottom: 1px dashed rgba(154, 134, 255, .3); }
.chibi { width: 100%; display: grid; place-items: center; padding: 8px 0 2px; background: transparent; border: 1px solid transparent; cursor: pointer; }
.chibi canvas { width: 64px; height: 70px; }
.chibi:hover, .chibi.is-on { background: var(--abyss); border-color: var(--line); }
.chibi-caption { min-height: 1.6em; margin: 14px 0 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ash); text-align: center; }
.chibi-caption.has-name { color: var(--bone); }
@media (max-width: 1179px) { .chibis { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 479px) { .chibis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.booms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.boom { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 4px 14px; padding: 16px 16px 18px; background: var(--abyss); border: 1px solid var(--line); border-top: 2px solid var(--bc); }
.boom svg { grid-row: 1 / 3; width: 33px; height: 33px; margin-top: 3px; color: var(--bc); }
.boom h4 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.16rem; line-height: 1.2; }
.boom p { margin: 0; font-size: .95rem; line-height: 1.45; color: var(--ash); }
@media (max-width: 959px) { .booms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .booms { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- como jogar */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.step { min-width: 0; padding-right: 28px; }
.step-num { display: flex; align-items: center; gap: 16px; font-family: var(--f-display); font-size: 3rem; line-height: 1; letter-spacing: .02em; color: var(--rift); }
.step-num::after { content: ""; flex: 1; border-top: 1px dashed rgba(154, 134, 255, .4); }
.step:last-child .step-num { color: var(--ember); }
.step:last-child .step-num::after { display: none; }
.step h3 { margin: 18px 0 8px; font-family: var(--f-display); font-weight: 400; font-size: 1.42rem; line-height: 1.2; }
.step p { margin: 0; color: var(--ash); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: clamp(40px, 6vw, 64px); }
.cta-row .btn { padding: 14px 22px; }
@media (max-width: 899px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 18px; padding: 0 0 30px; }
  .step-num { grid-row: 1 / 3; flex-direction: column; align-items: center; gap: 10px; font-size: 2.6rem; height: 100%; }
  .step-num::after { border-top: 0; border-left: 1px dashed rgba(154, 134, 255, .4); width: 0; }
  .step h3 { margin: 6px 0 6px; }
  .step:last-child { padding-bottom: 0; }
}

/* ---------------------------------------------------------------- ranking */
.sec-rank { border-top: 1px solid var(--line); }
.rank-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 64px; align-items: start; }
.rank-layout .sec-head { margin-bottom: 0; }
.rank-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rank-list li { display: grid; grid-template-columns: 36px 64px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.rank-pos { font-size: 1.8rem; line-height: 1; color: var(--ash); text-align: center; }
.rank-list li:first-child .rank-pos { color: var(--ember); }
.rank-art { width: 64px; height: 64px; background: var(--abyss); }
.rank-art img { width: 64px; height: 64px; }
.rank-who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-display); font-weight: 400; font-size: 1.25rem; line-height: 1.2; color: var(--bone); }
.rank-meta { display: flex; flex-wrap: wrap; gap: 0 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--ash); }
.rank-meta .rank-label { color: var(--bone); }
.rank-lp { font-family: var(--f-mono); font-size: 13px; font-weight: 600; color: var(--bone); text-align: right; white-space: nowrap; }
@media (max-width: 859px) { .rank-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 479px) {
  .rank-list li { grid-template-columns: 26px 48px minmax(0, 1fr) auto; gap: 10px; padding-inline: 2px; }
  .rank-art, .rank-art img { width: 48px; height: 48px; }
  .rank-pos { font-size: 1.5rem; }
  .rank-name { font-size: 1.08rem; }
}

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding-block: 44px 52px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px 48px; }
.foot-note { margin: 12px 0 0; max-width: 46ch; color: var(--ash); font-size: .95rem; line-height: 1.55; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ash); text-decoration: none; padding: 4px 0; }
.foot-links a:hover { color: var(--bone); }

/* ---------------------------------------------------------------- status toast */
.site-toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 50; max-width: calc(100% - 32px);
  padding: 10px 16px; background: var(--abyss); border: 1px solid var(--line); border-left: 3px solid var(--moss);
  font-family: var(--f-mono); font-size: 13px; color: var(--bone);
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.site-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- auth dialog */
.auth {
  width: min(440px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px);
  margin: auto; padding: 0; overflow: auto;
  color: var(--bone); background: var(--abyss); border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
}
.auth::backdrop { background: rgba(8, 6, 14, .76); }
.auth[open] { animation: auth-in .22s ease-out; }
@keyframes auth-in { from { opacity: 0; transform: translateY(10px); } }
.auth-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 10px 20px; }
.auth-chibi { width: 64px; height: 64px; flex: none; margin: -6px 0 -4px -6px; }
.auth-brand { margin: 0; font-family: var(--f-display); font-size: 1.5rem; line-height: 1; white-space: nowrap; }
.auth-brand em { color: var(--rift); }
.auth-close { position: relative; flex: none; width: 38px; height: 38px; margin-left: auto; padding: 0; color: var(--ash); background: transparent; border: 1px solid transparent; cursor: pointer; }
.auth-close::before, .auth-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg); }
.auth-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.auth-close:hover { color: var(--bone); border-color: var(--line); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 20px; border-bottom: 1px solid var(--line); }
.auth-tab {
  margin-bottom: -1px; padding: 14px 8px 12px;
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ash); background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
}
.auth-tab:hover { color: var(--bone); }
.auth-tab[aria-selected="true"] { color: var(--bone); border-bottom-color: var(--ember); }
.site .auth-tab:focus-visible { outline-offset: -2px; }
.auth-panel { padding: 20px 20px 22px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-lede { margin: 0; color: var(--ash); font-size: .98rem; line-height: 1.5; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld label { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ash); }
.fld input { width: 100%; padding: 12px 14px; font-family: var(--f-mono); font-size: 16px; color: var(--bone); background: var(--void); border: 1px solid var(--edge); border-radius: 0; }
.fld input:hover { border-color: var(--ash); }
.fld input:focus-visible { outline: 2px solid var(--bone); outline-offset: 1px; border-color: var(--bone); }
.fld input[aria-invalid="true"] { border-color: var(--blood); }
.fld .hint { font-size: 11.5px; }
.pw { position: relative; }
.pw input { padding-right: 96px; }
.pw-toggle { position: absolute; top: 4px; right: 4px; bottom: 4px; padding: 0 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ash); background: transparent; border: 1px solid transparent; cursor: pointer; }
.pw-toggle:hover { color: var(--bone); border-color: var(--line); }
.site .pw-toggle:focus-visible { outline-offset: -2px; }
.auth-msg { margin: 0; color: var(--err); font-size: .97rem; line-height: 1.45; }
.auth-msg:not(:empty) { padding: 10px 12px; background: rgba(212, 84, 90, .1); border: 1px solid rgba(212, 84, 90, .5); }
.auth-submit { width: 100%; padding: 14px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.auth-submit.is-loading:disabled { opacity: .88; cursor: progress; }
.auth-submit.is-loading::before { content: ""; width: 9px; height: 9px; border: 2px solid var(--void); transform: rotate(45deg); animation: tdv-spin 1s steps(8) infinite; }
@keyframes tdv-spin { to { transform: rotate(405deg); } }
.auth-switch { margin: 0; text-align: center; font-size: .97rem; color: var(--ash); }
.linkish { padding: 2px 0; font: inherit; color: var(--ember); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--bone); }
@media (max-width: 379px) { .auth-head { padding-left: 14px; } .auth-tabs { margin: 0 14px; } .auth-panel { padding: 18px 14px 20px; } .auth-brand { font-size: 1.3rem; } }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  .hero-canvas, .nav, .nav-links a::after, .unit-ab, .site-toast { transition: none; }
  .auth[open] { animation: none; }
  .auth-submit.is-loading::before { animation: none; }
}
