/* The Last Heart. Dark red-black, blood red, gold. Pixel face for headlines only. */
:root {
  --bg: #140b0d;
  --bg-2: #1a0f12;
  --panel: #211418;
  --panel-2: #2a1a1f;
  --text: #f3e9e2;
  --muted: #bda9a6;
  --gold: #f6c945;
  --gold-d: #b8860b;
  --gold-l: #ffe08a;
  --red: #c4202a;
  --red-l: #ff5a63;
  --line: rgba(246, 201, 69, 0.28);
  --line-hi: rgba(246, 201, 69, 0.7);
  --notch: 6px;
  --gutter: 16px;
  --maxw: 1180px;
  --font-title: "Jacquard 24", "Silkscreen", ui-monospace, monospace;
  --font-px: "Silkscreen", "Press Start 2P", ui-monospace, monospace;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-l); }
::selection { background: var(--red); color: #fff; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #4a2a30; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-d); }
* { scrollbar-color: #4a2a30 var(--bg); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #140b0d; padding: 8px 14px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.skip:hover { color: #140b0d; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: 72px; position: relative; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-px); font-weight: 700; margin: 0; letter-spacing: 0; line-height: 1.15; text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 4.6vw, 2.6rem); color: var(--gold); }
h3 { font-size: 1.05rem; color: var(--gold); }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--text); max-width: 60ch; }
.muted { color: var(--muted); }
.sec-head { margin-bottom: 36px; max-width: 760px; }
.sec-head h2 { margin-bottom: 16px; }
.sec-head p { color: var(--muted); font-size: 1.08rem; margin: 0; max-width: 62ch; }

/* ---------- Pixel panel ---------- */
.px {
  --c: var(--line);
  position: relative;
  background: var(--panel);
  border: 2px solid var(--c);
  border-image: linear-gradient(135deg, var(--c), rgba(196, 32, 42, 0.5)) 1;
  clip-path: polygon(0 var(--notch), var(--notch) var(--notch), var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch)));
  transition: box-shadow 0.35s var(--ease);
}
.px:hover { --c: var(--line-hi); box-shadow: inset 0 0 40px rgba(246, 201, 69, 0.1); }

/* ---------- Buttons ---------- */
.btn {
  --notch: 5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font: 700 0.95rem var(--font-body);
  text-decoration: none; cursor: pointer; border: 0; color: #fff;
  clip-path: polygon(0 var(--notch), var(--notch) var(--notch), var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch)));
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.3s;
}
.btn-red { background: var(--red); box-shadow: inset 0 -4px 0 rgba(0,0,0,.28), inset 0 3px 0 rgba(255,255,255,.14); }
.btn-red:hover { background: #d92a35; color: #fff; box-shadow: inset 0 -4px 0 rgba(0,0,0,.28), inset 0 3px 0 rgba(255,255,255,.2), inset 0 0 28px rgba(246,201,69,.35); }
.btn-ghost { background: rgba(246, 201, 69, 0.1); color: var(--gold); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { background: rgba(246, 201, 69, 0.2); color: var(--gold-l); box-shadow: inset 0 0 0 2px var(--line-hi); }
.btn:active { transform: translateY(2px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.85rem; --notch: 4px; }
.btn[aria-disabled="true"] { opacity: 0.5; }

/* ---------- Header ---------- */
/* Floating pixel-notched bar. The header itself is transparent; only the panel catches the eye. */
.site-header { position: sticky; top: 0; z-index: 50; padding-block: 12px; pointer-events: none; }
.nav-row { --notch: 6px; position: relative; isolation: isolate; display: flex; align-items: center; gap: 16px; min-height: 60px; padding-inline: 16px 10px; pointer-events: auto; }
.nav-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(26, 15, 18, 0.86); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 2px var(--line);
  clip-path: polygon(0 var(--notch), var(--notch) var(--notch), var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch))); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold); font-family: var(--font-title); font-size: 1.7rem; line-height: 1; letter-spacing: 0.02em; white-space: nowrap; }
.brand svg { width: 30px; height: 28px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a:not(.btn) { position: relative; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem; padding: 12px 11px; transition: color 0.2s; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 5px; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav a:not(.btn):hover, .nav a[aria-current] { color: var(--gold); }
.nav a:not(.btn):hover::after, .nav a[aria-current]::after { transform: scaleX(1); }
.nav .btn { margin-left: 6px; }
.nav .btn + .btn { margin-left: 8px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 2px solid var(--line); color: var(--gold); width: 44px; height: 44px; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; margin: auto; }

/* ---------- Hero ---------- */
.hero { perspective: 1400px; padding: 0; min-height: min(100svh, 960px); display: flex; flex-direction: column; isolation: isolate; overflow: hidden; }
.hero-art { position: absolute; inset: auto 0 -4% 0; width: 100%; height: 78%; object-fit: cover; object-position: 50% 100%; z-index: -2; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%); mask-image: linear-gradient(to bottom, transparent 0, #000 24%); opacity: calc(1 - var(--p, 0) * 1.1); }
.hero-3d { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 78%; z-index: -2; pointer-events: none; }
.has-3d .hero-art { display: none; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(20,11,13,0) 70%, var(--bg) 100%); }
#embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-inner { text-align: center; padding: 56px var(--gutter) 0; display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: 64px; height: 60px; margin-bottom: 18px; filter: drop-shadow(0 0 18px rgba(246,201,69,.45)); }
/* Lockup: a small lead-in, then one big word, both in a pixel blackletter. The big word wears the logo's gold with a red outline. */
.hero h1 { display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 0.9; font-family: var(--font-title); font-weight: 400; }
.hero h1 .t-small { display: flex; align-items: center; gap: 0.7em; font-size: clamp(1.7rem, 6vw, 3rem); letter-spacing: 0.06em; color: var(--text); }
.hero h1 .t-small::before, .hero h1 .t-small::after { content: ""; width: clamp(20px, 5vw, 56px); height: 4px; background: var(--gold-d); }
.hero h1 .t-big { font-size: clamp(4.6rem, 22vw, 8.5rem); letter-spacing: 0.02em; color: var(--gold); -webkit-text-stroke: 0.05em var(--red); paint-order: stroke fill; }
.tagline { margin: 22px 0 28px; max-width: 42ch; text-wrap: balance; font-weight: 600; text-shadow: 0 1px 14px rgba(20, 11, 13, 0.95), 0 0 3px rgba(20, 11, 13, 0.8); font-size: clamp(1.05rem, 2.6vw, 1.35rem); color: var(--text); font-weight: 500; }
.countdown { display: flex; gap: 10px; justify-content: center; }
.cd-unit { --notch: 5px; min-width: 65px; padding: 12px 8px 10px; background: rgba(33, 20, 24, 0.82); box-shadow: inset 0 0 0 2px var(--line);
  clip-path: polygon(0 var(--notch), var(--notch) var(--notch), var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch))); }
