/* read-v2.css — the read pages (rules, banlist, about, changelog, and next proof, claim, burn) on the v2 house style: the
   approved _rules-v2 template. A hero, a contents list that follows you (chips on phones), sections set for reading, notes
   and an end bar. Page blocks follow the kit. */

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.read { max-width: 1180px; margin: 0 auto; padding: 4px var(--pad) 64px; display: grid; grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: start; overflow-x: clip; }
.read [hidden] { display: none !important; }
.read .hero { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: clamp(10px, 3vh, 30px) 0 10px; }
.read .hero h1 { margin: 0; font: 900 clamp(42px, 7vw, 96px)/.92 var(--display); letter-spacing: .02em;
  background: linear-gradient(180deg, #fff 8%, var(--hi) 55%, color-mix(in srgb, var(--c) 85%, #000)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.read .hero p { margin: 14px 0 0; max-width: 34em; }
.read .hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.read .hero .fan { position: relative; width: clamp(130px, 14vw, 190px); aspect-ratio: 813 / 1185; margin-right: 40px; }
.read .hero .fan img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 9px; box-shadow: 0 24px 40px rgba(0,0,0,.55); }
.read .hero .fan img:nth-child(1) { transform: translateX(-38%) rotate(-10deg) scale(.9); }
.read .hero .fan img:nth-child(3) { transform: translateX(38%) rotate(10deg) scale(.9); }
.read .hero .coin { width: clamp(110px, 12vw, 160px); margin-right: 30px; filter: drop-shadow(0 0 40px color-mix(in srgb, var(--c) 60%, transparent)) drop-shadow(0 20px 30px rgba(0,0,0,.6)); }

.toc { position: sticky; top: 84px; display: grid; gap: 2px; padding: 10px; border-radius: 20px; background: rgba(18,16,14,.55); border: 1px solid var(--hair); }
.toc a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color .2s, background .2s; }
.toc a:hover { color: var(--ink); background: var(--glass); }
.toc a.on { color: var(--ink); background: rgba(255,255,255,.08); }
.toc a span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.08); flex: none; }
.toc a.on span { color: #160f03; background: var(--hi); }
.toc .bar { height: 3px; margin: 8px 10px 4px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.toc .bar i { display: block; height: 100%; width: 0; background: var(--hi); }
.toc-phone { display: none; }

.read article { display: grid; gap: clamp(40px, 7vh, 72px); min-width: 0; }
.read.solo { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.read.solo article { gap: clamp(30px, 5vh, 52px); }
.read section { display: grid; gap: 16px; min-width: 0; scroll-margin-top: 90px; }
.read section h2 { margin: 0; }
.read section > p, .read section li { font-size: 17px; line-height: 1.65; color: var(--ink-2); max-width: 66ch; }
.read section > p { margin: 0; }
.read section b { color: var(--ink); }
.read section a:not(.v2-btn):not(.v2-btn-glass):not(.v2-btn-ghost) { color: var(--hi); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--hi) 40%, transparent); text-underline-offset: 3px; }
.read h3.sub { margin: 6px 0 -4px; font-size: 18px; font-weight: 700; color: var(--ink); }
ul.clean { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 66ch; }
ul.clean li { position: relative; padding-left: 22px; }
ul.clean li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--hi); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent); }
.read .note { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-radius: 18px; font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 70ch;
  background: color-mix(in srgb, var(--c) 10%, rgba(255,255,255,.03)); border: 1px solid color-mix(in srgb, var(--hi) 22%, transparent); }
.read .note svg { width: 22px; height: 22px; fill: none; stroke: var(--hi); stroke-width: 1.8; }
.read .end { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px; border-radius: 24px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, transparent), rgba(255,255,255,.03)); border: 1px solid var(--hair); }
.read .end b { font: 900 22px var(--display); }
.read .end .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── rules: ways to win, the field, the turn ── */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.way { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); }
.way img { width: 48px; aspect-ratio: 813 / 1185; object-fit: cover; border-radius: 4px; }
.way b { font-size: 16px; }
.way small { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.matd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 560px; padding: 14px; border-radius: 20px; background: rgba(0,0,0,.3); border: 1px solid var(--hair); }
.matd div { aspect-ratio: 813 / 1185; display: grid; place-items: center; border-radius: 6px; font-size: clamp(8px, 1.5vw, 10.5px); font-weight: 700; text-align: center; color: var(--muted);
  background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); overflow-wrap: anywhere; }