.cd-num { display: block; font-family: var(--font-px); font-size: clamp(1.3rem, 4.4vw, 2.2rem); color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1; }
.cd-lab { display: block; margin-top: 6px; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.open-state { display: none; align-items: center; gap: 12px; font-family: var(--font-px); font-size: clamp(1.1rem, 3.4vw, 1.8rem); color: var(--gold); }
.open-state i { width: 14px; height: 14px; background: #4ade80; animation: blink 1.6s steps(2) infinite; }
.is-open .countdown { display: none; }
.is-open .open-state { display: inline-flex; }
.btn-main { min-height: 60px; padding: 0 28px; flex-direction: column; gap: 2px; }
.btn-main .row { display: inline-flex; align-items: center; gap: 10px; }
.btn-main .addr-in { font: 600 0.78rem ui-monospace, "Cascadia Mono", Consolas, monospace; opacity: 0.85; }
.btn-gold { background: var(--gold); color: #140b0d; font-weight: 800; box-shadow: inset 0 -4px 0 rgba(0,0,0,.22), inset 0 3px 0 rgba(255,255,255,.3); }
.btn-gold:hover { background: var(--gold-l); color: #140b0d; }
.cta-row { align-items: center; }
.local-time { margin: 14px 0 0; font-size: 0.82rem; color: var(--muted); min-height: 1.3em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }
.hero-spacer { flex: 1; min-height: 400px; }
.float { position: absolute; z-index: 1; padding: 14px 16px; width: 210px; background: rgba(33, 20, 24, .78); backdrop-filter: blur(6px); }
.float b { display: block; font-family: var(--font-px); font-size: 0.8rem; color: var(--gold); margin-bottom: 4px; }
.float span { font-size: 0.85rem; color: var(--muted); }
.float-l { left: max(var(--gutter), calc(50% - 560px)); bottom: 15%; }
.float-r { right: max(var(--gutter), calc(50% - 560px)); bottom: 22%; }
.heartbeat { animation: beat 2.4s var(--ease) infinite; transform-origin: center; }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.12); } 24% { transform: scale(1); } 36% { transform: scale(1.07); } 50% { transform: scale(1); } }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- Status bar ---------- */
.statusbar { padding-block: 0; margin-top: -30px; z-index: 2; }
.status-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding: 18px 22px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.9rem; padding: 6px 12px; background: rgba(255,255,255,.06); }
.badge i { width: 10px; height: 10px; background: var(--muted); }
.badge.on i { background: #4ade80; }
.badge.off i { background: var(--red-l); }
.status-card .addr { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--gold); font-size: 0.95rem; }
.status-card .grow { flex: 1; }
#players { font-weight: 700; }

/* ---------- Features bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cell { padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 10px; }
.cell h3 { font-size: 1.1rem; }
.cell p { color: var(--muted); margin: 0; }
.cell .big { font-family: var(--font-px); font-size: clamp(2rem, 5vw, 3rem); color: var(--gold); line-height: 1; }
.c-hearts { grid-column: span 4; grid-row: span 2; justify-content: space-between; }
.c-abil { grid-column: span 2; grid-row: span 2; }
.c-border { grid-column: span 2; }
.c-grace { grid-column: span 2; }
.c-log { grid-column: span 2; }
.c-cross { grid-column: span 6; flex-direction: row; align-items: center; gap: 28px; flex-wrap: wrap; }
.hearts-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.hearts-row svg { width: 38px; height: 34px; }
.hearts-row .lost { opacity: 0.28; filter: grayscale(1); }
.hearts-row .stolen { animation: lose 3.2s var(--ease) infinite; }
@keyframes lose { 0%, 60% { transform: none; opacity: 1; } 75% { transform: translateY(-8px) scale(1.15); } 100% { transform: none; opacity: 1; } }
.ability-peek { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: auto; padding-top: 12px; }
.ability-peek svg { width: 100%; height: auto; aspect-ratio: 1; background: rgba(0,0,0,.25); padding: 6px; }
.cross-pair { display: flex; gap: 12px; flex: none; }
.chip { font-family: var(--font-px); font-size: 0.85rem; padding: 10px 16px; background: rgba(246,201,69,.1); color: var(--gold); box-shadow: inset 0 0 0 2px var(--line); }
.chip.red { background: rgba(196,32,42,.18); color: var(--red-l); box-shadow: inset 0 0 0 2px rgba(255,90,99,.4); }
.cross-text { flex: 1 1 320px; }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.slot { aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--muted); font-size: 0.85rem;
  background: var(--bg-2); border: 2px dashed var(--line); }
.slot b { display: block; font-family: var(--font-px); font-size: 0.8rem; color: var(--gold); margin-bottom: 4px; }

/* ---------- Abilities ---------- */
.abilities { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ability { padding: 22px 16px 18px; text-align: center; cursor: pointer; min-height: 190px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ability svg { width: 64px; height: 64px; transition: transform 0.4s var(--ease); }
.ability:hover svg, .ability:focus-visible svg { transform: translateY(-4px) scale(1.08); }
.ability h3 { font-size: 0.9rem; }
.ability p { margin: 0; font-size: 0.85rem; color: var(--muted); opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.4s var(--ease); }
.ability:hover p, .ability:focus-visible p, .ability:focus-within p { opacity: 1; transform: none; }
.ability.locked { cursor: not-allowed; background: var(--bg-2); --c: rgba(246,201,69,.16); }
.ability.locked h3 { color: var(--muted); font-size: 0.78rem; }
.ability.locked svg { opacity: 0.55; }
.reroll-note { margin-top: 28px; display: flex; gap: 14px; align-items: center; padding: 18px 22px; max-width: 720px; }
.reroll-note svg { width: 30px; height: 30px; flex: none; }
.reroll-note p { margin: 0; }
@media (hover: none) { .ability p { opacity: 1; transform: none; } }

/* ---------- Border ---------- */
.border-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: center; }
.border-art { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; margin-inline: auto; background:
  linear-gradient(rgba(246,201,69,.06) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(246,201,69,.06) 1px, transparent 1px) 0 0 / 24px 24px, var(--bg-2); border: 2px solid var(--line); }
.ring { position: absolute; left: 50%; top: 50%; border: 3px solid rgba(246,201,69,.3); transform: translate(-50%, -50%); transition: border-color 0.6s var(--ease), box-shadow 0.6s var(--ease), background 0.6s; }
.ring.on { border-color: var(--gold); background: rgba(196,32,42,.12); }
.ring.past { border-color: rgba(246,201,69,.6); }
.ring-lab { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-family: var(--font-px); font-size: 0.65rem; color: var(--gold); white-space: nowrap; }
.center-dot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; transform: translate(-50%,-50%); background: var(--red-l); }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; position: relative; }
.step { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding-bottom: 28px; position: relative; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 23px; top: 40px; bottom: -2px; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step-dot { width: 48px; height: 40px; display: grid; place-items: center; font-family: var(--font-px); font-size: 0.8rem; color: var(--bg); background: var(--gold-d); transition: background 0.4s; z-index: 1; }
.step.on .step-dot { background: var(--gold); }
.step b { font-family: var(--font-px); font-size: 1.3rem; color: var(--text); display: block; line-height: 1.2; }
.step span { color: var(--muted); font-size: 0.9rem; }
.border-foot { margin-top: 28px; color: var(--muted); }

/* ---------- Coins & ranks ---------- */
.earn { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 28px; }
.earn .cell { min-height: 0; }
.earn .big { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.ranks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.rank { padding: 26px 20px 22px; text-align: center; align-items: center; }
.rank svg { width: 88px; height: 88px; }
.rank .price { font-family: var(--font-px); font-size: 1.5rem; color: var(--gold); display: flex; align-items: center; gap: 8px; justify-content: center; }
.rank .price svg { width: 22px; height: 20px; }
.rank .perk { font-size: 0.85rem; color: var(--muted); }
.rank.founder { --c: var(--red-l); background: #2a1216; border-image: linear-gradient(135deg, var(--red-l), var(--gold)) 1; }
.founder-tag { font-family: var(--font-px); font-weight: 700; font-size: 1.15rem; color: var(--red-l); }
.nopay { margin-top: 24px; font-weight: 600; color: var(--text); }
.nopay b { color: var(--gold); }

/* ---------- Join ---------- */
.tabs { max-width: 820px; }
.tablist { display: flex; gap: 8px; margin-bottom: -2px; position: relative; z-index: 1; }
.tab { font: 700 0.95rem var(--font-body); padding: 14px 24px; background: var(--bg-2); color: var(--muted); border: 2px solid var(--line); border-bottom: 0; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--panel); color: var(--gold); border-color: var(--line-hi); }
.tabpanel { padding: 28px 24px; background: var(--panel); border: 2px solid var(--line-hi); }
.tabpanel[hidden] { display: none; }
.steps { margin: 0 0 24px; padding-left: 22px; }
.steps li { margin-bottom: 10px; padding-left: 4px; }
.steps li::marker { color: var(--gold); font-weight: 800; }
.copyfield { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); margin-top: 10px; }
.copyfield .lab { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; min-width: 70px; }
.copyfield code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--gold); font-size: 1.05rem; flex: 1 1 160px; }
.note { margin-top: 20px; padding: 14px 16px; background: rgba(196,32,42,.12); box-shadow: inset 0 0 0 2px rgba(255,90,99,.3); font-size: 0.92rem; }

/* ---------- Vote ---------- */
.vote-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.vote-list a { justify-content: space-between; text-align: left; }
.vote-list a span:first-child { flex: 1; }
.vote-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.vote-how .cell { min-height: 0; }