.matd .m { color: #d9ecff; background: rgba(90,167,255,.12); }
.matd .s { color: #d7ffe6; background: rgba(126,226,168,.1); }
.matd .p { color: var(--hi); background: color-mix(in srgb, var(--c) 12%, transparent); }
.phases { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.phase { display: grid; gap: 6px; align-content: start; padding: 12px 10px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); }
.phase span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 800; color: #160f03; background: linear-gradient(180deg, #fff, var(--hi)); }
.phase b { font-size: 14px; }
.phase small { font-size: 13px; line-height: 1.4; color: var(--ink-2); }

/* ── rules: battle, chains, deck limits ── */
.battles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bt { display: grid; gap: 10px; align-content: start; padding: 14px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); }
.bt .vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; text-align: center; }
.bt .vs img { width: 100%; max-width: 76px; aspect-ratio: 813 / 1185; object-fit: cover; border-radius: 5px; justify-self: center; }
.bt .vs img.def { transform: rotate(90deg) scale(.72); }
.bt .vs em { font-style: normal; font: 900 13px var(--display); color: var(--hi); }
.bt .n { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bt p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.speeds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.speed { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); }
.speed b { font-size: 15px; }
.speed small { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.speed i { justify-self: start; padding: 3px 10px; border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 800; color: #160f03; background: var(--sc); }
.chainex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chainex div { display: grid; justify-items: center; gap: 4px; text-align: center; }
.chainex img { width: 62px; aspect-ratio: 813 / 1185; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 2px var(--lc); }
.chainex small { font-size: 11px; font-weight: 800; color: var(--lc); }
.chainex svg { width: 26px; height: 26px; fill: none; stroke: var(--muted); stroke-width: 2; }
.chainex p { margin: 0; flex: 1; min-width: 220px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.limits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.limits div { display: grid; gap: 4px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); }
.limits b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.limits small { font-size: 13px; color: var(--ink-2); }
.ranked { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rk { display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: 22px; border: 1px solid var(--hair); background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); }
.rk b { font: 900 18px var(--display); letter-spacing: .04em; color: var(--rc); }
.rk dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; }
.rk dt { color: var(--muted); }
.rk dd { margin: 0; color: var(--ink); }

/* ── the banlist (rules section and banlist.html) ── */
.banbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.banbar .search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--hair); }
.banbar .search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; }
.banbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: 15px var(--ui, system-ui); }
.banchips { display: flex; flex-wrap: wrap; gap: 8px; }
.banchips span { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; background: rgba(255,255,255,.06); border: 1px solid var(--hair); }
.banchips b { font-size: 16px; font-variant-numeric: tabular-nums; }
.bantiers { display: grid; gap: 22px; }
.tier { display: grid; gap: 10px; }
.tier h3 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 16px; }
.tier h3 i { min-width: 26px; height: 26px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; font-style: normal; font-size: 12px; font-weight: 800; }
.tier h3 small { font-weight: 500; color: var(--muted); }
.bans { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.ban { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px; border-radius: 14px; background: rgba(255,255,255,.04); min-width: 0; }
.ban img { width: 36px; aspect-ratio: 813 / 1185; object-fit: cover; border-radius: 3px; }
.ban > span { display: grid; min-width: 0; }
.ban b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ban small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.bans.big { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px 10px; }
.bans.big .ban { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 6px; align-content: start; text-align: center; }
.bans.big .ban img { width: 100%; border-radius: 6px; box-shadow: 0 6px 16px rgba(0,0,0,.45); }
.bans.big .ban b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12.5px; line-height: 1.3; }
.tier .empty { margin: 0; padding: 14px 16px; border-radius: 16px; font-size: 14px; color: var(--muted); background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.14); }

/* ── about ── */
.letter { display: grid; gap: 12px; padding: clamp(18px, 3vw, 28px); border-radius: 24px; max-width: 70ch;
  background: linear-gradient(165deg, rgba(40,32,18,.75), rgba(16,12,7,.75)); border: 1px solid color-mix(in srgb, var(--hi) 30%, transparent); }
.letter p { margin: 0; font-size: 16.5px; line-height: 1.7; color: var(--ink-2); }
.letter .sign { font-family: var(--display); color: var(--hi); letter-spacing: .04em; }
.wallets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wcard { display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); min-width: 0; }
.wcard b { font: 900 16px var(--display); letter-spacing: .04em; color: var(--hi); }
.wcard small { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.wcard a { justify-self: start; margin-top: 4px; font-size: 13.5px; font-weight: 650; color: var(--hi); }
.wcard code { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mode { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); min-width: 0; }
.mode img { width: 56px; aspect-ratio: 813 / 1185; object-fit: cover; border-radius: 5px; }
.mode b { display: block; margin-bottom: 4px; font-size: 16px; }
.mode p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.who3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.who3 div { display: grid; gap: 4px; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); }
.who3 b { font: 900 17px var(--display); letter-spacing: .04em; color: var(--hi); }
.who3 small { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.event { border-color: color-mix(in srgb, var(--hi) 45%, transparent); background: color-mix(in srgb, var(--c) 14%, rgba(255,255,255,.03)); padding: 18px; border-radius: 22px; }

/* ── changelog ── */
.rels { display: grid; gap: 18px; }
.rel { display: grid; gap: 12px; padding: clamp(18px, 3vw, 26px); border-radius: 24px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); }
.rel.latest { border-color: color-mix(in srgb, var(--hi) 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 12%, transparent), rgba(255,255,255,.02)); }
.rel .ver { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; }
.rel .ver b { font: 900 clamp(22px, 2.6vw, 30px)/1 var(--display); color: var(--hi); }
.rel .ver .tag { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #160f03; background: var(--hi); }
.rel .head { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink); }
.rel ul.clean li { font-size: 16px; }

/* ── proof: the ledger ── */
.figure { display: grid; gap: 8px; padding: clamp(20px, 3vw, 30px); border-radius: 26px; max-width: 680px;
  background: radial-gradient(90% 120% at 20% 0%, rgba(255,140,60,.18), transparent 60%), rgba(255,255,255,.04); border: 1px solid rgba(255,160,80,.3); }
.figure b { font: 900 clamp(38px, 7vw, 76px)/1 var(--display); letter-spacing: .01em; color: #ffd9a8; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.figure span { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.stat { display: grid; gap: 4px; align-content: start; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); min-width: 0; }
.stat b { font-size: clamp(24px, 3vw, 32px); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat small { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.runs { display: grid; gap: 14px; max-width: 760px; }
.run { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; }
.run img { width: 44px; aspect-ratio: 400 / 733; object-fit: cover; border-radius: 5px; }
.run .row { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; margin-bottom: 6px; }
.run .row b { font-size: 15px; }
.run .v2-bar { height: 10px; }
.flow3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.flow3 div { display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); }
.flow3 span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 800; color: #160f03; background: linear-gradient(180deg, #fff, var(--hi)); }
.flow3 b { font-size: 16px; }
.flow3 small { font-size: 14px; line-height: 1.45; color: var(--ink-2); }

/* ── claim and burn: one action card ── */
.action { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; justify-items: start; min-width: 0; padding: clamp(20px, 3vw, 30px); border-radius: 26px; max-width: 580px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid var(--hair); }
/* the hero's h1 rule would make this 96px; the action card's title stays card-sized */
.read .hero .action h1.big { margin: 0; font: 900 clamp(30px, 4.6vw, 52px)/1.02 var(--display); overflow-wrap: anywhere; }
.action p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.action p b { color: var(--ink); }
.action .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.action .msg { font-size: 14.5px; line-height: 1.5; min-height: 1.5em; overflow-wrap: anywhere; }
.action .msg.err { color: var(--bad); }
.action .msg.ok { color: var(--ok); }
.action .msg a { color: var(--hi); text-decoration: underline; }
.amt { display: flex; gap: 8px; width: 100%; }
.amt input { flex: 1 1 0; width: 0; min-width: 0; height: 48px; padding: 0 16px; border-radius: 14px; font: inherit; font-size: 17px; color: var(--ink); background: rgba(0,0,0,.35); border: 1px solid var(--hair); }
.amt input:focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; }
.amt button { flex: none; height: 48px; padding: 0 14px; border-radius: 14px; font-weight: 700; color: var(--ink); background: var(--glass-2); border: 1px solid var(--hair); }
.bal { font-size: 15px; color: var(--ink-2); }
.bal b { color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .flow3 { grid-template-columns: minmax(0, 1fr); } }
@media (orientation: landscape) and (max-height: 500px) { .flow3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (max-width: 900px) {
  .read { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .toc-phone { position: sticky; top: 70px; z-index: 20; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 8px var(--pad);
    background: linear-gradient(180deg, rgba(5,5,5,.9), rgba(5,5,5,.6)); backdrop-filter: blur(14px); }
  .toc-phone::-webkit-scrollbar { display: none; }
  .toc-phone a { flex: none; height: 34px; padding: 0 14px; display: grid; place-items: center; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--glass); border: 1px solid var(--hair); }
  .toc-phone a.on { color: #160f03; background: var(--hi); border-color: transparent; }
  .ways, .battles, .speeds, .wallets, .modes, .who3 { grid-template-columns: minmax(0, 1fr); }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ranked { grid-template-columns: minmax(0, 1fr); }
  .read .hero { grid-template-columns: minmax(0, 1fr); }
  .read .hero .fan { order: -1; margin: 10px auto 0; width: 110px; }
  .read .hero .coin { order: -1; margin: 0 auto; width: 96px; }
  .read section > p, .read section li { font-size: 16px; }
  .bans.big { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
@media (orientation: landscape) and (max-height: 500px) {
  .read .hero { grid-template-columns: minmax(0, 1fr) auto; }
  .read .hero .fan { order: 0; width: 90px; margin: 0 40px 0 0; }
  .read .hero .coin { order: 0; width: 84px; margin: 0 20px 0 0; }
  .read .hero h1 { font-size: 40px; }
  .ways, .battles, .speeds, .wallets, .who3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phases { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .limits { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ranked { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc-phone { top: 60px; }
}