/* ---------- Rules ---------- */
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 820px; counter-reset: r; }
.rules li { padding: 16px 20px 16px 62px; position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rules li::before { content: ""; position: absolute; left: 20px; top: 20px; width: 22px; height: 20px; background: var(--gold); clip-path: polygon(10% 0, 40% 0, 50% 14%, 60% 0, 90% 0, 100% 30%, 100% 50%, 50% 100%, 0 50%, 0 30%); }
.editme { font-size: 0.7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; background: rgba(255,90,99,.16); color: var(--red-l); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; display: grid; gap: 10px; }
.faq details { background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 20px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-family: var(--font-px); color: var(--gold); font-size: 1.3rem; }
.faq details[open] summary::after { content: "-"; }
.faq details[open] { box-shadow: inset 0 0 0 2px var(--line-hi); }
.faq .ans { padding: 0 20px 20px; color: var(--muted); }
.faq summary:hover { color: var(--gold); }

/* ---------- Community ---------- */
.community { padding-block: 0 80px; }
.banner { position: relative; overflow: hidden; min-height: 360px; display: flex; align-items: center; isolation: isolate; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; z-index: -1; }
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20,11,13,.95) 0%, rgba(20,11,13,.75) 45%, rgba(20,11,13,0) 80%); }
.banner-copy { padding: 44px 32px; max-width: 540px; }
.banner h2 { margin-bottom: 14px; }
.banner p { color: var(--text); margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 2px solid rgba(246,201,69,.14); padding-block: 44px 56px; background: var(--bg-2); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot h3 { font-size: 0.85rem; margin-bottom: 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .brand { margin-bottom: 14px; }
.legal { margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(246,201,69,.12); color: var(--muted); font-size: 0.85rem; }

/* ---------- Sub pages ---------- */
.page-top { padding-block: 64px 24px; }
.page-top h1 { font-size: clamp(1.8rem, 6vw, 3.2rem); color: var(--gold); margin-bottom: 18px; }
.page-body { padding-top: 24px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--gold); color: #140b0d; font-weight: 800; padding: 12px 22px; z-index: 90; pointer-events: none; transition: opacity .25s, transform .35s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .abilities { grid-template-columns: repeat(3, 1fr); }
  .ranks { grid-template-columns: repeat(2, 1fr); }
  .vote-list, .vote-how { grid-template-columns: repeat(2, 1fr); }
  .float { display: none; }
  .border-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .menu-btn { display: grid; }
  .nav { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 18px; display: none; margin: 0; pointer-events: auto; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid rgba(246,201,69,.1); }
  .nav a:not(.btn)::after { left: 4px; right: auto; width: 28px; bottom: 8px; }
  .nav .btn { margin: 10px 0 0; }
  .brand span { font-size: 1.45rem; }
}
@media (max-width: 720px) {
  section { padding-block: 56px; }
  .bento { grid-template-columns: 1fr; }
  .c-hearts, .c-abil, .c-border, .c-grace, .c-log, .c-cross { grid-column: auto; grid-row: auto; }
  .shots { grid-template-columns: 1fr; }
  .earn { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
  .hero-art { inset: auto; left: 50%; bottom: 0; width: 200%; max-width: none; height: 480px; transform: translateX(-50%); object-position: 50% 50%; }
  .hero-spacer { min-height: 300px; }
  .hero-3d { height: 460px; }
  .banner::after { background: linear-gradient(0deg, rgba(20,11,13,.95) 0%, rgba(20,11,13,.7) 70%, rgba(20,11,13,.3) 100%); }
  .banner { align-items: flex-end; }
  .stepper-wrap { order: 2; }
}
@media (max-width: 520px) {
  .abilities { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ability { min-height: 170px; padding-inline: 10px; }
  .ranks, .vote-list, .vote-how { grid-template-columns: 1fr; }
  .cd-unit { min-width: 0; flex: 1; }
  .countdown { width: 100%; gap: 8px; }
  .cta-row .btn { flex: 1 1 100%; }
  .hearts-row svg { width: 30px; height: 27px; }
  .tab { padding: 12px 18px; }
  .tabpanel { padding: 22px 16px; }
}

/* ---------- Ability detail: the wall dissolves, the chosen ability opens up ---------- */
.ability.shake { animation: ab-shake 0.4s var(--ease); }
@keyframes ab-shake { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }
.is-leaving .ability:not(.sel) { animation: ab-out 0.55s var(--ease) var(--d, 0ms) forwards; pointer-events: none; }
@keyframes ab-out { to { opacity: 0; transform: translateY(26px) scale(0.55) rotate(var(--r, 0deg)); filter: blur(6px); } }
.is-leaving .ability.sel { animation: ab-sel 0.5s var(--ease) forwards; pointer-events: none; }
@keyframes ab-sel { to { transform: scale(1.08); box-shadow: inset 0 0 44px rgba(246, 201, 69, 0.28); } }
.is-returning .ability { animation: ab-in 0.55s var(--ease) both; }
.is-returning .ability:nth-child(3n + 2) { animation-delay: 60ms; }
.is-returning .ability:nth-child(3n) { animation-delay: 120ms; }
@keyframes ab-in { from { opacity: 0; transform: translateY(20px) scale(0.9); } }
.ability-stage { scroll-margin-top: 100px; }
.ab-detail { display: grid; gap: 30px; animation: ab-detail-in 0.6s var(--ease) both; }
@keyframes ab-detail-in { from { opacity: 0; } }
.ab-back { justify-self: start; }
.ab-hero { display: flex; gap: 32px; align-items: center; }
.ab-big { width: clamp(96px, 18vw, 168px); flex: none; }
.ab-big svg { width: 100%; height: auto; }
.ab-name { font-size: clamp(2rem, 6vw, 3.4rem); color: var(--gold); margin-bottom: 14px; }
.ab-desc { color: var(--text); font-size: 1.15rem; max-width: 56ch; margin: 0; }
.ab-levels { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; }
.lvl { padding: 22px 20px 26px; animation: lvl-in 0.6s var(--ease) both; animation-delay: calc(0.25s + var(--k, 0) * 120ms); }
@keyframes lvl-in { from { opacity: 0; transform: translateY(30px); } }
.lvl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.lvl-tag { font-family: var(--font-px); font-weight: 700; font-size: 1rem; color: var(--gold); }
.pips { display: flex; gap: 6px; }
.pips i { width: 14px; height: 14px; background: rgba(246, 201, 69, 0.18); }
.pips i.on { background: var(--gold); }
.lvl p { margin: 0; color: var(--muted); }
.lvl-stats { margin: 0; display: grid; gap: 12px; }
.lvl-stats div { display: grid; gap: 2px; }
.lvl-stats dt { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lvl-stats dd { margin: 0; font-weight: 700; color: var(--text); font-size: 1.05rem; }
.lvl-note { margin-top: 14px !important; color: var(--gold) !important; font-weight: 600; }
.ab-cast { display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 8px 14px; background: rgba(246,201,69,.1); box-shadow: inset 0 0 0 2px var(--line); }
.ab-cast span { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ab-cast b { color: var(--gold); }
.ab-note { margin: 12px 0 0; color: var(--muted); font-size: 0.95rem; }
.ability p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
::view-transition-group(ab-icon) { animation-duration: 0.6s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }
@media (max-width: 720px) {
  .ab-hero { flex-direction: column; align-items: flex-start; gap: 18px; }
  .ab-levels { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #embers { display: none; }
}

.ab-group { grid-column: 1 / -1; font-family: var(--font-px); font-weight: 700; font-size: 0.95rem; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 14px; padding-top: 8px; }
.ab-group::after { content: ""; flex: 1; height: 3px; background: var(--line); }
.ab-group:not(:first-child) { margin-top: 18px; }
.ab-kind { display: inline-block; margin-bottom: 10px; padding: 4px 10px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bg); background: var(--gold); }
.ab-foot { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- Ability cards, take two: an inventory slot, a readable line, a clear way in ---------- */
.ability { min-height: 0; padding: 20px 16px 16px; gap: 10px; text-align: center; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.ability:hover, .ability:focus-visible { transform: translateY(-5px); box-shadow: inset 0 0 48px rgba(246, 201, 69, 0.12); }
.ability::before { content: ""; position: absolute; top: 10px; left: 10px; width: 8px; height: 8px; background: var(--gold); opacity: 0.85; }
.ability[data-kind="active"]::before { background: var(--red-l); }
.ab-plate { position: relative; display: grid; place-items: center; width: 92px; height: 92px; margin-bottom: 4px; --notch: 5px;
  background: radial-gradient(circle at 50% 38%, #3a1d22 0%, #1a0f12 72%); box-shadow: inset 0 0 0 2px var(--line), inset 0 -10px 0 rgba(0, 0, 0, 0.22);
  clip-path: polygon(0 var(--notch), var(--notch) var(--notch), var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch))); transition: box-shadow 0.35s var(--ease), background 0.35s; }
.ab-plate::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 12px; height: 6px; background: rgba(0, 0, 0, 0.45); border-radius: 0; }
.ability:hover .ab-plate, .ability:focus-visible .ab-plate { box-shadow: inset 0 0 0 2px var(--line-hi), inset 0 -10px 0 rgba(0, 0, 0, 0.22); background: radial-gradient(circle at 50% 38%, #5a2a1e 0%, #1a0f12 75%); }
.ab-ico { position: relative; z-index: 1; display: block; width: 56px; height: 56px; }
.ab-ico svg { width: 100%; height: 100%; transition: transform 0.4s var(--ease); }
.ability:hover .ab-ico svg, .ability:focus-visible .ab-ico svg { transform: translateY(-3px) scale(1.1); }
.ability h3 { font-size: 0.95rem; letter-spacing: 0.04em; }
.ability p { opacity: 1; transform: none; font-size: 0.86rem; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.9em; }
.ab-open { margin-top: auto; padding-top: 6px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); opacity: 0.55; transition: opacity 0.3s; }
.ab-open i { display: inline-block; font-style: normal; transition: transform 0.3s var(--ease); }
.ability:hover .ab-open, .ability:focus-visible .ab-open { opacity: 1; }
.ability:hover .ab-open i, .ability:focus-visible .ab-open i { transform: translateX(4px); }
@media (max-width: 520px) {
  .ab-plate { width: 76px; height: 76px; }
  .ab-ico { width: 46px; height: 46px; }
  .ability p { font-size: 0.8rem; }
}

/* ================= Abilities: colour per ability, how-it-works strip, compare table ================= */
.ab-info { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 26px; padding: 0; }
.ab-info li { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.ab-info b { color: var(--gold); font-size: 0.95rem; }
.ab-info span { color: var(--text); font-size: 0.9rem; line-height: 1.45; }
.ab-group small { font-family: var(--font-body); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 0.88rem; margin-left: 2px; }
.ability { --ac: var(--gold); }
.ability h3 { color: var(--ac); }
.ability::before, .ability[data-kind="active"]::before { background: var(--ac); }
.ab-plate { background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--ac, #f6c945) 14%, #2a1519) 0%, #1a0f12 72%); }
.ability:hover, .ability:focus-visible { box-shadow: inset 0 0 52px color-mix(in srgb, var(--ac) 16%, transparent); }
.ability:hover .ab-plate, .ability:focus-visible .ab-plate { background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--ac) 34%, #1a0f12) 0%, #1a0f12 78%); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ac) 75%, transparent), inset 0 -10px 0 rgba(0, 0, 0, 0.22); }
.ab-open { color: var(--ac); }
.ab-detail .ab-name { color: var(--ac, var(--gold)); }
.ab-detail .ab-kind { background: var(--ac, var(--gold)); }
.ab-detail .lvl-tag { color: var(--ac, var(--gold)); }
.ab-detail .pips i.on { background: var(--ac, var(--gold)); }
.ab-detail .ab-cast b { color: var(--ac, var(--gold)); }
@media (max-width: 980px) { .ab-info { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ab-info { grid-template-columns: 1fr; } }

/* ================= The rest of the cards ================= */
.cell { background: linear-gradient(180deg, #2a1a21 0%, var(--panel) 42%); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.cell::before { content: ""; position: absolute; top: 10px; left: 10px; width: 6px; height: 6px; background: var(--gold); opacity: 0.8; }
.cell:hover { transform: translateY(-3px); box-shadow: inset 0 0 44px rgba(246, 201, 69, 0.1); }
.cell h3 { letter-spacing: 0.03em; }
.cell.c-border::before, .cell.c-log::before { background: var(--gold); }
.c-hearts { background: linear-gradient(135deg, #3a1a20 0%, #261820 40%, var(--panel) 100%); }
.c-hearts .lede { font-size: clamp(1.05rem, 2vw, 1.3rem); }
.c-abil .ability-peek svg { background: radial-gradient(circle at 50% 40%, #3a1d22, #1a0f12 75%); box-shadow: inset 0 0 0 2px var(--line); }
.c-cross { background: linear-gradient(90deg, rgba(196, 32, 42, 0.14), rgba(246, 201, 69, 0.08) 60%, var(--panel)); }
.earn .cell { padding-top: 30px; }
.earn .big { display: inline-block; align-self: flex-start; padding: 6px 12px 4px; background: rgba(246, 201, 69, 0.1); box-shadow: inset 0 0 0 2px var(--line); }
.vote-how .cell h3 { color: var(--gold); }
.vote-how .cell { align-items: flex-start; }
.vote-list a { min-height: 56px; }
.rules li { background: linear-gradient(90deg, #2a1a21, var(--panel) 40%); }
.status-card { background: linear-gradient(90deg, #2a1a21, var(--panel) 50%); }

/* Ranks: helmets sit in inventory slots, prices read as a coin chip */
.rank { padding-top: 28px; gap: 12px; }
.rank .ab-plate { width: 116px; height: 116px; }
.rank .ab-ico { width: 78px; height: 78px; }
.rank .ab-ico svg { width: 100%; height: 100%; transition: transform 0.4s var(--ease); }
.rank:hover .ab-ico svg { transform: translateY(-3px) scale(1.08); }
.rank .price { display: inline-flex; align-items: baseline; justify-content: center; gap: 8px; padding: 8px 14px; background: rgba(246, 201, 69, 0.1); box-shadow: inset 0 0 0 2px var(--line); }
.rank .price .coin { display: block; width: 20px; height: 18px; align-self: center; }
.rank .price .coin svg { width: 100%; height: 100%; }
.rank .price b { font-family: var(--font-px); font-size: 1.45rem; color: var(--gold); line-height: 1; }
.rank .price small { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.rank[data-rank="gold"] .ab-plate { background: radial-gradient(circle at 50% 38%, #4a3510 0%, #1a0f12 75%); }
.rank[data-rank="netherite"] .ab-plate { background: radial-gradient(circle at 50% 38%, #3a2f36 0%, #1a0f12 75%); }
.rank[data-rank="iron"] .ab-plate { background: radial-gradient(circle at 50% 38%, #36363d 0%, #1a0f12 75%); }
.rank.founder .ab-plate { background: radial-gradient(circle at 50% 38%, #5a1218 0%, #1a0f12 75%); box-shadow: inset 0 0 0 2px rgba(255, 90, 99, 0.5), inset 0 -10px 0 rgba(0, 0, 0, 0.22); }
.rank.founder::before { background: var(--red-l); }
.rank.founder .founder-tag { font-size: 1.2rem; }

/* ================= Feature cards, take two ================= */
.bento { gap: 18px; }
.c-hearts .hearts-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; max-width: 100%; margin: 14px 0 18px; }
.c-hearts .hearts-row > span { display: block; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.35)); }
.c-hearts .hearts-row svg { width: 100%; height: auto; }
.c-hearts h3 { font-size: clamp(1.2rem, 2.6vw, 1.7rem); }
.c-hearts .lede { color: var(--text); max-width: 46ch; margin: 0; }
.num { color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }

/* border: five nested squares that light up outward */
.mini-border { position: relative; width: 92px; height: 92px; flex: none; margin-bottom: 4px; }
.mini-border i { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 3px solid var(--gold-d); background: transparent; animation: ring-glow 4s steps(1) infinite; }
.mini-border i:nth-child(1) { width: 18%; height: 18%; background: var(--red-l); border-color: var(--red-l); animation: none; }
.mini-border i:nth-child(2) { width: 36%; height: 36%; animation-delay: 0s; }
.mini-border i:nth-child(3) { width: 55%; height: 55%; animation-delay: 0.6s; }
.mini-border i:nth-child(4) { width: 77%; height: 77%; animation-delay: 1.2s; }
.mini-border i:nth-child(5) { width: 100%; height: 100%; animation-delay: 1.8s; }
@keyframes ring-glow { 0%, 12% { border-color: var(--gold); } 24%, 100% { border-color: var(--gold-d); } }

/* grace: twelve blocks that tick off like a timer */
.segbar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-bottom: 8px; }
.segbar i { height: 22px; background: var(--gold); animation: seg-tick 6s steps(1) infinite; animation-delay: calc(var(--n, 0) * 0.35s); }
.segbar i:nth-child(1) { --n: 11; } .segbar i:nth-child(2) { --n: 10; } .segbar i:nth-child(3) { --n: 9; } .segbar i:nth-child(4) { --n: 8; }
.segbar i:nth-child(5) { --n: 7; } .segbar i:nth-child(6) { --n: 6; } .segbar i:nth-child(7) { --n: 5; } .segbar i:nth-child(8) { --n: 4; }
.segbar i:nth-child(9) { --n: 3; } .segbar i:nth-child(10) { --n: 2; } .segbar i:nth-child(11) { --n: 1; } .segbar i:nth-child(12) { --n: 0; }
@keyframes seg-tick { 0%, 60% { background: var(--gold); } 70%, 100% { background: rgba(246, 201, 69, 0.16); } }

/* combat log: log out, then the skull */
.flow { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.flow .arr { font-family: var(--font-px); color: var(--red-l); font-size: 1.4rem; }
.flow .ab-plate { width: 76px; height: 76px; margin: 0; background: radial-gradient(circle at 50% 38%, #5a1218 0%, #1a0f12 75%); }
.flow .ab-ico { width: 46px; height: 46px; }

/* crossplay: two platform plates joined by a plus */
.cross-pair { display: flex; align-items: center; gap: 12px; flex: none; }
.plat { display: grid; place-items: center; width: 108px; height: 76px; font-family: var(--font-px); font-weight: 700; font-size: 0.95rem; --notch: 5px;
  clip-path: polygon(0 var(--notch), var(--notch) var(--notch), var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch))); }
.plat-j { background: radial-gradient(circle at 50% 38%, #4a3510 0%, #1a0f12 75%); color: var(--gold); box-shadow: inset 0 0 0 2px var(--line-hi); }
.plat-b { background: radial-gradient(circle at 50% 38%, #5a1218 0%, #1a0f12 75%); color: var(--red-l); box-shadow: inset 0 0 0 2px rgba(255, 90, 99, 0.5); }
.cross-pair .plus { font-family: var(--font-px); color: var(--gold); font-size: 1.6rem; }
.c-cross { gap: 32px; }
@media (max-width: 720px) { .c-hearts .hearts-row { gap: 6px; } .plat { width: 92px; height: 66px; } }

/* ================= Ranks: Minecraft helmets with the enchant glint, and the detail view ================= */
.mc-item { display: block; width: 100%; height: 100%; image-rendering: pixelated; filter: drop-shadow(0 0 6px rgba(160, 90, 255, 0.55)); }
.rank { cursor: pointer; }
.rank:hover, .rank:focus-visible { transform: translateY(-5px); }
.rank .ab-open { color: var(--gold); }
.rank .perk { font-size: 0.86rem; color: var(--muted); min-height: 2.6em; }
.rank .price.free b { font-size: 1.1rem; color: var(--red-l); }
.rank.founder .ab-open { color: var(--red-l); }
.is-leaving .rank:not(.sel) { animation: ab-out 0.55s var(--ease) var(--d, 0ms) forwards; pointer-events: none; }
.is-leaving .rank.sel { animation: ab-sel 0.5s var(--ease) forwards; pointer-events: none; }
.is-returning .rank { animation: ab-in 0.55s var(--ease) both; }
.is-returning .rank:nth-child(2) { animation-delay: 60ms; }
.is-returning .rank:nth-child(3) { animation-delay: 120ms; }
.is-returning .rank:nth-child(4) { animation-delay: 180ms; }
.rank-stage { scroll-margin-top: 100px; }
.rk-big { width: clamp(110px, 20vw, 170px); height: clamp(110px, 20vw, 170px); display: block; flex: none; }
.rk-chat { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0 0; }
.rk-chat span { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.chatline { padding: 8px 14px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 2px var(--line); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1rem; font-weight: 600; }
.chatline i { font-style: normal; color: var(--text); }
.chatline em { font-style: normal; }
.rk-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rk-col { padding: 22px 22px 24px; background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); animation: lvl-in 0.6s var(--ease) both; animation-delay: 0.25s; }
.rk-col:nth-child(2) { animation-delay: 0.37s; }
.rk-col h4 { margin: 0 0 14px; font-family: var(--font-px); font-size: 1rem; color: var(--ac, var(--gold)); }
.rk-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rk-col li { position: relative; padding-left: 20px; color: var(--text); }
.rk-col li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; background: var(--ac, var(--gold)); }
.rk-col li.muted { color: var(--muted); }
.rk-col li.cmd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-left: 20px; }
.rk-col li.cmd-row span { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.rk-col code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.95rem; padding: 4px 10px; background: rgba(246, 201, 69, 0.1); color: var(--gold); box-shadow: inset 0 0 0 2px var(--line); }
.rk-detail .ab-kind { background: var(--ac, var(--gold)); }
@media (max-width: 720px) { .rk-cols { grid-template-columns: 1fr; } }
.rk-back { justify-self: start; }

/* Rank price: a gold plate that reads first */
.rank .price { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; row-gap: 0; width: 100%; padding: 12px 16px 12px 14px; text-align: left; --notch: 5px;
  background: linear-gradient(180deg, rgba(246, 201, 69, 0.26), rgba(246, 201, 69, 0.08)); box-shadow: inset 0 0 0 2px var(--gold), inset 0 -6px 0 rgba(0, 0, 0, 0.25);
  clip-path: polygon(0 var(--notch), var(--notch) var(--notch), var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch))); }
.rank .price .coin { grid-row: 1 / span 2; width: 34px; height: 31px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.4)); }
.rank .price b { font-size: clamp(1.9rem, 4vw, 2.3rem); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45); letter-spacing: 0.02em; align-self: end; }
.rank .price small { align-self: start; margin-top: 4px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; color: var(--text); }
.rank .price.free { grid-template-columns: 1fr; text-align: center; background: rgba(255, 90, 99, 0.12); box-shadow: inset 0 0 0 2px var(--red-l), inset 0 -6px 0 rgba(0, 0, 0, 0.25); }
.rank h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }

/* ================= Smoother choreography ================= */
@keyframes ab-out { 0% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x, 0), 34px) scale(0.6) rotate(var(--r, 0deg)); filter: blur(8px) saturate(0.4); } }
@keyframes ab-sel {
  0% { transform: none; }
  45% { transform: translateY(-8px) scale(1.07); box-shadow: inset 0 0 60px rgba(246, 201, 69, 0.4), 0 0 0 3px var(--ac, var(--gold)), 0 0 46px color-mix(in srgb, var(--ac, var(--gold)) 55%, transparent); }
  100% { transform: translateY(-4px) scale(1.04); opacity: 0.0; filter: brightness(1.6); box-shadow: 0 0 0 3px var(--ac, var(--gold)), 0 0 70px color-mix(in srgb, var(--ac, var(--gold)) 60%, transparent); }
}
@keyframes ab-in { from { opacity: 0; transform: translateY(28px) scale(0.86); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ab-detail-in { from { opacity: 0; transform: scale(0.97) translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.ab-detail, .rk-detail { animation-duration: 0.7s; position: relative; }
.ab-detail::before, .rk-detail::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; transform-origin: left; background: var(--ac, var(--gold));
  box-shadow: 0 0 22px var(--ac, var(--gold)); animation: det-sweep 0.9s var(--ease) both; }
@keyframes det-sweep { from { transform: scaleX(0); opacity: 1; } 70% { opacity: 1; } to { transform: scaleX(1); opacity: 0; } }
.ab-hero > *, .rk-hero > * { animation: hero-rise 0.65s var(--ease) both; }
.ab-hero > :nth-child(2), .rk-hero > :nth-child(2) { animation-delay: 0.12s; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(22px); } }
.ab-big, .rk-big { animation: hero-pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both !important; }
@keyframes hero-pop { from { opacity: 0; transform: scale(0.4) rotate(-12deg); } }
@media (prefers-reduced-motion: reduce) { .ab-detail::before, .rk-detail::before { display: none; } .ab-detail, .rk-detail, .ab-hero > *, .rk-hero > *, .ab-big, .rk-big { animation: none !important; } }

/* ================= Ability cards, same finish as ranks ================= */
.ability { padding: 28px 16px 16px; gap: 12px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ac) 14%, #2a1a21) 0%, var(--panel) 46%); }
.ability::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--ac); opacity: 0.85; box-shadow: 0 0 18px var(--ac); transition: opacity 0.3s; }
.ability:hover::after, .ability:focus-visible::after { opacity: 1; }
.ability .ab-plate { width: 108px; height: 108px; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ac) 45%, transparent), inset 0 -8px 0 rgba(0, 0, 0, 0.25); }
.ability .ab-ico { width: 70px; height: 70px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--ac) 55%, transparent)); }
.ability h3 { font-size: 1.05rem; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4); }
.ab-chip { padding: 4px 12px 3px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); --notch: 3px;
  background: color-mix(in srgb, var(--ac) 22%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ac) 80%, transparent);
  clip-path: polygon(0 var(--notch), var(--notch) var(--notch), var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch))); }
.ability p { color: var(--text); opacity: 0.85; min-height: 3.9em; }
.ability .ab-open { opacity: 0.9; padding-top: 4px; }
.ability:hover { transform: translateY(-6px); box-shadow: inset 0 0 60px color-mix(in srgb, var(--ac) 22%, transparent), 0 14px 0 -8px rgba(0, 0, 0, 0.35); }
.ability:hover .ab-plate { transform: scale(1.04); }
.ab-plate { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s; }

/* Ability items: enchanted Minecraft items, glow in the ability colour */
.ability .mc-item, .ab-big .mc-item { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--ac, #a05aff) 70%, transparent)); }
.ab-big { width: clamp(96px, 18vw, 168px); height: clamp(96px, 18vw, 168px); }
.ab-big .mc-item { width: 100%; height: 100%; }

/* Feature card: enchanted items that link to the abilities */
.ability-peek { gap: 10px; }
.peek-item { display: grid; place-items: center; aspect-ratio: 1; padding: 12%; --notch: 4px; text-decoration: none; cursor: pointer;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--ac, #f6c945) 16%, #2a1519) 0%, #1a0f12 74%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ac, #f6c945) 45%, transparent), inset 0 -6px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.peek-item .mc-item { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--ac, #a05aff) 70%, transparent)); transition: transform 0.3s var(--ease); }
.peek-item:hover, .peek-item:focus-visible { transform: translateY(-4px); box-shadow: inset 0 0 0 2px var(--ac), inset 0 -6px 0 rgba(0, 0, 0, 0.25), 0 0 22px color-mix(in srgb, var(--ac) 50%, transparent); outline: none; }
.peek-item:hover .mc-item, .peek-item:focus-visible .mc-item { transform: scale(1.1); }

/* In the detail view the how-it-works strip steps aside, so the heading and the ability fit on screen together */
#abilities:has(.ability-stage.is-detail) .ab-info { display: none; }

/* ================= Crafting recipes ================= */
.crafts { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 0; padding: 0; }
.craft { --ac: var(--gold); display: grid; gap: 22px; padding: 26px 24px 24px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ac) 12%, #2a1a21) 0%, var(--panel) 50%); }
.craft::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--ac); box-shadow: 0 0 18px var(--ac); }
.craft-rec { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 2px var(--line); }
.cslot { display: grid; place-items: center; width: clamp(46px, 7vw, 62px); aspect-ratio: 1; padding: 7px; background: #231419; box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.55), inset -2px -2px 0 rgba(255, 255, 255, 0.07); }
.cslot svg, .cslot .mc-item { width: 100%; height: 100%; filter: none; }
.cslot.special { box-shadow: inset 0 0 0 2px #d15bd1, inset 2px 2px 0 rgba(0, 0, 0, 0.4); }
.cslot.result { width: clamp(64px, 10vw, 86px); padding: 10px; background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--ac) 28%, #2a1519) 0%, #1a0f12 78%); box-shadow: inset 0 0 0 2px var(--ac), 0 0 24px color-mix(in srgb, var(--ac) 40%, transparent); }
.cslot.result .mc-item { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--ac) 70%, transparent)); }
.carrow { font-family: var(--font-px); color: var(--ac); font-size: 2rem; line-height: 1; }
.craft-txt h3 { color: var(--ac); font-size: 1.25rem; margin-bottom: 10px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4); }
.craft-txt p { margin: 0 0 8px; color: var(--text); }
.craft-note { color: var(--muted) !important; font-size: 0.92rem; }
.craft-foot { margin-top: 22px; max-width: 78ch; }
@media (max-width: 900px) { .crafts { grid-template-columns: 1fr; } }

/* Nav: eight links plus two buttons need to stay on one line */
.nav .btn { white-space: nowrap; }
@media (min-width: 861px) and (max-width: 1180px) {
  .nav a:not(.btn) { padding: 12px 7px; font-size: 0.86rem; }
  .nav a:not(.btn)::after { left: 7px; right: 7px; }
  .nav .btn { margin-left: 3px; padding-inline: 12px; }
}

/* Feature cards: the whole card is a link to its section */
.bento .cell { position: relative; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 3px solid var(--gold); outline-offset: -3px; }
.bento .cell { cursor: pointer; }
.bento .peek-item { position: relative; z-index: 2; }

/* Combat logging: fight, log out, die */
.flow { gap: 10px; }
.flow .cslot { width: 58px; flex: none; }
.flow .cslot.dead { background: radial-gradient(circle at 50% 38%, #5a1218 0%, #1a0f12 78%); box-shadow: inset 0 0 0 2px rgba(255, 90, 99, 0.6); }
.flow .arr { font-size: 1.2rem; }

/* Custom recipes card: the four results in a row */
.craft-peek { display: flex; gap: 10px; margin-bottom: 8px; position: relative; z-index: 0; }
.craft-peek .cslot { width: 58px; flex: none; }
.craft-peek .cslot.result { padding: 8px; }
.c-craft p { margin: 0; }
.craft-peek .cpk { display: block; flex: none; }

/* Item tooltip */
.tip { --notch: 4px; --tc: var(--gold); position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; max-width: 240px; padding: 9px 14px 8px;
  font-family: var(--font-px); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tc); white-space: nowrap;
  background: #140b0d; box-shadow: inset 0 0 0 2px var(--tc), inset 0 -4px 0 rgba(0, 0, 0, 0.45), 0 8px 0 -2px rgba(0, 0, 0, 0.4); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
  clip-path: polygon(0 var(--notch), var(--notch) var(--notch), var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch))); }
.tip[hidden] { display: none; }
.craft-peek .cpk { position: relative; z-index: 2; text-decoration: none; }
.craft-peek { aria-hidden: true; }
.craft-peek { z-index: auto; }
.craft-peek { flex-wrap: wrap; } .c-rankcard .craft-peek { gap: 8px; } .c-rankcard .craft-peek .cslot, .c-craft .craft-peek .cslot { width: 52px; }

/* ================= The 3D layer =================
   One fixed, see-through canvas over the page. Only the hero content sits in front of it, so the heart stays
   behind the title and the buttons. When the heart bursts, the gold and the dust fly over the page. */
.fx-3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; }
.hero { perspective: none; isolation: auto; }
.hero-inner { position: relative; z-index: 41; }
.float, .statusbar { z-index: 41; }
